Skip to content

Commit 90efbfd

Browse files
committed
tools: fix version of JDK
1 parent a479e5f commit 90efbfd

File tree

3 files changed

+17
-7
lines changed

3 files changed

+17
-7
lines changed

Build-Installer.ps1

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,9 @@ param (
2222
[String]
2323
$EspressifIdeVersion = '2.4.2',
2424
[String]
25-
$JdkVersion = "jdk11.0.15_9"
25+
$JdkVersion = "jdk11.0.15_9",
26+
[String]
27+
$JdkArtifactVersion = "11.0.15.9.1"
2628
)
2729

2830
# Stop on error
@@ -38,6 +40,7 @@ $ErrorView = 'NormalView'
3840
"-IdfEnvVersion = ${IdfEnvVersion}"
3941
"-InstallerType = ${InstallerType}"
4042
"-JdkVersion = ${JdkVersion}"
43+
"-JdkArtifactVersion = ${JdkArtifactVersion}"
4144
"-OfflineBranch = ${OfflineBranch}"
4245
"-Python = ${Python}"
4346
"-SignInstaller = ${SignInstaller}"
@@ -173,7 +176,7 @@ function PrepareIdfEclipse {
173176
PrepareIdfPackage -BasePath build\$InstallerType\tools\amazon-corretto-11-x64-windows-jdk\ `
174177
-FilePath ${JdkVersion}\bin\java.exe `
175178
-DistZip amazon-corretto-11-x64-windows-jdk.zip `
176-
-DownloadUrl https://corretto.aws/downloads/latest/amazon-corretto-11-x64-windows-jdk.zip
179+
-DownloadUrl https://corretto.aws/downloads/resources/${JdkArtifactVersion}/amazon-corretto-${JdkArtifactVersion}-windows-x64-jdk.zip
177180

178181
PrepareIdfPackage -BasePath build\$InstallerType\tools\espressif-ide\${EspressifIdeVersion} `
179182
-FilePath espressif-ide.exe `
@@ -358,6 +361,7 @@ if (('offline' -eq $InstallerType) -or ('espressif-ide' -eq $InstallerType)){
358361
$IsccParameters += '/DVERSION=' + $EspressifIdeVersion
359362
$IsccParameters += '/DESPRESSIFIDEVERSION=' + $EspressifIdeVersion
360363
$IsccParameters += '/DJDKVERSION=' + $JdkVersion
364+
$IsccParameters += '/DJDKARTIFACTVERSION=' + $JdkArtifactVersion
361365
PrepareIdfEclipse
362366
} else {
363367
$IsccParameters += '/DVERSION=' + $OfflineBranch.Replace('v', '')
@@ -368,6 +372,8 @@ if (('offline' -eq $InstallerType) -or ('espressif-ide' -eq $InstallerType)){
368372
PrepareIdfPythonWheels
369373
} elseif ('online' -eq $InstallerType) {
370374
DownloadIdfVersions
375+
$IsccParameters += '/DJDKVERSION=' + $JdkVersion
376+
$IsccParameters += '/DJDKARTIFACTVERSION=' + $JdkArtifactVersion
371377
$IsccParameters += '/DESPRESSIFIDE=yes'
372378
$IsccParameters += '/DOFFLINE=no'
373379
} else {

src/InnoSetup/IdfToolsSetup.iss

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,11 @@
4343
#ifndef JDKVERSION
4444
#define JDKVERSION "jdk11.0.15_9"
4545
#endif
46-
#define JDK_DOWNLOADURL "https://corretto.aws/downloads/latest/amazon-corretto-11-x64-windows-jdk.zip"
46+
47+
#ifndef JDKARTIFACTVERSION
48+
#define JDKARTIFACTVERSION "11.0.15.9.1"
49+
#endif
50+
#define JDK_DOWNLOADURL "https://corretto.aws/downloads/resources/" + JDKARTIFACTVERSION + "/amazon-corretto-" + JDKARTIFACTVERSION + "-windows-x64-jdk.zip"
4751

4852
#define IDFVersionsURL "https://dl.espressif.com/dl/esp-idf/idf_versions.txt"
4953

src/InnoSetup/PostInstall.iss

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,10 @@ procedure InstallEclipse();
180180
var
181181
FilePath: String;
182182
begin
183+
if (WizardIsComponentSelected('{#COMPONENT_ECLIPSE_JDK}')) then begin
184+
InstallIdfPackage(ExpandConstant('{app}\tools\amazon-corretto-11-x64-windows-jdk\{#JDKVERSION}\bin\java.exe'), GetJdkDistZip(), ExpandConstant('{app}\tools\amazon-corretto-11-x64-windows-jdk\') );
185+
end;
186+
183187
if (not WizardIsComponentSelected('{#COMPONENT_ECLIPSE}')) then begin
184188
Exit;
185189
end;
@@ -192,10 +196,6 @@ begin
192196
end;
193197
194198
DoCmdlineInstall(CustomMessage('ComponentEclipse'), CustomMessage('ComponentEclipse'), GetIdfEnvCommand(ExpandConstant('ide install --url "{#ECLIPSE_DOWNLOADURL}" --file "{#ECLIPSE_INSTALLER}" --destination "') + GetPathWithForwardSlashes(GetEclipsePath('')) + '"'));
195-
196-
if (WizardIsComponentSelected('{#COMPONENT_ECLIPSE_JDK}')) then begin
197-
InstallIdfPackage(ExpandConstant('{app}\tools\amazon-corretto-11-x64-windows-jdk\{#JDKVERSION}\bin\java.exe'), GetJdkDistZip(), ExpandConstant('{app}\tools\amazon-corretto-11-x64-windows-jdk\') );
198-
end;
199199
end;
200200
201201
<event('CurStepChanged')>

0 commit comments

Comments
 (0)