setup.iss 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227
  1. ; -- Setup.iss --
  2. ; Inno Setup's own Setup script
  3. ; Inno Setup
  4. ; Copyright (C) 1997-2026 Jordan Russell. All rights reserved.
  5. ; Portions Copyright (C) 2000-2026 Martijn Laan. All rights reserved.
  6. ; For conditions of distribution and use, see LICENSE.TXT.
  7. ; #define x64
  8. //
  9. #ifdef x64
  10. #define arch "x64"
  11. #define dasharch "-" + arch
  12. #define spacebit ""
  13. #define proa "dialog"
  14. #else
  15. #define arch "x86"
  16. #define dasharch ""
  17. #define spacebit " (32-bit)"
  18. #define proa "commandline"
  19. #endif
  20. //
  21. #define CheckArch(str Filename) \
  22. Local[0] = Is64BitPEImage(AddBackslash(SourcePath) + Filename) != 0, \
  23. Local[1] = (arch == "x64") != 0, \
  24. (Local[0] != Local[1]) ? Error(ExtractFilename(Filename) + " has incorrect architecture. " + arch + " required.") : Filename
  25. //
  26. #include "isdonateandmail.iss"
  27. #include "isportable.iss"
  28. [Setup]
  29. AppName=Inno Setup
  30. AppId=Inno Setup 7
  31. AppVersion=7.0.0-preview-1
  32. AppPublisher=jrsoftware.org
  33. AppPublisherURL=https://www.innosetup.com/
  34. AppSupportURL=https://www.innosetup.com/
  35. AppUpdatesURL=https://www.innosetup.com/
  36. VersionInfoCopyright=Copyright (C) 1997-2026 Jordan Russell. Portions Copyright (C) 2000-2026 Martijn Laan.
  37. AppMutex=InnoSetupCompilerAppMutex7{#dasharch},Global\InnoSetupCompilerAppMutex7{#dasharch}
  38. SetupMutex=InnoSetupCompilerSetupMutex7{#dasharch},Global\InnoSetupCompilerSetupMutex7{#dasharch}
  39. WizardStyle=modern dynamic
  40. DefaultDirName={code:GetDefaultDirName|Inno Setup 7}
  41. DefaultGroupName=Inno Setup 7{#spacebit}
  42. PrivilegesRequiredOverridesAllowed={#proa}
  43. AllowNoIcons=yes
  44. Compression=lzma2/max
  45. SolidCompression=yes
  46. UninstallDisplayIcon={app}\ISIDE.exe
  47. UsePreviousLanguage=no
  48. LicenseFile=license.txt
  49. TimeStampsInUTC=yes
  50. TouchDate=none
  51. TouchTime=00:00
  52. #ifdef SIGNTOOL
  53. SignTool=issigntool256
  54. SignedUninstaller=yes
  55. #endif
  56. SetupArchitecture={#arch}
  57. #expr EmitLanguagesSection
  58. [Messages]
  59. HelpTextNote=/PORTABLE=1%nEnable portable mode.
  60. [Tasks]
  61. Name: desktopicon; Description: "{cm:CreateDesktopIcon}"; Flags: unchecked; Check: not PortableCheck
  62. Name: fileassoc; Description: "{cm:AssocFileExtension,Inno Setup,.iss}"; Check: not PortableCheck
  63. [InstallDelete]
  64. ; Remove desktop icon if needed
  65. Type: files; Name: {autodesktop}\Inno Setup Compiler.lnk; Tasks: not desktopicon; Check: not PortableCheck
  66. ; Remove translations in case any got demoted
  67. Type: files; Name: "{app}\Languages\*.isl"
  68. #include "setup.allowedpublickeys.iss"
  69. #ifdef SIGNTOOL
  70. #define signcheck "signcheck"
  71. #else
  72. #define signcheck
  73. #endif
  74. [Files]
  75. Source: "license.txt"; DestDir: "{app}"; Flags: ignoreversion touch
  76. Source: "{#CheckArch("files\ISIDE.exe")}"; DestDir: "{app}"; Flags: ignoreversion signonce touch
  77. Source: "files\isscint{#dasharch}.dll"; DestDir: "{app}"; Flags: ignoreversion issigverify signcheck touch
  78. Source: "files\isscint{#dasharch}.dll.issig"; DestDir: "{app}"; Flags: ignoreversion touch
  79. Source: "{#CheckArch("files\ISCC.exe")}"; DestDir: "{app}"; Flags: ignoreversion {#signcheck} touch
  80. Source: "{#CheckArch("files\ISCmplr.dll")}"; DestDir: "{app}"; Flags: ignoreversion issigverify {#signcheck} touch
  81. Source: "files\ISCmplr.dll.issig"; DestDir: "{app}"; Flags: ignoreversion touch
  82. Source: "{#CheckArch("files\ISPP.dll")}"; DestDir: "{app}"; Flags: ignoreversion issigverify {#signcheck} touch
  83. Source: "files\ISPP.dll.issig"; DestDir: "{app}"; Flags: ignoreversion touch
  84. Source: "files\ISPPBuiltins.iss"; DestDir: "{app}"; Flags: ignoreversion touch
  85. Source: "files\iszlib{#dasharch}.dll"; DestDir: "{app}"; Flags: ignoreversion issigverify signcheck touch
  86. Source: "files\iszlib{#dasharch}.dll.issig"; DestDir: "{app}"; Flags: ignoreversion touch
  87. Source: "files\isbzip{#dasharch}.dll"; DestDir: "{app}"; Flags: ignoreversion issigverify signcheck touch
  88. Source: "files\isbzip{#dasharch}.dll.issig"; DestDir: "{app}"; Flags: ignoreversion touch
  89. Source: "files\islzma{#dasharch}.dll"; DestDir: "{app}"; Flags: ignoreversion issigverify signcheck touch
  90. Source: "files\islzma{#dasharch}.dll.issig"; DestDir: "{app}"; Flags: ignoreversion touch
  91. #ifdef x64
  92. Source: "files\islzma-Arm64EC.dll"; DestDir: "{app}"; Flags: ignoreversion issigverify signcheck touch
  93. Source: "files\islzma-Arm64EC.dll.issig"; DestDir: "{app}"; Flags: ignoreversion touch
  94. #else
  95. Source: "files\islzma32.exe"; DestDir: "{app}"; Flags: ignoreversion issigverify signcheck touch
  96. Source: "files\islzma32.exe.issig"; DestDir: "{app}"; Flags: ignoreversion touch
  97. Source: "files\islzma64.exe"; DestDir: "{app}"; Flags: ignoreversion issigverify signcheck touch
  98. Source: "files\islzma64.exe.issig"; DestDir: "{app}"; Flags: ignoreversion touch
  99. #endif
  100. Source: "{#CheckArch("files\ISSigTool.exe")}"; DestDir: "{app}"; Flags: ignoreversion signonce touch
  101. Source: "files\Setup.e32"; DestDir: "{app}"; Flags: ignoreversion issigverify touch
  102. Source: "files\Setup.e32.issig"; DestDir: "{app}"; Flags: ignoreversion touch
  103. Source: "files\Setup.e64"; DestDir: "{app}"; Flags: ignoreversion issigverify touch
  104. Source: "files\Setup.e64.issig"; DestDir: "{app}"; Flags: ignoreversion touch
  105. Source: "files\SetupCustomStyle.e32"; DestDir: "{app}"; Flags: ignoreversion issigverify touch
  106. Source: "files\SetupCustomStyle.e32.issig"; DestDir: "{app}"; Flags: ignoreversion touch
  107. Source: "files\SetupCustomStyle.e64"; DestDir: "{app}"; Flags: ignoreversion issigverify touch
  108. Source: "files\SetupCustomStyle.e64.issig"; DestDir: "{app}"; Flags: ignoreversion touch
  109. Source: "files\SetupLdr.e32"; DestDir: "{app}"; Flags: ignoreversion issigverify touch
  110. Source: "files\SetupLdr.e32.issig"; DestDir: "{app}"; Flags: ignoreversion touch
  111. Source: "files\SetupLdr.e64"; DestDir: "{app}"; Flags: ignoreversion issigverify touch
  112. Source: "files\SetupLdr.e64.issig"; DestDir: "{app}"; Flags: ignoreversion touch
  113. Source: "files\is7z.dll"; DestDir: "{app}"; Flags: ignoreversion issigverify signcheck touch
  114. Source: "files\is7z.dll.issig"; DestDir: "{app}"; Flags: ignoreversion touch
  115. Source: "files\is7z-x64.dll"; DestDir: "{app}"; Flags: ignoreversion issigverify signcheck touch
  116. Source: "files\is7z-x64.dll.issig"; DestDir: "{app}"; Flags: ignoreversion touch
  117. Source: "files\is7zxa.dll"; DestDir: "{app}"; Flags: ignoreversion issigverify signcheck touch
  118. Source: "files\is7zxa.dll.issig"; DestDir: "{app}"; Flags: ignoreversion touch
  119. Source: "files\is7zxa-x64.dll"; DestDir: "{app}"; Flags: ignoreversion issigverify signcheck touch
  120. Source: "files\is7zxa-x64.dll.issig"; DestDir: "{app}"; Flags: ignoreversion touch
  121. Source: "files\is7zxr.dll"; DestDir: "{app}"; Flags: ignoreversion issigverify signcheck touch
  122. Source: "files\is7zxr.dll.issig"; DestDir: "{app}"; Flags: ignoreversion touch
  123. Source: "files\is7zxr-x64.dll"; DestDir: "{app}"; Flags: ignoreversion issigverify signcheck touch
  124. Source: "files\is7zxr-x64.dll.issig"; DestDir: "{app}"; Flags: ignoreversion touch
  125. Source: "files\isunzlib.dll"; DestDir: "{app}"; Flags: ignoreversion issigverify signcheck touch
  126. Source: "files\isunzlib.dll.issig"; DestDir: "{app}"; Flags: ignoreversion touch
  127. Source: "files\isunzlib-x64.dll"; DestDir: "{app}"; Flags: ignoreversion issigverify signcheck touch
  128. Source: "files\isunzlib-x64.dll.issig"; DestDir: "{app}"; Flags: ignoreversion touch
  129. Source: "files\isbunzip.dll"; DestDir: "{app}"; Flags: ignoreversion issigverify signcheck touch
  130. Source: "files\isbunzip.dll.issig"; DestDir: "{app}"; Flags: ignoreversion touch
  131. Source: "files\isbunzip-x64.dll"; DestDir: "{app}"; Flags: ignoreversion issigverify signcheck touch
  132. Source: "files\isbunzip-x64.dll.issig"; DestDir: "{app}"; Flags: ignoreversion touch
  133. Source: "files\ISetup.chm"; DestDir: "{app}"; Flags: ignoreversion touch
  134. Source: "files\ISetup-dark.chm"; DestDir: "{app}"; Flags: ignoreversion touch
  135. Source: "whatsnew.htm"; DestDir: "{app}"; Flags: ignoreversion touch
  136. Source: "files\Default.isl"; DestDir: "{app}"; Flags: ignoreversion touch
  137. Source: "files\Languages\*.isl"; DestDir: "{app}\Languages"; Flags: ignoreversion touch
  138. Source: "files\SetupClassicIcon.ico"; DestDir: "{app}"; Flags: ignoreversion touch
  139. Source: "files\WizClassicImage.bmp"; DestDir: "{app}"; Flags: ignoreversion touch
  140. Source: "files\WizClassicImage-IS.bmp"; DestDir: "{app}"; Flags: ignoreversion touch
  141. Source: "files\WizClassicSmallImage.bmp"; DestDir: "{app}"; Flags: ignoreversion touch
  142. Source: "files\WizClassicSmallImage-IS.bmp"; DestDir: "{app}"; Flags: ignoreversion touch
  143. Source: "Examples\64Bit.iss"; DestDir: "{app}\Examples"; Flags: ignoreversion touch
  144. Source: "Examples\64BitTwoArch.iss"; DestDir: "{app}\Examples"; Flags: ignoreversion touch
  145. Source: "Examples\64BitThreeArch.iss"; DestDir: "{app}\Examples"; Flags: ignoreversion touch
  146. Source: "Examples\AllPagesExample.iss"; DestDir: "{app}\Examples"; Flags: ignoreversion touch
  147. Source: "Examples\CodeAutomation.iss"; DestDir: "{app}\Examples"; Flags: ignoreversion touch
  148. Source: "Examples\CodeAutomation2.iss"; DestDir: "{app}\Examples"; Flags: ignoreversion touch
  149. Source: "Examples\CodeClasses.iss"; DestDir: "{app}\Examples"; Flags: ignoreversion touch
  150. Source: "Examples\CodeDlg.iss"; DestDir: "{app}\Examples"; Flags: ignoreversion touch
  151. Source: "Examples\CodeDll.iss"; DestDir: "{app}\Examples"; Flags: ignoreversion touch
  152. Source: "Examples\CodeDownloadFiles.iss"; DestDir: "{app}\Examples"; Flags: ignoreversion touch
  153. Source: "Examples\CodeExample1.iss"; DestDir: "{app}\Examples"; Flags: ignoreversion touch
  154. Source: "Examples\CodePrepareToInstall.iss"; DestDir: "{app}\Examples"; Flags: ignoreversion touch
  155. Source: "Examples\Components.iss"; DestDir: "{app}\Examples"; Flags: ignoreversion touch
  156. Source: "Examples\DownloadFiles.iss"; DestDir: "{app}\Examples"; Flags: ignoreversion touch
  157. Source: "Examples\Example1.iss"; DestDir: "{app}\Examples"; Flags: ignoreversion touch
  158. Source: "Examples\Example2.iss"; DestDir: "{app}\Examples"; Flags: ignoreversion touch
  159. Source: "Examples\Example3.iss"; DestDir: "{app}\Examples"; Flags: ignoreversion touch
  160. Source: "Examples\ISPPExample1.iss"; DestDir: "{app}\Examples"; Flags: ignoreversion touch
  161. Source: "Examples\ISPPExample1License.txt"; DestDir: "{app}\Examples"; Flags: ignoreversion touch
  162. Source: "Examples\License.txt"; DestDir: "{app}\Examples"; Flags: ignoreversion touch
  163. Source: "Examples\Languages.iss"; DestDir: "{app}\Examples"; Flags: ignoreversion touch
  164. Source: "Examples\MyDll.dll"; DestDir: "{app}\Examples"; Flags: ignoreversion issigverify signcheck touch
  165. Source: "Examples\MyDll-x64.dll"; DestDir: "{app}\Examples"; Flags: ignoreversion issigverify signcheck touch
  166. Source: "Examples\MyProg.chm"; DestDir: "{app}\Examples"; Flags: ignoreversion touch
  167. Source: "Examples\MyProg.exe"; DestDir: "{app}\Examples"; Flags: ignoreversion issigverify signcheck touch
  168. Source: "Examples\MyProg-Arm64.exe"; DestDir: "{app}\Examples"; Flags: ignoreversion issigverify signcheck touch
  169. Source: "Examples\MyProg-x64.exe"; DestDir: "{app}\Examples"; Flags: ignoreversion issigverify signcheck touch
  170. Source: "Examples\PowerShell.iss"; DestDir: "{app}\Examples"; Flags: ignoreversion touch
  171. Source: "Examples\Readme.txt"; DestDir: "{app}\Examples"; Flags: ignoreversion touch
  172. Source: "Examples\Readme-Dutch.txt"; DestDir: "{app}\Examples"; Flags: ignoreversion touch
  173. Source: "Examples\Readme-German.txt"; DestDir: "{app}\Examples"; Flags: ignoreversion touch
  174. Source: "Examples\UnicodeExample1.iss"; DestDir: "{app}\Examples"; Flags: ignoreversion touch
  175. Source: "Examples\UninstallCodeExample1.iss"; DestDir: "{app}\Examples"; Flags: ignoreversion touch
  176. Source: "Examples\MyDll\C\MyDll.c"; DestDir: "{app}\Examples\MyDll\C"; Flags: ignoreversion touch
  177. Source: "Examples\MyDll\C\MyDll.def"; DestDir: "{app}\Examples\MyDll\C"; Flags: ignoreversion touch
  178. Source: "Examples\MyDll\C\MyDll.vcxproj"; DestDir: "{app}\Examples\MyDll\C"; Flags: ignoreversion touch
  179. Source: "Examples\MyDll\C\MyDll.sln"; DestDir: "{app}\Examples\MyDll\C"; Flags: ignoreversion touch
  180. Source: "Examples\MyDll\Delphi\MyDll.dpr"; DestDir: "{app}\Examples\MyDll\Delphi"; Flags: ignoreversion touch
  181. Source: "Examples\MyDll\Delphi\MyDll.dproj"; DestDir: "{app}\Examples\MyDll\Delphi"; Flags: ignoreversion touch
  182. [INI]
  183. Filename: "{app}\isfaq.url"; Section: "InternetShortcut"; Key: "URL"; String: "https://jrsoftware.org/isfaq.php"
  184. [UninstallDelete]
  185. Type: files; Name: "{app}\isfaq.url"
  186. [Icons]
  187. ; All these will be automatically skipped on portable mode, either because of NoIconsCheck being checked, or because of the desktopicon task being removed
  188. Name: "{group}\Inno Setup Compiler"; Filename: "{app}\ISIDE.exe"; WorkingDir: "{app}"; AppUserModelID: "JR.InnoSetup.IDE.7{#dasharch}"
  189. Name: "{group}\Inno Setup Documentation"; Filename: "{app}\ISetup.chm"
  190. Name: "{group}\Inno Setup Documentation (Dark)"; Filename: "{app}\ISetup-dark.chm"
  191. Name: "{group}\Inno Setup Example Scripts"; Filename: "{app}\Examples\"
  192. Name: "{group}\Inno Setup FAQ"; Filename: "{app}\isfaq.url"
  193. Name: "{group}\Inno Setup Revision History"; Filename: "{app}\whatsnew.htm"
  194. Name: "{autodesktop}\Inno Setup Compiler"; Filename: "{app}\ISIDE.exe"; WorkingDir: "{app}"; AppUserModelID: "JR.InnoSetup.IDE.7{#dasharch}"; Tasks: desktopicon
  195. [Run]
  196. ; The /ASSOC line will be automatically skipped on portable mode, because of the fileassoc task being removed
  197. Filename: "{app}\ISIDE.exe"; Parameters: "/ASSOC"; StatusMsg: "{cm:AssocingFileExtension,Inno Setup,.iss}"; Tasks: fileassoc
  198. Filename: "{app}\ISIDE.exe"; WorkingDir: "{app}"; Description: "{cm:LaunchProgram,Inno Setup}"; Flags: nowait postinstall skipifsilent
  199. [UninstallRun]
  200. ; The /UNASSOC line will be automatically skipped on portable mode, because of Uninstallable being set to no
  201. Filename: "{app}\ISIDE.exe"; Parameters: "/UNASSOC"; RunOnceId: "RemoveISSAssoc"
  202. #ifndef x64
  203. [Code]
  204. function InitializeSetup: Boolean;
  205. begin
  206. Result := IsAdminInstallMode or PortableCheck;
  207. if not Result then
  208. SuppressibleMsgBox('Non-administrative install of 32-bit Inno Setup requires using command-line parameter /PORTABLE=1', mbError, MB_OK, IDOK);
  209. end;
  210. #endif