idf_tool_setup.iss 3.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  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.0"
  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. 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"
  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. [UninstallDelete]
  58. Type: filesandordirs; Name: "{app}\dist"
  59. Type: filesandordirs; Name: "{app}\releases"
  60. Type: filesandordirs; Name: "{app}\tools"
  61. Type: filesandordirs; Name: "{app}\python_env"
  62. [Run]
  63. 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
  64. Filename: "{app}\dist\{#GitInstallerName}"; Parameters: "/silent /tasks="""" /norestart"; Description: "Installing Git"; Check: GitInstallRequired
  65. Filename: "{group}\{#IDFCmdExeShortcutFile}"; Flags: postinstall shellexec; Description: "Run ESP-IDF Command Prompt (cmd.exe)"; Check: InstallationSuccessful
  66. [Registry]
  67. Root: HKCU; Subkey: "Environment"; ValueType: string; ValueName: "IDF_TOOLS_PATH"; \
  68. ValueData: "{app}"; Flags: preservestringtype createvalueifdoesntexist;
  69. [Code]
  70. #include "utils.iss.inc"
  71. #include "choice_page.iss.inc"
  72. #include "cmdline_page.iss.inc"
  73. #include "idf_page.iss.inc"
  74. #include "git_page.iss.inc"
  75. #include "python_page.iss.inc"
  76. #include "idf_download_page.iss.inc"
  77. #include "idf_setup.iss.inc"
  78. #include "summary.iss.inc"
  79. #include "main.iss.inc"