DownloadFiles.iss 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. ; -- DownloadFiles.iss --
  2. ;
  3. ; This script shows how the [Files] section can be used to download files and
  4. ; archives while showing the download and extraction progress to the user.
  5. ;
  6. ; Archives will be downloaded to temporary copy at the start of the Preparing
  7. ; To Install step. Other files will be downloaded directly to their destination
  8. ; during the actual installation.
  9. ;
  10. ; To verify the downloaded files and archives, this script shows two methods:
  11. ; -For innosetup-latest.exe and MyProg-ExtraReadmes.7z: using Inno Setup
  12. ; Signature Tool and the [ISSigKeys] section
  13. ; -For iscrypt.dll: using a simple SHA-256 hash check
  14. ; Using the Inno Setup Signature Tool has the benefit that the script does not
  15. ; need to be changed when the downloaded file or archive changes, so any
  16. ; installers built will also keep working (they are "evergreen")
  17. [Setup]
  18. AppName=My Program
  19. AppVersion=1.5
  20. WizardStyle=modern
  21. DefaultDirName={autopf}\My Program
  22. DefaultGroupName=My Program
  23. UninstallDisplayIcon={app}\MyProg.exe
  24. OutputDir=userdocs:Inno Setup Examples Output
  25. ArchiveExtraction=full
  26. ;Use "ArchiveExtraction=enhanced" if all your archives are .7z files
  27. ;Use "ArchiveExtraction=enhanced/nopassword" if all your archives are not password-protected
  28. [ISSigKeys]
  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
  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, verified and extracted
  45. Source: "https://jrsoftware.org/download.php/myprog-extrareadmes.7z"; DestName: "MyProg.ExtraReadmes.7z"; DestDir: "{app}"; \
  46. ExternalSize: 269; Flags: external download extractarchive recursesubdirs ignoreversion issigverify
  47. ; This archive will be downloaded and extracted without verificaton
  48. Source: "https://github.com/jrsoftware/issrc/archive/refs/heads/main.zip"; DestName: "issrc-main.zip"; DestDir: "{app}"; \
  49. ExternalSize: 15_000_000; Flags: external download extractarchive recursesubdirs ignoreversion
  50. [Icons]
  51. Name: "{group}\My Program"; Filename: "{app}\MyProg.exe"