idf_tool_setup.iss 4.9 KB

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