DownloadFiles.iss 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. ; -- DownloadFiles.iss --
  2. ;
  3. ; This script demonstrates how to download files and archives, extract
  4. ; downloaded archives, and verify the integrity of downloaded files and
  5. ; archives, all without using [Code].
  6. ;
  7. ; To verify the downloaded files and archives, this script shows two methods:
  8. ; -For innosetup-latest.exe and MyProg-ExtraReadmes.7z: using Inno Setup
  9. ; Signature Tool, the [ISSigKeys] section, and .issig signature files which
  10. ; are automatically downloaded before the main file is downloaded
  11. ; -For iscrypt.dll: using a simple SHA-256 hash check
  12. ; Using the Inno Setup Signature Tool has the benefit that the script does not
  13. ; need to be changed when the downloaded file or archive changes, so any
  14. ; installers built will also keep working (they are "evergreen")
  15. [Setup]
  16. AppName=My Program
  17. AppVersion=1.5
  18. WizardStyle=modern dynamic
  19. DefaultDirName={autopf}\My Program
  20. DefaultGroupName=My Program
  21. UninstallDisplayIcon={app}\MyProg.exe
  22. OutputDir=userdocs:Inno Setup Examples Output
  23. ArchiveExtraction=full
  24. ; Use "ArchiveExtraction=enhanced" if all your archives are .7z files
  25. ; Use "ArchiveExtraction=enhanced/nopassword" if all your archives are not password-protected
  26. [ISSigKeys]
  27. ; Use Inno Setup Signature Tool (ISSigTool.exe) to create your own keys and
  28. ; .issig signature files
  29. Name: mykey; RuntimeID: def02; \
  30. KeyID: "def020edee3c4835fd54d85eff8b66d4d899b22a777353ca4a114b652e5e7a28"; \
  31. PublicX: "515dc7d6c16d4a46272ceb3d158c5630a96466ab4d948e72c2029d737c823097"; \
  32. PublicY: "f3c21f6b5156c52a35f6f28016ee3e31a3ded60c325b81fb7b1f88c221081a61"
  33. [Files]
  34. ; Place any regular files here
  35. Source: "MyProg.exe"; DestDir: "{app}"
  36. Source: "MyProg.chm"; DestDir: "{app}"
  37. Source: "Readme.txt"; DestDir: "{app}"; Flags: isreadme
  38. ; These files will be downloaded and verified during the actual installation
  39. Source: "https://jrsoftware.org/download.php/is.exe?dontcount=1"; DestName: "innosetup-latest.exe"; DestDir: "{app}"; \
  40. ExternalSize: 7_000_000; Flags: external download ignoreversion issigverify
  41. Source: "https://jrsoftware.org/download.php/iscrypt.dll?dontcount=1"; DestName: "ISCrypt.dll"; DestDir: "{app}"; \
  42. Hash: "2f6294f9aa09f59a574b5dcd33be54e16b39377984f3d5658cda44950fa0f8fc"; \
  43. ExternalSize: 2560; Flags: external download ignoreversion
  44. ; This archive will be downloaded and verified at the start of the Preparing to Install Step
  45. ; It is then extracted normally during the actual installation process
  46. Source: "https://jrsoftware.org/download.php/myprog-extrareadmes.7z"; DestName: "MyProg-ExtraReadmes.7z"; DestDir: "{app}"; \
  47. ExternalSize: 275; Flags: external download extractarchive recursesubdirs ignoreversion issigverify
  48. ; This archive will be downloaded and extracted without verification
  49. Source: "https://github.com/jrsoftware/issrc/archive/refs/heads/main.zip"; DestName: "issrc-main.zip"; DestDir: "{app}"; \
  50. ExternalSize: 15_000_000; Flags: external download extractarchive recursesubdirs ignoreversion
  51. [Icons]
  52. Name: "{group}\My Program"; Filename: "{app}\MyProg.exe"