64BitThreeArch.iss 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. ; -- 64BitThreeArch.iss --
  2. ; Demonstrates how to install a program built for three different
  3. ; architectures (x86, x64, ARM64) using a single installer.
  4. ; SEE THE DOCUMENTATION FOR DETAILS ON CREATING .ISS SCRIPT FILES!
  5. [Setup]
  6. AppName=My Program
  7. AppVersion=1.5
  8. WizardStyle=modern
  9. DefaultDirName={autopf}\My Program
  10. DefaultGroupName=My Program
  11. UninstallDisplayIcon={app}\MyProg.exe
  12. Compression=lzma2
  13. SolidCompression=yes
  14. OutputDir=userdocs:Inno Setup Examples Output
  15. ; "ArchitecturesInstallIn64BitMode=x64 arm64" requests that the install
  16. ; be done in "64-bit mode" on x64 & ARM64, meaning it should use the
  17. ; native 64-bit Program Files directory and the 64-bit view of the
  18. ; registry. On all other architectures it will install in "32-bit mode".
  19. ArchitecturesInstallIn64BitMode=x64 arm64
  20. [Files]
  21. ; Install MyProg-x64.exe if running on x64, MyProg-ARM64.exe if
  22. ; running on ARM64, MyProg.exe otherwise.
  23. ; Place all x64 files here
  24. Source: "MyProg-x64.exe"; DestDir: "{app}"; DestName: "MyProg.exe"; Check: InstallX64
  25. ; Place all ARM64 files here, first one should be marked 'solidbreak'
  26. Source: "MyProg-ARM64.exe"; DestDir: "{app}"; DestName: "MyProg.exe"; Check: InstallARM64; Flags: solidbreak
  27. ; Place all x86 files here, first one should be marked 'solidbreak'
  28. Source: "MyProg.exe"; DestDir: "{app}"; Check: InstallOtherArch; Flags: solidbreak
  29. ; Place all common files here, first one should be marked 'solidbreak'
  30. Source: "MyProg.chm"; DestDir: "{app}"; Flags: solidbreak
  31. Source: "Readme.txt"; DestDir: "{app}"; Flags: isreadme
  32. [Icons]
  33. Name: "{group}\My Program"; Filename: "{app}\MyProg.exe"
  34. [Code]
  35. function InstallX64: Boolean;
  36. begin
  37. Result := Is64BitInstallMode and (ProcessorArchitecture = paX64);
  38. end;
  39. function InstallARM64: Boolean;
  40. begin
  41. Result := Is64BitInstallMode and (ProcessorArchitecture = paARM64);
  42. end;
  43. function InstallOtherArch: Boolean;
  44. begin
  45. Result := not InstallX64 and not InstallARM64;
  46. end;