idf_tool_setup.iss 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. ; Copyright 2019 Espressif Systems (Shanghai) PTE 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"
  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. Source: "tools_WD_excl.ps1"; DestDir: "{app}\dist"
  59. Source: "tools_WD_clean.ps1"; DestDir: "{app}\dist"
  60. [UninstallDelete]
  61. Type: filesandordirs; Name: "{app}\dist"
  62. Type: filesandordirs; Name: "{app}\releases"
  63. Type: filesandordirs; Name: "{app}\tools"
  64. Type: filesandordirs; Name: "{app}\python_env"
  65. Type: files; Name: "{group}\{#IDFCmdExeShortcutFile}"
  66. Type: files; Name: "{autodesktop}\{#IDFCmdExeShortcutFile}"
  67. [Tasks]
  68. Name: createlnk; Description: "Create Start Menu shortcut for the ESP-IDF Tools Command Prompt";
  69. Name: createdsk; Description: "Create Desktop shortcut for the ESP-IDF Tools Command Prompt";
  70. ; WD registration checkbox is identified by 'Windows Defender' substring anywhere in its caption, not by the position index in WizardForm.TasksList.Items
  71. ; 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
  72. Name: wdexcl; Description: "Register the ESP-IDF Tools executables as Windows Defender exclusions (improves compilation speed, requires elevation)";
  73. [Run]
  74. 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
  75. Filename: "{app}\dist\{#GitInstallerName}"; Parameters: "/silent /tasks="""" /norestart"; Description: "Installing Git"; Check: GitInstallRequired
  76. Filename: "{group}\{#IDFCmdExeShortcutFile}"; Flags: postinstall shellexec; Description: "Run ESP-IDF Command Prompt (cmd.exe)"; Check: InstallationSuccessful
  77. [UninstallRun]
  78. Filename: "powershell.exe"; \
  79. Parameters: "-ExecutionPolicy Bypass -File ""{app}\dist\tools_WD_clean.ps1"" -RmExclPath ""{app}"""; \
  80. WorkingDir: {app}; Flags: runhidden
  81. [Registry]
  82. Root: HKCU; Subkey: "Environment"; ValueType: string; ValueName: "IDF_TOOLS_PATH"; \
  83. ValueData: "{app}"; Flags: preservestringtype createvalueifdoesntexist uninsdeletevalue deletevalue;
  84. [Code]
  85. #include "utils.iss.inc"
  86. #include "choice_page.iss.inc"
  87. #include "cmdline_page.iss.inc"
  88. #include "idf_page.iss.inc"
  89. #include "git_page.iss.inc"
  90. #include "python_page.iss.inc"
  91. #include "idf_download_page.iss.inc"
  92. #include "idf_setup.iss.inc"
  93. #include "summary.iss.inc"
  94. #include "main.iss.inc"