Provisioning: Add Java 17 to Windows on ARM
There are no WoA versions of JDK builds available from Oracle but Microsoft maintains a WoA compatible OpenJDK build. This change also removes the registry edit to disable Java auto-update as the auto-update function in Java no longer exists. Task-number: QTQAINFRA-6109 Task-number: QTQAINFRA-6385 Pick-to: 6.8 Change-Id: I672ef4ac7cbca3d62ecd6a646fd769aff1cad4c5 Reviewed-by: Simo Fält <simo.falt@qt.io>
This commit is contained in:
parent
84bf41ba5b
commit
b3f5b4fd64
@ -5,15 +5,26 @@
|
||||
|
||||
# This script will install Java SE
|
||||
# https://www.oracle.com/java/technologies/javase/jdk17-archive-downloads.html
|
||||
$version = "17.0.10"
|
||||
$version_major = "17"
|
||||
$installdir = "C:\Program Files\Java\jdk-$version_major"
|
||||
|
||||
$cpu_arch = Get-CpuArchitecture
|
||||
switch ($cpu_arch) {
|
||||
arm64 {
|
||||
$version = "17.0.11"
|
||||
$arch = "aarch64"
|
||||
$sha1 = "1c5984a185778ad91498b746e677d84e153d5918"
|
||||
# Using Microsoft build version of OpenJDK from: https://learn.microsoft.com/en-us/java/openjdk/download
|
||||
# as there are no available Windows ARM64 versions of JDK from Oracle
|
||||
$url_official = "https://aka.ms/download-jdk/microsoft-jdk-${version}-windows-${arch}.msi"
|
||||
$url_cache = "\\ci-files01-hki.ci.qt.io\provisioning\windows\microsoft-jdk-${version}-windows-${arch}.msi"
|
||||
$javaPackage = "C:\Windows\Temp\jdk-$version.msi"
|
||||
Break
|
||||
}
|
||||
x64 {
|
||||
$version = "17.0.10"
|
||||
$arch = "x64"
|
||||
$sha1 = "d573091930076c3ffa9f74273cb41cb5c75c5400"
|
||||
$installdir = "C:\Program Files\Java\jdk-$version_major"
|
||||
$url_official = "https://download.oracle.com/java/17/archive/jdk-${version}_windows-${arch}_bin.exe"
|
||||
$url_cache = "\\ci-files01-hki.ci.qt.io\provisioning\windows\jdk-$version-windows-$arch.exe"
|
||||
$javaPackage = "C:\Windows\Temp\jdk-$version.exe"
|
||||
@ -36,9 +47,6 @@ if ($javaPackage.EndsWith(".exe")) {
|
||||
}
|
||||
Remove "$javaPackage"
|
||||
|
||||
Write-Host "Remove Java update from startup"
|
||||
reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Run" /v SunJavaUpdateSched /f
|
||||
|
||||
Set-EnvironmentVariable "JAVA_HOME" "$installdir"
|
||||
Prepend-Path "$installdir\bin"
|
||||
|
||||
|
@ -0,0 +1 @@
|
||||
. "$PSScriptRoot\..\common\windows\install-jdk.ps1"
|
Loading…
x
Reference in New Issue
Block a user