Skip to content

Commit 8c88b18

Browse files
authored
Bugfix/forwardslash and offline-5.0 (#158)
* tools: deploy idf_tools with backward slashesh * tools: fix missing gdb * tools: deploy tools and debuggers based on available chips * tools: use single branch clone instead of shallow * update release to 2.18
1 parent c89a913 commit 8c88b18

File tree

5 files changed

+57
-12
lines changed

5 files changed

+57
-12
lines changed

README.md

Lines changed: 1 addition & 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.18 - 2022-12-23 - Online Installer [download](https://github.com/espressif/idf-installer/releases/download/online-2.18/esp-idf-tools-setup-online-2.18.exe)/[mirror](https://dl.espressif.com/dl/idf-installer/esp-idf-tools-setup-online-2.18.exe) | Deploy ESP-IDF, Espressif-IDE and support for other languages | 4 MB |
1920
| 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 |
2021
| 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 |
2122
| 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 |

src/InnoSetup/Configuration.iss

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,16 @@ begin
122122
Result := ResultPath;
123123
end;
124124
125+
function GetPathWithBackslashes(Path: String): String;
126+
var
127+
ResultPath: String;
128+
begin
129+
ResultPath := Path;
130+
StringChangeEx(ResultPath, '/', '\', True);
131+
Result := ResultPath;
132+
end;
133+
134+
125135
{ Find Major and Minor version in esp_idf_version.h file. }
126136
function GetIDFVersionFromHeaderFile():String;
127137
var

src/InnoSetup/Environment.iss

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -251,11 +251,7 @@ begin
251251
CmdLine := GitExecutablePath + ' clone --progress -b ' + IDFDownloadVersion;
252252
253253
if (WizardIsComponentSelected('{#COMPONENT_OPTIMIZATION_GIT_SHALLOW}')) then begin
254-
GitDepth := '1';
255-
end;
256-
257-
if (Length(GitDepth) > 0) then begin
258-
CmdLine := CmdLine + ' --depth ' + GitDepth + ' --shallow-submodules ';
254+
CmdLine := CmdLine + ' --single-branch --shallow-submodules ';
259255
end;
260256
261257
if (IsGitRecursive) then begin
@@ -358,10 +354,19 @@ begin
358354
end;
359355
end;
360356
357+
function TrimTrailingBackslash(Path: String): String;
358+
begin
359+
if (Length(Path) > 0) and (Path[Length(Path)] = '\') then begin
360+
Result := Copy(Path, 1, Length(Path) - 1);
361+
end else begin
362+
Result := Path;
363+
end;
364+
end;
365+
361366
procedure IDFToolsSetup();
362367
var
363368
CmdLine: String;
364-
IdfPathWithForwardSlashes: String;
369+
IdfPathWithBackslashes: String;
365370
IDFToolsPyPath: String;
366371
IDFToolsPyCmd: String;
367372
BundledIDFToolsPyPath: String;
@@ -370,7 +375,7 @@ var
370375
ResultCode: Integer;
371376
TargetSupportTestCommand: String;
372377
begin
373-
IdfPathWithForwardSlashes := GetPathWithForwardSlashes(GetIDFPath(''));;
378+
IdfPathWithBackslashes := TrimTrailingBackslash(GetPathWithBackslashes(GetIDFPath('')));
374379
IDFToolsPyPath := GetIDFPath('tools\idf_tools.py');
375380
BundledIDFToolsPyPath := ExpandConstant('{app}\idf_tools_fallback.py');
376381
JSONArg := '';
@@ -396,7 +401,7 @@ begin
396401
TargetSupportTestCommand := '"' + IDFToolsPyCmd + '" install --targets=""';
397402
398403
{ IDFPath not quoted, as it can not contain spaces }
399-
IDFToolsPyCmd := PythonExecutablePath + ' "' + IDFToolsPyCmd + '" --idf-path "' + IdfPathWithForwardSlashes + '" ' + JSONArg + ' ';
404+
IDFToolsPyCmd := PythonExecutablePath + ' "' + IDFToolsPyCmd + '" "--idf-path=' + IdfPathWithBackslashes + '" ' + JSONArg + ' ';
400405
401406
SetEnvironmentVariable('PYTHONUNBUFFERED', '1');
402407

src/InnoSetup/IdfToolsSetup.iss

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
#ifdef VERSION
1515
#define MyAppVersion VERSION
1616
#else
17-
#define MyAppVersion "2.17"
17+
#define MyAppVersion "2.18"
1818
#endif
1919

2020
#define MyAppPublisher "Espressif Systems (Shanghai) Co. Ltd."
@@ -236,14 +236,32 @@ Source: "{#BUILD}\tools\openocd-esp32\*"; DestDir: "\\?\{app}\tools\openocd-esp3
236236
Source: "{#BUILD}\tools\xtensa-esp32-elf\*"; DestDir: "\\?\{app}\tools\xtensa-esp32-elf"; Components: "{#COMPONENT_TARGET_ESP32}"; Flags: recursesubdirs skipifsourcedoesntexist;
237237
Source: "{#BUILD}\tools\xtensa-esp32s2-elf\*"; DestDir: "\\?\{app}\tools\xtensa-esp32s2-elf"; Components: "{#COMPONENT_TARGET_ESP32_S2}"; Flags: recursesubdirs skipifsourcedoesntexist;
238238

239+
; GDB RISC-V - ifndef begins with the latest chip def. If installer is not capable of handling the chip in the latest chip
240+
; then one chip is eliminated from the list
241+
#ifndef DISABLE_TARGET_ESP32_C6
242+
Source: "{#BUILD}\tools\riscv32-esp-elf\*"; DestDir: "\\?\{app}\tools\riscv32-esp-elf"; Components: {#COMPONENT_TARGET_ESP32_C3} {#COMPONENT_TARGET_ESP32_C2} {#COMPONENT_TARGET_ESP32_C6}; Flags: recursesubdirs skipifsourcedoesntexist;
243+
Source: "{#BUILD}\tools\riscv32-esp-elf-gdb\*"; DestDir: "\\?\{app}\tools\riscv32-esp-elf-gdb"; Components: {#COMPONENT_TARGET_ESP32_C3} {#COMPONENT_TARGET_ESP32_C2} {#COMPONENT_TARGET_ESP32_C6}; Flags: recursesubdirs skipifsourcedoesntexist;
244+
#else
245+
#ifndef DISABLE_TARGET_ESP32_C2
246+
Source: "{#BUILD}\tools\riscv32-esp-elf\*"; DestDir: "\\?\{app}\tools\riscv32-esp-elf"; Components: {#COMPONENT_TARGET_ESP32_C3} {#COMPONENT_TARGET_ESP32_C2}; Flags: recursesubdirs skipifsourcedoesntexist;
247+
Source: "{#BUILD}\tools\riscv32-esp-elf-gdb\*"; DestDir: "\\?\{app}\tools\riscv32-esp-elf-gdb"; Components: {#COMPONENT_TARGET_ESP32_C3} {#COMPONENT_TARGET_ESP32_C2}; Flags: recursesubdirs skipifsourcedoesntexist;
248+
#else
239249
#ifndef DISABLE_TARGET_ESP32_C3
240-
Source: "{#BUILD}\tools\riscv32-esp-elf\*"; DestDir: "\\?\{app}\tools\riscv32-esp-elf"; Components: "{#COMPONENT_TARGET_ESP32_C3}"; Flags: recursesubdirs skipifsourcedoesntexist;
250+
Source: "{#BUILD}\tools\riscv32-esp-elf\*"; DestDir: "\\?\{app}\tools\riscv32-esp-elf"; Components: {#COMPONENT_TARGET_ESP32_C3}; Flags: recursesubdirs skipifsourcedoesntexist;
251+
Source: "{#BUILD}\tools\riscv32-esp-elf-gdb\*"; DestDir: "\\?\{app}\tools\riscv32-esp-elf-gdb"; Components: {#COMPONENT_TARGET_ESP32_C3}; Flags: recursesubdirs skipifsourcedoesntexist;
252+
#endif
253+
#endif
241254
#endif
242255

256+
; GDB - Xtensa
243257
#ifndef DISABLE_TARGET_ESP32_S3
244258
Source: "{#BUILD}\tools\xtensa-esp32s3-elf\*"; DestDir: "\\?\{app}\tools\xtensa-esp32s3-elf"; Components: "{#COMPONENT_TARGET_ESP32_S3}"; Flags: recursesubdirs skipifsourcedoesntexist;
259+
Source: "{#BUILD}\tools\xtensa-esp-elf-gdb\*"; DestDir: "\\?\{app}\tools\xtensa-esp-elf-gdb"; Components: {#COMPONENT_TARGET_ESP32} {#COMPONENT_TARGET_ESP32_S2} {#COMPONENT_TARGET_ESP32_S3}; Flags: recursesubdirs skipifsourcedoesntexist;
260+
#else
261+
Source: "{#BUILD}\tools\xtensa-esp-elf-gdb\*"; DestDir: "\\?\{app}\tools\xtensa-esp-elf-gdb"; Components: {#COMPONENT_TARGET_ESP32} {#COMPONENT_TARGET_ESP32_S2}; Flags: recursesubdirs skipifsourcedoesntexist;
245262
#endif
246263

264+
247265
; Helper Python files for sanity check of Python environment - used by system_check_page
248266
Source: "..\Python\system_check\system_check_download.py"; Flags: dontcopy
249267
Source: "..\Python\system_check\system_check_subprocess.py"; Flags: dontcopy

src/Resources/download/index.html

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,10 +145,10 @@ <h1 class="text-center">ESP-IDF Windows Installer Download</h1>
145145
<h2 class="text-center">Open Source IoT Development Framework for ESP32</h2>
146146
<div id="section-download">
147147
<div class="download-button">
148-
<form class="download-form" method="get" action="https://dl.espressif.com/dl/idf-installer/esp-idf-tools-setup-online-2.17.exe">
148+
<form class="download-form" method="get" action="https://dl.espressif.com/dl/idf-installer/esp-idf-tools-setup-online-2.18.exe">
149149
<button class="button-online">
150150
<i class="fa fa-download" aria-hidden="true"></i>
151-
<div>Universal Online Installer 2.17</div>
151+
<div>Universal Online Installer 2.18</div>
152152
<div>Windows 10, 11</div>
153153
<div>Size: 4 MB</div>
154154
</button>
@@ -244,6 +244,17 @@ <h2 class="text-center">Download links to available releases and mirrors.</h2>
244244
<span class="release-notes">Release notes</span>
245245
</div>
246246
<ol class="list-row-container menu">
247+
<!-- Release 2.18 -->
248+
<li>
249+
<span class="release-number">Online Installer 2.18</span>
250+
<span class="release-date">2022-12-23</span>
251+
<span class="release-download">
252+
<span><a href="https://github.com/espressif/idf-installer/releases/download/online-2.18/esp-idf-tools-setup-online-2.18.exe">Download</a> /
253+
<a href="https://dl.espressif.com/dl/idf-installer/esp-idf-tools-setup-online-2.18.exe">Mirror</a>
254+
- 4 MB</span>
255+
</span>
256+
<span class="release-notes"><a href="https://github.com/espressif/idf-installer/releases/tag/online-2.18">Release Notes</a></span>
257+
</li>
247258

248259
<!-- Release Offline 4.1.4 -->
249260
<li>

0 commit comments

Comments
 (0)