From 0e6d32cbfdc7b6e85d05f906cd0f2e1d859c4a43 Mon Sep 17 00:00:00 2001 From: Ivan Grokhotkov Date: Fri, 25 Sep 2020 13:40:23 +0200 Subject: [PATCH] tools: windows installer: add support for IDF_GITHUB_ASSETS Adds a checkbox to download tools from dl.espressif.com mirror. --- tools/windows/tool_setup/idf_tool_setup.iss | 1 + tools/windows/tool_setup/main.iss.inc | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/tools/windows/tool_setup/idf_tool_setup.iss b/tools/windows/tool_setup/idf_tool_setup.iss index 83eb25f2e2..614203362b 100644 --- a/tools/windows/tool_setup/idf_tool_setup.iss +++ b/tools/windows/tool_setup/idf_tool_setup.iss @@ -82,6 +82,7 @@ Name: createdsk; Description: "Create Desktop shortcut for the ESP-IDF Tools Com ; WD registration checkbox is identified by 'Windows Defender' substring anywhere in its caption, not by the position index in WizardForm.TasksList.Items ; 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 Name: wdexcl; Description: "Register the ESP-IDF Tools executables as Windows Defender exclusions (improves compilation speed, requires elevation)"; +Name: idf_tools_use_mirror; Description: "Use Espressif download server instead of downloading tool packages from Github"; Flags: unchecked; [Run] 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 diff --git a/tools/windows/tool_setup/main.iss.inc b/tools/windows/tool_setup/main.iss.inc index d54d6d9828..f6b0a50b47 100644 --- a/tools/windows/tool_setup/main.iss.inc +++ b/tools/windows/tool_setup/main.iss.inc @@ -117,6 +117,11 @@ begin if not IDFUseExisting then IDFDownload(); + if WizardIsTaskSelected('idf_tools_use_mirror') then + begin + SetEnvironmentVariable('IDF_GITHUB_ASSETS', 'dl.espressif.com/github_assets') + end; + IDFToolsSetup();