64BitThreeArch.iss 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  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 dynamic
  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=x64compatible or arm64" instructs
  16. ; Setup to use "64-bit install mode" on x64-compatible systems and
  17. ; Arm64 systems, meaning Setup should use the native 64-bit Program
  18. ; Files directory and the 64-bit view of the registry. On all other
  19. ; OS architectures (e.g., 32-bit x86), Setup will use "32-bit
  20. ; install mode".
  21. ArchitecturesInstallIn64BitMode=x64compatible or arm64
  22. [Files]
  23. ; In order of preference, we want to install:
  24. ; - Arm64 binaries on Arm64 systems
  25. ; - else, x64 binaries on x64-compatible systems
  26. ; - else, x86 binaries
  27. ; Place all Arm64-specific files here, using 'Check: PreferArm64Files' on each entry.
  28. Source: "MyProg-Arm64.exe"; DestDir: "{app}"; DestName: "MyProg.exe"; Check: PreferArm64Files
  29. ; Place all x64-specific files here, using 'Check: PreferX64Files' on each entry.
  30. ; Only the first entry should include the 'solidbreak' flag.
  31. Source: "MyProg-x64.exe"; DestDir: "{app}"; DestName: "MyProg.exe"; Check: PreferX64Files; Flags: solidbreak
  32. ; Place all x86-specific files here, using 'Check: PreferX86Files' on each entry.
  33. ; Only the first entry should include the 'solidbreak' flag.
  34. Source: "MyProg.exe"; DestDir: "{app}"; Check: PreferX86Files; Flags: solidbreak
  35. ; Place all common files here.
  36. ; Only the first entry should include the 'solidbreak' flag.
  37. Source: "MyProg.chm"; DestDir: "{app}"; Flags: solidbreak
  38. Source: "Readme.txt"; DestDir: "{app}"; Flags: isreadme
  39. [Icons]
  40. Name: "{group}\My Program"; Filename: "{app}\MyProg.exe"
  41. [Code]
  42. function PreferArm64Files: Boolean;
  43. begin
  44. Result := IsArm64;
  45. end;
  46. function PreferX64Files: Boolean;
  47. begin
  48. Result := not PreferArm64Files and IsX64Compatible;
  49. end;
  50. function PreferX86Files: Boolean;
  51. begin
  52. Result := not PreferArm64Files and not PreferX64Files;
  53. end;