From 173472517337adc3bb52d6a0350e6e92a64d7337 Mon Sep 17 00:00:00 2001 From: Aditya Shastri Date: Sun, 31 Dec 2023 17:15:19 -0800 Subject: [PATCH] Temurin addition --- temurin-11-jdk/Temurin11.nuspec | 53 +++++++++++++++ temurin-11-jdk/tools/chocolateyinstall.ps1 | 28 ++++++++ temurin-11-jdk/tools/helper.ps1 | 75 ++++++++++++++++++++++ temurin-11-jre/Temurin11jre.nuspec | 53 +++++++++++++++ temurin-11-jre/tools/chocolateyinstall.ps1 | 28 ++++++++ temurin-11-jre/tools/helper.ps1 | 75 ++++++++++++++++++++++ temurin-17-jdk/Temurin17.nuspec | 53 +++++++++++++++ temurin-17-jdk/tools/chocolateyinstall.ps1 | 28 ++++++++ temurin-17-jdk/tools/helper.ps1 | 75 ++++++++++++++++++++++ temurin-17-jre/Temurin17jre.nuspec | 53 +++++++++++++++ temurin-17-jre/tools/chocolateyinstall.ps1 | 28 ++++++++ temurin-17-jre/tools/helper.ps1 | 75 ++++++++++++++++++++++ temurin-21-jdk/Temurin21.nuspec | 53 +++++++++++++++ temurin-21-jdk/tools/chocolateyinstall.ps1 | 17 +++++ temurin-21-jdk/tools/helper.ps1 | 75 ++++++++++++++++++++++ temurin-21-jre/Temurin21jre.nuspec | 53 +++++++++++++++ temurin-21-jre/tools/chocolateyinstall.ps1 | 17 +++++ temurin-21-jre/tools/helper.ps1 | 75 ++++++++++++++++++++++ temurin-8-jdk/Temurin8.nuspec | 53 +++++++++++++++ temurin-8-jdk/tools/chocolateyinstall.ps1 | 28 ++++++++ temurin-8-jdk/tools/helper.ps1 | 75 ++++++++++++++++++++++ temurin-8-jre/Temurin8jre.nuspec | 53 +++++++++++++++ temurin-8-jre/tools/chocolateyinstall.ps1 | 28 ++++++++ temurin-8-jre/tools/helper.ps1 | 75 ++++++++++++++++++++++ temurin-jdk/Temurin.nuspec | 53 +++++++++++++++ temurin-jdk/tools/chocolateyinstall.ps1 | 17 +++++ temurin-jdk/tools/helper.ps1 | 75 ++++++++++++++++++++++ temurin-jre/Temurinjre.nuspec | 53 +++++++++++++++ temurin-jre/tools/chocolateyinstall.ps1 | 17 +++++ temurin-jre/tools/helper.ps1 | 75 ++++++++++++++++++++++ 30 files changed, 1516 insertions(+) create mode 100644 temurin-11-jdk/Temurin11.nuspec create mode 100644 temurin-11-jdk/tools/chocolateyinstall.ps1 create mode 100644 temurin-11-jdk/tools/helper.ps1 create mode 100644 temurin-11-jre/Temurin11jre.nuspec create mode 100644 temurin-11-jre/tools/chocolateyinstall.ps1 create mode 100644 temurin-11-jre/tools/helper.ps1 create mode 100644 temurin-17-jdk/Temurin17.nuspec create mode 100644 temurin-17-jdk/tools/chocolateyinstall.ps1 create mode 100644 temurin-17-jdk/tools/helper.ps1 create mode 100644 temurin-17-jre/Temurin17jre.nuspec create mode 100644 temurin-17-jre/tools/chocolateyinstall.ps1 create mode 100644 temurin-17-jre/tools/helper.ps1 create mode 100644 temurin-21-jdk/Temurin21.nuspec create mode 100644 temurin-21-jdk/tools/chocolateyinstall.ps1 create mode 100644 temurin-21-jdk/tools/helper.ps1 create mode 100644 temurin-21-jre/Temurin21jre.nuspec create mode 100644 temurin-21-jre/tools/chocolateyinstall.ps1 create mode 100644 temurin-21-jre/tools/helper.ps1 create mode 100644 temurin-8-jdk/Temurin8.nuspec create mode 100644 temurin-8-jdk/tools/chocolateyinstall.ps1 create mode 100644 temurin-8-jdk/tools/helper.ps1 create mode 100644 temurin-8-jre/Temurin8jre.nuspec create mode 100644 temurin-8-jre/tools/chocolateyinstall.ps1 create mode 100644 temurin-8-jre/tools/helper.ps1 create mode 100644 temurin-jdk/Temurin.nuspec create mode 100644 temurin-jdk/tools/chocolateyinstall.ps1 create mode 100644 temurin-jdk/tools/helper.ps1 create mode 100644 temurin-jre/Temurinjre.nuspec create mode 100644 temurin-jre/tools/chocolateyinstall.ps1 create mode 100644 temurin-jre/tools/helper.ps1 diff --git a/temurin-11-jdk/Temurin11.nuspec b/temurin-11-jdk/Temurin11.nuspec new file mode 100644 index 0000000..bf0e251 --- /dev/null +++ b/temurin-11-jdk/Temurin11.nuspec @@ -0,0 +1,53 @@ + + + + Temurin11 + 11.0.21.900 + Temurin jdk11 hotspot 11.0.21.9 + Adoptium + JohanJanssen + false + https://github.com/adoptium/jdk11u/blob/master/LICENSE + https://adoptium.net/ + https://adoptium.net/images/temurin-light.png + ## Temurin + + The Temurin11 package uses OpenJDK_HotSpot VM from Temurin using the msi file format. + + Using a msi file provides a rich source of installation options : + + ** The following Features must be listed after `/ADDLOCAL=` using a comma after each feature. ** + +| Feature | Description | +|----|----| +| FeatureMain &nbsp; | &nbsp; Core Temurin installation (DEFAULT) | +| FeatureEnvironment &nbsp; | &nbsp; Update the PATH environment variable (DEFAULT) | +| FeatureJarFileRunWith &nbsp; | &nbsp; Associate .jar files with Java applications (DEFAULT) | +| FeatureJavaHome &nbsp; | &nbsp; Update the JAVA_HOME environment variable | +| FeatureIcedTeaWeb &nbsp; | &nbsp; Install IcedTea-Web | +| FeatureJNLPFileRunWith &nbsp; | &nbsp; Associate .jnlp files with IcedTea-web (Temurin 8 only) | +| FeatureOracleJavaSoft &nbsp; | &nbsp; Updates registry keys HKLM\SOFTWARE\JavaSoft\ (Temurin 8 only) | + +** Note: FeatureOracleJavaSoft can be used to prevent Oracle Java launching from PATH when Temurin is uninstalled. Reinstall Oracle Java if you need to restore the Oracle registry keys. ** + +Optional parameters can be used that group some of the features together: + +| Parameter | Features | +|----|----| +| &nbsp; INSTALLLEVEL=1 &nbsp; | &nbsp; FeatureMain,FeatureEnvironment,FeatureJarFileRunWith &nbsp; | +|----|----| +| &nbsp; INSTALLLEVEL=2 &nbsp; | &nbsp; FeatureMain,FeatureEnvironment,FeatureJarFileRunWith, FeatureJavaHome,FeatureIcedTeaWeb &nbsp; | +|----|----| +| &nbsp; INSTALLLEVEL=3 &nbsp; | &nbsp; FeatureMain,FeatureEnvironment,FeatureJarFileRunWith, FeatureJavaHome,FeatureIcedTeaWeb,FeatureJNLPFileRunWith &nbsp; | + +The following example silently installs Temurin, updates the PATH, associates .jar files with Java applications and defines JAVA_HOME: +Example: `choco install Temurin11 --params="/ADDLOCAL=FeatureMain,FeatureEnvironment,FeatureJarFileRunWith,FeatureJavaHome /INSTALLDIR=$env:Programfiles\Eclipse Adoptium\ /quiet"` +** Note: You must use INSTALLDIR with FeatureMain. INSTALLDIR Default is `$env:Programfiles\Eclipse Adoptium` ** + +This will install both the 32 bit and 64 bit versions of the desired package by using the parameter `/both` +Example: `choco install Temurin11 --params="/both"` + Adoptium provides prebuilt OpenJDK build binaries. This one uses OpenJDK_HotSpot. + openjdk java jvm + https://github.com/johanjanssen/TemurinChocolateyPackages + + \ No newline at end of file diff --git a/temurin-11-jdk/tools/chocolateyinstall.ps1 b/temurin-11-jdk/tools/chocolateyinstall.ps1 new file mode 100644 index 0000000..02c7ed1 --- /dev/null +++ b/temurin-11-jdk/tools/chocolateyinstall.ps1 @@ -0,0 +1,28 @@ +$ErrorActionPreference = 'Stop' + if(!$PSScriptRoot){ $PSScriptRoot = Split-Path $MyInvocation.MyCommand.Path -Parent } +. "$PSScriptRoot\helper.ps1" + +# Get Package Parameters +$parameters = (Get-PackageParameters); $pp = ( Test-PackageParamaters $parameters ).ToString() -replace('""|="True"','') -replace(";", ' ') -replace("==", '=') + +$packageArgs = @{ + PackageName = 'Temurin11' + fileType = 'msi' + Url = 'https://github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.21%2B9/OpenJDK11U-jdk_x86-32_windows_hotspot_11.0.21_9.msi' + Url64bit = 'https://github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.21%2B9/OpenJDK11U-jdk_x64_windows_hotspot_11.0.21_9.msi' + Checksum = '57111DF6BFB24D0F9977A3940AAE41940CC42C6A6F43AA98D03C73F568BED30A' + ChecksumType = 'sha256' + Checksum64 = 'CCAA09811F488CF95340E2702E8D9176058A52E89808AE6E1A1D20DE39E5CE34' + ChecksumType64 = 'sha256' + SilentArgs = $pp +} + +if ($parameters.both){ +write-warning "Installing 32bit version" +Install-ChocolateyPackage $packageArgs.packageName $packageArgs.fileType $packageArgs.SilentArgs $packageArgs.url -checksum $packageArgs.checksum -checksumtype $packageArgs.ChecksumType +write-warning "Installing 64bit version" +Install-ChocolateyPackage $packageArgs.packageName $packageArgs.fileType $packageArgs.SilentArgs $packageArgs.Url64bit $packageArgs.Url64bit -checksum $packageArgs.Checksum64 -checksumtype $packageArgs.ChecksumType64 +} else { +write-warning "Installing only Get-OSArchitectureWidth" +Install-ChocolateyPackage @packageArgs +} diff --git a/temurin-11-jdk/tools/helper.ps1 b/temurin-11-jdk/tools/helper.ps1 new file mode 100644 index 0000000..5e2ccd2 --- /dev/null +++ b/temurin-11-jdk/tools/helper.ps1 @@ -0,0 +1,75 @@ + +<# Bol Updating of hashtable to string for ToString method #> +Update-TypeData -TypeName System.Collections.HashTable ` + -MemberType ScriptMethod ` + -MemberName ToString ` + -Value { $keys = $this.keys; foreach ($key in $keys) { $v = $this[$key]; + if ($key -match "\s") { $hashstr += "`"$key`"" + "=" + "`"$v`"" + ";" } + else { $hashstr += $key + "=" + "`"$v`"" + ";" } }; + return $hashstr } +<# Eol Updating of hashtable to string for ToString method #> + +function Test-PackageParamaters { +[CmdletBinding()] +param( + [hashtable]$pp +) +$disabledMsg = "This switch has been disabled" +$New_pp = @{}; +$toolsDir = @{$true="${env:ProgramFiles}\Temurin";$false="${env:programfiles(x86)}\Temurin"}[ ((Get-OSArchitectureWidth 64) -or ($env:chocolateyForceX86 -eq $true)) ] + if (![string]::IsNullOrEmpty($pp.transforms)) { + $New_pp.add( "transforms", $pp.transforms ) + } + if (![string]::IsNullOrEmpty($pp.INSTALLDIR) -and (($New_pp.ADDLOCAL -match "FeatureMain") -or ($pp.ADDLOCAL -match "FeatureMain")) -and ([string]::IsNullOrEmpty($pp.INSTALLLEVEL)) ) { + Write-Warning "You must use INSTALLDIR with FeatureMain." + Write-Warning "Using provided $($pp.INSTALLDIR)" + $New_pp.add( "InstallDir", "`"`"$($pp.INSTALLDIR)`"`"" ) + } elseif ([string]::IsNullOrEmpty($pp.INSTALLDIR) -and (($New_pp.ADDLOCAL -match "FeatureMain") -or ($pp.ADDLOCAL -match "FeatureMain")) -and ([string]::IsNullOrEmpty($pp.INSTALLLEVEL)) ) { + Write-Warning "Using Default of $toolsDir" + $New_pp.add( "InstallDir", "`"`"$toolsDir`"`"" ) + } + if ((![string]::IsNullOrEmpty($pp.ADDLOCAL)) -and ([string]::IsNullOrEmpty($pp.INSTALLLEVEL)) ) { + Write-Warning "Using Addlocal" + $addlocalArray = ($pp.ADDLOCAL -split "\,") + foreach ( $_ in $addlocalArray) { + switch -Wildcard ($_) { + "FeatureMain" { + $pp_addlocal_array += -join ("FeatureMain", ",") + } + "FeatureEnvironment" { + $pp_addlocal_array += -join ("FeatureEnvironment", ",") + } + "FeatureJarFileRunWith" { + $pp_addlocal_array += -join ("FeatureJarFileRunWith", ",") + } + "FeatureJavaHome" { + $pp_addlocal_array += -join ("FeatureJavaHome", ",") + } + "FeatureIcedTeaWeb" { + $DisabledMsg | Write-Warning +# $pp_addlocal_array += -join ("FeatureIcedTeaWeb", ",") + } + "FeatureJNLPFileRunWith" { + $DisabledMsg | Write-Warning +# $pp_addlocal_array += -join ("FeatureJNLPFileRunWith", ",") + } + "FeatureOracleJavaSoft" { + $pp_addlocal_array += -join ("FeatureOracleJavaSoft", ",") + } + } + } + Write-Warning "No InstallLevel detected. Defaulting to AddLocal" + $New_pp.add( "ADDLOCAL", ($pp_addlocal_array -replace ".{1}$") ) + } + if (![string]::IsNullOrEmpty($pp.INSTALLLEVEL) ) { + $New_pp.add( "INSTALLLEVEL", $pp.INSTALLLEVEL ) + } + if ([string]::IsNullOrEmpty($pp.quiet)) { + $New_pp.add( "/quiet", $true ) + } else { + # Added to make sure the /quiet silent install is carried over if the user adds it to the params switch list + $New_pp.add( "/quiet", $true ) + } + +return $New_pp +} diff --git a/temurin-11-jre/Temurin11jre.nuspec b/temurin-11-jre/Temurin11jre.nuspec new file mode 100644 index 0000000..94a2c9a --- /dev/null +++ b/temurin-11-jre/Temurin11jre.nuspec @@ -0,0 +1,53 @@ + + + + Temurin11jre + 11.0.21.900 + Temurin jre11 hotspot 11.0.21.9 + Adoptium + JohanJanssen + false + https://github.com/adoptium/jdk11u/blob/master/LICENSE + https://adoptium.net/ + https://adoptium.net/images/temurin-light.png + ## Temurin + + The Temurin11jre package uses OpenJDK_HotSpot VM from Temurin using the msi file format. + + Using a msi file provides a rich source of installation options : + + ** The following Features must be listed after `/ADDLOCAL=` using a comma after each feature. ** + +| Feature | Description | +|----|----| +| FeatureMain &nbsp; | &nbsp; Core Temurin installation (DEFAULT) | +| FeatureEnvironment &nbsp; | &nbsp; Update the PATH environment variable (DEFAULT) | +| FeatureJarFileRunWith &nbsp; | &nbsp; Associate .jar files with Java applications (DEFAULT) | +| FeatureJavaHome &nbsp; | &nbsp; Update the JAVA_HOME environment variable | +| FeatureIcedTeaWeb &nbsp; | &nbsp; Install IcedTea-Web | +| FeatureJNLPFileRunWith &nbsp; | &nbsp; Associate .jnlp files with IcedTea-web (Temurin 8 only) | +| FeatureOracleJavaSoft &nbsp; | &nbsp; Updates registry keys HKLM\SOFTWARE\JavaSoft\ (Temurin 8 only) | + +** Note: FeatureOracleJavaSoft can be used to prevent Oracle Java launching from PATH when Temurin is uninstalled. Reinstall Oracle Java if you need to restore the Oracle registry keys. ** + +Optional parameters can be used that group some of the features together: + +| Parameter | Features | +|----|----| +| &nbsp; INSTALLLEVEL=1 &nbsp; | &nbsp; FeatureMain,FeatureEnvironment,FeatureJarFileRunWith &nbsp; | +|----|----| +| &nbsp; INSTALLLEVEL=2 &nbsp; | &nbsp; FeatureMain,FeatureEnvironment,FeatureJarFileRunWith, FeatureJavaHome,FeatureIcedTeaWeb &nbsp; | +|----|----| +| &nbsp; INSTALLLEVEL=3 &nbsp; | &nbsp; FeatureMain,FeatureEnvironment,FeatureJarFileRunWith, FeatureJavaHome,FeatureIcedTeaWeb,FeatureJNLPFileRunWith &nbsp; | + +The following example silently installs Temurin, updates the PATH, associates .jar files with Java applications and defines JAVA_HOME: +Example: `choco install Temurin11jre --params="/ADDLOCAL=FeatureMain,FeatureEnvironment,FeatureJarFileRunWith,FeatureJavaHome /INSTALLDIR=$env:Programfiles\Eclipse Adoptium\ /quiet"` +** Note: You must use INSTALLDIR with FeatureMain. INSTALLDIR Default is `$env:Programfiles\Eclipse Adoptium` ** + +This will install both the 32 bit and 64 bit versions of the desired package by using the parameter `/both` +Example: `choco install Temurin11jre --params="/both"` + Adoptium provides prebuilt OpenJDK build binaries. This one uses OpenJDK_HotSpot. + openjdk java jvm + https://github.com/johanjanssen/TemurinChocolateyPackages + + \ No newline at end of file diff --git a/temurin-11-jre/tools/chocolateyinstall.ps1 b/temurin-11-jre/tools/chocolateyinstall.ps1 new file mode 100644 index 0000000..60c7497 --- /dev/null +++ b/temurin-11-jre/tools/chocolateyinstall.ps1 @@ -0,0 +1,28 @@ +$ErrorActionPreference = 'Stop' + if(!$PSScriptRoot){ $PSScriptRoot = Split-Path $MyInvocation.MyCommand.Path -Parent } +. "$PSScriptRoot\helper.ps1" + +# Get Package Parameters +$parameters = (Get-PackageParameters); $pp = ( Test-PackageParamaters $parameters ).ToString() -replace('""|="True"','') -replace(";", ' ') -replace("==", '=') + +$packageArgs = @{ + PackageName = 'Temurin11jre' + fileType = 'msi' + Url = 'https://github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.21%2B9/OpenJDK11U-jre_x86-32_windows_hotspot_11.0.21_9.msi' + Url64bit = 'https://github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.21%2B9/OpenJDK11U-jre_x64_windows_hotspot_11.0.21_9.msi' + Checksum = 'B9D2E1156EED11127C4B583EDDC8B9C36F28A2EE1EB676FDBF4B931F89DCC86B' + ChecksumType = 'sha256' + Checksum64 = '9B0EA6EBE77E70C7AC229074028D64399D72A7FDA499AAD114EF0BA4C375B1A8' + ChecksumType64 = 'sha256' + SilentArgs = $pp +} + +if ($parameters.both){ +write-warning "Installing 32bit version" +Install-ChocolateyPackage $packageArgs.packageName $packageArgs.fileType $packageArgs.SilentArgs $packageArgs.url -checksum $packageArgs.checksum -checksumtype $packageArgs.ChecksumType +write-warning "Installing 64bit version" +Install-ChocolateyPackage $packageArgs.packageName $packageArgs.fileType $packageArgs.SilentArgs $packageArgs.Url64bit $packageArgs.Url64bit -checksum $packageArgs.Checksum64 -checksumtype $packageArgs.ChecksumType64 +} else { +write-warning "Installing only Get-OSArchitectureWidth" +Install-ChocolateyPackage @packageArgs +} diff --git a/temurin-11-jre/tools/helper.ps1 b/temurin-11-jre/tools/helper.ps1 new file mode 100644 index 0000000..5e2ccd2 --- /dev/null +++ b/temurin-11-jre/tools/helper.ps1 @@ -0,0 +1,75 @@ + +<# Bol Updating of hashtable to string for ToString method #> +Update-TypeData -TypeName System.Collections.HashTable ` + -MemberType ScriptMethod ` + -MemberName ToString ` + -Value { $keys = $this.keys; foreach ($key in $keys) { $v = $this[$key]; + if ($key -match "\s") { $hashstr += "`"$key`"" + "=" + "`"$v`"" + ";" } + else { $hashstr += $key + "=" + "`"$v`"" + ";" } }; + return $hashstr } +<# Eol Updating of hashtable to string for ToString method #> + +function Test-PackageParamaters { +[CmdletBinding()] +param( + [hashtable]$pp +) +$disabledMsg = "This switch has been disabled" +$New_pp = @{}; +$toolsDir = @{$true="${env:ProgramFiles}\Temurin";$false="${env:programfiles(x86)}\Temurin"}[ ((Get-OSArchitectureWidth 64) -or ($env:chocolateyForceX86 -eq $true)) ] + if (![string]::IsNullOrEmpty($pp.transforms)) { + $New_pp.add( "transforms", $pp.transforms ) + } + if (![string]::IsNullOrEmpty($pp.INSTALLDIR) -and (($New_pp.ADDLOCAL -match "FeatureMain") -or ($pp.ADDLOCAL -match "FeatureMain")) -and ([string]::IsNullOrEmpty($pp.INSTALLLEVEL)) ) { + Write-Warning "You must use INSTALLDIR with FeatureMain." + Write-Warning "Using provided $($pp.INSTALLDIR)" + $New_pp.add( "InstallDir", "`"`"$($pp.INSTALLDIR)`"`"" ) + } elseif ([string]::IsNullOrEmpty($pp.INSTALLDIR) -and (($New_pp.ADDLOCAL -match "FeatureMain") -or ($pp.ADDLOCAL -match "FeatureMain")) -and ([string]::IsNullOrEmpty($pp.INSTALLLEVEL)) ) { + Write-Warning "Using Default of $toolsDir" + $New_pp.add( "InstallDir", "`"`"$toolsDir`"`"" ) + } + if ((![string]::IsNullOrEmpty($pp.ADDLOCAL)) -and ([string]::IsNullOrEmpty($pp.INSTALLLEVEL)) ) { + Write-Warning "Using Addlocal" + $addlocalArray = ($pp.ADDLOCAL -split "\,") + foreach ( $_ in $addlocalArray) { + switch -Wildcard ($_) { + "FeatureMain" { + $pp_addlocal_array += -join ("FeatureMain", ",") + } + "FeatureEnvironment" { + $pp_addlocal_array += -join ("FeatureEnvironment", ",") + } + "FeatureJarFileRunWith" { + $pp_addlocal_array += -join ("FeatureJarFileRunWith", ",") + } + "FeatureJavaHome" { + $pp_addlocal_array += -join ("FeatureJavaHome", ",") + } + "FeatureIcedTeaWeb" { + $DisabledMsg | Write-Warning +# $pp_addlocal_array += -join ("FeatureIcedTeaWeb", ",") + } + "FeatureJNLPFileRunWith" { + $DisabledMsg | Write-Warning +# $pp_addlocal_array += -join ("FeatureJNLPFileRunWith", ",") + } + "FeatureOracleJavaSoft" { + $pp_addlocal_array += -join ("FeatureOracleJavaSoft", ",") + } + } + } + Write-Warning "No InstallLevel detected. Defaulting to AddLocal" + $New_pp.add( "ADDLOCAL", ($pp_addlocal_array -replace ".{1}$") ) + } + if (![string]::IsNullOrEmpty($pp.INSTALLLEVEL) ) { + $New_pp.add( "INSTALLLEVEL", $pp.INSTALLLEVEL ) + } + if ([string]::IsNullOrEmpty($pp.quiet)) { + $New_pp.add( "/quiet", $true ) + } else { + # Added to make sure the /quiet silent install is carried over if the user adds it to the params switch list + $New_pp.add( "/quiet", $true ) + } + +return $New_pp +} diff --git a/temurin-17-jdk/Temurin17.nuspec b/temurin-17-jdk/Temurin17.nuspec new file mode 100644 index 0000000..d1cef99 --- /dev/null +++ b/temurin-17-jdk/Temurin17.nuspec @@ -0,0 +1,53 @@ + + + + Temurin17 + 17.0.9.900 + Temurin jdk17 hotspot 17.0.9.9 + Adoptium + JohanJanssen + false + https://github.com/adoptium/jdk17/blob/master/LICENSE + https://adoptium.net/ + https://adoptium.net/images/temurin-light.png + ## Temurin + + The Temurin17 package uses OpenJDK_HotSpot VM from Temurin using the msi file format. + + Using a msi file provides a rich source of installation options : + + ** The following Features must be listed after `/ADDLOCAL=` using a comma after each feature. ** + +| Feature | Description | +|----|----| +| FeatureMain &nbsp; | &nbsp; Core Temurin installation (DEFAULT) | +| FeatureEnvironment &nbsp; | &nbsp; Update the PATH environment variable (DEFAULT) | +| FeatureJarFileRunWith &nbsp; | &nbsp; Associate .jar files with Java applications (DEFAULT) | +| FeatureJavaHome &nbsp; | &nbsp; Update the JAVA_HOME environment variable | +| FeatureIcedTeaWeb &nbsp; | &nbsp; Install IcedTea-Web | +| FeatureJNLPFileRunWith &nbsp; | &nbsp; Associate .jnlp files with IcedTea-web (Temurin 8 only) | +| FeatureOracleJavaSoft &nbsp; | &nbsp; Updates registry keys HKLM\SOFTWARE\JavaSoft\ (Temurin 8 only) | + +** Note: FeatureOracleJavaSoft can be used to prevent Oracle Java launching from PATH when Temurin is uninstalled. Reinstall Oracle Java if you need to restore the Oracle registry keys. ** + +Optional parameters can be used that group some of the features together: + +| Parameter | Features | +|----|----| +| &nbsp; INSTALLLEVEL=1 &nbsp; | &nbsp; FeatureMain,FeatureEnvironment,FeatureJarFileRunWith &nbsp; | +|----|----| +| &nbsp; INSTALLLEVEL=2 &nbsp; | &nbsp; FeatureMain,FeatureEnvironment,FeatureJarFileRunWith, FeatureJavaHome,FeatureIcedTeaWeb &nbsp; | +|----|----| +| &nbsp; INSTALLLEVEL=3 &nbsp; | &nbsp; FeatureMain,FeatureEnvironment,FeatureJarFileRunWith, FeatureJavaHome,FeatureIcedTeaWeb,FeatureJNLPFileRunWith &nbsp; | + +The following example silently installs Temurin, updates the PATH, associates .jar files with Java applications and defines JAVA_HOME: +Example: `choco install Temurin17 --params="/ADDLOCAL=FeatureMain,FeatureEnvironment,FeatureJarFileRunWith,FeatureJavaHome /INSTALLDIR=$env:Programfiles\Eclipse Adoptium\ /quiet"` +** Note: You must use INSTALLDIR with FeatureMain. INSTALLDIR Default is `$env:Programfiles\Eclipse Adoptium` ** + +This will install both the 32 bit and 64 bit versions of the desired package by using the parameter `/both` +Example: `choco install Temurin17 --params="/both"` + Adoptium provides prebuilt OpenJDK build binaries. This one uses OpenJDK_HotSpot. + openjdk java jvm + https://github.com/johanjanssen/TemurinChocolateyPackages + + \ No newline at end of file diff --git a/temurin-17-jdk/tools/chocolateyinstall.ps1 b/temurin-17-jdk/tools/chocolateyinstall.ps1 new file mode 100644 index 0000000..ada5ab7 --- /dev/null +++ b/temurin-17-jdk/tools/chocolateyinstall.ps1 @@ -0,0 +1,28 @@ +$ErrorActionPreference = 'Stop' + if(!$PSScriptRoot){ $PSScriptRoot = Split-Path $MyInvocation.MyCommand.Path -Parent } +. "$PSScriptRoot\helper.ps1" + +# Get Package Parameters +$parameters = (Get-PackageParameters); $pp = ( Test-PackageParamaters $parameters ).ToString() -replace('""|="True"','') -replace(";", ' ') -replace("==", '=') + +$packageArgs = @{ + PackageName = 'Temurin17' + fileType = 'msi' + Url = 'https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.9%2B9.1/OpenJDK17U-jdk_x86-32_windows_hotspot_17.0.9_9.msi' + Url64bit = 'https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.9%2B9.1/OpenJDK17U-jdk_x64_windows_hotspot_17.0.9_9.msi' + Checksum = 'C23979CA982CC301A62143DD0CA75CEFA75C33D029295A6DD21B75B01DF2BA4E' + ChecksumType = 'sha256' + Checksum64 = 'CD7B319F6FBD7EFC68A0E464C55C7F2A28D6B8BE3D0BCDA315A16F885C57CADB' + ChecksumType64 = 'sha256' + SilentArgs = $pp +} + +if ($parameters.both){ +write-warning "Installing 32bit version" +Install-ChocolateyPackage $packageArgs.packageName $packageArgs.fileType $packageArgs.SilentArgs $packageArgs.url -checksum $packageArgs.checksum -checksumtype $packageArgs.ChecksumType +write-warning "Installing 64bit version" +Install-ChocolateyPackage $packageArgs.packageName $packageArgs.fileType $packageArgs.SilentArgs $packageArgs.Url64bit $packageArgs.Url64bit -checksum $packageArgs.Checksum64 -checksumtype $packageArgs.ChecksumType64 +} else { +write-warning "Installing only Get-OSArchitectureWidth" +Install-ChocolateyPackage @packageArgs +} diff --git a/temurin-17-jdk/tools/helper.ps1 b/temurin-17-jdk/tools/helper.ps1 new file mode 100644 index 0000000..5e2ccd2 --- /dev/null +++ b/temurin-17-jdk/tools/helper.ps1 @@ -0,0 +1,75 @@ + +<# Bol Updating of hashtable to string for ToString method #> +Update-TypeData -TypeName System.Collections.HashTable ` + -MemberType ScriptMethod ` + -MemberName ToString ` + -Value { $keys = $this.keys; foreach ($key in $keys) { $v = $this[$key]; + if ($key -match "\s") { $hashstr += "`"$key`"" + "=" + "`"$v`"" + ";" } + else { $hashstr += $key + "=" + "`"$v`"" + ";" } }; + return $hashstr } +<# Eol Updating of hashtable to string for ToString method #> + +function Test-PackageParamaters { +[CmdletBinding()] +param( + [hashtable]$pp +) +$disabledMsg = "This switch has been disabled" +$New_pp = @{}; +$toolsDir = @{$true="${env:ProgramFiles}\Temurin";$false="${env:programfiles(x86)}\Temurin"}[ ((Get-OSArchitectureWidth 64) -or ($env:chocolateyForceX86 -eq $true)) ] + if (![string]::IsNullOrEmpty($pp.transforms)) { + $New_pp.add( "transforms", $pp.transforms ) + } + if (![string]::IsNullOrEmpty($pp.INSTALLDIR) -and (($New_pp.ADDLOCAL -match "FeatureMain") -or ($pp.ADDLOCAL -match "FeatureMain")) -and ([string]::IsNullOrEmpty($pp.INSTALLLEVEL)) ) { + Write-Warning "You must use INSTALLDIR with FeatureMain." + Write-Warning "Using provided $($pp.INSTALLDIR)" + $New_pp.add( "InstallDir", "`"`"$($pp.INSTALLDIR)`"`"" ) + } elseif ([string]::IsNullOrEmpty($pp.INSTALLDIR) -and (($New_pp.ADDLOCAL -match "FeatureMain") -or ($pp.ADDLOCAL -match "FeatureMain")) -and ([string]::IsNullOrEmpty($pp.INSTALLLEVEL)) ) { + Write-Warning "Using Default of $toolsDir" + $New_pp.add( "InstallDir", "`"`"$toolsDir`"`"" ) + } + if ((![string]::IsNullOrEmpty($pp.ADDLOCAL)) -and ([string]::IsNullOrEmpty($pp.INSTALLLEVEL)) ) { + Write-Warning "Using Addlocal" + $addlocalArray = ($pp.ADDLOCAL -split "\,") + foreach ( $_ in $addlocalArray) { + switch -Wildcard ($_) { + "FeatureMain" { + $pp_addlocal_array += -join ("FeatureMain", ",") + } + "FeatureEnvironment" { + $pp_addlocal_array += -join ("FeatureEnvironment", ",") + } + "FeatureJarFileRunWith" { + $pp_addlocal_array += -join ("FeatureJarFileRunWith", ",") + } + "FeatureJavaHome" { + $pp_addlocal_array += -join ("FeatureJavaHome", ",") + } + "FeatureIcedTeaWeb" { + $DisabledMsg | Write-Warning +# $pp_addlocal_array += -join ("FeatureIcedTeaWeb", ",") + } + "FeatureJNLPFileRunWith" { + $DisabledMsg | Write-Warning +# $pp_addlocal_array += -join ("FeatureJNLPFileRunWith", ",") + } + "FeatureOracleJavaSoft" { + $pp_addlocal_array += -join ("FeatureOracleJavaSoft", ",") + } + } + } + Write-Warning "No InstallLevel detected. Defaulting to AddLocal" + $New_pp.add( "ADDLOCAL", ($pp_addlocal_array -replace ".{1}$") ) + } + if (![string]::IsNullOrEmpty($pp.INSTALLLEVEL) ) { + $New_pp.add( "INSTALLLEVEL", $pp.INSTALLLEVEL ) + } + if ([string]::IsNullOrEmpty($pp.quiet)) { + $New_pp.add( "/quiet", $true ) + } else { + # Added to make sure the /quiet silent install is carried over if the user adds it to the params switch list + $New_pp.add( "/quiet", $true ) + } + +return $New_pp +} diff --git a/temurin-17-jre/Temurin17jre.nuspec b/temurin-17-jre/Temurin17jre.nuspec new file mode 100644 index 0000000..d0907fc --- /dev/null +++ b/temurin-17-jre/Temurin17jre.nuspec @@ -0,0 +1,53 @@ + + + + Temurin17jre + 17.0.9.900 + Temurin jre17 hotspot 17.0.9.9 + Adoptium + JohanJanssen + false + https://github.com/adoptium/jdk17/blob/master/LICENSE + https://adoptium.net/ + https://adoptium.net/images/temurin-light.png + ## Temurin + + The Temurin17jre package uses OpenJDK_HotSpot VM from Temurin using the msi file format. + + Using a msi file provides a rich source of installation options : + + ** The following Features must be listed after `/ADDLOCAL=` using a comma after each feature. ** + +| Feature | Description | +|----|----| +| FeatureMain &nbsp; | &nbsp; Core Temurin installation (DEFAULT) | +| FeatureEnvironment &nbsp; | &nbsp; Update the PATH environment variable (DEFAULT) | +| FeatureJarFileRunWith &nbsp; | &nbsp; Associate .jar files with Java applications (DEFAULT) | +| FeatureJavaHome &nbsp; | &nbsp; Update the JAVA_HOME environment variable | +| FeatureIcedTeaWeb &nbsp; | &nbsp; Install IcedTea-Web | +| FeatureJNLPFileRunWith &nbsp; | &nbsp; Associate .jnlp files with IcedTea-web (Temurin 8 only) | +| FeatureOracleJavaSoft &nbsp; | &nbsp; Updates registry keys HKLM\SOFTWARE\JavaSoft\ (Temurin 8 only) | + +** Note: FeatureOracleJavaSoft can be used to prevent Oracle Java launching from PATH when Temurin is uninstalled. Reinstall Oracle Java if you need to restore the Oracle registry keys. ** + +Optional parameters can be used that group some of the features together: + +| Parameter | Features | +|----|----| +| &nbsp; INSTALLLEVEL=1 &nbsp; | &nbsp; FeatureMain,FeatureEnvironment,FeatureJarFileRunWith &nbsp; | +|----|----| +| &nbsp; INSTALLLEVEL=2 &nbsp; | &nbsp; FeatureMain,FeatureEnvironment,FeatureJarFileRunWith, FeatureJavaHome,FeatureIcedTeaWeb &nbsp; | +|----|----| +| &nbsp; INSTALLLEVEL=3 &nbsp; | &nbsp; FeatureMain,FeatureEnvironment,FeatureJarFileRunWith, FeatureJavaHome,FeatureIcedTeaWeb,FeatureJNLPFileRunWith &nbsp; | + +The following example silently installs Temurin, updates the PATH, associates .jar files with Java applications and defines JAVA_HOME: +Example: `choco install Temurin17jre --params="/ADDLOCAL=FeatureMain,FeatureEnvironment,FeatureJarFileRunWith,FeatureJavaHome /INSTALLDIR=$env:Programfiles\Eclipse Adoptium\ /quiet"` +** Note: You must use INSTALLDIR with FeatureMain. INSTALLDIR Default is `$env:Programfiles\Eclipse Adoptium` ** + +This will install both the 32 bit and 64 bit versions of the desired package by using the parameter `/both` +Example: `choco install Temurin17jre --params="/both"` + Adoptium provides prebuilt OpenJDK build binaries. This one uses OpenJDK_HotSpot. + openjdk java jvm + https://github.com/johanjanssen/TemurinChocolateyPackages + + \ No newline at end of file diff --git a/temurin-17-jre/tools/chocolateyinstall.ps1 b/temurin-17-jre/tools/chocolateyinstall.ps1 new file mode 100644 index 0000000..4d63944 --- /dev/null +++ b/temurin-17-jre/tools/chocolateyinstall.ps1 @@ -0,0 +1,28 @@ +$ErrorActionPreference = 'Stop' + if(!$PSScriptRoot){ $PSScriptRoot = Split-Path $MyInvocation.MyCommand.Path -Parent } +. "$PSScriptRoot\helper.ps1" + +# Get Package Parameters +$parameters = (Get-PackageParameters); $pp = ( Test-PackageParamaters $parameters ).ToString() -replace('""|="True"','') -replace(";", ' ') -replace("==", '=') + +$packageArgs = @{ + PackageName = 'Temurin17jre' + fileType = 'msi' + Url = 'https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.9%2B9.1/OpenJDK17U-jre_x86-32_windows_hotspot_17.0.9_9.msi' + Url64bit = 'https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.9%2B9.1/OpenJDK17U-jre_x64_windows_hotspot_17.0.9_9.msi' + Checksum = '69E0EDCFF69D3629083B54054F93A3C36422FDA695E6843A9A9B69CC94FFBB04' + ChecksumType = 'sha256' + Checksum64 = '06A11211B09054B3A57C51C1D90FC0A183DB32EE03EA0002740A0EF89D1B3CD4' + ChecksumType64 = 'sha256' + SilentArgs = $pp +} + +if ($parameters.both){ +write-warning "Installing 32bit version" +Install-ChocolateyPackage $packageArgs.packageName $packageArgs.fileType $packageArgs.SilentArgs $packageArgs.url -checksum $packageArgs.checksum -checksumtype $packageArgs.ChecksumType +write-warning "Installing 64bit version" +Install-ChocolateyPackage $packageArgs.packageName $packageArgs.fileType $packageArgs.SilentArgs $packageArgs.Url64bit $packageArgs.Url64bit -checksum $packageArgs.Checksum64 -checksumtype $packageArgs.ChecksumType64 +} else { +write-warning "Installing only Get-OSArchitectureWidth" +Install-ChocolateyPackage @packageArgs +} diff --git a/temurin-17-jre/tools/helper.ps1 b/temurin-17-jre/tools/helper.ps1 new file mode 100644 index 0000000..5e2ccd2 --- /dev/null +++ b/temurin-17-jre/tools/helper.ps1 @@ -0,0 +1,75 @@ + +<# Bol Updating of hashtable to string for ToString method #> +Update-TypeData -TypeName System.Collections.HashTable ` + -MemberType ScriptMethod ` + -MemberName ToString ` + -Value { $keys = $this.keys; foreach ($key in $keys) { $v = $this[$key]; + if ($key -match "\s") { $hashstr += "`"$key`"" + "=" + "`"$v`"" + ";" } + else { $hashstr += $key + "=" + "`"$v`"" + ";" } }; + return $hashstr } +<# Eol Updating of hashtable to string for ToString method #> + +function Test-PackageParamaters { +[CmdletBinding()] +param( + [hashtable]$pp +) +$disabledMsg = "This switch has been disabled" +$New_pp = @{}; +$toolsDir = @{$true="${env:ProgramFiles}\Temurin";$false="${env:programfiles(x86)}\Temurin"}[ ((Get-OSArchitectureWidth 64) -or ($env:chocolateyForceX86 -eq $true)) ] + if (![string]::IsNullOrEmpty($pp.transforms)) { + $New_pp.add( "transforms", $pp.transforms ) + } + if (![string]::IsNullOrEmpty($pp.INSTALLDIR) -and (($New_pp.ADDLOCAL -match "FeatureMain") -or ($pp.ADDLOCAL -match "FeatureMain")) -and ([string]::IsNullOrEmpty($pp.INSTALLLEVEL)) ) { + Write-Warning "You must use INSTALLDIR with FeatureMain." + Write-Warning "Using provided $($pp.INSTALLDIR)" + $New_pp.add( "InstallDir", "`"`"$($pp.INSTALLDIR)`"`"" ) + } elseif ([string]::IsNullOrEmpty($pp.INSTALLDIR) -and (($New_pp.ADDLOCAL -match "FeatureMain") -or ($pp.ADDLOCAL -match "FeatureMain")) -and ([string]::IsNullOrEmpty($pp.INSTALLLEVEL)) ) { + Write-Warning "Using Default of $toolsDir" + $New_pp.add( "InstallDir", "`"`"$toolsDir`"`"" ) + } + if ((![string]::IsNullOrEmpty($pp.ADDLOCAL)) -and ([string]::IsNullOrEmpty($pp.INSTALLLEVEL)) ) { + Write-Warning "Using Addlocal" + $addlocalArray = ($pp.ADDLOCAL -split "\,") + foreach ( $_ in $addlocalArray) { + switch -Wildcard ($_) { + "FeatureMain" { + $pp_addlocal_array += -join ("FeatureMain", ",") + } + "FeatureEnvironment" { + $pp_addlocal_array += -join ("FeatureEnvironment", ",") + } + "FeatureJarFileRunWith" { + $pp_addlocal_array += -join ("FeatureJarFileRunWith", ",") + } + "FeatureJavaHome" { + $pp_addlocal_array += -join ("FeatureJavaHome", ",") + } + "FeatureIcedTeaWeb" { + $DisabledMsg | Write-Warning +# $pp_addlocal_array += -join ("FeatureIcedTeaWeb", ",") + } + "FeatureJNLPFileRunWith" { + $DisabledMsg | Write-Warning +# $pp_addlocal_array += -join ("FeatureJNLPFileRunWith", ",") + } + "FeatureOracleJavaSoft" { + $pp_addlocal_array += -join ("FeatureOracleJavaSoft", ",") + } + } + } + Write-Warning "No InstallLevel detected. Defaulting to AddLocal" + $New_pp.add( "ADDLOCAL", ($pp_addlocal_array -replace ".{1}$") ) + } + if (![string]::IsNullOrEmpty($pp.INSTALLLEVEL) ) { + $New_pp.add( "INSTALLLEVEL", $pp.INSTALLLEVEL ) + } + if ([string]::IsNullOrEmpty($pp.quiet)) { + $New_pp.add( "/quiet", $true ) + } else { + # Added to make sure the /quiet silent install is carried over if the user adds it to the params switch list + $New_pp.add( "/quiet", $true ) + } + +return $New_pp +} diff --git a/temurin-21-jdk/Temurin21.nuspec b/temurin-21-jdk/Temurin21.nuspec new file mode 100644 index 0000000..1bc9059 --- /dev/null +++ b/temurin-21-jdk/Temurin21.nuspec @@ -0,0 +1,53 @@ + + + + Temurin21 + 21.0.1.1200 + Temurin jdk21 hotspot 21.0.1.12 + Adoptium + JohanJanssen + false + https://github.com/adoptium/jdk21/blob/master/LICENSE + https://adoptium.net/ + https://adoptium.net/images/temurin-light.png + ## Temurin + + The Temurin21 package uses OpenJDK_HotSpot VM from Temurin using the msi file format. + + Using a msi file provides a rich source of installation options : + + ** The following Features must be listed after `/ADDLOCAL=` using a comma after each feature. ** + +| Feature | Description | +|----|----| +| FeatureMain &nbsp; | &nbsp; Core Temurin installation (DEFAULT) | +| FeatureEnvironment &nbsp; | &nbsp; Update the PATH environment variable (DEFAULT) | +| FeatureJarFileRunWith &nbsp; | &nbsp; Associate .jar files with Java applications (DEFAULT) | +| FeatureJavaHome &nbsp; | &nbsp; Update the JAVA_HOME environment variable | +| FeatureIcedTeaWeb &nbsp; | &nbsp; Install IcedTea-Web | +| FeatureJNLPFileRunWith &nbsp; | &nbsp; Associate .jnlp files with IcedTea-web (Temurin 8 only) | +| FeatureOracleJavaSoft &nbsp; | &nbsp; Updates registry keys HKLM\SOFTWARE\JavaSoft\ (Temurin 8 only) | + +** Note: FeatureOracleJavaSoft can be used to prevent Oracle Java launching from PATH when Temurin is uninstalled. Reinstall Oracle Java if you need to restore the Oracle registry keys. ** + +Optional parameters can be used that group some of the features together: + +| Parameter | Features | +|----|----| +| &nbsp; INSTALLLEVEL=1 &nbsp; | &nbsp; FeatureMain,FeatureEnvironment,FeatureJarFileRunWith &nbsp; | +|----|----| +| &nbsp; INSTALLLEVEL=2 &nbsp; | &nbsp; FeatureMain,FeatureEnvironment,FeatureJarFileRunWith, FeatureJavaHome,FeatureIcedTeaWeb &nbsp; | +|----|----| +| &nbsp; INSTALLLEVEL=3 &nbsp; | &nbsp; FeatureMain,FeatureEnvironment,FeatureJarFileRunWith, FeatureJavaHome,FeatureIcedTeaWeb,FeatureJNLPFileRunWith &nbsp; | + +The following example silently installs Temurin, updates the PATH, associates .jar files with Java applications and defines JAVA_HOME: +Example: `choco install Temurin21 --params="/ADDLOCAL=FeatureMain,FeatureEnvironment,FeatureJarFileRunWith,FeatureJavaHome /INSTALLDIR=$env:Programfiles\Eclipse Adoptium\ /quiet"` +** Note: You must use INSTALLDIR with FeatureMain. INSTALLDIR Default is `$env:Programfiles\Eclipse Adoptium` ** + +This will install both the 32 bit and 64 bit versions of the desired package by using the parameter `/both` +Example: `choco install Temurin21 --params="/both"` + Adoptium provides prebuilt OpenJDK build binaries. This one uses OpenJDK_HotSpot. + openjdk java jvm + https://github.com/johanjanssen/TemurinChocolateyPackages + + \ No newline at end of file diff --git a/temurin-21-jdk/tools/chocolateyinstall.ps1 b/temurin-21-jdk/tools/chocolateyinstall.ps1 new file mode 100644 index 0000000..6e53da1 --- /dev/null +++ b/temurin-21-jdk/tools/chocolateyinstall.ps1 @@ -0,0 +1,17 @@ +$ErrorActionPreference = 'Stop' + if(!$PSScriptRoot){ $PSScriptRoot = Split-Path $MyInvocation.MyCommand.Path -Parent } +. "$PSScriptRoot\helper.ps1" + +# Get Package Parameters +$parameters = (Get-PackageParameters); $pp = ( Test-PackageParamaters $parameters ).ToString() -replace('""|="True"','') -replace(";", ' ') -replace("==", '=') + +$packageArgs = @{ + PackageName = 'Temurin21' + Url64bit = 'https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.1%2B12/OpenJDK21U-jdk_x64_windows_hotspot_21.0.1_12.msi' + Checksum64 = '62E12510B0097BD784B14B035013A32C65E7DA334220C3DDFCC90D87440D240C' + ChecksumType64 = 'sha256' + fileType = 'msi' + SilentArgs = $pp +} + +Install-ChocolateyPackage @packageArgs diff --git a/temurin-21-jdk/tools/helper.ps1 b/temurin-21-jdk/tools/helper.ps1 new file mode 100644 index 0000000..5e2ccd2 --- /dev/null +++ b/temurin-21-jdk/tools/helper.ps1 @@ -0,0 +1,75 @@ + +<# Bol Updating of hashtable to string for ToString method #> +Update-TypeData -TypeName System.Collections.HashTable ` + -MemberType ScriptMethod ` + -MemberName ToString ` + -Value { $keys = $this.keys; foreach ($key in $keys) { $v = $this[$key]; + if ($key -match "\s") { $hashstr += "`"$key`"" + "=" + "`"$v`"" + ";" } + else { $hashstr += $key + "=" + "`"$v`"" + ";" } }; + return $hashstr } +<# Eol Updating of hashtable to string for ToString method #> + +function Test-PackageParamaters { +[CmdletBinding()] +param( + [hashtable]$pp +) +$disabledMsg = "This switch has been disabled" +$New_pp = @{}; +$toolsDir = @{$true="${env:ProgramFiles}\Temurin";$false="${env:programfiles(x86)}\Temurin"}[ ((Get-OSArchitectureWidth 64) -or ($env:chocolateyForceX86 -eq $true)) ] + if (![string]::IsNullOrEmpty($pp.transforms)) { + $New_pp.add( "transforms", $pp.transforms ) + } + if (![string]::IsNullOrEmpty($pp.INSTALLDIR) -and (($New_pp.ADDLOCAL -match "FeatureMain") -or ($pp.ADDLOCAL -match "FeatureMain")) -and ([string]::IsNullOrEmpty($pp.INSTALLLEVEL)) ) { + Write-Warning "You must use INSTALLDIR with FeatureMain." + Write-Warning "Using provided $($pp.INSTALLDIR)" + $New_pp.add( "InstallDir", "`"`"$($pp.INSTALLDIR)`"`"" ) + } elseif ([string]::IsNullOrEmpty($pp.INSTALLDIR) -and (($New_pp.ADDLOCAL -match "FeatureMain") -or ($pp.ADDLOCAL -match "FeatureMain")) -and ([string]::IsNullOrEmpty($pp.INSTALLLEVEL)) ) { + Write-Warning "Using Default of $toolsDir" + $New_pp.add( "InstallDir", "`"`"$toolsDir`"`"" ) + } + if ((![string]::IsNullOrEmpty($pp.ADDLOCAL)) -and ([string]::IsNullOrEmpty($pp.INSTALLLEVEL)) ) { + Write-Warning "Using Addlocal" + $addlocalArray = ($pp.ADDLOCAL -split "\,") + foreach ( $_ in $addlocalArray) { + switch -Wildcard ($_) { + "FeatureMain" { + $pp_addlocal_array += -join ("FeatureMain", ",") + } + "FeatureEnvironment" { + $pp_addlocal_array += -join ("FeatureEnvironment", ",") + } + "FeatureJarFileRunWith" { + $pp_addlocal_array += -join ("FeatureJarFileRunWith", ",") + } + "FeatureJavaHome" { + $pp_addlocal_array += -join ("FeatureJavaHome", ",") + } + "FeatureIcedTeaWeb" { + $DisabledMsg | Write-Warning +# $pp_addlocal_array += -join ("FeatureIcedTeaWeb", ",") + } + "FeatureJNLPFileRunWith" { + $DisabledMsg | Write-Warning +# $pp_addlocal_array += -join ("FeatureJNLPFileRunWith", ",") + } + "FeatureOracleJavaSoft" { + $pp_addlocal_array += -join ("FeatureOracleJavaSoft", ",") + } + } + } + Write-Warning "No InstallLevel detected. Defaulting to AddLocal" + $New_pp.add( "ADDLOCAL", ($pp_addlocal_array -replace ".{1}$") ) + } + if (![string]::IsNullOrEmpty($pp.INSTALLLEVEL) ) { + $New_pp.add( "INSTALLLEVEL", $pp.INSTALLLEVEL ) + } + if ([string]::IsNullOrEmpty($pp.quiet)) { + $New_pp.add( "/quiet", $true ) + } else { + # Added to make sure the /quiet silent install is carried over if the user adds it to the params switch list + $New_pp.add( "/quiet", $true ) + } + +return $New_pp +} diff --git a/temurin-21-jre/Temurin21jre.nuspec b/temurin-21-jre/Temurin21jre.nuspec new file mode 100644 index 0000000..be7c49d --- /dev/null +++ b/temurin-21-jre/Temurin21jre.nuspec @@ -0,0 +1,53 @@ + + + + Temurin21jre + 21.0.1.1200 + Temurin jre21 hotspot 21.0.1.12 + Adoptium + JohanJanssen + false + https://github.com/adoptium/jdk21/blob/master/LICENSE + https://adoptium.net/ + https://adoptium.net/images/temurin-light.png + ## Temurin + + The Temurin21jre package uses OpenJDK_HotSpot VM from Temurin using the msi file format. + + Using a msi file provides a rich source of installation options : + + ** The following Features must be listed after `/ADDLOCAL=` using a comma after each feature. ** + +| Feature | Description | +|----|----| +| FeatureMain &nbsp; | &nbsp; Core Temurin installation (DEFAULT) | +| FeatureEnvironment &nbsp; | &nbsp; Update the PATH environment variable (DEFAULT) | +| FeatureJarFileRunWith &nbsp; | &nbsp; Associate .jar files with Java applications (DEFAULT) | +| FeatureJavaHome &nbsp; | &nbsp; Update the JAVA_HOME environment variable | +| FeatureIcedTeaWeb &nbsp; | &nbsp; Install IcedTea-Web | +| FeatureJNLPFileRunWith &nbsp; | &nbsp; Associate .jnlp files with IcedTea-web (Temurin 8 only) | +| FeatureOracleJavaSoft &nbsp; | &nbsp; Updates registry keys HKLM\SOFTWARE\JavaSoft\ (Temurin 8 only) | + +** Note: FeatureOracleJavaSoft can be used to prevent Oracle Java launching from PATH when Temurin is uninstalled. Reinstall Oracle Java if you need to restore the Oracle registry keys. ** + +Optional parameters can be used that group some of the features together: + +| Parameter | Features | +|----|----| +| &nbsp; INSTALLLEVEL=1 &nbsp; | &nbsp; FeatureMain,FeatureEnvironment,FeatureJarFileRunWith &nbsp; | +|----|----| +| &nbsp; INSTALLLEVEL=2 &nbsp; | &nbsp; FeatureMain,FeatureEnvironment,FeatureJarFileRunWith, FeatureJavaHome,FeatureIcedTeaWeb &nbsp; | +|----|----| +| &nbsp; INSTALLLEVEL=3 &nbsp; | &nbsp; FeatureMain,FeatureEnvironment,FeatureJarFileRunWith, FeatureJavaHome,FeatureIcedTeaWeb,FeatureJNLPFileRunWith &nbsp; | + +The following example silently installs Temurin, updates the PATH, associates .jar files with Java applications and defines JAVA_HOME: +Example: `choco install Temurin21jre --params="/ADDLOCAL=FeatureMain,FeatureEnvironment,FeatureJarFileRunWith,FeatureJavaHome /INSTALLDIR=$env:Programfiles\Eclipse Adoptium\ /quiet"` +** Note: You must use INSTALLDIR with FeatureMain. INSTALLDIR Default is `$env:Programfiles\Eclipse Adoptium` ** + +This will install both the 32 bit and 64 bit versions of the desired package by using the parameter `/both` +Example: `choco install Temurin21jre --params="/both"` + Adoptium provides prebuilt OpenJDK build binaries. This one uses OpenJDK_HotSpot. + openjdk java jvm + https://github.com/johanjanssen/TemurinChocolateyPackages + + \ No newline at end of file diff --git a/temurin-21-jre/tools/chocolateyinstall.ps1 b/temurin-21-jre/tools/chocolateyinstall.ps1 new file mode 100644 index 0000000..74ab632 --- /dev/null +++ b/temurin-21-jre/tools/chocolateyinstall.ps1 @@ -0,0 +1,17 @@ +$ErrorActionPreference = 'Stop' + if(!$PSScriptRoot){ $PSScriptRoot = Split-Path $MyInvocation.MyCommand.Path -Parent } +. "$PSScriptRoot\helper.ps1" + +# Get Package Parameters +$parameters = (Get-PackageParameters); $pp = ( Test-PackageParamaters $parameters ).ToString() -replace('""|="True"','') -replace(";", ' ') -replace("==", '=') + +$packageArgs = @{ + PackageName = 'Temurin21jre' + Url64bit = 'https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.1%2B12/OpenJDK21U-jre_x64_windows_hotspot_21.0.1_12.msi' + Checksum64 = '9BB4DB6E70E105E77A2F395AB925D6413CCD2A97D81FE7EAB67CFDC373CFBE9E' + ChecksumType64 = 'sha256' + fileType = 'msi' + SilentArgs = $pp +} + +Install-ChocolateyPackage @packageArgs diff --git a/temurin-21-jre/tools/helper.ps1 b/temurin-21-jre/tools/helper.ps1 new file mode 100644 index 0000000..5e2ccd2 --- /dev/null +++ b/temurin-21-jre/tools/helper.ps1 @@ -0,0 +1,75 @@ + +<# Bol Updating of hashtable to string for ToString method #> +Update-TypeData -TypeName System.Collections.HashTable ` + -MemberType ScriptMethod ` + -MemberName ToString ` + -Value { $keys = $this.keys; foreach ($key in $keys) { $v = $this[$key]; + if ($key -match "\s") { $hashstr += "`"$key`"" + "=" + "`"$v`"" + ";" } + else { $hashstr += $key + "=" + "`"$v`"" + ";" } }; + return $hashstr } +<# Eol Updating of hashtable to string for ToString method #> + +function Test-PackageParamaters { +[CmdletBinding()] +param( + [hashtable]$pp +) +$disabledMsg = "This switch has been disabled" +$New_pp = @{}; +$toolsDir = @{$true="${env:ProgramFiles}\Temurin";$false="${env:programfiles(x86)}\Temurin"}[ ((Get-OSArchitectureWidth 64) -or ($env:chocolateyForceX86 -eq $true)) ] + if (![string]::IsNullOrEmpty($pp.transforms)) { + $New_pp.add( "transforms", $pp.transforms ) + } + if (![string]::IsNullOrEmpty($pp.INSTALLDIR) -and (($New_pp.ADDLOCAL -match "FeatureMain") -or ($pp.ADDLOCAL -match "FeatureMain")) -and ([string]::IsNullOrEmpty($pp.INSTALLLEVEL)) ) { + Write-Warning "You must use INSTALLDIR with FeatureMain." + Write-Warning "Using provided $($pp.INSTALLDIR)" + $New_pp.add( "InstallDir", "`"`"$($pp.INSTALLDIR)`"`"" ) + } elseif ([string]::IsNullOrEmpty($pp.INSTALLDIR) -and (($New_pp.ADDLOCAL -match "FeatureMain") -or ($pp.ADDLOCAL -match "FeatureMain")) -and ([string]::IsNullOrEmpty($pp.INSTALLLEVEL)) ) { + Write-Warning "Using Default of $toolsDir" + $New_pp.add( "InstallDir", "`"`"$toolsDir`"`"" ) + } + if ((![string]::IsNullOrEmpty($pp.ADDLOCAL)) -and ([string]::IsNullOrEmpty($pp.INSTALLLEVEL)) ) { + Write-Warning "Using Addlocal" + $addlocalArray = ($pp.ADDLOCAL -split "\,") + foreach ( $_ in $addlocalArray) { + switch -Wildcard ($_) { + "FeatureMain" { + $pp_addlocal_array += -join ("FeatureMain", ",") + } + "FeatureEnvironment" { + $pp_addlocal_array += -join ("FeatureEnvironment", ",") + } + "FeatureJarFileRunWith" { + $pp_addlocal_array += -join ("FeatureJarFileRunWith", ",") + } + "FeatureJavaHome" { + $pp_addlocal_array += -join ("FeatureJavaHome", ",") + } + "FeatureIcedTeaWeb" { + $DisabledMsg | Write-Warning +# $pp_addlocal_array += -join ("FeatureIcedTeaWeb", ",") + } + "FeatureJNLPFileRunWith" { + $DisabledMsg | Write-Warning +# $pp_addlocal_array += -join ("FeatureJNLPFileRunWith", ",") + } + "FeatureOracleJavaSoft" { + $pp_addlocal_array += -join ("FeatureOracleJavaSoft", ",") + } + } + } + Write-Warning "No InstallLevel detected. Defaulting to AddLocal" + $New_pp.add( "ADDLOCAL", ($pp_addlocal_array -replace ".{1}$") ) + } + if (![string]::IsNullOrEmpty($pp.INSTALLLEVEL) ) { + $New_pp.add( "INSTALLLEVEL", $pp.INSTALLLEVEL ) + } + if ([string]::IsNullOrEmpty($pp.quiet)) { + $New_pp.add( "/quiet", $true ) + } else { + # Added to make sure the /quiet silent install is carried over if the user adds it to the params switch list + $New_pp.add( "/quiet", $true ) + } + +return $New_pp +} diff --git a/temurin-8-jdk/Temurin8.nuspec b/temurin-8-jdk/Temurin8.nuspec new file mode 100644 index 0000000..411b1f5 --- /dev/null +++ b/temurin-8-jdk/Temurin8.nuspec @@ -0,0 +1,53 @@ + + + + Temurin8 + 8.392.8 + Temurin jdk8 hotspot 8.392.8 + Adoptium + JohanJanssen + false + https://github.com/adoptium/jdk8u/blob/master/LICENSE + https://adoptium.net/ + https://adoptium.net/images/temurin-light.png + ## Temurin + + The Temurin8 package uses OpenJDK_HotSpot VM from Temurin using the msi file format. + + Using a msi file provides a rich source of installation options : + + ** The following Features must be listed after `/ADDLOCAL=` using a comma after each feature. ** + +| Feature | Description | +|----|----| +| FeatureMain &nbsp; | &nbsp; Core Temurin installation (DEFAULT) | +| FeatureEnvironment &nbsp; | &nbsp; Update the PATH environment variable (DEFAULT) | +| FeatureJarFileRunWith &nbsp; | &nbsp; Associate .jar files with Java applications (DEFAULT) | +| FeatureJavaHome &nbsp; | &nbsp; Update the JAVA_HOME environment variable | +| FeatureIcedTeaWeb &nbsp; | &nbsp; Install IcedTea-Web | +| FeatureJNLPFileRunWith &nbsp; | &nbsp; Associate .jnlp files with IcedTea-web (Temurin 8 only) | +| FeatureOracleJavaSoft &nbsp; | &nbsp; Updates registry keys HKLM\SOFTWARE\JavaSoft\ (Temurin 8 only) | + +** Note: FeatureOracleJavaSoft can be used to prevent Oracle Java launching from PATH when Temurin is uninstalled. Reinstall Oracle Java if you need to restore the Oracle registry keys. ** + +Optional parameters can be used that group some of the features together: + +| Parameter | Features | +|----|----| +| &nbsp; INSTALLLEVEL=1 &nbsp; | &nbsp; FeatureMain,FeatureEnvironment,FeatureJarFileRunWith &nbsp; | +|----|----| +| &nbsp; INSTALLLEVEL=2 &nbsp; | &nbsp; FeatureMain,FeatureEnvironment,FeatureJarFileRunWith, FeatureJavaHome,FeatureIcedTeaWeb &nbsp; | +|----|----| +| &nbsp; INSTALLLEVEL=3 &nbsp; | &nbsp; FeatureMain,FeatureEnvironment,FeatureJarFileRunWith, FeatureJavaHome,FeatureIcedTeaWeb,FeatureJNLPFileRunWith &nbsp; | + +The following example silently installs Temurin, updates the PATH, associates .jar files with Java applications and defines JAVA_HOME: +Example: `choco install Temurin8 --params="/ADDLOCAL=FeatureMain,FeatureEnvironment,FeatureJarFileRunWith,FeatureJavaHome /INSTALLDIR=$env:Programfiles\Eclipse Adoptium\ /quiet"` +** Note: You must use INSTALLDIR with FeatureMain. INSTALLDIR Default is `$env:Programfiles\Eclipse Adoptium` ** + +This will install both the 32 bit and 64 bit versions of the desired package by using the parameter `/both` +Example: `choco install Temurin8 --params="/both"` + Adoptium provides prebuilt OpenJDK build binaries. This one uses OpenJDK_HotSpot. + openjdk java jvm + https://github.com/johanjanssen/TemurinChocolateyPackages + + \ No newline at end of file diff --git a/temurin-8-jdk/tools/chocolateyinstall.ps1 b/temurin-8-jdk/tools/chocolateyinstall.ps1 new file mode 100644 index 0000000..92d3c04 --- /dev/null +++ b/temurin-8-jdk/tools/chocolateyinstall.ps1 @@ -0,0 +1,28 @@ +$ErrorActionPreference = 'Stop' + if(!$PSScriptRoot){ $PSScriptRoot = Split-Path $MyInvocation.MyCommand.Path -Parent } +. "$PSScriptRoot\helper.ps1" + +# Get Package Parameters +$parameters = (Get-PackageParameters); $pp = ( Test-PackageParamaters $parameters ).ToString() -replace('""|="True"','') -replace(";", ' ') -replace("==", '=') + +$packageArgs = @{ + PackageName = 'Temurin8' + fileType = 'msi' + Url = 'https://github.com/adoptium/temurin8-binaries/releases/download/jdk8u392-b08/OpenJDK8U-jdk_x86-32_windows_hotspot_8u392b08.msi' + Url64bit = 'https://github.com/adoptium/temurin8-binaries/releases/download/jdk8u392-b08/OpenJDK8U-jdk_x64_windows_hotspot_8u392b08.msi' + Checksum = 'A6CFD8F97B5AABF0F0FB7FC33D1C6F417E41BB5E575B168AFB269B1BA0AE9DF3' + ChecksumType = 'sha256' + Checksum64 = '223D252802B9087E85886F08FAEBF9FA676285565895E74EC2F9BDE4B1F39F03' + ChecksumType64 = 'sha256' + SilentArgs = $pp +} + +if ($parameters.both){ +write-warning "Installing 32bit version" +Install-ChocolateyPackage $packageArgs.packageName $packageArgs.fileType $packageArgs.SilentArgs $packageArgs.url -checksum $packageArgs.checksum -checksumtype $packageArgs.ChecksumType +write-warning "Installing 64bit version" +Install-ChocolateyPackage $packageArgs.packageName $packageArgs.fileType $packageArgs.SilentArgs $packageArgs.Url64bit $packageArgs.Url64bit -checksum $packageArgs.Checksum64 -checksumtype $packageArgs.ChecksumType64 +} else { +write-warning "Installing only Get-OSArchitectureWidth" +Install-ChocolateyPackage @packageArgs +} diff --git a/temurin-8-jdk/tools/helper.ps1 b/temurin-8-jdk/tools/helper.ps1 new file mode 100644 index 0000000..5e2ccd2 --- /dev/null +++ b/temurin-8-jdk/tools/helper.ps1 @@ -0,0 +1,75 @@ + +<# Bol Updating of hashtable to string for ToString method #> +Update-TypeData -TypeName System.Collections.HashTable ` + -MemberType ScriptMethod ` + -MemberName ToString ` + -Value { $keys = $this.keys; foreach ($key in $keys) { $v = $this[$key]; + if ($key -match "\s") { $hashstr += "`"$key`"" + "=" + "`"$v`"" + ";" } + else { $hashstr += $key + "=" + "`"$v`"" + ";" } }; + return $hashstr } +<# Eol Updating of hashtable to string for ToString method #> + +function Test-PackageParamaters { +[CmdletBinding()] +param( + [hashtable]$pp +) +$disabledMsg = "This switch has been disabled" +$New_pp = @{}; +$toolsDir = @{$true="${env:ProgramFiles}\Temurin";$false="${env:programfiles(x86)}\Temurin"}[ ((Get-OSArchitectureWidth 64) -or ($env:chocolateyForceX86 -eq $true)) ] + if (![string]::IsNullOrEmpty($pp.transforms)) { + $New_pp.add( "transforms", $pp.transforms ) + } + if (![string]::IsNullOrEmpty($pp.INSTALLDIR) -and (($New_pp.ADDLOCAL -match "FeatureMain") -or ($pp.ADDLOCAL -match "FeatureMain")) -and ([string]::IsNullOrEmpty($pp.INSTALLLEVEL)) ) { + Write-Warning "You must use INSTALLDIR with FeatureMain." + Write-Warning "Using provided $($pp.INSTALLDIR)" + $New_pp.add( "InstallDir", "`"`"$($pp.INSTALLDIR)`"`"" ) + } elseif ([string]::IsNullOrEmpty($pp.INSTALLDIR) -and (($New_pp.ADDLOCAL -match "FeatureMain") -or ($pp.ADDLOCAL -match "FeatureMain")) -and ([string]::IsNullOrEmpty($pp.INSTALLLEVEL)) ) { + Write-Warning "Using Default of $toolsDir" + $New_pp.add( "InstallDir", "`"`"$toolsDir`"`"" ) + } + if ((![string]::IsNullOrEmpty($pp.ADDLOCAL)) -and ([string]::IsNullOrEmpty($pp.INSTALLLEVEL)) ) { + Write-Warning "Using Addlocal" + $addlocalArray = ($pp.ADDLOCAL -split "\,") + foreach ( $_ in $addlocalArray) { + switch -Wildcard ($_) { + "FeatureMain" { + $pp_addlocal_array += -join ("FeatureMain", ",") + } + "FeatureEnvironment" { + $pp_addlocal_array += -join ("FeatureEnvironment", ",") + } + "FeatureJarFileRunWith" { + $pp_addlocal_array += -join ("FeatureJarFileRunWith", ",") + } + "FeatureJavaHome" { + $pp_addlocal_array += -join ("FeatureJavaHome", ",") + } + "FeatureIcedTeaWeb" { + $DisabledMsg | Write-Warning +# $pp_addlocal_array += -join ("FeatureIcedTeaWeb", ",") + } + "FeatureJNLPFileRunWith" { + $DisabledMsg | Write-Warning +# $pp_addlocal_array += -join ("FeatureJNLPFileRunWith", ",") + } + "FeatureOracleJavaSoft" { + $pp_addlocal_array += -join ("FeatureOracleJavaSoft", ",") + } + } + } + Write-Warning "No InstallLevel detected. Defaulting to AddLocal" + $New_pp.add( "ADDLOCAL", ($pp_addlocal_array -replace ".{1}$") ) + } + if (![string]::IsNullOrEmpty($pp.INSTALLLEVEL) ) { + $New_pp.add( "INSTALLLEVEL", $pp.INSTALLLEVEL ) + } + if ([string]::IsNullOrEmpty($pp.quiet)) { + $New_pp.add( "/quiet", $true ) + } else { + # Added to make sure the /quiet silent install is carried over if the user adds it to the params switch list + $New_pp.add( "/quiet", $true ) + } + +return $New_pp +} diff --git a/temurin-8-jre/Temurin8jre.nuspec b/temurin-8-jre/Temurin8jre.nuspec new file mode 100644 index 0000000..f3b17e9 --- /dev/null +++ b/temurin-8-jre/Temurin8jre.nuspec @@ -0,0 +1,53 @@ + + + + Temurin8jre + 8.392.8 + Temurin jre8 hotspot 8.392.8 + Adoptium + JohanJanssen + false + https://github.com/adoptium/jdk8u/blob/master/LICENSE + https://adoptium.net/ + https://adoptium.net/images/temurin-light.png + ## Temurin + + The Temurin8jre package uses OpenJDK_HotSpot VM from Temurin using the msi file format. + + Using a msi file provides a rich source of installation options : + + ** The following Features must be listed after `/ADDLOCAL=` using a comma after each feature. ** + +| Feature | Description | +|----|----| +| FeatureMain &nbsp; | &nbsp; Core Temurin installation (DEFAULT) | +| FeatureEnvironment &nbsp; | &nbsp; Update the PATH environment variable (DEFAULT) | +| FeatureJarFileRunWith &nbsp; | &nbsp; Associate .jar files with Java applications (DEFAULT) | +| FeatureJavaHome &nbsp; | &nbsp; Update the JAVA_HOME environment variable | +| FeatureIcedTeaWeb &nbsp; | &nbsp; Install IcedTea-Web | +| FeatureJNLPFileRunWith &nbsp; | &nbsp; Associate .jnlp files with IcedTea-web (Temurin 8 only) | +| FeatureOracleJavaSoft &nbsp; | &nbsp; Updates registry keys HKLM\SOFTWARE\JavaSoft\ (Temurin 8 only) | + +** Note: FeatureOracleJavaSoft can be used to prevent Oracle Java launching from PATH when Temurin is uninstalled. Reinstall Oracle Java if you need to restore the Oracle registry keys. ** + +Optional parameters can be used that group some of the features together: + +| Parameter | Features | +|----|----| +| &nbsp; INSTALLLEVEL=1 &nbsp; | &nbsp; FeatureMain,FeatureEnvironment,FeatureJarFileRunWith &nbsp; | +|----|----| +| &nbsp; INSTALLLEVEL=2 &nbsp; | &nbsp; FeatureMain,FeatureEnvironment,FeatureJarFileRunWith, FeatureJavaHome,FeatureIcedTeaWeb &nbsp; | +|----|----| +| &nbsp; INSTALLLEVEL=3 &nbsp; | &nbsp; FeatureMain,FeatureEnvironment,FeatureJarFileRunWith, FeatureJavaHome,FeatureIcedTeaWeb,FeatureJNLPFileRunWith &nbsp; | + +The following example silently installs Temurin, updates the PATH, associates .jar files with Java applications and defines JAVA_HOME: +Example: `choco install Temurin8jre --params="/ADDLOCAL=FeatureMain,FeatureEnvironment,FeatureJarFileRunWith,FeatureJavaHome /INSTALLDIR=$env:Programfiles\Eclipse Adoptium\ /quiet"` +** Note: You must use INSTALLDIR with FeatureMain. INSTALLDIR Default is `$env:Programfiles\Eclipse Adoptium` ** + +This will install both the 32 bit and 64 bit versions of the desired package by using the parameter `/both` +Example: `choco install Temurin8jre --params="/both"` + Adoptium provides prebuilt OpenJDK build binaries. This one uses OpenJDK_HotSpot. + openjdk java jvm + https://github.com/johanjanssen/TemurinChocolateyPackages + + \ No newline at end of file diff --git a/temurin-8-jre/tools/chocolateyinstall.ps1 b/temurin-8-jre/tools/chocolateyinstall.ps1 new file mode 100644 index 0000000..3b0fb46 --- /dev/null +++ b/temurin-8-jre/tools/chocolateyinstall.ps1 @@ -0,0 +1,28 @@ +$ErrorActionPreference = 'Stop' + if(!$PSScriptRoot){ $PSScriptRoot = Split-Path $MyInvocation.MyCommand.Path -Parent } +. "$PSScriptRoot\helper.ps1" + +# Get Package Parameters +$parameters = (Get-PackageParameters); $pp = ( Test-PackageParamaters $parameters ).ToString() -replace('""|="True"','') -replace(";", ' ') -replace("==", '=') + +$packageArgs = @{ + PackageName = 'Temurin8jre' + fileType = 'msi' + Url = 'https://github.com/adoptium/temurin8-binaries/releases/download/jdk8u392-b08/OpenJDK8U-jre_x86-32_windows_hotspot_8u392b08.msi' + Url64bit = 'https://github.com/adoptium/temurin8-binaries/releases/download/jdk8u392-b08/OpenJDK8U-jre_x64_windows_hotspot_8u392b08.msi' + Checksum = 'E8049D25C1EAA1C01FBB26D36410C32D83DD456CCE3C7AD4C6523E0C61C79138' + ChecksumType = 'sha256' + Checksum64 = '7DD4DCC7FEAC3D7632C1D2336BF65E914B3AA62A0BD9D87A682CE294E964DE65' + ChecksumType64 = 'sha256' + SilentArgs = $pp +} + +if ($parameters.both){ +write-warning "Installing 32bit version" +Install-ChocolateyPackage $packageArgs.packageName $packageArgs.fileType $packageArgs.SilentArgs $packageArgs.url -checksum $packageArgs.checksum -checksumtype $packageArgs.ChecksumType +write-warning "Installing 64bit version" +Install-ChocolateyPackage $packageArgs.packageName $packageArgs.fileType $packageArgs.SilentArgs $packageArgs.Url64bit $packageArgs.Url64bit -checksum $packageArgs.Checksum64 -checksumtype $packageArgs.ChecksumType64 +} else { +write-warning "Installing only Get-OSArchitectureWidth" +Install-ChocolateyPackage @packageArgs +} diff --git a/temurin-8-jre/tools/helper.ps1 b/temurin-8-jre/tools/helper.ps1 new file mode 100644 index 0000000..5e2ccd2 --- /dev/null +++ b/temurin-8-jre/tools/helper.ps1 @@ -0,0 +1,75 @@ + +<# Bol Updating of hashtable to string for ToString method #> +Update-TypeData -TypeName System.Collections.HashTable ` + -MemberType ScriptMethod ` + -MemberName ToString ` + -Value { $keys = $this.keys; foreach ($key in $keys) { $v = $this[$key]; + if ($key -match "\s") { $hashstr += "`"$key`"" + "=" + "`"$v`"" + ";" } + else { $hashstr += $key + "=" + "`"$v`"" + ";" } }; + return $hashstr } +<# Eol Updating of hashtable to string for ToString method #> + +function Test-PackageParamaters { +[CmdletBinding()] +param( + [hashtable]$pp +) +$disabledMsg = "This switch has been disabled" +$New_pp = @{}; +$toolsDir = @{$true="${env:ProgramFiles}\Temurin";$false="${env:programfiles(x86)}\Temurin"}[ ((Get-OSArchitectureWidth 64) -or ($env:chocolateyForceX86 -eq $true)) ] + if (![string]::IsNullOrEmpty($pp.transforms)) { + $New_pp.add( "transforms", $pp.transforms ) + } + if (![string]::IsNullOrEmpty($pp.INSTALLDIR) -and (($New_pp.ADDLOCAL -match "FeatureMain") -or ($pp.ADDLOCAL -match "FeatureMain")) -and ([string]::IsNullOrEmpty($pp.INSTALLLEVEL)) ) { + Write-Warning "You must use INSTALLDIR with FeatureMain." + Write-Warning "Using provided $($pp.INSTALLDIR)" + $New_pp.add( "InstallDir", "`"`"$($pp.INSTALLDIR)`"`"" ) + } elseif ([string]::IsNullOrEmpty($pp.INSTALLDIR) -and (($New_pp.ADDLOCAL -match "FeatureMain") -or ($pp.ADDLOCAL -match "FeatureMain")) -and ([string]::IsNullOrEmpty($pp.INSTALLLEVEL)) ) { + Write-Warning "Using Default of $toolsDir" + $New_pp.add( "InstallDir", "`"`"$toolsDir`"`"" ) + } + if ((![string]::IsNullOrEmpty($pp.ADDLOCAL)) -and ([string]::IsNullOrEmpty($pp.INSTALLLEVEL)) ) { + Write-Warning "Using Addlocal" + $addlocalArray = ($pp.ADDLOCAL -split "\,") + foreach ( $_ in $addlocalArray) { + switch -Wildcard ($_) { + "FeatureMain" { + $pp_addlocal_array += -join ("FeatureMain", ",") + } + "FeatureEnvironment" { + $pp_addlocal_array += -join ("FeatureEnvironment", ",") + } + "FeatureJarFileRunWith" { + $pp_addlocal_array += -join ("FeatureJarFileRunWith", ",") + } + "FeatureJavaHome" { + $pp_addlocal_array += -join ("FeatureJavaHome", ",") + } + "FeatureIcedTeaWeb" { + $DisabledMsg | Write-Warning +# $pp_addlocal_array += -join ("FeatureIcedTeaWeb", ",") + } + "FeatureJNLPFileRunWith" { + $DisabledMsg | Write-Warning +# $pp_addlocal_array += -join ("FeatureJNLPFileRunWith", ",") + } + "FeatureOracleJavaSoft" { + $pp_addlocal_array += -join ("FeatureOracleJavaSoft", ",") + } + } + } + Write-Warning "No InstallLevel detected. Defaulting to AddLocal" + $New_pp.add( "ADDLOCAL", ($pp_addlocal_array -replace ".{1}$") ) + } + if (![string]::IsNullOrEmpty($pp.INSTALLLEVEL) ) { + $New_pp.add( "INSTALLLEVEL", $pp.INSTALLLEVEL ) + } + if ([string]::IsNullOrEmpty($pp.quiet)) { + $New_pp.add( "/quiet", $true ) + } else { + # Added to make sure the /quiet silent install is carried over if the user adds it to the params switch list + $New_pp.add( "/quiet", $true ) + } + +return $New_pp +} diff --git a/temurin-jdk/Temurin.nuspec b/temurin-jdk/Temurin.nuspec new file mode 100644 index 0000000..5780d6a --- /dev/null +++ b/temurin-jdk/Temurin.nuspec @@ -0,0 +1,53 @@ + + + + Temurin + 21.0.1.1200 + Temurin jdk21 hotspot 21.0.1.12 + Adoptium + JohanJanssen + false + https://github.com/adoptium/jdk21/blob/master/LICENSE + https://adoptium.net/ + https://adoptium.net/images/temurin-light.png + ## Temurin + + The Temurin package uses OpenJDK_HotSpot VM from Temurin using the msi file format. + + Using a msi file provides a rich source of installation options : + + ** The following Features must be listed after `/ADDLOCAL=` using a comma after each feature. ** + +| Feature | Description | +|----|----| +| FeatureMain &nbsp; | &nbsp; Core Temurin installation (DEFAULT) | +| FeatureEnvironment &nbsp; | &nbsp; Update the PATH environment variable (DEFAULT) | +| FeatureJarFileRunWith &nbsp; | &nbsp; Associate .jar files with Java applications (DEFAULT) | +| FeatureJavaHome &nbsp; | &nbsp; Update the JAVA_HOME environment variable | +| FeatureIcedTeaWeb &nbsp; | &nbsp; Install IcedTea-Web | +| FeatureJNLPFileRunWith &nbsp; | &nbsp; Associate .jnlp files with IcedTea-web (Temurin 8 only) | +| FeatureOracleJavaSoft &nbsp; | &nbsp; Updates registry keys HKLM\SOFTWARE\JavaSoft\ (Temurin 8 only) | + +** Note: FeatureOracleJavaSoft can be used to prevent Oracle Java launching from PATH when Temurin is uninstalled. Reinstall Oracle Java if you need to restore the Oracle registry keys. ** + +Optional parameters can be used that group some of the features together: + +| Parameter | Features | +|----|----| +| &nbsp; INSTALLLEVEL=1 &nbsp; | &nbsp; FeatureMain,FeatureEnvironment,FeatureJarFileRunWith &nbsp; | +|----|----| +| &nbsp; INSTALLLEVEL=2 &nbsp; | &nbsp; FeatureMain,FeatureEnvironment,FeatureJarFileRunWith, FeatureJavaHome,FeatureIcedTeaWeb &nbsp; | +|----|----| +| &nbsp; INSTALLLEVEL=3 &nbsp; | &nbsp; FeatureMain,FeatureEnvironment,FeatureJarFileRunWith, FeatureJavaHome,FeatureIcedTeaWeb,FeatureJNLPFileRunWith &nbsp; | + +The following example silently installs Temurin, updates the PATH, associates .jar files with Java applications and defines JAVA_HOME: +Example: `choco install Temurin --params="/ADDLOCAL=FeatureMain,FeatureEnvironment,FeatureJarFileRunWith,FeatureJavaHome /INSTALLDIR=$env:Programfiles\Eclipse Adoptium\ /quiet"` +** Note: You must use INSTALLDIR with FeatureMain. INSTALLDIR Default is `$env:Programfiles\Eclipse Adoptium` ** + +This will install both the 32 bit and 64 bit versions of the desired package by using the parameter `/both` +Example: `choco install Temurin --params="/both"` + Adoptium provides prebuilt OpenJDK build binaries. This one uses OpenJDK_HotSpot. + openjdk java jvm + https://github.com/johanjanssen/TemurinChocolateyPackages + + \ No newline at end of file diff --git a/temurin-jdk/tools/chocolateyinstall.ps1 b/temurin-jdk/tools/chocolateyinstall.ps1 new file mode 100644 index 0000000..919bb97 --- /dev/null +++ b/temurin-jdk/tools/chocolateyinstall.ps1 @@ -0,0 +1,17 @@ +$ErrorActionPreference = 'Stop' + if(!$PSScriptRoot){ $PSScriptRoot = Split-Path $MyInvocation.MyCommand.Path -Parent } +. "$PSScriptRoot\helper.ps1" + +# Get Package Parameters +$parameters = (Get-PackageParameters); $pp = ( Test-PackageParamaters $parameters ).ToString() -replace('""|="True"','') -replace(";", ' ') -replace("==", '=') + +$packageArgs = @{ + PackageName = 'Temurin' + Url64bit = 'https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.1%2B12/OpenJDK21U-jdk_x64_windows_hotspot_21.0.1_12.msi' + Checksum64 = '62E12510B0097BD784B14B035013A32C65E7DA334220C3DDFCC90D87440D240C' + ChecksumType64 = 'sha256' + fileType = 'msi' + SilentArgs = $pp +} + +Install-ChocolateyPackage @packageArgs diff --git a/temurin-jdk/tools/helper.ps1 b/temurin-jdk/tools/helper.ps1 new file mode 100644 index 0000000..5e2ccd2 --- /dev/null +++ b/temurin-jdk/tools/helper.ps1 @@ -0,0 +1,75 @@ + +<# Bol Updating of hashtable to string for ToString method #> +Update-TypeData -TypeName System.Collections.HashTable ` + -MemberType ScriptMethod ` + -MemberName ToString ` + -Value { $keys = $this.keys; foreach ($key in $keys) { $v = $this[$key]; + if ($key -match "\s") { $hashstr += "`"$key`"" + "=" + "`"$v`"" + ";" } + else { $hashstr += $key + "=" + "`"$v`"" + ";" } }; + return $hashstr } +<# Eol Updating of hashtable to string for ToString method #> + +function Test-PackageParamaters { +[CmdletBinding()] +param( + [hashtable]$pp +) +$disabledMsg = "This switch has been disabled" +$New_pp = @{}; +$toolsDir = @{$true="${env:ProgramFiles}\Temurin";$false="${env:programfiles(x86)}\Temurin"}[ ((Get-OSArchitectureWidth 64) -or ($env:chocolateyForceX86 -eq $true)) ] + if (![string]::IsNullOrEmpty($pp.transforms)) { + $New_pp.add( "transforms", $pp.transforms ) + } + if (![string]::IsNullOrEmpty($pp.INSTALLDIR) -and (($New_pp.ADDLOCAL -match "FeatureMain") -or ($pp.ADDLOCAL -match "FeatureMain")) -and ([string]::IsNullOrEmpty($pp.INSTALLLEVEL)) ) { + Write-Warning "You must use INSTALLDIR with FeatureMain." + Write-Warning "Using provided $($pp.INSTALLDIR)" + $New_pp.add( "InstallDir", "`"`"$($pp.INSTALLDIR)`"`"" ) + } elseif ([string]::IsNullOrEmpty($pp.INSTALLDIR) -and (($New_pp.ADDLOCAL -match "FeatureMain") -or ($pp.ADDLOCAL -match "FeatureMain")) -and ([string]::IsNullOrEmpty($pp.INSTALLLEVEL)) ) { + Write-Warning "Using Default of $toolsDir" + $New_pp.add( "InstallDir", "`"`"$toolsDir`"`"" ) + } + if ((![string]::IsNullOrEmpty($pp.ADDLOCAL)) -and ([string]::IsNullOrEmpty($pp.INSTALLLEVEL)) ) { + Write-Warning "Using Addlocal" + $addlocalArray = ($pp.ADDLOCAL -split "\,") + foreach ( $_ in $addlocalArray) { + switch -Wildcard ($_) { + "FeatureMain" { + $pp_addlocal_array += -join ("FeatureMain", ",") + } + "FeatureEnvironment" { + $pp_addlocal_array += -join ("FeatureEnvironment", ",") + } + "FeatureJarFileRunWith" { + $pp_addlocal_array += -join ("FeatureJarFileRunWith", ",") + } + "FeatureJavaHome" { + $pp_addlocal_array += -join ("FeatureJavaHome", ",") + } + "FeatureIcedTeaWeb" { + $DisabledMsg | Write-Warning +# $pp_addlocal_array += -join ("FeatureIcedTeaWeb", ",") + } + "FeatureJNLPFileRunWith" { + $DisabledMsg | Write-Warning +# $pp_addlocal_array += -join ("FeatureJNLPFileRunWith", ",") + } + "FeatureOracleJavaSoft" { + $pp_addlocal_array += -join ("FeatureOracleJavaSoft", ",") + } + } + } + Write-Warning "No InstallLevel detected. Defaulting to AddLocal" + $New_pp.add( "ADDLOCAL", ($pp_addlocal_array -replace ".{1}$") ) + } + if (![string]::IsNullOrEmpty($pp.INSTALLLEVEL) ) { + $New_pp.add( "INSTALLLEVEL", $pp.INSTALLLEVEL ) + } + if ([string]::IsNullOrEmpty($pp.quiet)) { + $New_pp.add( "/quiet", $true ) + } else { + # Added to make sure the /quiet silent install is carried over if the user adds it to the params switch list + $New_pp.add( "/quiet", $true ) + } + +return $New_pp +} diff --git a/temurin-jre/Temurinjre.nuspec b/temurin-jre/Temurinjre.nuspec new file mode 100644 index 0000000..19c82d9 --- /dev/null +++ b/temurin-jre/Temurinjre.nuspec @@ -0,0 +1,53 @@ + + + + Temurinjre + 21.0.1.1200 + Temurin jre21 hotspot 21.0.1.12 + Adoptium + JohanJanssen + false + https://github.com/adoptium/jdk21/blob/master/LICENSE + https://adoptium.net/ + https://adoptium.net/images/temurin-light.png + ## Temurin + + The Temurinjre package uses OpenJDK_HotSpot VM from Temurin using the msi file format. + + Using a msi file provides a rich source of installation options : + + ** The following Features must be listed after `/ADDLOCAL=` using a comma after each feature. ** + +| Feature | Description | +|----|----| +| FeatureMain &nbsp; | &nbsp; Core Temurin installation (DEFAULT) | +| FeatureEnvironment &nbsp; | &nbsp; Update the PATH environment variable (DEFAULT) | +| FeatureJarFileRunWith &nbsp; | &nbsp; Associate .jar files with Java applications (DEFAULT) | +| FeatureJavaHome &nbsp; | &nbsp; Update the JAVA_HOME environment variable | +| FeatureIcedTeaWeb &nbsp; | &nbsp; Install IcedTea-Web | +| FeatureJNLPFileRunWith &nbsp; | &nbsp; Associate .jnlp files with IcedTea-web (Temurin 8 only) | +| FeatureOracleJavaSoft &nbsp; | &nbsp; Updates registry keys HKLM\SOFTWARE\JavaSoft\ (Temurin 8 only) | + +** Note: FeatureOracleJavaSoft can be used to prevent Oracle Java launching from PATH when Temurin is uninstalled. Reinstall Oracle Java if you need to restore the Oracle registry keys. ** + +Optional parameters can be used that group some of the features together: + +| Parameter | Features | +|----|----| +| &nbsp; INSTALLLEVEL=1 &nbsp; | &nbsp; FeatureMain,FeatureEnvironment,FeatureJarFileRunWith &nbsp; | +|----|----| +| &nbsp; INSTALLLEVEL=2 &nbsp; | &nbsp; FeatureMain,FeatureEnvironment,FeatureJarFileRunWith, FeatureJavaHome,FeatureIcedTeaWeb &nbsp; | +|----|----| +| &nbsp; INSTALLLEVEL=3 &nbsp; | &nbsp; FeatureMain,FeatureEnvironment,FeatureJarFileRunWith, FeatureJavaHome,FeatureIcedTeaWeb,FeatureJNLPFileRunWith &nbsp; | + +The following example silently installs Temurin, updates the PATH, associates .jar files with Java applications and defines JAVA_HOME: +Example: `choco install Temurinjre --params="/ADDLOCAL=FeatureMain,FeatureEnvironment,FeatureJarFileRunWith,FeatureJavaHome /INSTALLDIR=$env:Programfiles\Eclipse Adoptium\ /quiet"` +** Note: You must use INSTALLDIR with FeatureMain. INSTALLDIR Default is `$env:Programfiles\Eclipse Adoptium` ** + +This will install both the 32 bit and 64 bit versions of the desired package by using the parameter `/both` +Example: `choco install Temurinjre --params="/both"` + Adoptium provides prebuilt OpenJDK build binaries. This one uses OpenJDK_HotSpot. + openjdk java jvm + https://github.com/johanjanssen/TemurinChocolateyPackages + + \ No newline at end of file diff --git a/temurin-jre/tools/chocolateyinstall.ps1 b/temurin-jre/tools/chocolateyinstall.ps1 new file mode 100644 index 0000000..138801a --- /dev/null +++ b/temurin-jre/tools/chocolateyinstall.ps1 @@ -0,0 +1,17 @@ +$ErrorActionPreference = 'Stop' + if(!$PSScriptRoot){ $PSScriptRoot = Split-Path $MyInvocation.MyCommand.Path -Parent } +. "$PSScriptRoot\helper.ps1" + +# Get Package Parameters +$parameters = (Get-PackageParameters); $pp = ( Test-PackageParamaters $parameters ).ToString() -replace('""|="True"','') -replace(";", ' ') -replace("==", '=') + +$packageArgs = @{ + PackageName = 'Temurinjre' + Url64bit = 'https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.1%2B12/OpenJDK21U-jre_x64_windows_hotspot_21.0.1_12.msi' + Checksum64 = '9BB4DB6E70E105E77A2F395AB925D6413CCD2A97D81FE7EAB67CFDC373CFBE9E' + ChecksumType64 = 'sha256' + fileType = 'msi' + SilentArgs = $pp +} + +Install-ChocolateyPackage @packageArgs diff --git a/temurin-jre/tools/helper.ps1 b/temurin-jre/tools/helper.ps1 new file mode 100644 index 0000000..5e2ccd2 --- /dev/null +++ b/temurin-jre/tools/helper.ps1 @@ -0,0 +1,75 @@ + +<# Bol Updating of hashtable to string for ToString method #> +Update-TypeData -TypeName System.Collections.HashTable ` + -MemberType ScriptMethod ` + -MemberName ToString ` + -Value { $keys = $this.keys; foreach ($key in $keys) { $v = $this[$key]; + if ($key -match "\s") { $hashstr += "`"$key`"" + "=" + "`"$v`"" + ";" } + else { $hashstr += $key + "=" + "`"$v`"" + ";" } }; + return $hashstr } +<# Eol Updating of hashtable to string for ToString method #> + +function Test-PackageParamaters { +[CmdletBinding()] +param( + [hashtable]$pp +) +$disabledMsg = "This switch has been disabled" +$New_pp = @{}; +$toolsDir = @{$true="${env:ProgramFiles}\Temurin";$false="${env:programfiles(x86)}\Temurin"}[ ((Get-OSArchitectureWidth 64) -or ($env:chocolateyForceX86 -eq $true)) ] + if (![string]::IsNullOrEmpty($pp.transforms)) { + $New_pp.add( "transforms", $pp.transforms ) + } + if (![string]::IsNullOrEmpty($pp.INSTALLDIR) -and (($New_pp.ADDLOCAL -match "FeatureMain") -or ($pp.ADDLOCAL -match "FeatureMain")) -and ([string]::IsNullOrEmpty($pp.INSTALLLEVEL)) ) { + Write-Warning "You must use INSTALLDIR with FeatureMain." + Write-Warning "Using provided $($pp.INSTALLDIR)" + $New_pp.add( "InstallDir", "`"`"$($pp.INSTALLDIR)`"`"" ) + } elseif ([string]::IsNullOrEmpty($pp.INSTALLDIR) -and (($New_pp.ADDLOCAL -match "FeatureMain") -or ($pp.ADDLOCAL -match "FeatureMain")) -and ([string]::IsNullOrEmpty($pp.INSTALLLEVEL)) ) { + Write-Warning "Using Default of $toolsDir" + $New_pp.add( "InstallDir", "`"`"$toolsDir`"`"" ) + } + if ((![string]::IsNullOrEmpty($pp.ADDLOCAL)) -and ([string]::IsNullOrEmpty($pp.INSTALLLEVEL)) ) { + Write-Warning "Using Addlocal" + $addlocalArray = ($pp.ADDLOCAL -split "\,") + foreach ( $_ in $addlocalArray) { + switch -Wildcard ($_) { + "FeatureMain" { + $pp_addlocal_array += -join ("FeatureMain", ",") + } + "FeatureEnvironment" { + $pp_addlocal_array += -join ("FeatureEnvironment", ",") + } + "FeatureJarFileRunWith" { + $pp_addlocal_array += -join ("FeatureJarFileRunWith", ",") + } + "FeatureJavaHome" { + $pp_addlocal_array += -join ("FeatureJavaHome", ",") + } + "FeatureIcedTeaWeb" { + $DisabledMsg | Write-Warning +# $pp_addlocal_array += -join ("FeatureIcedTeaWeb", ",") + } + "FeatureJNLPFileRunWith" { + $DisabledMsg | Write-Warning +# $pp_addlocal_array += -join ("FeatureJNLPFileRunWith", ",") + } + "FeatureOracleJavaSoft" { + $pp_addlocal_array += -join ("FeatureOracleJavaSoft", ",") + } + } + } + Write-Warning "No InstallLevel detected. Defaulting to AddLocal" + $New_pp.add( "ADDLOCAL", ($pp_addlocal_array -replace ".{1}$") ) + } + if (![string]::IsNullOrEmpty($pp.INSTALLLEVEL) ) { + $New_pp.add( "INSTALLLEVEL", $pp.INSTALLLEVEL ) + } + if ([string]::IsNullOrEmpty($pp.quiet)) { + $New_pp.add( "/quiet", $true ) + } else { + # Added to make sure the /quiet silent install is carried over if the user adds it to the params switch list + $New_pp.add( "/quiet", $true ) + } + +return $New_pp +}