From 66aac7028633d35a869a6bffda5ee7484458789f Mon Sep 17 00:00:00 2001 From: Martin Vychodil Date: Fri, 13 Dec 2019 01:53:55 +0100 Subject: [PATCH 1/3] tools: WD exclusions support - internal improvements * use {group} symbolic path instead of {autostartmenu) due to backward compatibility * don't check Defender module existence in PS scripts (done by the installer) --- tools/windows/tool_setup/idf_tool_setup.iss | 4 ++-- tools/windows/tool_setup/tools_WD_clean.ps1 | 7 ------- tools/windows/tool_setup/tools_WD_excl.ps1 | 21 --------------------- 3 files changed, 2 insertions(+), 30 deletions(-) diff --git a/tools/windows/tool_setup/idf_tool_setup.iss b/tools/windows/tool_setup/idf_tool_setup.iss index 95f82c935..fc9991ecd 100644 --- a/tools/windows/tool_setup/idf_tool_setup.iss +++ b/tools/windows/tool_setup/idf_tool_setup.iss @@ -73,7 +73,7 @@ Type: filesandordirs; Name: "{app}\dist" Type: filesandordirs; Name: "{app}\releases" Type: filesandordirs; Name: "{app}\tools" Type: filesandordirs; Name: "{app}\python_env" -Type: files; Name: "{autostartmenu}\Programs\ESP-IDF\{#IDFCmdExeShortcutFile}" +Type: files; Name: "{group}\{#IDFCmdExeShortcutFile}" Type: files; Name: "{autodesktop}\{#IDFCmdExeShortcutFile}" [Tasks] @@ -84,7 +84,7 @@ Name: wdexcl; Description: "Register the ESP-IDF Tools executables as Windows De [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 Filename: "{app}\dist\{#GitInstallerName}"; Parameters: "/silent /tasks="""" /norestart"; Description: "Installing Git"; Check: GitInstallRequired -Filename: "{autostartmenu}\Programs\ESP-IDF\{#IDFCmdExeShortcutFile}"; Flags: postinstall shellexec; Description: "Run ESP-IDF Command Prompt (cmd.exe)"; Check: InstallationSuccessful +Filename: "{group}\{#IDFCmdExeShortcutFile}"; Flags: postinstall shellexec; Description: "Run ESP-IDF Command Prompt (cmd.exe)"; Check: InstallationSuccessful [UninstallRun] Filename: "powershell.exe"; \ diff --git a/tools/windows/tool_setup/tools_WD_clean.ps1 b/tools/windows/tool_setup/tools_WD_clean.ps1 index 74f60c49c..620bff35c 100644 --- a/tools/windows/tool_setup/tools_WD_clean.ps1 +++ b/tools/windows/tool_setup/tools_WD_clean.ps1 @@ -35,11 +35,6 @@ $retVal = 1 Try { - #check the Defender module availability - if (!(Get-Module "Defender")) { - Write-Output "Windows Defender module not available, aborting" - [Environment]::Exit(0) - } Import-Module Defender @@ -59,7 +54,6 @@ Try if( [string]::IsNullOrEmpty($logFile) ) { $tempFileName = Get-Date -UFormat "%Y%m%d%H%M%s" $lf = Join-Path -Path $env:TEMP -ChildPath "WDEspLog$tempFileName.log" - #Write-Output "Logfile: $lf" } $newProcess = new-object System.Diagnostics.ProcessStartInfo "PowerShell" @@ -77,7 +71,6 @@ Try Remove-Item $lf } - #Write-Output "Process finished with code " $proc.ExitCode exit $proc.ExitCode } diff --git a/tools/windows/tool_setup/tools_WD_excl.ps1 b/tools/windows/tool_setup/tools_WD_excl.ps1 index 09c831327..b7d32c709 100644 --- a/tools/windows/tool_setup/tools_WD_excl.ps1 +++ b/tools/windows/tool_setup/tools_WD_excl.ps1 @@ -88,13 +88,6 @@ Try } } - #check the Defender module availability - $wdModuleDir = Join-Path -Path $env:SystemRoot -ChildPath "System32\WindowsPowerShell\v1.0\Modules\Defender" - if( -not (Test-Path -Path $wdModuleDir) ) { - Write-Output "Windows Defender module not found, aborting" - [Environment]::Exit($retVal) - } - Import-Module Defender #self-elevation support @@ -119,7 +112,6 @@ Try if( $bOwnLogFile ) { $tempFileName = Get-Date -UFormat "%Y%m%d%H%M%s" $lf = Join-Path -Path $env:TEMP -ChildPath "WDEspLog$tempFileName.log" - Write-Output "Logfile: $lf" } else { $lf = $logFile } @@ -164,37 +156,24 @@ Try #ADD exclusion paths if( $bAddPath ) { - #foreach ($wdPath in $AddExclPath) { - # $pathsToExclude.Add( $wdPath ) - #} $pathsToExclude.Add( $AddExclPath ) } #ADD exclusion files if( $bAddFile ) { - #foreach ($wdFile in $AddExclFile) { - # $filesToExclude.Add( $wdFile ) - #} $filesToExclude.Add( $AddExclFile ) } #REMOVE exclusion paths if( $bRmPath ) { - #foreach ($wdPath in $RmExclPath) { - # $pathsToInclude.Add( $wdPath ) - #} $pathsToInclude.Add( $RmExclPath ) } #ADD exclusion file if( $bAddFile ) { - #foreach ($wdFile in $RmExclFile) { - # $filesToRemove.Add( $wdFile ) - #} $filesToRemove.Add( $RmExclFile ) } } - #default: throw exception else { throw (New-Object -TypeName System.ArgumentException -ArgumentList "Mandatory parameter(s) missing") } From d021e7141926cddf3b023ea26bf72f9109244854 Mon Sep 17 00:00:00 2001 From: Ivan Grokhotkov Date: Thu, 12 Dec 2019 14:15:13 +0100 Subject: [PATCH 2/3] tools: bump windows tools installer version to v2.2 Includes the fix for Windows Defender exceptions installation. Closes https://github.com/espressif/esp-idf/issues/4225 Closes https://github.com/espressif/esp-idf/issues/4354 Closes IDFGH-2036 Closes IDFGH-2202 --- tools/windows/tool_setup/idf_tool_setup.iss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/windows/tool_setup/idf_tool_setup.iss b/tools/windows/tool_setup/idf_tool_setup.iss index fc9991ecd..8b01689c5 100644 --- a/tools/windows/tool_setup/idf_tool_setup.iss +++ b/tools/windows/tool_setup/idf_tool_setup.iss @@ -5,7 +5,7 @@ #include #define MyAppName "ESP-IDF Tools" -#define MyAppVersion "2.1" +#define MyAppVersion "2.2" #define MyAppPublisher "Espressif Systems (Shanghai) Co. Ltd." #define MyAppURL "https://github.com/espressif/esp-idf" From f91c5c6f23bcbd41ae43e40cf6e6804b0d282420 Mon Sep 17 00:00:00 2001 From: Ivan Grokhotkov Date: Thu, 12 Dec 2019 14:15:33 +0100 Subject: [PATCH 3/3] docs: update Windows tools installer link --- docs/en/get-started/windows-setup.rst | 2 +- docs/zh_CN/get-started/windows-setup.rst | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/en/get-started/windows-setup.rst b/docs/en/get-started/windows-setup.rst index 5a908473a..2819a50d0 100644 --- a/docs/en/get-started/windows-setup.rst +++ b/docs/en/get-started/windows-setup.rst @@ -24,7 +24,7 @@ ESP-IDF Tools Installer The easiest way to install ESP-IDF's prerequisites is to download the ESP-IDF Tools installer from this URL: -https://dl.espressif.com/dl/esp-idf-tools-setup-2.1.exe +https://dl.espressif.com/dl/esp-idf-tools-setup-2.2.exe The installer includes the cross-compilers, OpenOCD, cmake_ and Ninja_ build tool. The installer can also download and run installers for Python_ 3.7 and `Git For Windows`_ if they are not already installed on the computer. diff --git a/docs/zh_CN/get-started/windows-setup.rst b/docs/zh_CN/get-started/windows-setup.rst index a4297e4e4..523956d01 100644 --- a/docs/zh_CN/get-started/windows-setup.rst +++ b/docs/zh_CN/get-started/windows-setup.rst @@ -24,7 +24,7 @@ ESP-IDF 工具安装器 要安装 ESP-IDF 必备工具,最简易的方式是下载 ESP-IDF 工具安装器,地址如下: -https://dl.espressif.com/dl/esp-idf-tools-setup-2.0.exe +https://dl.espressif.com/dl/esp-idf-tools-setup-2.2.exe 本安装器可为您安装所需的交叉编译器、OpenOCD、cmake_ 和 Ninja_ 编译工具,以及一款 mconf-idf_ 配置工具。此外,本安装器还可在有需要时下载、运行 Python_ 3.7 和 `Git For Windows` 的安装器。