Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfix/forwardslash and offline-5.0 #158

Merged
merged 7 commits into from
Dec 23, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Note: Online Installer is recommended way of the installation.

| Version | Purpose | Size |
| ------- | ------- | ---- |
| 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 |
| 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 |
| 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 |
| 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 |
Expand Down
10 changes: 10 additions & 0 deletions src/InnoSetup/Configuration.iss
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,16 @@ begin
Result := ResultPath;
end;

function GetPathWithBackslashes(Path: String): String;
var
ResultPath: String;
begin
ResultPath := Path;
StringChangeEx(ResultPath, '/', '\', True);
Result := ResultPath;
end;


{ Find Major and Minor version in esp_idf_version.h file. }
function GetIDFVersionFromHeaderFile():String;
var
Expand Down
21 changes: 13 additions & 8 deletions src/InnoSetup/Environment.iss
Original file line number Diff line number Diff line change
Expand Up @@ -251,11 +251,7 @@ begin
CmdLine := GitExecutablePath + ' clone --progress -b ' + IDFDownloadVersion;

if (WizardIsComponentSelected('{#COMPONENT_OPTIMIZATION_GIT_SHALLOW}')) then begin
GitDepth := '1';
end;

if (Length(GitDepth) > 0) then begin
CmdLine := CmdLine + ' --depth ' + GitDepth + ' --shallow-submodules ';
CmdLine := CmdLine + ' --single-branch --shallow-submodules ';
end;

if (IsGitRecursive) then begin
Expand Down Expand Up @@ -358,10 +354,19 @@ begin
end;
end;

function TrimTrailingBackslash(Path: String): String;
begin
if (Length(Path) > 0) and (Path[Length(Path)] = '\') then begin
Result := Copy(Path, 1, Length(Path) - 1);
end else begin
Result := Path;
end;
end;

procedure IDFToolsSetup();
var
CmdLine: String;
IdfPathWithForwardSlashes: String;
IdfPathWithBackslashes: String;
IDFToolsPyPath: String;
IDFToolsPyCmd: String;
BundledIDFToolsPyPath: String;
Expand All @@ -370,7 +375,7 @@ var
ResultCode: Integer;
TargetSupportTestCommand: String;
begin
IdfPathWithForwardSlashes := GetPathWithForwardSlashes(GetIDFPath(''));;
IdfPathWithBackslashes := TrimTrailingBackslash(GetPathWithBackslashes(GetIDFPath('')));
IDFToolsPyPath := GetIDFPath('tools\idf_tools.py');
BundledIDFToolsPyPath := ExpandConstant('{app}\idf_tools_fallback.py');
JSONArg := '';
Expand All @@ -396,7 +401,7 @@ begin
TargetSupportTestCommand := '"' + IDFToolsPyCmd + '" install --targets=""';

{ IDFPath not quoted, as it can not contain spaces }
IDFToolsPyCmd := PythonExecutablePath + ' "' + IDFToolsPyCmd + '" --idf-path "' + IdfPathWithForwardSlashes + '" ' + JSONArg + ' ';
IDFToolsPyCmd := PythonExecutablePath + ' "' + IDFToolsPyCmd + '" "--idf-path=' + IdfPathWithBackslashes + '" ' + JSONArg + ' ';

SetEnvironmentVariable('PYTHONUNBUFFERED', '1');

Expand Down
22 changes: 20 additions & 2 deletions src/InnoSetup/IdfToolsSetup.iss
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#ifdef VERSION
#define MyAppVersion VERSION
#else
#define MyAppVersion "2.17"
#define MyAppVersion "2.18"
#endif

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

; GDB RISC-V - ifndef begins with the latest chip def. If installer is not capable of handling the chip in the latest chip
; then one chip is eliminated from the list
#ifndef DISABLE_TARGET_ESP32_C6
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;
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;
#else
#ifndef DISABLE_TARGET_ESP32_C2
Source: "{#BUILD}\tools\riscv32-esp-elf\*"; DestDir: "\\?\{app}\tools\riscv32-esp-elf"; Components: {#COMPONENT_TARGET_ESP32_C3} {#COMPONENT_TARGET_ESP32_C2}; Flags: recursesubdirs skipifsourcedoesntexist;
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;
#else
#ifndef DISABLE_TARGET_ESP32_C3
Source: "{#BUILD}\tools\riscv32-esp-elf\*"; DestDir: "\\?\{app}\tools\riscv32-esp-elf"; Components: "{#COMPONENT_TARGET_ESP32_C3}"; Flags: recursesubdirs skipifsourcedoesntexist;
Source: "{#BUILD}\tools\riscv32-esp-elf\*"; DestDir: "\\?\{app}\tools\riscv32-esp-elf"; Components: {#COMPONENT_TARGET_ESP32_C3}; Flags: recursesubdirs skipifsourcedoesntexist;
Source: "{#BUILD}\tools\riscv32-esp-elf-gdb\*"; DestDir: "\\?\{app}\tools\riscv32-esp-elf-gdb"; Components: {#COMPONENT_TARGET_ESP32_C3}; Flags: recursesubdirs skipifsourcedoesntexist;
#endif
#endif
#endif

; GDB - Xtensa
#ifndef DISABLE_TARGET_ESP32_S3
Source: "{#BUILD}\tools\xtensa-esp32s3-elf\*"; DestDir: "\\?\{app}\tools\xtensa-esp32s3-elf"; Components: "{#COMPONENT_TARGET_ESP32_S3}"; Flags: recursesubdirs skipifsourcedoesntexist;
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;
#else
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;
#endif


; Helper Python files for sanity check of Python environment - used by system_check_page
Source: "..\Python\system_check\system_check_download.py"; Flags: dontcopy
Source: "..\Python\system_check\system_check_subprocess.py"; Flags: dontcopy
Expand Down
15 changes: 13 additions & 2 deletions src/Resources/download/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -145,10 +145,10 @@ <h1 class="text-center">ESP-IDF Windows Installer Download</h1>
<h2 class="text-center">Open Source IoT Development Framework for ESP32</h2>
<div id="section-download">
<div class="download-button">
<form class="download-form" method="get" action="https://dl.espressif.com/dl/idf-installer/esp-idf-tools-setup-online-2.17.exe">
<form class="download-form" method="get" action="https://dl.espressif.com/dl/idf-installer/esp-idf-tools-setup-online-2.18.exe">
<button class="button-online">
<i class="fa fa-download" aria-hidden="true"></i>
<div>Universal Online Installer 2.17</div>
<div>Universal Online Installer 2.18</div>
<div>Windows 10, 11</div>
<div>Size: 4 MB</div>
</button>
Expand Down Expand Up @@ -244,6 +244,17 @@ <h2 class="text-center">Download links to available releases and mirrors.</h2>
<span class="release-notes">Release notes</span>
</div>
<ol class="list-row-container menu">
<!-- Release 2.18 -->
<li>
<span class="release-number">Online Installer 2.18</span>
<span class="release-date">2022-12-23</span>
<span class="release-download">
<span><a href="https://github.com/espressif/idf-installer/releases/download/online-2.18/esp-idf-tools-setup-online-2.18.exe">Download</a> /
<a href="https://dl.espressif.com/dl/idf-installer/esp-idf-tools-setup-online-2.18.exe">Mirror</a>
- 4 MB</span>
</span>
<span class="release-notes"><a href="https://github.com/espressif/idf-installer/releases/tag/online-2.18">Release Notes</a></span>
</li>

<!-- Release Offline 4.1.4 -->
<li>
Expand Down