Eselter

Arcanum UAP2.0PL.iss

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