diff --git a/Build-Installer.ps1 b/Build-Installer.ps1 index ba72061..19d6cd8 100644 --- a/Build-Installer.ps1 +++ b/Build-Installer.ps1 @@ -96,7 +96,7 @@ function PrepareIdf7za { function PrepareIdfEnv { PrepareIdfFile -BasePath build\$InstallerType\lib ` -FilePath idf-env.exe ` - -DownloadUrl https://github.com/espressif/idf-env/releases/download/v1.2.1.0/win64.idf-env.exe + -DownloadUrl https://github.com/espressif/idf-env/releases/download/v1.2.2.0/win64.idf-env.exe } function PrepareIdfGit { diff --git a/src/InnoSetup/IdfToolsSetup.iss b/src/InnoSetup/IdfToolsSetup.iss index e1fbc4b..b089605 100644 --- a/src/InnoSetup/IdfToolsSetup.iss +++ b/src/InnoSetup/IdfToolsSetup.iss @@ -5,7 +5,7 @@ #include #define MyAppName "ESP-IDF Tools" -#define MyAppVersion "2.10" +#define MyAppVersion "2.11" #define MyAppPublisher "Espressif Systems (Shanghai) Co. Ltd." #define MyAppURL "https://github.com/espressif/esp-idf" diff --git a/src/InnoSetup/Pages/SystemCheckPage.iss b/src/InnoSetup/Pages/SystemCheckPage.iss index dcaab2f..a024d32 100644 --- a/src/InnoSetup/Pages/SystemCheckPage.iss +++ b/src/InnoSetup/Pages/SystemCheckPage.iss @@ -413,15 +413,29 @@ var begin SystemLogTitle(CustomMessage('SystemCheckRootCertificates') + ' '); - { It's necessary to invoke PowerShell *BEFORE* Python. Invoke-Request will retrieve and add Root Certificate if necessary. } + { It's necessary to invoke reuqest to https server *BEFORE* Python. idf-env will retrieve and add Root Certificate if necessary. } { Without the certificate Python is failing to connect to https. } { Windows command to list current certificates: certlm.msc } - OutFile := ExpandConstant('{tmp}\check'); - Command := 'powershell -ExecutionPolicy Bypass '; - Command := Command + 'Invoke-WebRequest -Uri "https://dl.espressif.com/dl/?system_check=win' + GetWindowsVersionString + '" -OutFile "' + OutFile + '-1.txt";'; - Command := Command + 'Invoke-WebRequest -Uri "https://github.com/espressif" -OutFile "' + OutFile + '-2.txt";'; - {Command := Command + 'Invoke-WebRequest -Uri "https://www.s3.amazonaws.com/" -OutFile "' + OutFile + '-3.txt";';} + + Command := GetIdfEnvCommand('certificate verify --url https://dl.espressif.com/dl/?system_check=win' + GetWindowsVersionString); + ResultCode := SystemCheckExec(Command, ExpandConstant('{tmp}')); + if (ResultCode <> 0) then begin + SystemLog(' [' + CustomMessage('SystemCheckResultWarn') + ']'); + SystemLog(CustomMessage('SystemCheckRootCertificateWarning')); + Exit; + end; + + Command := GetIdfEnvCommand('certificate verify --url https://github.com/espressif'); ResultCode := SystemCheckExec(Command, ExpandConstant('{tmp}')); + if (ResultCode <> 0) then begin + SystemLog(' [' + CustomMessage('SystemCheckResultWarn') + ']'); + SystemLog(CustomMessage('SystemCheckRootCertificateWarning')); + Exit; + end; + + Command := GetIdfEnvCommand('certificate verify --url https://www.s3.amazonaws.com/'); + ResultCode := SystemCheckExec(Command, ExpandConstant('{tmp}')); + if (ResultCode <> 0) then begin SystemLog(' [' + CustomMessage('SystemCheckResultWarn') + ']'); SystemLog(CustomMessage('SystemCheckRootCertificateWarning'));