Advertisement
Guest User

64BitThreeArch.iss

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