idf_tool_setup.iss 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. ; Copyright 2019-2020 Espressif Systems (Shanghai) CO LTD
  2. ; SPDX-License-Identifier: Apache-2.0
  3. #pragma include __INCLUDE__ + ";" + ReadReg(HKLM, "Software\Mitrich Software\Inno Download Plugin", "InstallDir")
  4. #include <idp.iss>
  5. #define MyAppName "ESP-IDF Tools"
  6. #define MyAppVersion "2.3"
  7. #define MyAppPublisher "Espressif Systems (Shanghai) Co. Ltd."
  8. #define MyAppURL "https://github.com/espressif/esp-idf"
  9. #define PythonVersion "3.7"
  10. #define PythonInstallerName "python-3.7.3-amd64.exe"
  11. #define PythonInstallerDownloadURL "https://www.python.org/ftp/python/3.7.3/python-3.7.3-amd64.exe"
  12. #define GitVersion "2.21.0"
  13. #define GitInstallerName "Git-2.21.0-64-bit.exe"
  14. #define GitInstallerDownloadURL "https://github.com/git-for-windows/git/releases/download/v2.21.0.windows.1/Git-2.21.0-64-bit.exe"
  15. #define IDFVersionsURL "https://dl.espressif.com/dl/esp-idf/idf_versions.txt"
  16. #define IDFCmdExeShortcutDescription "Open ESP-IDF Command Prompt (cmd.exe)"
  17. #define IDFCmdExeShortcutFile "ESP-IDF Command Prompt (cmd.exe).lnk"
  18. [Setup]
  19. ; NOTE: The value of AppId uniquely identifies this application.
  20. ; Do not use the same AppId value in installers for other applications.
  21. ; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
  22. AppId={{9E068D99-5C4B-4E5F-96A3-B17CF291E6BD}
  23. AppName={#MyAppName}
  24. AppVersion={#MyAppVersion}
  25. AppVerName={#MyAppName} {#MyAppVersion}
  26. AppPublisher={#MyAppPublisher}
  27. AppPublisherURL={#MyAppURL}
  28. AppSupportURL={#MyAppURL}
  29. AppUpdatesURL={#MyAppURL}
  30. DefaultDirName={%USERPROFILE}\.espressif
  31. UsePreviousAppDir=no
  32. DirExistsWarning=no
  33. DefaultGroupName=ESP-IDF
  34. DisableProgramGroupPage=yes
  35. OutputBaseFilename=esp-idf-tools-setup-unsigned
  36. Compression=lzma
  37. SolidCompression=yes
  38. ArchitecturesAllowed=x64
  39. ArchitecturesInstallIn64BitMode=x64
  40. LicenseFile=license.txt
  41. PrivilegesRequired=lowest
  42. SetupLogging=yes
  43. ChangesEnvironment=yes
  44. WizardStyle=modern
  45. [Languages]
  46. Name: "english"; MessagesFile: "compiler:Default.isl,Languages/idf_tool_en-US.islu"
  47. [Dirs]
  48. Name: "{app}\dist"
  49. [Files]
  50. Source: "cmdlinerunner\build\cmdlinerunner.dll"; Flags: dontcopy
  51. Source: "unzip\7za.exe"; Flags: dontcopy
  52. Source: "idf_versions.txt"; Flags: dontcopy
  53. Source: "..\..\idf_tools.py"; DestDir: "{app}"; DestName: "idf_tools_fallback.py"
  54. ; Note: this tools.json matches the requirements of IDF v3.x versions.
  55. Source: "tools_fallback.json"; DestDir: "{app}"; DestName: "tools_fallback.json"
  56. Source: "idf_cmd_init.bat"; DestDir: "{app}"
  57. Source: "dist\*"; DestDir: "{app}\dist"
  58. ; Helper Python files for sanity check of Python environment - used by system_check_page
  59. Source: "system_check\system_check_download.py"; Flags: dontcopy
  60. Source: "system_check\system_check_subprocess.py"; Flags: dontcopy
  61. Source: "system_check\system_check_virtualenv.py"; Flags: dontcopy
  62. ; Helper PowerShell scripts for managing exceptions in Windows Defender
  63. Source: "tools_WD_excl.ps1"; DestDir: "{app}\dist"
  64. Source: "tools_WD_clean.ps1"; DestDir: "{app}\dist"
  65. [UninstallDelete]
  66. Type: filesandordirs; Name: "{app}\dist"
  67. Type: filesandordirs; Name: "{app}\releases"
  68. Type: filesandordirs; Name: "{app}\tools"
  69. Type: filesandordirs; Name: "{app}\python_env"
  70. Type: files; Name: "{group}\{#IDFCmdExeShortcutFile}"
  71. Type: files; Name: "{autodesktop}\{#IDFCmdExeShortcutFile}"
  72. [Tasks]
  73. Name: createlnk; Description: "Create Start Menu shortcut for the ESP-IDF Tools Command Prompt";
  74. Name: createdsk; Description: "Create Desktop shortcut for the ESP-IDF Tools Command Prompt";
  75. ; WD registration checkbox is identified by 'Windows Defender' substring anywhere in its caption, not by the position index in WizardForm.TasksList.Items
  76. ; Please, keep this in mind when making changes to the item's description - WD checkbox is to be disabled on systems without the Windows Defender installed
  77. Name: wdexcl; Description: "Register the ESP-IDF Tools executables as Windows Defender exclusions (improves compilation speed, requires elevation)";
  78. Name: idf_tools_use_mirror; Description: "Use Espressif download server instead of downloading tool packages from Github"; Flags: unchecked;
  79. [Run]
  80. Filename: "{app}\dist\{#PythonInstallerName}"; Parameters: "/passive PrependPath=1 InstallLauncherAllUsers=0 Include_dev=0 Include_tcltk=0 Include_launcher=0 Include_test=0 Include_doc=0"; Description: "Installing Python"; Check: PythonInstallRequired
  81. Filename: "{app}\dist\{#GitInstallerName}"; Parameters: "/silent /tasks="""" /norestart"; Description: "Installing Git"; Check: GitInstallRequired
  82. Filename: "{group}\{#IDFCmdExeShortcutFile}"; Flags: postinstall shellexec; Description: "Run ESP-IDF Command Prompt (cmd.exe)"; Check: InstallationSuccessful
  83. [UninstallRun]
  84. Filename: "powershell.exe"; \
  85. Parameters: "-ExecutionPolicy Bypass -File ""{app}\dist\tools_WD_clean.ps1"" -RmExclPath ""{app}"""; \
  86. WorkingDir: {app}; Flags: runhidden
  87. [Registry]
  88. Root: HKCU; Subkey: "Environment"; ValueType: string; ValueName: "IDF_TOOLS_PATH"; \
  89. ValueData: "{app}"; Flags: preservestringtype createvalueifdoesntexist uninsdeletevalue deletevalue;
  90. [Code]
  91. #include "utils.iss.inc"
  92. #include "choice_page.iss.inc"
  93. #include "cmdline_page.iss.inc"
  94. #include "idf_page.iss.inc"
  95. #include "git_page.iss.inc"
  96. #include "python_page.iss.inc"
  97. #include "system_check_page.iss.inc"
  98. #include "idf_download_page.iss.inc"
  99. #include "idf_setup.iss.inc"
  100. #include "summary.iss.inc"
  101. #include "main.iss.inc"