Skip to content

Commit 14fdc56

Browse files
authored
add offline version 5.0 (#155)
* add offline version 5.0 * add C2 and C6 * use explicit file extension for xcopy #150
1 parent 08fb4eb commit 14fdc56

14 files changed

+181
-41
lines changed

Build-Installer.ps1

Lines changed: 45 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,13 @@ function DownloadIdfVersions() {
5757
Invoke-WebRequest -O $Versions https://dl.espressif.com/dl/esp-idf/idf_versions.txt
5858
}
5959

60-
function PrepareConstraints {
60+
function GetConstraintFile() {
6161
$ShortVersion = $OfflineBranch -replace "^v" -replace "-.*$"
62-
$ConstraintFile = "espidf.constraints.v${ShortVersion}.txt"
62+
return "espidf.constraints.v${ShortVersion}.txt"
63+
}
64+
65+
function PrepareConstraints {
66+
$ConstraintFile = GetConstraintFile
6367
$ConstraintUrl = "https://dl.espressif.com/dl/esp-idf/$ConstraintFile"
6468
"Downloading $ConstraintUrl"
6569
Invoke-WebRequest -O "build\$InstallerType\${ConstraintFile}" $ConstraintUrl
@@ -164,18 +168,34 @@ function PrepareIdfPython {
164168

165169
function PrepareIdfPythonWheels {
166170
$WheelsDirectory = "build\$InstallerType\tools\idf-python-wheels\$IdfPythonWheelsVersion"
167-
if (!( Test-Path -Path $WheelsDirectory -PathType Container )) {
168-
mkdir $WheelsDirectory
169-
170-
# Patch requirements.txt to become resolvable
171-
$Requirements = "${WheelsDirectory}\requirements.txt"
172-
$regex = '^[^#].*windows-curses.*'
173-
174-
$RequirementsPath = "$BundleDir\tools\requirements\requirements.core.txt"
175-
# ESP-IDF v5 - requirements is in tools\requirements\requirements.core.txt
176-
if (-Not (Test-Path -Path "$RequirementsPath" -PathType Leaf)) {
177-
$RequirementsPath = "$BundleDir\requirements.txt" # Fallback to ESP-IDF v4
178-
}
171+
if ( Test-Path -Path $WheelsDirectory -PathType Container ) {
172+
"$WheelsDirectory exists. Using cached content."
173+
return
174+
}
175+
mkdir $WheelsDirectory
176+
177+
# Patch requirements.txt to become resolvable
178+
$Requirements = "${WheelsDirectory}\requirements.txt"
179+
$regex = '^[^#].*windows-curses.*'
180+
181+
$RequirementsPath = "$BundleDir\tools\requirements\requirements.core.txt"
182+
# ESP-IDF v5 - requirements is in tools\requirements\requirements.core.txt
183+
184+
if (Test-Path -Path "$RequirementsPath" -PathType Leaf) {
185+
(Get-Content $RequirementsPath) -replace $regex, 'windows-curses' | Set-Content $Requirements
186+
187+
$ConstraintFile = GetConstraintFile
188+
189+
python3 -m pip download --python-version 3.8 `
190+
--only-binary=":all:" `
191+
--extra-index-url "https://dl.espressif.com/pypi/" `
192+
-r ${Requirements} `
193+
-d ${WheelsDirectory} `
194+
-c "build\$InstallerType\${ConstraintFile}"
195+
} else {
196+
# ESP-IDF v4 and older
197+
$RequirementsPath = "$BundleDir\requirements.txt" # Fallback to ESP-IDF v4
198+
179199
(Get-Content $RequirementsPath) -replace $regex, 'windows-curses' | Set-Content $Requirements
180200

181201
python3 -m pip download --python-version 3.8 `
@@ -352,6 +372,17 @@ if (('offline' -eq $InstallerType) -or ('espressif-ide' -eq $InstallerType)){
352372
if (($OfflineBranch -like 'v4.1*') -or ($OfflineBranch -like 'v4.2*') ){
353373
$IsccParameters += '/DDISABLE_TARGET_ESP32_C3'
354374
$IsccParameters += '/DDISABLE_TARGET_ESP32_S3'
375+
$IsccParameters += '/DDISABLE_TARGET_ESP32_C2'
376+
$IsccParameters += '/DDISABLE_TARGET_ESP32_C6'
377+
}
378+
379+
if (($OfflineBranch -like 'v4.3*') -or ($OfflineBranch -like 'v4.4*') ){
380+
$IsccParameters += '/DDISABLE_TARGET_ESP32_C2'
381+
$IsccParameters += '/DDISABLE_TARGET_ESP32_C6'
382+
}
383+
384+
if ($OfflineBranch -like 'v5.0*') {
385+
$IsccParameters += '/DDISABLE_TARGET_ESP32_C6'
355386
}
356387

357388
if ($Compression -eq 'none') {

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ Note: Online Installer is recommended way of the installation.
1616

1717
| Version | Purpose | Size |
1818
| ------- | ------- | ---- |
19+
| 2.17 - 2022-12-06 - Online Installer [download](https://github.com/espressif/idf-installer/releases/download/online-2.17/esp-idf-tools-setup-online-2.17.exe)/[mirror](https://dl.espressif.com/dl/idf-installer/esp-idf-tools-setup-online-2.17.exe) | Deploy ESP-IDF, Espressif-IDE and support for other languages | 4 MB |
1920
| 2.16 - 2022-08-03 - Online Installer [download](https://github.com/espressif/idf-installer/releases/download/online-2.16/esp-idf-tools-setup-online-2.16.exe)/[mirror](https://dl.espressif.com/dl/idf-installer/esp-idf-tools-setup-online-2.16.exe) | Deploy ESP-IDF, Espressif-IDE and support for other languages | 4 MB |
2021
| 2.15 - 2022-04-20 - Online Installer [download](https://github.com/espressif/idf-installer/releases/download/online-2.15/esp-idf-tools-setup-online-2.15.exe)/[mirror](https://dl.espressif.com/dl/idf-installer/esp-idf-tools-setup-online-2.15.exe) | Deploy ESP-IDF, Espressif-IDE and support for other languages | 4 MB |
2122
| 2.14 - 2022-03-30 - Online Installer [download](https://github.com/espressif/idf-installer/releases/download/online-2.14/esp-idf-tools-setup-online-2.14.exe)/[mirror](https://dl.espressif.com/dl/idf-installer/esp-idf-tools-setup-online-2.14.exe) | Deploy ESP-IDF, Espressif-IDE and support for other languages | 4 MB |
@@ -36,6 +37,7 @@ Note: Online Installer is recommended way of the installation.
3637

3738
| Version | Content | Size |
3839
| ------- | ------- | ---- |
40+
| ESP-IDF v5.0 [download](https://github.com/espressif/idf-installer/releases/download/offline-5.0/esp-idf-tools-setup-offline-5.0.exe)/[mirror](https://dl.espressif.com/dl/idf-installer/esp-idf-tools-setup-offline-5.0.exe) | ESP-IDF + Toolchains for ESP32, ESP32-S2, ESP32-S3, ESP32-C3, ESP32-C2 | 670 MB |
3941
| ESP-IDF v4.4.3 [download](https://github.com/espressif/idf-installer/releases/download/offline-4.4.3/esp-idf-tools-setup-offline-4.4.3.exe)/[mirror](https://dl.espressif.com/dl/idf-installer/esp-idf-tools-setup-offline-4.4.3.exe) | ESP-IDF + Toolchains for ESP32, ESP32-S2, ESP32-S3, ESP32-C3 | 600 MB |
4042
| ESP-IDF v4.4.2 [download](https://github.com/espressif/idf-installer/releases/download/offline-4.4.2/esp-idf-tools-setup-offline-4.4.2.exe)/[mirror](https://dl.espressif.com/dl/idf-installer/esp-idf-tools-setup-offline-4.4.2.exe) | ESP-IDF + Toolchains for ESP32, ESP32-S2, ESP32-S3, ESP32-C3 | 600 MB |
4143
| ESP-IDF v4.4.1 [download](https://github.com/espressif/idf-installer/releases/download/offline-4.4.1/esp-idf-tools-setup-offline-4.4.1.exe)/[mirror](https://dl.espressif.com/dl/idf-installer/esp-idf-tools-setup-offline-4.4.1.exe) | ESP-IDF + Toolchains for ESP32, ESP32-S2, ESP32-S3, ESP32-C3 | 600 MB |

src/InnoSetup/Environment.iss

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ begin
294294
/h copies hidden files, /q disables file name logging (making copying faster!)
295295
}
296296
297-
CmdLine := ExpandConstant('cmd.exe /c ""xcopy" /s /e /i /h /q "' + IDFTempPath + '" "' + IDFPath + '""');
297+
CmdLine := ExpandConstant('cmd.exe /c ""xcopy.exe" /s /e /i /h /q "' + IDFTempPath + '" "' + IDFPath + '""');
298298
DoCmdlineInstall(CustomMessage('ExtractingEspIdf'), CustomMessage('CopyingEspIdf'), CmdLine);
299299
300300
GitRepoFixFileMode(IDFPath);
@@ -331,10 +331,18 @@ begin
331331
Targets := Targets + 'esp32,';
332332
end;
333333
334+
if (WizardIsComponentSelected('{#COMPONENT_TARGET_ESP32_C2}')) then begin
335+
Targets := Targets + 'esp32-c2,';
336+
end;
337+
334338
if (WizardIsComponentSelected('{#COMPONENT_TARGET_ESP32_C3}')) then begin
335339
Targets := Targets + 'esp32-c3,';
336340
end;
337341
342+
if (WizardIsComponentSelected('{#COMPONENT_TARGET_ESP32_C6}')) then begin
343+
Targets := Targets + 'esp32-c6,';
344+
end;
345+
338346
if (WizardIsComponentSelected('{#COMPONENT_TARGET_ESP32_S3}')) then begin
339347
Targets := Targets + 'esp32-s3,';
340348
end;

src/InnoSetup/IdfToolsSetup.iss

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,9 @@
126126
#define COMPONENT_DRIVER_WCH = "driver/wch"
127127
#define COMPONENT_TARGET = "target"
128128
#define COMPONENT_TARGET_ESP32 = "target/esp32"
129+
#define COMPONENT_TARGET_ESP32_C2 = "target/esp32c2"
129130
#define COMPONENT_TARGET_ESP32_C3 = "target/esp32c3"
131+
#define COMPONENT_TARGET_ESP32_C6 = "target/esp32c6"
130132
#define COMPONENT_TARGET_ESP32_S = "target/esp32s"
131133
#define COMPONENT_TARGET_ESP32_S3 = "target/esp32s/s3"
132134
#define COMPONENT_TARGET_ESP32_S2 = "target/esp32s/s2"
@@ -300,10 +302,18 @@ Name: "{#COMPONENT_DRIVER_WCH}"; Description: {cm:ComponentDriverWch}; Types: fu
300302
Name: "{#COMPONENT_TARGET}"; Description: {cm:ComponentTarget}; Types: full; Flags: checkablealone
301303
Name: "{#COMPONENT_TARGET_ESP32}"; Description: {cm:ComponentTargetEsp32}; Types: full; Flags: checkablealone
302304

305+
#ifndef DISABLE_TARGET_ESP32_C2
306+
Name: "{#COMPONENT_TARGET_ESP32_C2}"; Description: {cm:ComponentTargetEsp32c2}; Types: custom; Flags: checkablealone
307+
#endif
308+
303309
#ifndef DISABLE_TARGET_ESP32_C3
304310
Name: "{#COMPONENT_TARGET_ESP32_C3}"; Description: {cm:ComponentTargetEsp32c3}; Types: full; Flags: checkablealone
305311
#endif
306312

313+
#ifndef DISABLE_TARGET_ESP32_C6
314+
Name: "{#COMPONENT_TARGET_ESP32_C6}"; Description: {cm:ComponentTargetEsp32c6}; Types: custom; Flags: checkablealone
315+
#endif
316+
307317
Name: "{#COMPONENT_TARGET_ESP32_S}"; Description: {cm:ComponentTargetEsp32s}; Types: full; Flags: checkablealone
308318
Name: "{#COMPONENT_TARGET_ESP32_S2}"; Description: {cm:ComponentTargetEsp32s2}; Types: full; Flags: checkablealone
309319

src/InnoSetup/Languages/IdfToolsSetup_cs-CZ.isl

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,12 @@ ComponentDriverSilabs=Silicon Labs - Virtual COM Port pro USB CP210x (ESP desky)
6868
ComponentDriverWch=WCH - Virtual COM Port pro USB CH343/CH9102 (LilyGo desky)
6969
ComponentTarget=Chip Targets - více informací na https://products.espressif.com/
7070
ComponentTargetEsp32=ESP32
71-
ComponentTargetEsp32c3=ESP32-C3
71+
ComponentTargetEsp32c2=ESP32-C2 (ESP-IDF v5.0+)
72+
ComponentTargetEsp32c3=ESP32-C3 (ESP-IDF v4.3+)
73+
ComponentTargetEsp32c6=ESP32-C6 (ESP-IDF v5.1+)
7274
ComponentTargetEsp32s=ESP32-S Series
73-
ComponentTargetEsp32s3=ESP32-S3
74-
ComponentTargetEsp32s2=ESP32-S2
75+
ComponentTargetEsp32s3=ESP32-S3 (ESP-IDF v4.4+)
76+
ComponentTargetEsp32s2=ESP32-S2 (ESP-IDF v4.2+)
7577
ComponentOptimization=Optimalizace
7678
ComponentOptimizationEspressifDownload=Použít Espressif download mirror místo GitHub-u
7779
InstallationFull=Plná instalace
@@ -159,3 +161,5 @@ ComponentToitJaguar=Jazyk Toit - nástroj Jaguar s podporou pro live-reload (jag
159161
InstallingToit=Instalace integrace s Toit
160162
ComponentJdk=Amazon Corretto 11 JDK
161163
SettingEnvironmentVariable=Konfigurace proměnné prostředí
164+
SystemCheckEnvironmentVariables=Environment variables
165+
SystemCheckPathExtError=PATHEXT does not contain .EXE

src/InnoSetup/Languages/IdfToolsSetup_en-US.isl

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,12 @@ ComponentDriverSilabs=Silicon Labs - Virtual COM Port for USB CP210x (ESP boards
6868
ComponentDriverWch=WCH - Virtual COM Port for USB CH343/CH9102 (LilyGo boards)
6969
ComponentTarget=Chip Targets - more details at https://products.espressif.com/
7070
ComponentTargetEsp32=ESP32
71-
ComponentTargetEsp32c3=ESP32-C3
71+
ComponentTargetEsp32c2=ESP32-C2 (ESP-IDF v5.0+)
72+
ComponentTargetEsp32c3=ESP32-C3 (ESP-IDF v4.3+)
73+
ComponentTargetEsp32c6=ESP32-C6 (ESP-IDF v5.1+)
7274
ComponentTargetEsp32s=ESP32-S Series
73-
ComponentTargetEsp32s3=ESP32-S3
74-
ComponentTargetEsp32s2=ESP32-S2
75+
ComponentTargetEsp32s3=ESP32-S3 (ESP-IDF v4.4+)
76+
ComponentTargetEsp32s2=ESP32-S2 (ESP-IDF v4.2+)
7577
ComponentOptimization=Optimization
7678
ComponentOptimizationEspressifDownload=Use Espressif download mirror instead of GitHub
7779
InstallationFull=Full installation
@@ -159,3 +161,5 @@ ComponentToitJaguar=Toit language support - Jaguar live reloading tool (jag.exe)
159161
InstallingToit=Installing Toit language
160162
ComponentJdk=Amazon Corretto 11 JDK
161163
SettingEnvironmentVariable=Setting environment variable
164+
SystemCheckEnvironmentVariables=Environment variables
165+
SystemCheckPathExtError=PATHEXT does not contain .EXE

src/InnoSetup/Languages/IdfToolsSetup_es-ES.isl

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,12 @@ ComponentDriverSilabs=Silicon Labs - Puerto Virtual COM para USB CP210x (ESP boa
6969
ComponentDriverWch=WCH - Virtual COM Port para USB CH343/CH9102 (LilyGo boards)
7070
ComponentTarget=Chip Targets - más detalles https://products.espressif.com/
7171
ComponentTargetEsp32=ESP32
72-
ComponentTargetEsp32c3=ESP32-C3
72+
ComponentTargetEsp32c2=ESP32-C2 (ESP-IDF v5.0+)
73+
ComponentTargetEsp32c3=ESP32-C3 (ESP-IDF v4.3+)
74+
ComponentTargetEsp32c6=ESP32-C6 (ESP-IDF v5.1+)
7375
ComponentTargetEsp32s=ESP32-S Series
74-
ComponentTargetEsp32s3=ESP32-S3
75-
ComponentTargetEsp32s2=ESP32-S2
76+
ComponentTargetEsp32s3=ESP32-S3 (ESP-IDF v4.4+)
77+
ComponentTargetEsp32s2=ESP32-S2 (ESP-IDF v4.2+)
7678
ComponentOptimization=Optimización
7779
ComponentOptimizationEspressifDownload=Usar enlaces de descarga Espressif en vez de GitHub
7880
InstallationFull=Instalación completa
@@ -160,3 +162,5 @@ ComponentToitJaguar=Toit language support - Jaguar live reloading tool (jag.exe)
160162
InstallingToit=Installing Toit language
161163
ComponentJdk=Amazon Corretto 11 JDK
162164
SettingEnvironmentVariable=Setting environment variable
165+
SystemCheckEnvironmentVariables=Environment variables
166+
SystemCheckPathExtError=PATHEXT does not contain .EXE

src/InnoSetup/Languages/IdfToolsSetup_pt-BR.isl

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,12 @@ ComponentDriverSilabs=Silicon Labs - Virtual COM Port para USB CP210x (placas ES
6969
ComponentDriverWch=WCH - Virtual COM Port para USB CH343/CH9102 (placas LilyGo)
7070
ComponentTarget=Chip Targets - Mais detalhes em https://products.espressif.com/
7171
ComponentTargetEsp32=ESP32
72-
ComponentTargetEsp32c3=ESP32-C3
72+
ComponentTargetEsp32c2=ESP32-C2 (ESP-IDF v5.0+)
73+
ComponentTargetEsp32c3=ESP32-C3 (ESP-IDF v4.3+)
74+
ComponentTargetEsp32c6=ESP32-C6 (ESP-IDF v5.1+)
7375
ComponentTargetEsp32s=ESP32-S Series
74-
ComponentTargetEsp32s3=ESP32-S3
75-
ComponentTargetEsp32s2=ESP32-S2
76+
ComponentTargetEsp32s3=ESP32-S3 (ESP-IDF v4.4+)
77+
ComponentTargetEsp32s2=ESP32-S2 (ESP-IDF v4.2+)
7678
ComponentOptimization=Otimização
7779
ComponentOptimizationEspressifDownload=Utilizar o servidor Espressif para o download e não o GitHub
7880
InstallationFull=Instalação completa
@@ -160,3 +162,5 @@ ComponentToitJaguar=Toit language support - Jaguar live reloading tool (jag.exe)
160162
InstallingToit=Installing Toit language
161163
ComponentJdk=Amazon Corretto 11 JDK
162164
SettingEnvironmentVariable=Setting environment variable
165+
SystemCheckEnvironmentVariables=Environment variables
166+
SystemCheckPathExtError=PATHEXT does not contain .EXE

src/InnoSetup/Languages/IdfToolsSetup_pt-PT.isl

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,12 @@ ComponentDriverSilabs=Silicon Labs - Virtual COM Port para USB CP210x (placas ES
6969
ComponentDriverWch=WCH - Virtual COM Port para USB CH343/CH9102 (placas LilyGo)
7070
ComponentTarget=Chip Targets - Mais detalhes em https://products.espressif.com/
7171
ComponentTargetEsp32=ESP32
72-
ComponentTargetEsp32c3=ESP32-C3
72+
ComponentTargetEsp32c2=ESP32-C2 (ESP-IDF v5.0+)
73+
ComponentTargetEsp32c3=ESP32-C3 (ESP-IDF v4.3+)
74+
ComponentTargetEsp32c6=ESP32-C6 (ESP-IDF v5.1+)
7375
ComponentTargetEsp32s=ESP32-S Series
74-
ComponentTargetEsp32s3=ESP32-S3
75-
ComponentTargetEsp32s2=ESP32-S2
76+
ComponentTargetEsp32s3=ESP32-S3 (ESP-IDF v4.4+)
77+
ComponentTargetEsp32s2=ESP32-S2 (ESP-IDF v4.2+)
7678
ComponentOptimization=Otimização
7779
ComponentOptimizationEspressifDownload=Utilizar o servidor Espressif para descarregar e não o GitHub
7880
InstallationFull=Instalação completa
@@ -160,3 +162,5 @@ ComponentToitJaguar=Toit language support - Jaguar live reloading tool (jag.exe)
160162
InstallingToit=Installing Toit language
161163
ComponentJdk=Amazon Corretto 11 JDK
162164
SettingEnvironmentVariable=Setting environment variable
165+
SystemCheckEnvironmentVariables=Environment variables
166+
SystemCheckPathExtError=PATHEXT does not contain .EXE

src/InnoSetup/Languages/IdfToolsSetup_sk-SK.isl

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,12 @@ ComponentDriverSilabs=Silicon Labs - Virtual COM Port pre USB CP210x (ESP dosky)
6868
ComponentDriverWch=WCH - Virtual COM Port pre USB CH343/CH9102 (LilyGo dosky)
6969
ComponentTarget=Chip Targets - viac informácií na https://products.espressif.com/
7070
ComponentTargetEsp32=ESP32
71-
ComponentTargetEsp32c3=ESP32-C3
71+
ComponentTargetEsp32c2=ESP32-C2 (ESP-IDF v5.0+)
72+
ComponentTargetEsp32c3=ESP32-C3 (ESP-IDF v4.3+)
73+
ComponentTargetEsp32c6=ESP32-C6 (ESP-IDF v5.1+)
7274
ComponentTargetEsp32s=ESP32-S Series
73-
ComponentTargetEsp32s3=ESP32-S3
74-
ComponentTargetEsp32s2=ESP32-S2
75+
ComponentTargetEsp32s3=ESP32-S3 (ESP-IDF v4.4+)
76+
ComponentTargetEsp32s2=ESP32-S2 (ESP-IDF v4.2+)
7577
ComponentOptimization=Optimalizácia
7678
ComponentOptimizationEspressifDownload=Použiť Espressif download mirror namiesto GitHub-u
7779
InstallationFull=Plná inštalácia
@@ -159,3 +161,5 @@ ComponentToitJaguar=Jazyk Toit - nástroj Jaguar s podporou live-reload (jag.exe
159161
InstallingToit=Inštalácia integrácie s Toit
160162
ComponentJdk=Amazon Corretto 11 JDK
161163
SettingEnvironmentVariable=Nastavovanie premennej prostredia
164+
SystemCheckEnvironmentVariables=Environment variables
165+
SystemCheckPathExtError=PATHEXT does not contain .EXE

0 commit comments

Comments
 (0)