Eselter

Arcanum UAP2.0PL.iss

Apr 8th, 2020 (edited)
285
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ; Script generated by the Inno Setup Script Wizard.
  2. ; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
  3.  
  4. #define MyAppName "Arcanum UAP2.0PL"
  5. #define MyAppVersion "1.62"
  6.  
  7. #define MyAppPublisher "Eselter"
  8.  
  9. #define BeveledLabel "by Eselter"
  10.  
  11. #define SourceDir "D:\Downloads\Arcanum\Spolszczenie raw UAP2.0"
  12. #define MyAppExeName "Arcanum.exe"
  13.  
  14. [Setup]
  15. ; NOTE: The value of AppId uniquely identifies this application.
  16. ; Do not use the same AppId value in installers for other applications.
  17. ; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
  18. AppId=1207658829
  19. AppName={#MyAppName}
  20. VersionInfoDescription=Spolszczenie Arcanum do wersji UAP2.0
  21. VersionInfoOriginalFileName={#MyAppName}.exe
  22. VersionInfoCopyright={#MyAppPublisher}
  23. VersionInfoVersion=1.6.2.0
  24. AppVersion={#MyAppVersion}
  25. AppVerName={#MyAppName}
  26. AppPublisher={#MyAppPublisher}
  27. ;DefaultDirName={sd}\{cm:GameFolderName}\Arcanum
  28. DefaultDirName={code:GetInstallationPath}
  29. AppendDefaultDirName=no
  30. DefaultGroupName=Arcanum - Of Steamworks and Magick Obscura [GOG.com]
  31. AllowNoIcons=yes
  32. DisableProgramGroupPage=yes
  33. OutputBaseFilename={#MyAppName}
  34. SetupIconFile=icon.ico
  35. Compression=lzma2/ultra64
  36. InternalCompressLevel=ultra64
  37. LZMANumFastBytes=273
  38. LZMADictionarySize=90112
  39. LZMAUseSeparateProcess=yes
  40. SolidCompression=yes
  41. DiskSpanning=no
  42. ;SlicesPerDisk=1
  43. ;DiskSliceSize=736000000
  44. UsePreviousLanguage=yes
  45. UsePreviousAppDir=yes
  46. Uninstallable=no
  47. ;UninstallDisplayIcon={app}\{#MyAppExeName}
  48. DisableDirPage=no
  49. DirExistsWarning=no
  50. WizardStyle=classic
  51. WizardResizable=no
  52. WizardSmallImageFile=55x55.bmp
  53. WizardImageFile=164x314.bmp
  54. ;LicenseFile=License.txt
  55. InfoBeforeFile=InfoBeforeFile.rtf
  56. ShowComponentSizes=no
  57.  
  58. [Languages]
  59. Name: "polish"; MessagesFile: "compiler:Languages\Polish.isl"
  60.  
  61. [Messages]
  62. BeveledLabel={#BeveledLabel}
  63.  
  64. [CustomMessages]
  65. polish.GameFolderName=Gry
  66. polish.LaunchProgram=Uruchom %1
  67. polish.Open=Otwórz %1
  68.  
  69. [Types]
  70. Name: "custom"; Description: Standardowa; Flags: iscustom
  71.  
  72. [Components]
  73. Name: "main"; Description: Spolszczenie; Flags: fixed; Types: custom
  74.  
  75. Name: "main\UAP"; Description: dla wersji UAP2.0; Flags: exclusive checkablealone; Types: custom
  76. Name: "main\UAP\borders"; Description: Dodatkowe obramowanie (High Resolution Patch: Borders = 1); Flags: dontinheritcheck
  77. Name: "main\UAP\races"; Description: Dodatkowe rasy (UAP2.0 - Race Mod); Flags: dontinheritcheck
  78. Name: "main\UAP\riddlers"; Description: Dodatkowe zagadki (UAP2.0 - Riddlers Mod); Flags: dontinheritcheck
  79. Name: "main\UAP\debug"; Description: "Menu debugowania (UAP2.0 - Virgil's Debug Menu)"; Flags: dontinheritcheck
  80.  
  81. Name: "main\stock"; Description: dla wersji 1.0.7.4 (stock); Flags: exclusive checkablealone
  82. Name: "main\stock\borders"; Description: Dodatkowe obramowanie (High Resolution Patch: Borders = 1); Flags: dontinheritcheck
  83.  
  84. Name: "additional_modules"; Description: Spolszczenie dodatkowych misji:
  85. Name: "additional_modules\BuriedSecrets"; Description: Buried Secrets (Tajemnice zabrane do grobu)
  86. Name: "additional_modules\Deathmatch"; Description: Deathmatch (Śmiertelny Pojedynek)              
  87. Name: "additional_modules\DustyDunes"; Description: Dusty Dunes (Szare Wydmy)
  88. Name: "additional_modules\Hellgate"; Description: Hellgate (Wrota Piekieł)
  89. Name: "additional_modules\Time"; Description: Time (Czas)
  90. Name: "additional_modules\WoodmirRace"; Description: Woodmir Race (Wyścig Woodmir)
  91. Name: "additional_modules\LostDungeonofSouls"; Description: Lost Dungeon of Souls (Zagubiony Loch Dusz)
  92.  
  93. [Files]
  94. Source: "{#SourceDir}\base\*"; DestDir: "{app}"; Flags: createallsubdirs recursesubdirs overwritereadonly sortfilesbyextension sortfilesbyname; Components: main
  95.  
  96. Source: "{#SourceDir}\UAP\*"; DestDir: "{app}"; Flags: createallsubdirs recursesubdirs overwritereadonly sortfilesbyextension sortfilesbyname; Components: main\UAP
  97. Source: "{#SourceDir}\1.0.7.4\*"; DestDir: "{app}"; Flags: createallsubdirs recursesubdirs overwritereadonly sortfilesbyextension sortfilesbyname; Components: not main\UAP
  98.  
  99. Source: "{#SourceDir}\no_borders\*"; DestDir: "{app}\data\art\interface"; Flags: createallsubdirs recursesubdirs overwritereadonly sortfilesbyextension sortfilesbyname; Components: not (main\UAP\borders or main\stock\borders)
  100. Source: "{#SourceDir}\borders\*"; DestDir: "{app}\data\art\interface"; Flags: createallsubdirs recursesubdirs overwritereadonly sortfilesbyextension sortfilesbyname; Components: main\UAP\borders main\stock\borders
  101.  
  102. Source: "{#SourceDir}\no_races_base\*"; DestDir: "{app}"; Flags: createallsubdirs recursesubdirs overwritereadonly sortfilesbyextension sortfilesbyname; Components: not main\UAP\races
  103. Source: "{#SourceDir}\no_races_uap\*"; DestDir: "{app}"; Flags: createallsubdirs recursesubdirs overwritereadonly sortfilesbyextension sortfilesbyname; Components: not main\UAP\races and main\UAP
  104. Source: "{#SourceDir}\no_races_1.0.7.4\*"; DestDir: "{app}"; Flags: createallsubdirs recursesubdirs overwritereadonly sortfilesbyextension sortfilesbyname; Components: main\stock
  105. Source: "{#SourceDir}\races\*"; DestDir: "{app}"; Flags: createallsubdirs recursesubdirs overwritereadonly sortfilesbyextension sortfilesbyname; Components: main\UAP\races
  106.  
  107. Source: "{#SourceDir}\no_riddlers\*"; DestDir: "{app}"; Flags: createallsubdirs recursesubdirs overwritereadonly sortfilesbyextension sortfilesbyname; Components: not main\UAP\riddlers
  108. Source: "{#SourceDir}\riddlers\*"; DestDir: "{app}"; Flags: createallsubdirs recursesubdirs overwritereadonly sortfilesbyextension sortfilesbyname; Components: main\UAP\riddlers
  109.  
  110. Source: "{#SourceDir}\60000Debug.dlg"; DestDir: "{app}\data\dlg"; Flags: overwritereadonly sortfilesbyextension sortfilesbyname; Components: main\UAP\debug
  111.  
  112. Source: "{#SourceDir}\additional_modules\BuriedSecrets\*"; DestDir: "{app}\modules\BuriedSecrets"; Flags: createallsubdirs recursesubdirs overwritereadonly sortfilesbyextension sortfilesbyname; Components: additional_modules\BuriedSecrets; Check: FileExists(ExpandConstant('{app}\modules\BuriedSecrets.dat'))
  113. Source: "{#SourceDir}\additional_modules\BuriedSecrets\*"; DestDir: "{app}\modules\Buried Secrets"; Flags: createallsubdirs recursesubdirs overwritereadonly sortfilesbyextension sortfilesbyname; Components: additional_modules\BuriedSecrets; Check: FileExists(ExpandConstant('{app}\modules\buried secrets.dat'))
  114. Source: "{#SourceDir}\additional_modules\Deathmatch\*"; DestDir: "{app}\modules\Deathmatch"; Flags: createallsubdirs recursesubdirs overwritereadonly sortfilesbyextension sortfilesbyname; Components: additional_modules\Deathmatch
  115. Source: "{#SourceDir}\additional_modules\Dusty Dunes\*"; DestDir: "{app}\modules\Dusty Dunes"; Flags: createallsubdirs recursesubdirs overwritereadonly sortfilesbyextension sortfilesbyname; Components: additional_modules\DustyDunes
  116. Source: "{#SourceDir}\additional_modules\Hellgate\*"; DestDir: "{app}\modules\Hellgate"; Flags: createallsubdirs recursesubdirs overwritereadonly sortfilesbyextension sortfilesbyname; Components: additional_modules\Hellgate
  117. Source: "{#SourceDir}\additional_modules\Time\*"; DestDir: "{app}\modules\Time"; Flags: createallsubdirs recursesubdirs overwritereadonly sortfilesbyextension sortfilesbyname; Components: additional_modules\Time
  118. Source: "{#SourceDir}\additional_modules\Woodmir Race\*"; DestDir: "{app}\modules\Woodmir Race"; Flags: createallsubdirs recursesubdirs overwritereadonly sortfilesbyextension sortfilesbyname; Components: additional_modules\WoodmirRace
  119. Source: "{#SourceDir}\additional_modules\LostDungeonofSouls\*"; DestDir: "{app}\modules\LostDungeonofSouls"; Flags: createallsubdirs recursesubdirs overwritereadonly sortfilesbyextension sortfilesbyname; Components: additional_modules\LostDungeonofSouls
  120.  
  121. [InstallDelete]
  122. Type: files; Name: "{app}\data\dlg\01853Bates_with_Logahaire.dlg"; Components: main\UAP
  123. Type: files; Name: "{app}\data\dlg\02899Ashbury_Guard_Evil.dlg"; Components: main\UAP
  124.  
  125. Type: files; Name: "{app}\data\dlg\01853Bates_with_Loghaire.dlg"; Components: main\stock
  126. Type: files; Name: "{app}\data\dlg\02899Ashbury_Guards_Evil.dlg"; Components: main\stock
  127. Type: files; Name: "{app}\data\dlg\03100Game_Of_Witt_Female.dlg"; Components: main\stock
  128. Type: files; Name: "{app}\modules\Arcanum\sound\speech\01912\v12_m.mp3"; Components: main\stock
  129. Type: dirifempty; Name: "{app}\modules\Arcanum\sound\speech\01912\"; Components: main\stock
  130.  
  131. Type: files; Name: "{app}\data\dlg\60000Debug.dlg"; Components: not main\UAP\debug
  132.  
  133. Type: filesandordirs; Name: "{app}\modules\BuriedSecrets\dlg\*.dlg"; Components: not additional_modules\BuriedSecrets;
  134. Type: dirifempty; Name: "{app}\modules\BuriedSecrets\dlg\"; Components: not additional_modules\BuriedSecrets;
  135. Type: filesandordirs; Name: "{app}\modules\BuriedSecrets\mes\*.mes"; Components: not additional_modules\BuriedSecrets;
  136. Type: dirifempty; Name: "{app}\modules\BuriedSecrets\mes\"; Components: not additional_modules\BuriedSecrets;
  137. Type: filesandordirs; Name: "{app}\modules\BuriedSecrets\Slide\*.bmp"; Components: not additional_modules\BuriedSecrets;
  138. Type: dirifempty; Name: "{app}\modules\BuriedSecrets\Slide\"; Components: not additional_modules\BuriedSecrets;
  139. Type: dirifempty; Name: "{app}\modules\BuriedSecrets\"; Components: not additional_modules\BuriedSecrets;
  140. Type: filesandordirs; Name: "{app}\modules\Buried Secrets\dlg\*.dlg"; Components: not additional_modules\BuriedSecrets;
  141. Type: dirifempty; Name: "{app}\modules\Buried Secrets\dlg\"; Components: not additional_modules\BuriedSecrets;
  142. Type: filesandordirs; Name: "{app}\modules\Buried Secrets\mes\*.mes"; Components: not additional_modules\BuriedSecrets;  
  143. Type: dirifempty; Name: "{app}\modules\Buried Secrets\mes\"; Components: not additional_modules\BuriedSecrets;
  144. Type: filesandordirs; Name: "{app}\modules\Buried Secrets\Slide\*.bmp"; Components: not additional_modules\BuriedSecrets;
  145. Type: dirifempty; Name: "{app}\modules\Buried Secrets\Slide\"; Components: not additional_modules\BuriedSecrets;
  146. Type: dirifempty; Name: "{app}\modules\Buried Secrets\"; Components: not additional_modules\BuriedSecrets;
  147.  
  148. Type: filesandordirs; Name: "{app}\modules\Deathmatch\dlg\*.dlg"; Components: not additional_modules\Deathmatch;
  149. Type: dirifempty; Name: "{app}\modules\Deathmatch\dlg\"; Components: not additional_modules\Deathmatch;
  150. Type: filesandordirs; Name: "{app}\modules\Deathmatch\mes\*.mes"; Components: not additional_modules\Deathmatch;
  151. Type: dirifempty; Name: "{app}\modules\Deathmatch\mes\"; Components: not additional_modules\Deathmatch;
  152. Type: filesandordirs; Name: "{app}\modules\Deathmatch\Slide\*.bmp"; Components: not additional_modules\Deathmatch;
  153. Type: dirifempty; Name: "{app}\modules\Deathmatch\Slide\"; Components: not additional_modules\Deathmatch;
  154. Type: dirifempty; Name: "{app}\modules\Deathmatch\"; Components: not additional_modules\Deathmatch;
  155.  
  156. Type: filesandordirs; Name: "{app}\modules\Dusty Dunes\dlg\*.dlg"; Components: not additional_modules\DustyDunes;
  157. Type: dirifempty; Name: "{app}\modules\Dusty Dunes\dlg\"; Components: not additional_modules\DustyDunes;
  158. Type: filesandordirs; Name: "{app}\modules\Dusty Dunes\mes\*.mes"; Components: not additional_modules\DustyDunes;
  159. Type: dirifempty; Name: "{app}\modules\Dusty Dunes\mes\"; Components: not additional_modules\DustyDunes;
  160. Type: filesandordirs; Name: "{app}\modules\Dusty Dunes\Slide\*.bmp"; Components: not additional_modules\DustyDunes;
  161. Type: dirifempty; Name: "{app}\modules\Dusty Dunes\Slide\"; Components: not additional_modules\DustyDunes;
  162. Type: dirifempty; Name: "{app}\modules\Dusty Dunes\"; Components: not additional_modules\DustyDunes;  
  163.  
  164. Type: filesandordirs; Name: "{app}\modules\Hellgate\dlg\*.dlg"; Components: not additional_modules\Hellgate;
  165. Type: dirifempty; Name: "{app}\modules\Hellgate\dlg\"; Components: not additional_modules\Hellgate;
  166. Type: filesandordirs; Name: "{app}\modules\Hellgate\mes\*.mes"; Components: not additional_modules\Hellgate;
  167. Type: dirifempty; Name: "{app}\modules\Hellgate\mes\"; Components: not additional_modules\Hellgate;
  168. Type: filesandordirs; Name: "{app}\modules\Hellgate\Slide\*.bmp"; Components: not additional_modules\Hellgate;
  169. Type: dirifempty; Name: "{app}\modules\Hellgate\Slide\"; Components: not additional_modules\Hellgate;
  170. Type: dirifempty; Name: "{app}\modules\Hellgate\"; Components: not additional_modules\Hellgate;  
  171.  
  172. Type: filesandordirs; Name: "{app}\modules\Time\dlg\*.dlg"; Components: not additional_modules\Time;
  173. Type: dirifempty; Name: "{app}\modules\Time\dlg\"; Components: not additional_modules\Time;
  174. Type: filesandordirs; Name: "{app}\modules\Time\mes\*.mes"; Components: not additional_modules\Time;
  175. Type: dirifempty; Name: "{app}\modules\Time\mes\"; Components: not additional_modules\Time;
  176. Type: filesandordirs; Name: "{app}\modules\Time\Slide\*.bmp"; Components: not additional_modules\Time;
  177. Type: dirifempty; Name: "{app}\modules\Time\Slide\"; Components: not additional_modules\Time;
  178. Type: dirifempty; Name: "{app}\modules\Time\"; Components: not additional_modules\Time;  
  179.  
  180. Type: filesandordirs; Name: "{app}\modules\Woodmir Race\dlg\*.dlg"; Components: not additional_modules\WoodmirRace;
  181. Type: dirifempty; Name: "{app}\modules\Woodmir Race\dlg\"; Components: not additional_modules\WoodmirRace;
  182. Type: filesandordirs; Name: "{app}\modules\Woodmir Race\mes\*.mes"; Components: not additional_modules\WoodmirRace;
  183. Type: dirifempty; Name: "{app}\modules\Woodmir Race\mes\"; Components: not additional_modules\WoodmirRace;
  184. Type: filesandordirs; Name: "{app}\modules\Woodmir Race\Slide\*.bmp"; Components: not additional_modules\WoodmirRace;
  185. Type: dirifempty; Name: "{app}\modules\Woodmir Race\Slide\"; Components: not additional_modules\WoodmirRace;
  186. Type: dirifempty; Name: "{app}\modules\Woodmir Race\"; Components: not additional_modules\WoodmirRace;
  187.  
  188. Type: filesandordirs; Name: "{app}\modules\LostDungeonofSouls\dlg\*.dlg"; Components: not additional_modules\LostDungeonofSouls;
  189. Type: dirifempty; Name: "{app}\modules\LostDungeonofSouls\dlg\"; Components: not additional_modules\LostDungeonofSouls;
  190. Type: filesandordirs; Name: "{app}\modules\LostDungeonofSouls\mes\*.mes"; Components: not additional_modules\LostDungeonofSouls;
  191. Type: dirifempty; Name: "{app}\modules\LostDungeonofSouls\mes\"; Components: not additional_modules\LostDungeonofSouls;
  192. Type: filesandordirs; Name: "{app}\modules\LostDungeonofSouls\Slide\*.bmp"; Components: not additional_modules\LostDungeonofSouls;
  193. Type: dirifempty; Name: "{app}\modules\LostDungeonofSouls\Slide\"; Components: not additional_modules\LostDungeonofSouls;
  194. Type: dirifempty; Name: "{app}\modules\LostDungeonofSouls\"; Components: not additional_modules\LostDungeonofSouls;
  195.  
  196. Type: files; Name: "{app}\modules\BuriedSecrets\Slide\Death.bmp"
  197. Type: files; Name: "{app}\modules\Buried Secrets\Slide\Death.bmp"
  198. Type: files; Name: "{app}\modules\Deathmatch\Slide\Death.bmp"
  199. Type: files; Name: "{app}\modules\Dusty Dunes\Slide\Death.bmp"
  200. Type: files; Name: "{app}\modules\Hellgate\Slide\Death.bmp"
  201. Type: files; Name: "{app}\modules\Time\Slide\Death.bmp"
  202. Type: files; Name: "{app}\modules\Woodmir Race\Slide\Death.bmp"
  203.  
  204. [Icons]
  205. Name: "{group}\Dokumenty\Arcanum - Instrukcja"; Filename: "{app}\Arcanum Instrukcja.pdf"; Flags: createonlyiffileexists; Check: DirExists(ExpandConstant('{group}\Dokumenty'))
  206. Name: "{group}\Dokumenty\Mapa Arcanum"; Filename: "{app}\mapa_pl.pdf"; Flags: createonlyiffileexists; Check: DirExists(ExpandConstant('{group}\Dokumenty'))
  207. Name: "{group}\Dokumenty\Opowieści Arcanum"; Filename: "{app}\opowiadanie.pdf"; Flags: createonlyiffileexists; Check: DirExists(ExpandConstant('{group}\Dokumenty'))
  208.  
  209. [Run]
  210. Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,Arcanum}"; Flags: nowait postinstall unchecked skipifsilent
  211. Filename: "{app}\Arcanum Instrukcja.pdf"; Description: "{cm:Open,Arcanum - Instrukcja}"; Flags: nowait postinstall unchecked skipifsilent shellexec skipifdoesntexist
  212. Filename: "{app}\mapa_pl.pdf"; Description: "{cm:Open,Mapa Arcanum}"; Flags: nowait postinstall unchecked skipifsilent shellexec skipifdoesntexist
  213. Filename: "{app}\opowiadanie.pdf"; Description: "{cm:Open,Opowieści Arcanum}"; Flags: nowait postinstall unchecked skipifsilent shellexec skipifdoesntexist
  214.  
  215. [INI]
  216. Filename: "{app}\..\SierraLauncher.ini"; Section: "Launcher"; Key: "GameManual"; String: "..\Arcanum\Arcanum Instrukcja.pdf"; Check: FileExists(ExpandConstant('{app}\..\SierraLauncher.ini'))
  217.  
  218. [Code]
  219. var SelectedComponents: string;
  220. var SelectedComponentsMissingAddons: string;
  221. var SelectedComponentsMissingLocalization: string;
  222. function NextButtonClick(CurPageID: Integer): Boolean;
  223. begin
  224.   Result := True;
  225.  
  226.   if CurPageID = wpSelectDir then
  227.   begin
  228.     if not FileExists(ExpandConstant('{app}\Arcanum.exe')) then
  229.     begin
  230.       if FileExists(ExpandConstant('{app}\SierraLauncher.exe')) and FileExists(ExpandConstant('{app}\Arcanum\Arcanum.exe')) then
  231.       begin
  232.         Result := False;
  233.         Msgbox('Zidentyfikowano wersję gry ze steam.' + #13#10 + 'Musisz wskazać podkatalog Arcanum.', mbInformation, MB_OK);
  234.       end
  235.       else
  236.         Result := Msgbox('Nie znaleziono pliku "Arcanum.exe"' + #13#10 + 'Czy wybrany katalog jest prawidłowy?', mbError, MB_YESNO) = IDYES;
  237.     end
  238.   end;
  239.  
  240.   if CurPageID = wpSelectComponents then
  241.   begin
  242.     SelectedComponentsMissingAddons := '';
  243.     SelectedComponentsMissingLocalization := '';
  244.     SelectedComponents := WizardSelectedComponents(false) + ',';
  245.     Log('Selected Components: ' + SelectedComponents + ' pos: ' + IntToStr(Pos('main\uap', SelectedComponents)));
  246.  
  247.     if FileExists(ExpandConstant('{app}\Arcanum5.dat')) then
  248.     begin
  249.       if Pos('main\uap,', SelectedComponents) = 0 then
  250.         SelectedComponentsMissingLocalization := SelectedComponentsMissingLocalization + ' - UAP2.0' + #13#10;
  251.     end
  252.     else
  253.       if Pos('main\uap,', SelectedComponents) <> 0 then
  254.         SelectedComponentsMissingAddons := SelectedComponentsMissingAddons + ' - UAP2.0' + #13#10;
  255.  
  256.     if FileExists(ExpandConstant('{app}\ArcanumZHighResBorders.dat')) then
  257.     begin
  258.       if Pos('\borders,', SelectedComponents) = 0 then
  259.         SelectedComponentsMissingLocalization := SelectedComponentsMissingLocalization + ' - Dodatkowe obramowanie' + #13#10;
  260.     end
  261.     else
  262.       if Pos('\borders,', SelectedComponents) <> 0 then
  263.         SelectedComponentsMissingAddons := SelectedComponentsMissingAddons + ' - Dodatkowe obramowanie' + #13#10;    
  264.  
  265.     if FileExists(ExpandConstant('{app}\ArcanumXRaces.dat')) then
  266.     begin
  267.       if Pos('\races,', SelectedComponents) = 0 then
  268.         SelectedComponentsMissingLocalization := SelectedComponentsMissingLocalization + ' - Dodatkowe rasy' + #13#10;
  269.     end
  270.     else
  271.       if Pos('\races,', SelectedComponents) <> 0 then
  272.         SelectedComponentsMissingAddons := SelectedComponentsMissingAddons + ' - Dodatkowe rasy' + #13#10;        
  273.  
  274.     if FileExists(ExpandConstant('{app}\ArcanumXRiddlers.dat')) then
  275.     begin
  276.       if Pos('\riddlers,', SelectedComponents) = 0 then
  277.         SelectedComponentsMissingLocalization := SelectedComponentsMissingLocalization + ' - Dodatkowe zagadki' + #13#10;
  278.     end
  279.     else
  280.       if Pos('\riddlers,', SelectedComponents) <> 0 then
  281.         SelectedComponentsMissingAddons := SelectedComponentsMissingAddons + ' - Dodatkowe zagadki' + #13#10;  
  282.  
  283.     if FileExists(ExpandConstant('{app}\ArcanumXVirgilDebug.dat')) then
  284.     begin
  285.       if (Pos('\debug,', SelectedComponents) = 0) and (Pos('main\uap,', SelectedComponents) <> 0) then
  286.         SelectedComponentsMissingLocalization := SelectedComponentsMissingLocalization + ' - Menu debugowania' + #13#10;
  287.     end
  288.     else
  289.       if Pos('\debug,', SelectedComponents) <> 0 then
  290.         SelectedComponentsMissingAddons := SelectedComponentsMissingAddons + ' - Menu debugowania' + #13#10;
  291.        
  292.  
  293.     if FileExists(ExpandConstant('{app}\modules\BuriedSecrets.dat'))
  294.     or FileExists(ExpandConstant('{app}\modules\buried secrets.dat')) then
  295.     begin
  296.       if (Pos('additional_modules\buriedsecrets,', SelectedComponents) = 0) then
  297.         SelectedComponentsMissingLocalization := SelectedComponentsMissingLocalization + ' - Buried Secrets' + #13#10;
  298.     end
  299.     else
  300.       if Pos('additional_modules\buriedsecrets,', SelectedComponents) <> 0 then
  301.         SelectedComponentsMissingAddons := SelectedComponentsMissingAddons + ' - Buried Secrets' + #13#10;      
  302.        
  303.     if FileExists(ExpandConstant('{app}\modules\Deathmatch.dat')) then
  304.     begin
  305.       if (Pos('additional_modules\deathmatch,', SelectedComponents) = 0) then
  306.         SelectedComponentsMissingLocalization := SelectedComponentsMissingLocalization + ' - Deathmatch' + #13#10;
  307.     end
  308.     else
  309.       if Pos('additional_modules\deathmatch,', SelectedComponents) <> 0 then
  310.         SelectedComponentsMissingAddons := SelectedComponentsMissingAddons + ' - Deathmatch' + #13#10;        
  311.        
  312.     if FileExists(ExpandConstant('{app}\modules\Dusty Dunes.dat')) then
  313.     begin
  314.       if (Pos('additional_modules\dustydunes,', SelectedComponents) = 0) then
  315.         SelectedComponentsMissingLocalization := SelectedComponentsMissingLocalization + ' - Dusty Dunes' + #13#10;
  316.     end
  317.     else
  318.       if Pos('additional_modules\dustydunes,', SelectedComponents) <> 0 then
  319.         SelectedComponentsMissingAddons := SelectedComponentsMissingAddons + ' - Dusty Dunes' + #13#10;        
  320.        
  321.     if FileExists(ExpandConstant('{app}\modules\Hellgate.dat')) then
  322.     begin
  323.       if (Pos('additional_modules\hellgate,', SelectedComponents) = 0) then
  324.         SelectedComponentsMissingLocalization := SelectedComponentsMissingLocalization + ' - Hellgate' + #13#10;
  325.     end
  326.     else
  327.       if Pos('additional_modules\hellgate,', SelectedComponents) <> 0 then
  328.         SelectedComponentsMissingAddons := SelectedComponentsMissingAddons + ' - Hellgate' + #13#10;      
  329.        
  330.     if FileExists(ExpandConstant('{app}\modules\Time.dat')) then
  331.     begin
  332.       if (Pos('additional_modules\time,', SelectedComponents) = 0) then
  333.         SelectedComponentsMissingLocalization := SelectedComponentsMissingLocalization + ' - Time' + #13#10;
  334.     end
  335.     else
  336.       if Pos('additional_modules\time,', SelectedComponents) <> 0 then
  337.         SelectedComponentsMissingAddons := SelectedComponentsMissingAddons + ' - Time' + #13#10;
  338.        
  339.     if FileExists(ExpandConstant('{app}\modules\Woodmir Race.dat')) then
  340.     begin
  341.       if (Pos('additional_modules\woodmirrace,', SelectedComponents) = 0) then
  342.         SelectedComponentsMissingLocalization := SelectedComponentsMissingLocalization + ' - Woodmir Race' + #13#10;
  343.     end
  344.     else
  345.       if Pos('additional_modules\woodmirrace,', SelectedComponents) <> 0 then
  346.         SelectedComponentsMissingAddons := SelectedComponentsMissingAddons + ' - Woodmir Race' + #13#10;      
  347.        
  348.     if FileExists(ExpandConstant('{app}\modules\LostDungeonofSouls.dat')) then
  349.     begin
  350.       if (Pos('additional_modules\lostdungeonofsouls,', SelectedComponents) = 0) then
  351.         SelectedComponentsMissingLocalization := SelectedComponentsMissingLocalization + ' - Lost Dungeon of Souls' + #13#10;
  352.     end
  353.     else
  354.       if Pos('additional_modules\lostdungeonofsouls,', SelectedComponents) <> 0 then
  355.         SelectedComponentsMissingAddons := SelectedComponentsMissingAddons + ' - Lost Dungeon of Souls' + #13#10;
  356.  
  357.  
  358.     if not (SelectedComponentsMissingLocalization = '') then
  359.       SelectedComponentsMissingLocalization := 'Nie wybrano komponentu dla odnalezionych dodatków:' + #13#10 + SelectedComponentsMissingLocalization + #13#10;
  360.  
  361.     if not (SelectedComponentsMissingAddons = '') then
  362.       SelectedComponentsMissingLocalization := SelectedComponentsMissingLocalization + 'Wybrano komponent dla niezainstalowanych dodatków:' + #13#10 + SelectedComponentsMissingAddons + #13#10;
  363.  
  364.     if not (SelectedComponentsMissingLocalization = '') then
  365.       Result := Msgbox(SelectedComponentsMissingLocalization + 'Czy jesteś pewny, że zaznaczyłeś poprawne komponenty?', mbError, MB_YESNO) = IDYES;
  366.   end;
  367. end;
  368.  
  369. procedure CurPageChanged(CurPageID: Integer);
  370. begin
  371.   if CurPageID = wpSelectComponents then
  372.   begin
  373.     WizardForm.ComponentsList.ItemIndex := -1;
  374.  
  375.     if FileExists(ExpandConstant('{app}\Arcanum5.dat')) then
  376.     begin
  377.       WizardSelectComponents('main\UAP');
  378.  
  379.       if FileExists(ExpandConstant('{app}\ArcanumZHighResBorders.dat')) then
  380.         WizardSelectComponents('main\UAP\borders')
  381.       else
  382.         WizardSelectComponents('!main\UAP\borders');
  383.  
  384.       if FileExists(ExpandConstant('{app}\ArcanumXRaces.dat')) then
  385.         WizardSelectComponents('main\UAP\races')
  386.       else
  387.         WizardSelectComponents('!main\UAP\races');
  388.        
  389.       if FileExists(ExpandConstant('{app}\ArcanumXRiddlers.dat')) then
  390.         WizardSelectComponents('main\UAP\riddlers')
  391.       else
  392.         WizardSelectComponents('!main\UAP\riddlers');
  393.  
  394.       if FileExists(ExpandConstant('{app}\ArcanumXVirgilDebug.dat')) then
  395.         WizardSelectComponents('main\UAP\debug')
  396.       else
  397.         WizardSelectComponents('!main\UAP\debug');
  398.     end
  399.     else
  400.     begin
  401.       WizardSelectComponents('main\stock')
  402.       if FileExists(ExpandConstant('{app}\ArcanumZHighResBorders.dat')) then
  403.         WizardSelectComponents('main\stock\borders')
  404.       else
  405.         WizardSelectComponents('!main\stock\borders');
  406.     end;
  407.  
  408.     if FileExists(ExpandConstant('{app}\modules\BuriedSecrets.dat'))
  409.     or FileExists(ExpandConstant('{app}\modules\buried secrets.dat')) then
  410.       WizardSelectComponents('additional_modules\BuriedSecrets')
  411.     else
  412.       WizardSelectComponents('!additional_modules\BuriedSecrets');
  413.  
  414.     if FileExists(ExpandConstant('{app}\modules\Deathmatch.dat')) then
  415.       WizardSelectComponents('additional_modules\Deathmatch')
  416.     else
  417.       WizardSelectComponents('!additional_modules\Deathmatch');
  418.  
  419.     if FileExists(ExpandConstant('{app}\modules\Dusty Dunes.dat')) then
  420.       WizardSelectComponents('additional_modules\DustyDunes')
  421.     else
  422.       WizardSelectComponents('!additional_modules\DustyDunes');
  423.  
  424.     if FileExists(ExpandConstant('{app}\modules\Hellgate.dat')) then
  425.       WizardSelectComponents('additional_modules\Hellgate')
  426.     else
  427.       WizardSelectComponents('!additional_modules\Hellgate');
  428.  
  429.     if FileExists(ExpandConstant('{app}\modules\Time.dat')) then
  430.       WizardSelectComponents('additional_modules\Time')
  431.     else
  432.       WizardSelectComponents('!additional_modules\Time');
  433.  
  434.     if FileExists(ExpandConstant('{app}\modules\Woodmir Race.dat')) then
  435.       WizardSelectComponents('additional_modules\WoodmirRace')
  436.     else
  437.       WizardSelectComponents('!additional_modules\WoodmirRace');
  438.  
  439.     if FileExists(ExpandConstant('{app}\modules\LostDungeonofSouls.DAT')) then
  440.       WizardSelectComponents('additional_modules\LostDungeonofSouls')
  441.     else
  442.       WizardSelectComponents('!additional_modules\LostDungeonofSouls');
  443.   end;
  444. end;
  445.  
  446. // Credits for function GetInstallationPath goes to Martin Prikryl
  447. var InstallationPath: string;
  448. function GetInstallationPath(Param: string): string;
  449. begin
  450.   if InstallationPath = '' then
  451.   begin
  452.     if RegQueryStringValue(
  453.          HKLM32, 'SOFTWARE\GOG.com\Games\1207658829',
  454.          'path', InstallationPath) then
  455.     begin
  456.       Log('Detected GOG installation: ' + InstallationPath);
  457.     end
  458.     else if IsWin64 and RegQueryStringValue(
  459.          HKLM64, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Steam App 500810',
  460.          'InstallLocation', InstallationPath) then
  461.     begin
  462.       InstallationPath := InstallationPath + '\Arcanum';
  463.       Log('Detected Steam (x64) installation: ' + InstallationPath);
  464.     end
  465.     else if RegQueryStringValue(
  466.          HKLM32, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Steam App 500810',
  467.          'InstallLocation', InstallationPath) then
  468.     begin
  469.       InstallationPath := InstallationPath + '\Arcanum';
  470.       Log('Detected Steam (x86) installation: ' + InstallationPath);
  471.     end
  472.     else if RegQueryStringValue(
  473.          HKLM32, 'SOFTWARE\Troika\Arcanum',
  474.          'installed_to', InstallationPath) then
  475.     begin
  476.       Log('Detected Troika installation: ' + InstallationPath);
  477.     end
  478.     else if RegQueryStringValue(
  479.          HKLM32, 'SOFTWARE\Sierra OnLine\Setup\AR_USENG',
  480.          'Directory', InstallationPath) then
  481.     begin
  482.       Log('Detected Sierra OnLine installation: ' + InstallationPath);
  483.     end
  484.     else if RegQueryStringValue(
  485.          HKLM32, 'SOFTWARE\Sierra OnLine\Setup\AR_PL',
  486.          'Directory', InstallationPath) then
  487.     begin
  488.       Log('Detected Sierra OnLine PL installation: ' + InstallationPath);
  489.     end
  490.       else
  491.     begin
  492.       InstallationPath := ExpandConstant('{sd}\{cm:GameFolderName}\Arcanum');
  493.       Log('No installation detected, using the default path: ' + InstallationPath);
  494.     end;
  495.   end;
  496.   Result := InstallationPath;
  497. end;
RAW Paste Data