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