From 0dc7ad5c2760f9131219e31d0ed65292a995e264 Mon Sep 17 00:00:00 2001 From: JoshMJ Date: Mon, 11 Mar 2024 11:01:25 -0700 Subject: [PATCH 01/66] First attempt at converting wix/Build.OpenJDK_generic.cmd to .ps1 file --- wix/Build-OpenJDK.ps1 | 425 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 425 insertions(+) create mode 100644 wix/Build-OpenJDK.ps1 diff --git a/wix/Build-OpenJDK.ps1 b/wix/Build-OpenJDK.ps1 new file mode 100644 index 000000000..3a60e776e --- /dev/null +++ b/wix/Build-OpenJDK.ps1 @@ -0,0 +1,425 @@ +<# + FILEPATH: /c:/dev/openjdk-installer/wix/Build-OpenJDK.ps1 + Script: Build-OpenJDK.ps1 + Description: PowerShell script to build Windows installers for the OpenJDK using the WiX Toolset + Author: Josh Martin-Jaffe + Date: Feb. 29, 2024 + + .SYNOPSIS + Build-OpenJDK.ps1 is a script used to build OpenJDK. + + .DESCRIPTION + This script is used to build OpenJDK. It takes various parameters to configure the build process. + + .PARAMETER ProductMinorVersion + The product minor version for the JDK. + + .EXAMPLE + .\Build-OpenJDK.ps1 -ProductMajorVersion "15" -ProductMinorVersion "0" -ProductMaintenanceVersion "0" -ProductPatchVersion "0" -ProductBuildNumber "1" -MSIProductVersion "15.0.0.1" -Arch "x64" -JVM "hotspot" -ProductCategory "jdk" +#> + +param ( + # Mandatory parameters + [Parameter(Mandatory = $true, HelpMessage = "Specify the major version for the JDK.")] + [string]$ProductMajorVersion, + [Parameter(Mandatory = $true, HelpMessage = "Specify the minor version for the JDK.")] + [string]$ProductMinorVersion, + [Parameter(Mandatory = $true, HelpMessage = "Specify the maintenance version for the JDK.")] + [string]$ProductMaintenanceVersion, + [Parameter(Mandatory = $true, HelpMessage = "Specify the patch version for the JDK.")] + [string]$ProductPatchVersion, + [Parameter(Mandatory = $true, HelpMessage = "Specify the build number for the JDK.")] + [string]$ProductBuildNumber, + [Parameter(Mandatory = $true, HelpMessage = "Specify the MSI product version for the JDK.")] + [string]$MSIProductVersion, + [Parameter(Mandatory = $true, HelpMessage = "Specify the architecture for the JDK. Valid values are: x64, x86-32, x86, arm64, or any combination of them separated by spaces.")] + [string]$Arch, + [Parameter(Mandatory = $true, HelpMessage = "Specify the JVM for the JDK. Valid values are: hotspot, openj9, or any combination of them separated by spaces.")] + [string]$JVM, + [Parameter(Mandatory = $true, HelpMessage = "Specify the product category for the JDK. Valid values are: jdk, jre, or any combination of them separated by spaces.")] + [string]$ProductCategory, + # Optional parameters + [Parameter(Mandatory = $false, HelpMessage = "Specify the product SKU for the JDK.")] + [string]$Vendor = "Eclipse Adoptium", + [Parameter(Mandatory = $false, HelpMessage = "Specify the vendor branding.")] + [string]$VendorBranding = "Eclipse Temurin", + [Parameter(Mandatory = $false, HelpMessage = "Specify the vendor branding logo.")] + [string]$VendorBrandingLogo = "$(var.SetupResourcesDir)\logo.ico", + [Parameter(Mandatory = $false, HelpMessage = "Specify the vendor branding banner.")] + [string]$VendorBrandingBanner = "$(var.SetupResourcesDir)\wix-banner.png", + [Parameter(Mandatory = $false, HelpMessage = "Specify the vendor branding dialog.")] + [string]$VendorBrandingDialog = "$(var.SetupResourcesDir)\wix-dialog.png", + [Parameter(Mandatory = $false, HelpMessage = "Specify the product help link.")] + [string]$ProductHelpLink = "https://github.com/adoptium/adoptium-support/issues/new/choose", + [Parameter(Mandatory = $false, HelpMessage = "Specify the product support link.")] + [string]$ProductSupportLink = "https://adoptium.net/support", + [Parameter(Mandatory = $false, HelpMessage = "Specify the product update info link.")] + [string]$ProductUpdateInfoLink = "https://adoptium.net/temurin/releases" +) + +if ($env:DEBUG -eq "true") { + $DebugPreference = "Continue" +} +else { + $DebugPreference = "SilentlyContinue" +} + +& powershell -ExecutionPolicy Bypass -File "$PSScriptRoot\helpers\Validate-Input.ps1" ` + -toValidate $ARCH ` + -validInputs "x64", "x86-32", "x86", "arm64" ` + -delimiter " " + +if ($LASTEXITCODE -eq 1) { + Write-Host "ARCH $ARCH not supported : valid values are any combination of : x64, x86-32, arm64" + exit 1 +} + +# Update to handle the change of build variant until implications +# of setting this to Temurin can be evaluated +if ($JVM -eq "temurin") { + $JVM = "hotspot" +} + +& powershell -ExecutionPolicy Bypass -File "$PSScriptRoot\helpers\Validate-Input.ps1" ` + -toValidate $JVM ` + -validInputs "hotspot,openj9,dragonwell,openj9 hotspot,hotspot openj9" ` + -delimiter "," + +if ($LASTEXITCODE -eq 1) { + Write-Host "JVM '$JVM' not supported : valid values : hotspot, openj9, dragonwell, hotspot openj9, openj9 hotspot" + goto FAILED +} + +if ($PRODUCT_CATEGORY -ne "jre" -and $PRODUCT_CATEGORY -ne "jdk") { + Write-Host "PRODUCT_CATEGORY '$PRODUCT_CATEGORY' not supported : valid values : jre, jdk" + goto FAILED +} + +if ($SKIP_MSI_VALIDATION -eq "true") { + $MSI_VALIDATION_OPTION = " -sval " +} + +# Configure available SDK version: +# See folder e.g. "C:\Program Files (x86)\Windows Kits\[10]\bin\[10.0.16299.0]\x64" +$WIN_SDK_MAJOR_VERSION = 10 +$WIN_SDK_FULL_VERSION = "10.0.17763.0" +$WORKDIR = "Workdir" +New-Item -ItemType Directory -Path $WORKDIR | Out-Null + +# Nothing below this line needs to be changed normally. + +# Cultures: https://msdn.microsoft.com/de-de/library/ee825488(v=cs.20).aspx +$PRODUCT_SKU = "OpenJDK" +$PRODUCT_FULL_VERSION = "$PRODUCT_MAJOR_VERSION.$PRODUCT_MINOR_VERSION.$PRODUCT_MAINTENANCE_VERSION.$PRODUCT_PATCH_VERSION.$PRODUCT_BUILD_NUMBER" + +$PRODUCT_SHORT_VERSION = "$PRODUCT_MAJOR_VERSION$PRODUCT_MAINTENANCE_VERSION-b$PRODUCT_BUILD_NUMBER" +if ($PRODUCT_CATEGORY -eq "jre") { + $JRE = "-jre" +} +if ($PRODUCT_MAJOR_VERSION -ge 10) { + if ($PRODUCT_BUILD_NUMBER) { + $BUILD_NUM = "+$PRODUCT_BUILD_NUMBER" + } + $PRODUCT_SHORT_VERSION = $PRODUCT_MAJOR_VERSION + if ($PRODUCT_MINOR_VERSION -ne "0") { + $PRODUCT_SHORT_VERSION = "$PRODUCT_MAJOR_VERSION.$PRODUCT_MINOR_VERSION" + } + if ($PRODUCT_MAINTENANCE_VERSION -ne "0") { + $PRODUCT_SHORT_VERSION = "$PRODUCT_MAJOR_VERSION.$PRODUCT_MINOR_VERSION.$PRODUCT_MAINTENANCE_VERSION" + } + if ($PRODUCT_PATCH_VERSION -ne "0") { + $PRODUCT_SHORT_VERSION = "$PRODUCT_MAJOR_VERSION.$PRODUCT_MINOR_VERSION.$PRODUCT_MAINTENANCE_VERSION.$PRODUCT_PATCH_VERSION" + } + $PRODUCT_SHORT_VERSION = "$PRODUCT_SHORT_VERSION$BUILD_NUM" +} + +Write-Debug "PRODUCT_FULL_VERSION=$PRODUCT_FULL_VERSION" +Write-Debug "PRODUCT_SHORT_VERSION=$PRODUCT_SHORT_VERSION" + + +# Generate platform specific builds (x86-32,x64, arm64) +foreach ($A in $ARCH.Split(',')) { + # We could build both "hotspot,openj9" in one script, but it is not clear if release cycle is the same. + foreach ($J in $JVM.Split(',')) { + $PACKAGE_TYPE = $J + $PLATFORM = $A + Write-Debug "Generate OpenJDK setup '$PACKAGE_TYPE' for '$PLATFORM' platform '$PRODUCT_CATEGORY'" + Write-Debug "****************************************************" + $CULTURE = "en-us" + $LANGIDS = 1033 + $FOLDER_PLATFORM = $PLATFORM + if ($PLATFORM -eq "x86-32") { + $PLATFORM = "x86" + } + + $SETUP_RESOURCES_DIR = ".\Resources" + + foreach ($P in @( + "$PRODUCT_SKU$PRODUCT_MAJOR_VERSION\$PACKAGE_TYPE\$FOLDER_PLATFORM\jdk-$PRODUCT_MAJOR_VERSION.$PRODUCT_MINOR_VERSION.$PRODUCT_MAINTENANCE_VERSION", + "$PRODUCT_SKU$PRODUCT_MAJOR_VERSION\$PACKAGE_TYPE\$FOLDER_PLATFORM\jdk$PRODUCT_MAJOR_VERSIONu$PRODUCT_MAINTENANCE_VERSION-b$PRODUCT_BUILD_NUMBER", + "$PRODUCT_SKU$PRODUCT_MAJOR_VERSION\$PACKAGE_TYPE\$FOLDER_PLATFORM\jdk-$PRODUCT_MAJOR_VERSION+$PRODUCT_BUILD_NUMBER", + "$PRODUCT_SKU$PRODUCT_MAJOR_VERSION\$PACKAGE_TYPE\$FOLDER_PLATFORM\jdk-$PRODUCT_MAJOR_VERSION.$PRODUCT_MINOR_VERSION.$PRODUCT_MAINTENANCE_VERSION+$PRODUCT_BUILD_NUMBER", + "$PRODUCT_SKU$PRODUCT_MAJOR_VERSION\$PACKAGE_TYPE\$FOLDER_PLATFORM\jdk-$PRODUCT_MAJOR_VERSION.$PRODUCT_MINOR_VERSION.$PRODUCT_MAINTENANCE_VERSION.$PRODUCT_PATCH_VERSION+$PRODUCT_BUILD_NUMBER", + "$PRODUCT_SKU-Latest\$PACKAGE_TYPE\$FOLDER_PLATFORM\jdk-$PRODUCT_SHORT_VERSION" + )) { + $REPRO_DIR = ".\SourceDir\$P" + if ($PRODUCT_CATEGORY -eq "jre") { + $REPRO_DIR = "$REPRO_DIR-$PRODUCT_CATEGORY" + } + Write-Debug "looking for $REPRO_DIR" + if (Test-Path $REPRO_DIR) { + goto CONTINUE + } + } + + Write-Debug "SOURCE Dir not found / failed" + Write-Debug "Listing directory :" + Get-ChildItem -Path SourceDir -Recurse -Directory | Select-Object -ExpandProperty FullName + goto FAILED + + :CONTINUE + Write-Debug "Source dir used: $REPRO_DIR" + + $OUTPUT_BASE_FILENAME = "$PRODUCT_SKU$PRODUCT_MAJOR_VERSION-$PRODUCT_CATEGORY`_$FOLDER_PLATFORM`_windows_$PACKAGE_TYPE-$PRODUCT_FULL_VERSION" + # find all *.wxi.template,*.wxl.template,*.wxs.template files and replace text with configurations + Get-ChildItem -Path . -Recurse -Include *.wxi.template, *.Base.*.wxl.template, *.!JVM!.*.wxl.template, *.wxs.template | ForEach-Object { + $INPUT_FILE = $_.Name + # Prevent concurrency issues if multiple builds are running in parallel. + $OUTPUT_FILE = "$WORKDIR$OUTPUT_BASE_FILENAME-$($INPUT_FILE -replace '.template$')" + Write-Debug "string replacement input $INPUT_FILE output $OUTPUT_FILE" + try { + $content = Get-Content -Path $_.FullName -Raw -Encoding UTF8 + $content = $content -replace '{vendor}', '!VENDOR!' -replace '{vendor_branding_logo}', '!VENDOR_BRANDING_LOGO!' -replace '{vendor_branding_banner}', '!VENDOR_BRANDING_BANNER!' -replace '{vendor_branding_dialog}', '!VENDOR_BRANDING_DIALOG!' -replace '{vendor_branding}', '!VENDOR_BRANDING!' -replace '{product_help_link}', '!PRODUCT_HELP_LINK!' -replace '{product_support_link}', '!PRODUCT_SUPPORT_LINK!' -replace '{product_update_info_link}', '!PRODUCT_UPDATE_INFO_LINK!' + $content | Out-File -Encoding UTF8 -FilePath $OUTPUT_FILE + } + catch { + Write-Debug "Unable to make string replacement" + goto FAILED + } + } + + $CACHE_BASE_FOLDER = "Cache" + # Each build has its own cache for concurrent build + $CACHE_FOLDER = "$CACHE_BASE_FOLDER\$OUTPUT_BASE_FILENAME" + + # Generate one ID per release. But do NOT use * as we need to keep the same number for all languages, but not platforms. + $PRODUCT_ID = [guid]::NewGuid().ToString('B').ToUpper() + Write-Debug "PRODUCT_ID: $PRODUCT_ID" + + if (-not $env:UPGRADE_CODE_SEED) { + # If no UPGRADE_CODE_SEED given .. we are not trying to build upgradable MSI and generate always a new PRODUCT_UPGRADE_CODE + $PRODUCT_UPGRADE_CODE = [guid]::NewGuid().ToString('B').ToUpper() + Write-Debug "Uniq PRODUCT_UPGRADE_CODE: $PRODUCT_UPGRADE_CODE" + } + else { + # It will be better if we can generate "Name-based UUID" as specified here https://tools.ietf.org/html/rfc4122#section-4.3 + # but it's too difficult so fallback to random like guid based on md5 hash with getGuid.ps1 + # We use md5 hash to always get the same PRODUCT_UPGRADE_CODE(GUID) for each MSI build with same GUID_SSED to allow upgrade from Adoptium + # IF PRODUCT_UPGRADE_CODE change from build to build, upgrade is not proposed by Windows Installer + # Never change what compose SOURCE_TEXT_GUID and args0 for getGuid.ps1 or you will never get the same GUID as previous build and MSI upgradable feature wont work + $SOURCE_TEXT_GUID = "$PRODUCT_CATEGORY-$PRODUCT_MAJOR_VERSION-$PLATFORM-$PACKAGE_TYPE" + Write-Debug "SOURCE_TEXT_GUID (without displaying secret UPGRADE_CODE_SEED): $SOURCE_TEXT_GUID" + $PRODUCT_UPGRADE_CODE = .\getGuid.ps1 "$SOURCE_TEXT_GUID-$env:UPGRADE_CODE_SEED" + Write-Debug "Constant PRODUCT_UPGRADE_CODE: $PRODUCT_UPGRADE_CODE" + } + + + # # Build with extra Source Code feature (needs work) + # & "$WIX\bin\heat.exe" file "$REPRO_DIR\lib\src.zip" -out "Src-$OUTPUT_BASE_FILENAME.wxs" -gg -srd -cg "SrcFiles" -var var.ReproDir -dr INSTALLDIR -platform $PLATFORM + # & "$WIX\bin\heat.exe" dir "$REPRO_DIR" -out "Files-$OUTPUT_BASE_FILENAME.wxs" -t "$SETUP_RESOURCES_DIR\heat.tools.xslt" -gg -sfrag -scom -sreg -srd -ke -cg "AppFiles" -var var.ProductMajorVersion -var var.ProductMinorVersion -var var.ProductVersionString -var var.MSIProductVersion -var var.ReproDir -dr INSTALLDIR -platform $PLATFORM + # & "$WIX\bin\candle.exe" -arch $PLATFORM "$OUTPUT_BASE_FILENAME-Main.wxs" "Files-$OUTPUT_BASE_FILENAME.wxs" "Src-$OUTPUT_BASE_FILENAME.wxs" -ext WixUIExtension -ext WixUtilExtension -dProductSku="$PRODUCT_SKU" -dProductMajorVersion="$PRODUCT_MAJOR_VERSION" -dProductMinorVersion="$PRODUCT_MINOR_VERSION" -dProductVersionString="$PRODUCT_SHORT_VERSION" -dMSIProductVersion="$MSI_PRODUCT_VERSION" -dProductId="$PRODUCT_ID" -dReproDir="$REPRO_DIR" -dSetupResourcesDir="$SETUP_RESOURCES_DIR" -dCulture="$CULTURE" + # & "$WIX\bin\light.exe" $MSI_VALIDATION_OPTION "Main-$OUTPUT_BASE_FILENAME.wixobj" "Files-$OUTPUT_BASE_FILENAME.wixobj" "Src-$OUTPUT_BASE_FILENAME.wixobj" -cc $CACHE_FOLDER -ext WixUIExtension -ext WixUtilExtension -spdb -out "ReleaseDir\$OUTPUT_BASE_FILENAME.msi" -loc "Lang\$OUTPUT_BASE_FILENAME-$PRODUCT_SKU.Base.$CULTURE.wxl" -loc "Lang\$OUTPUT_BASE_FILENAME-$PRODUCT_SKU.$PACKAGE_TYPE.$CULTURE.wxl" -cultures:$CULTURE + + # Clean .cab cache for each run .. Cache is only used inside BuildSetupTranslationTransform.cmd to speed up MST generation + if (Test-Path -Path "!CACHE_FOLDER!") { + Remove-Item -Path "!CACHE_FOLDER!" -Recurse -Force + } + New-Item -ItemType Directory -Path "!CACHE_FOLDER!" | Out-Null + if (-not (Test-Path -Path "!CACHE_FOLDER!")) { + Write-Debug "Unable to create cache folder : !CACHE_FOLDER!" + goto FAILED + } + + # Build without extra Source Code feature + + # Set default variables + $ICEDTEAWEB_DIR = ".\SourceDir\icedtea-web-image" + $BUNDLE_ICEDTEAWEB = $false + + if ($PLATFORM -eq "x64" -and $PRODUCT_MAJOR_VERSION -eq 8 -and (Test-Path $ICEDTEAWEB_DIR)) { + Write-Debug "IcedTeaWeb Directory Exists!" + $BUNDLE_ICEDTEAWEB = $true + $ITW_WXS = "IcedTeaWeb-$OUTPUT_BASE_FILENAME.wxs" + $ITW_WIXOBJ = "$WORKDIR$IcedTeaWeb-$OUTPUT_BASE_FILENAME.wixobj" + + Write-Debug "HEAT" + & "$WIX\bin\heat.exe" dir "$ICEDTEAWEB_DIR" -out $ITW_WXS -t "$SETUP_RESOURCES_DIR\heat.icedteaweb.xslt" -gg -sfrag -scom -sreg -srd -ke -cg "IcedTeaWebFiles" -var var.IcedTeaWebDir -dr INSTALLDIR -platform $PLATFORM + + if ($LASTEXITCODE -ne 0) { + Write-Debug "Failed to generate Windows Installer XML Source files for IcedTea-Web (.wxs)" + goto FAILED + } + } + else { + Write-Debug "IcedTeaWeb Directory Does Not Exist!" + } + + Write-Debug "HEAT" + & "$WIX\bin\heat.exe" dir "$REPRO_DIR" -out "$WORKDIR$OUTPUT_BASE_FILENAME-Files.wxs" -gg -sfrag -scom -sreg -srd -ke -cg "AppFiles" -var var.ProductMajorVersion -var var.ProductMinorVersion -var var.ProductVersionString -var var.MSIProductVersion -var var.ReproDir -dr INSTALLDIR -platform $PLATFORM + if ($LASTEXITCODE -ne 0) { + Write-Host "Failed to generate Windows Installer XML Source files (.wxs)" + goto FAILED + } + + Write-Debug "CANDLE" + & "$WIX\bin\candle.exe" -arch $PLATFORM -out "$WORKDIR" "$WORKDIR$OUTPUT_BASE_FILENAME-Main.wxs" "$WORKDIR$OUTPUT_BASE_FILENAME-Files.wxs" $ITW_WXS -ext WixUIExtension -ext WixUtilExtension -dIcedTeaWebDir="$ICEDTEAWEB_DIR" -dOutputBaseFilename="$OUTPUT_BASE_FILENAME" -dProductSku="$PRODUCT_SKU" -dProductMajorVersion="$PRODUCT_MAJOR_VERSION" -dProductMinorVersion="$PRODUCT_MINOR_VERSION" -dProductVersionString="$PRODUCT_SHORT_VERSION" -dMSIProductVersion="$MSI_PRODUCT_VERSION" -dProductId="$PRODUCT_ID" -dProductUpgradeCode="$PRODUCT_UPGRADE_CODE" -dReproDir="$REPRO_DIR" -dSetupResourcesDir="$SETUP_RESOURCES_DIR" -dCulture="$CULTURE" -dJVM="$PACKAGE_TYPE" + if ($LASTEXITCODE -ne 0) { + Write-Host "Failed to preprocess and compile WiX source files into object files (.wixobj)" + Get-ChildItem -Path $WORKDIR -Recurse | Sort-Object -Property Name + goto FAILED + } + + Write-Debug "LIGHT" + & "$WIX\bin\light.exe" "$WORKDIR$OUTPUT_BASE_FILENAME-Main.wixobj" "$WORKDIR$OUTPUT_BASE_FILENAME-Files.wixobj" $ITW_WIXOBJ $MSI_VALIDATION_OPTION -cc $CACHE_FOLDER -ext WixUIExtension -ext WixUtilExtension -spdb -out "ReleaseDir\$OUTPUT_BASE_FILENAME.msi" -loc "$WORKDIR$OUTPUT_BASE_FILENAME-$PRODUCT_SKU.Base.$CULTURE.wxl" -loc "$WORKDIR$OUTPUT_BASE_FILENAME-$PRODUCT_SKU.$PACKAGE_TYPE.$CULTURE.wxl" -cultures:$CULTURE + if ($LASTEXITCODE -ne 0) { + Write-Host "Failed to link and bind one or more .wixobj files and create a Windows Installer database (.msi or .msm)" + Get-ChildItem -Path $WORKDIR -Recurse | Sort-Object -Property Name + goto FAILED + } + + # Clean up variables + $ICEDTEAWEB_DIR = "" + $BUNDLE_ICEDTEAWEB = "" + + # Generate setup translations + Get-Content "Lang\LanguageList.config" | ForEach-Object { + $language = $_ -split " " + $languageCode = $language[0] + $languageName = $language[1] + & "BuildSetupTranslationTransform.cmd" $languageCode $languageName + if ($LASTEXITCODE -ne 0) { + Write-Debug "Failed to build translation $languageCode $languageName" + goto FAILED + } + } + + # Add all supported languages to MSI Package attribute + $wiLangIdScript = "$env:ProgramFiles(x86)\Windows Kits\$env:WIN_SDK_MAJOR_VERSION\bin\$env:WIN_SDK_FULL_VERSION\x64\WiLangId.vbs" + $msiPath = "ReleaseDir\$OUTPUT_BASE_FILENAME.msi" + $arguments = "//Nologo $msiPath Package $LANGIDS" + Start-Process -FilePath "CSCRIPT" -ArgumentList $wiLangIdScript, $arguments -NoNewWindow -Wait + if ($LASTEXITCODE -ne 0) { + Write-Debug "Failed to pack all languages into MSI : $LANGIDS" + goto FAILED + } + + # For temporarily disable the smoke test - use OPTION SKIP_MSI_VALIDATION=true + # To validate MSI only once at the end + if ($env:SKIP_MSI_VALIDATION -ne "true") { + Write-Debug "SMOKE" + & "$WIX\bin\smoke.exe" "ReleaseDir\$OUTPUT_BASE_FILENAME.msi" + if ($LASTEXITCODE -ne 0) { + Write-Host "Failed to validate MSI" + goto FAILED + } + } + else { + Write-Debug "MSI validation was skipped by option SKIP_MSI_VALIDATION=true" + } + + # SIGN the MSIs with digital signature. + # Dual-Signing with SHA-1/SHA-256 requires Win 8.1 SDK or later. + if ($env:SIGNING_CERTIFICATE) { + $timestampErrors = 0 + for ($i = 1; $i -le 15; $i++) { + Get-Content "serverTimestamp.config" | ForEach-Object { + Write-Debug "try $timestampErrors / sha256 / timestamp server : $_" + # Always hide password here + $signtoolArgs = @( + "sign", + "-f", + $env:SIGNING_CERTIFICATE, + "-p", + $env:SIGN_PASSWORD, + "-fd", + "sha256", + "-d", + "Adoptium", + "-t", + $_, + "ReleaseDir\$OUTPUT_BASE_FILENAME.msi" + ) + & "$env:ProgramFiles(x86)\Windows Kits\$env:WIN_SDK_MAJOR_VERSION\bin\$env:WIN_SDK_FULL_VERSION\x64\signtool.exe" @signtoolArgs + + # check the return value of the timestamping operation and retry a max of ten times... + if ($LASTEXITCODE -eq 0) { + goto succeeded + } + + Write-Debug "Signing failed. Probably cannot find the timestamp server at $_" + $timestampErrors++ + } + + # always wait for more seconds after each retry + Start-Sleep -Seconds $i + } + + # return an error code... + Write-Debug "sign.bat exit code is 1. There were $timestampErrors timestamping errors." + exit 1 + } + else { + Write-Debug "Ignoring signing step: no certificate configured" + } + + :succeeded + # return a successful code... + Write-Debug "sign.bat exit code is 0. There were $timestampErrors timestamping errors." + + # Remove files we do not need any longer. + Remove-Item -Path "$WORKDIR\$OUTPUT_BASE_FILENAME-Files.wxs" -Force + Remove-Item -Path "$WORKDIR\$OUTPUT_BASE_FILENAME-Files.wixobj" -Force + Remove-Item -Path "$WORKDIR\$OUTPUT_BASE_FILENAME-Main.wxs" -Force + Remove-Item -Path "$WORKDIR\$OUTPUT_BASE_FILENAME-Main.wixobj" -Force + Remove-Item -Path "$WORKDIR\$OUTPUT_BASE_FILENAME-$PRODUCT_SKU.$JVM.*.wxl" -Force + Remove-Item -Path "$WORKDIR\$OUTPUT_BASE_FILENAME-$PRODUCT_SKU.Base.*.wxl" -Force + Remove-Item -Path "$WORKDIR\$OUTPUT_BASE_FILENAME-$PRODUCT_SKU.Variables.wxi" -Force + + if ($ITW_WXS) { + Remove-Item -Path $ITW_WXS -Force + Remove-Item -Path $ITW_WIXOBJ -Force + } + + Remove-Item -Path $CACHE_FOLDER -Recurse -Force + } + + $ITW_WXS = $null + $ITW_WIXOBJ = $null +} + +# Cleanup variables +$CULTURE = $null +$LANGIDS = $null +$OUTPUT_BASE_FILENAME = $null +$PACKAGE_TYPE = $null +$PRODUCT_CATEGORY = $null +$PRODUCT_SKU = $null +$PRODUCT_MAJOR_VERSION = $null +$PRODUCT_MINOR_VERSION = $null +$PRODUCT_MAINTENANCE_VERSION = $null +$PRODUCT_PATCH_VERSION = $null +$PRODUCT_BUILD_NUMBER = $null +$MSI_PRODUCT_VERSION = $null +$PRODUCT_ID = $null +$PRODUCT_VERSION = $null +$PLATFORM = $null +$FOLDER_PLATFORM = $null +$REPRO_DIR = $null +$SETUP_RESOURCES_DIR = $null +$WIN_SDK_FULL_VERSION = $null +$WIN_SDK_MAJOR_VERSION = $null + +exit 0 + +:FAILED +exit 2 From 3dd44adc803c792ff031962036aedec44cfc1096 Mon Sep 17 00:00:00 2001 From: JoshMJ Date: Mon, 11 Mar 2024 13:21:46 -0700 Subject: [PATCH 02/66] Updated main + base + hotspot wix xml templates --- wix/Includes/OpenJDK.Variables.wxi.template | 193 ++++---- wix/Lang/OpenJDK.Base.de-de.wxl.template | 47 +- wix/Lang/OpenJDK.Base.en-us.wxl.template | 49 +- wix/Lang/OpenJDK.Base.es-es.wxl.template | 47 +- wix/Lang/OpenJDK.Base.fr-fr.wxl.template | 49 +- wix/Lang/OpenJDK.Base.ja-jp.wxl.template | 47 +- wix/Lang/OpenJDK.Base.zh-cn.wxl.template | 47 +- wix/Lang/OpenJDK.Base.zh-tw.wxl.template | 47 +- wix/Lang/OpenJDK.hotspot.de-de.wxl.template | 23 +- wix/Lang/OpenJDK.hotspot.en-us.wxl.template | 23 +- wix/Lang/OpenJDK.hotspot.es-es.wxl.template | 23 +- wix/Lang/OpenJDK.hotspot.fr-fr.wxl.template | 21 +- wix/Lang/OpenJDK.hotspot.ja-jp.wxl.template | 21 +- wix/Lang/OpenJDK.hotspot.zh-cn.wxl.template | 21 +- wix/Lang/OpenJDK.hotspot.zh-tw.wxl.template | 21 +- wix/Main.wxs.template | 470 ++++++++++---------- 16 files changed, 564 insertions(+), 585 deletions(-) diff --git a/wix/Includes/OpenJDK.Variables.wxi.template b/wix/Includes/OpenJDK.Variables.wxi.template index 1446113d9..b8099783f 100644 --- a/wix/Includes/OpenJDK.Variables.wxi.template +++ b/wix/Includes/OpenJDK.Variables.wxi.template @@ -1,97 +1,96 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - =9?> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - =9?> - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + =9?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + =9?> + + + + + + + + + + + + + + + + + + + + + + diff --git a/wix/Lang/OpenJDK.Base.de-de.wxl.template b/wix/Lang/OpenJDK.Base.de-de.wxl.template index c5c882069..cefaf1fa5 100644 --- a/wix/Lang/OpenJDK.Base.de-de.wxl.template +++ b/wix/Lang/OpenJDK.Base.de-de.wxl.template @@ -1,24 +1,23 @@ - - - 1031 - {product_help_link} - {product_support_link} - {product_update_info_link} - Windows 7 oder höher ist erforderlich. - Dieses Produkt wird auf Itanium 64-Bit-Systemen nicht unterstützt. - Zum PATH hinzufügen - In die PATH-Umgebungsvariable einfügen. - JAVA_HOME-Variable konfigurieren - Als JAVA_HOME-Umgebungsvariable verwenden. - Quellcode - Quellcode für Klassen, welche die öffentliche API von Java enthalten. - Associate .jar - Associate .jar files to run with {vendor_branding} - "Eine neuere Version von [ProductName] ist bereits installiert. Das Setup wird jetzt beendet." - JavaSoft (Oracle) registry keys - Overwrites the reg keys HKLM\Software\JavaSoft (Oracle). After uninstallation of {vendor_branding}, Oracle Java running from PATH "C:\Program Files (x86)\Common Files\Oracle\Java\javapath" does not work. You need to reinstall it to recreate these registry keys - IcedTea-Web - Install the IcedTea-Web package - Associate .jnlp - Associate .jnlp files to run with IcedTea-Web - + + + + + + + + + + + + + + + + + + + + + + + diff --git a/wix/Lang/OpenJDK.Base.en-us.wxl.template b/wix/Lang/OpenJDK.Base.en-us.wxl.template index eff207b8b..4d7606695 100644 --- a/wix/Lang/OpenJDK.Base.en-us.wxl.template +++ b/wix/Lang/OpenJDK.Base.en-us.wxl.template @@ -1,25 +1,24 @@ - - - 1033 - {product_help_link} - {product_support_link} - {product_update_info_link} - Windows 7 or later is required. - - This product is not supported on Itanium 64-bit systems. - Add to PATH - Add to PATH environment variable. - Set JAVA_HOME variable - Set JAVA_HOME environment variable. - Source Code - Source code for classes that comprise the public API of Java. - Associate .jar - Associate .jar files to run with {vendor_branding} - "A later version of [ProductName] is already installed. Setup will now exit." - JavaSoft (Oracle) registry keys - Overwrites Oracle's reg key HKLM\Software\JavaSoft. After uninstallation of {vendor_branding}, Oracle Java needs to be reinstalled to re-create these registry keys. - IcedTea-Web - Install the IcedTea-Web package - Associate .jnlp - Associate .jnlp files to run with IcedTea-Web - + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/wix/Lang/OpenJDK.Base.es-es.wxl.template b/wix/Lang/OpenJDK.Base.es-es.wxl.template index 82384e71e..e7a5aa853 100644 --- a/wix/Lang/OpenJDK.Base.es-es.wxl.template +++ b/wix/Lang/OpenJDK.Base.es-es.wxl.template @@ -1,24 +1,23 @@ - - - 3082 - {product_help_link} - {product_support_link} - {product_update_info_link} - Requerido Windows 7 o superior. - Este producto no es compatible con sistemas Itanium de 64 bits. - Añadir al PATH - Añadir a la variable de entorno PATH. - Establecer la variable JAVA_HOME - Establecer la variable de entorno JAVA_HOME. - Código fuente - Código fuente de las clases que componen la API pública de Java. - Asociar .jar - Asociar la extensión de fichero .jar con {vendor_branding} - Ya hay instalada una versión posterior de [ProductName]. La instalación se cerrará. - Claves de registro JavaSoft (Oracle) - Sobrescribir las claves de registro HKLM\Software\JavaSoft (Oracle). Si se desinstala {vendor_branding}, la ejecución de Oracle Java desde la ruta "C:\Program Files (x86)\Common Files\Oracle\Java\javapath" no funcionará. Será necesario reinstalarlo. - IcedTea-Web - Instalar el paquete IcedTea-Web - Asociar .jnlp - Asociar la extensión de fichero .jnlp con IcedTea-Web - + + + + + + + + + + + + + + + + + + + + + + + diff --git a/wix/Lang/OpenJDK.Base.fr-fr.wxl.template b/wix/Lang/OpenJDK.Base.fr-fr.wxl.template index a57b9dd7c..b17d03ce5 100644 --- a/wix/Lang/OpenJDK.Base.fr-fr.wxl.template +++ b/wix/Lang/OpenJDK.Base.fr-fr.wxl.template @@ -1,25 +1,24 @@ - - - 1036 - {product_help_link} - {product_support_link} - {product_update_info_link} - Windows 7 ou ultérieur est requis. - Ce produit n'est pas pris en charge sur les systèmes Itanium 64 bits. - Ajouter au PATH - Ajouter à la variable d'environnement PATH. - Définir la variable JAVA_HOME - Définir la variable d'environnement JAVA_HOME. - Code source - Code source des classes qui composent l'API publique de Java. - Associer les .jar - Associer les fichiers .jar avec {vendor_branding} pour execution par double-click - "Une version ultérieur de [ProductName] est déjà installé. L'installation va maintenant quitter." - Clés de registre JavaSoft (Oracle) - - Écrase les clés de registre HKLM\Software\JavaSoft (Oracle). Après la désinstallation d'{vendor_branding}, Oracle Java lancé depuis le PATH "C:\Program Files (x86)\Common Files\Oracle\Java\javapath" ne fonctionne plus. Résintaller Oracle Java si besoin - IcedTea-Web - Install the IcedTea-Web package - Associate .jnlp - Associate .jnlp files to run with IcedTea-Web - + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/wix/Lang/OpenJDK.Base.ja-jp.wxl.template b/wix/Lang/OpenJDK.Base.ja-jp.wxl.template index 27828ae36..048c9a4a9 100644 --- a/wix/Lang/OpenJDK.Base.ja-jp.wxl.template +++ b/wix/Lang/OpenJDK.Base.ja-jp.wxl.template @@ -1,24 +1,23 @@ - - - 1041 - {product_help_link} - {product_support_link} - {product_update_info_link} - Windows 7 or later is required. - This product is not supported on Itanium 64-bit systems. - Add to PATH - Add to PATH environment variable. - Set JAVA_HOME variable - Set JAVA_HOME environment variable. - Source Code - Source code for classes that comprise the public API of Java. - Associate .jar - Associate .jar files to run with {vendor_branding} - "[ProductName]の新しいバージョンは既にインストールされています。セットアップは終了します。" - JavaSoft (Oracle) registry keys - Overwrites the reg keys HKLM\Software\JavaSoft (Oracle). After uninstallation of {vendor_branding}, Oracle Java running from PATH "C:\Program Files (x86)\Common Files\Oracle\Java\javapath" does not work. You need to reinstall it to recreate these registry keys - IcedTea-Web - Install the IcedTea-Web package - Associate .jnlp - Associate .jnlp files to run with IcedTea-Web - + + + + + + + + + + + + + + + + + + + + + + + diff --git a/wix/Lang/OpenJDK.Base.zh-cn.wxl.template b/wix/Lang/OpenJDK.Base.zh-cn.wxl.template index 63b506284..9072a0f30 100644 --- a/wix/Lang/OpenJDK.Base.zh-cn.wxl.template +++ b/wix/Lang/OpenJDK.Base.zh-cn.wxl.template @@ -1,24 +1,23 @@ - - - 2052 - {product_help_link} - {product_support_link} - {product_update_info_link} - Windows 7 or later is required. - This product is not supported on Itanium 64-bit systems. - Add to PATH - Add to PATH environment variable. - Set JAVA_HOME variable - Set JAVA_HOME environment variable. - Source Code - Source code for classes that comprise the public API of Java. - Associate .jar - Associate .jar files to run with {vendor_branding} - "已安装更高版本的[ProductName]。安装程序现在将退出。" - JavaSoft (Oracle) registry keys - Overwrites the reg keys HKLM\Software\JavaSoft (Oracle). After uninstallation of {vendor_branding}, Oracle Java running from PATH "C:\Program Files (x86)\Common Files\Oracle\Java\javapath" does not work. You need to reinstall it to recreate these registry keys - IcedTea-Web - Install the IcedTea-Web package - Associate .jnlp - Associate .jnlp files to run with IcedTea-Web - + + + + + + + + + + + + + + + + + + + + + + + diff --git a/wix/Lang/OpenJDK.Base.zh-tw.wxl.template b/wix/Lang/OpenJDK.Base.zh-tw.wxl.template index c0b78440d..2a4dbc760 100644 --- a/wix/Lang/OpenJDK.Base.zh-tw.wxl.template +++ b/wix/Lang/OpenJDK.Base.zh-tw.wxl.template @@ -1,24 +1,23 @@ - - - 1028 - {product_help_link} - {product_support_link} - {product_update_info_link} - Windows 7 or later is required. - This product is not supported on Itanium 64-bit systems. - Add to PATH - Add to PATH environment variable. - Set JAVA_HOME variable - Set JAVA_HOME environment variable. - Source Code - Source code for classes that comprise the public API of Java. - Associate .jar - Associate .jar files to run with {vendor_branding} - "已安裝更高版本的[ProductName]。安裝程序現在將退出。" - JavaSoft (Oracle) registry keys - Overwrites the reg keys HKLM\Software\JavaSoft (Oracle). After uninstallation of {vendor_branding}, Oracle Java running from PATH "C:\Program Files (x86)\Common Files\Oracle\Java\javapath" does not work. You need to reinstall it to recreate these registry keys - IcedTea-Web - Install the IcedTea-Web package - Associate .jnlp - Associate .jnlp files to run with IcedTea-Web - + + + + + + + + + + + + + + + + + + + + + + + diff --git a/wix/Lang/OpenJDK.hotspot.de-de.wxl.template b/wix/Lang/OpenJDK.hotspot.de-de.wxl.template index 2674fec9c..5e697ebdf 100644 --- a/wix/Lang/OpenJDK.hotspot.de-de.wxl.template +++ b/wix/Lang/OpenJDK.hotspot.de-de.wxl.template @@ -1,12 +1,11 @@ - - - JRE mit Hotspot - {vendor_branding} Runtime Environment mit Hotspot - {vendor_branding} JRE mit Hotspot - {vendor_branding} Runtime Environment mit Hotspot - - JDK mit Hotspot - {vendor_branding} Development Kit mit Hotspot - {vendor_branding} JDK mit Hotspot - {vendor_branding} Development Kit mit Hotspot - + + + + + + + + + + + diff --git a/wix/Lang/OpenJDK.hotspot.en-us.wxl.template b/wix/Lang/OpenJDK.hotspot.en-us.wxl.template index 9f60d537e..8cd92ae50 100644 --- a/wix/Lang/OpenJDK.hotspot.en-us.wxl.template +++ b/wix/Lang/OpenJDK.hotspot.en-us.wxl.template @@ -1,12 +1,11 @@ - - - JRE with Hotspot - {vendor_branding} Runtime Environment with Hotspot - {vendor_branding} JRE with Hotspot - {vendor_branding} Runtime Environment with Hotspot - - JDK with Hotspot - {vendor_branding} Development Kit with Hotspot - {vendor_branding} JDK with Hotspot - {vendor_branding} Development Kit with Hotspot - + + + + + + + + + + + diff --git a/wix/Lang/OpenJDK.hotspot.es-es.wxl.template b/wix/Lang/OpenJDK.hotspot.es-es.wxl.template index a7cf0e3ad..3f0124e99 100644 --- a/wix/Lang/OpenJDK.hotspot.es-es.wxl.template +++ b/wix/Lang/OpenJDK.hotspot.es-es.wxl.template @@ -1,12 +1,11 @@ - - - JRE con Hotspot - {vendor_branding} Runtime Environment con Hotspot - {vendor_branding} JRE con Hotspot - {vendor_branding} Runtime Environment con Hotspot - - JDK con Hotspot - {vendor_branding} Development Kit con Hotspot - {vendor_branding} JDK con Hotspot - {vendor_branding} Development Kit con Hotspot - + + + + + + + + + + + diff --git a/wix/Lang/OpenJDK.hotspot.fr-fr.wxl.template b/wix/Lang/OpenJDK.hotspot.fr-fr.wxl.template index 1ee3e925e..495057cf1 100644 --- a/wix/Lang/OpenJDK.hotspot.fr-fr.wxl.template +++ b/wix/Lang/OpenJDK.hotspot.fr-fr.wxl.template @@ -1,12 +1,11 @@ - - - JRE avec Hotspot - {vendor_branding} Runtime Environment avec Hotspot - {vendor_branding} JRE avec Hotspot - {vendor_branding} Runtime Environment avec Hotspot - - JDK avec Hotspot - {vendor_branding} Development Kit avec Hotspot - {vendor_branding} JDK avec Hotspot - {vendor_branding} Development Kit avec Hotspot + + + + + + + + + + \ No newline at end of file diff --git a/wix/Lang/OpenJDK.hotspot.ja-jp.wxl.template b/wix/Lang/OpenJDK.hotspot.ja-jp.wxl.template index d5ad70cb8..278cb1686 100644 --- a/wix/Lang/OpenJDK.hotspot.ja-jp.wxl.template +++ b/wix/Lang/OpenJDK.hotspot.ja-jp.wxl.template @@ -1,12 +1,11 @@ - - - JRE with Hotspot - {vendor_branding} Runtime Environment with Hotspot - {vendor_branding} JRE with Hotspot - {vendor_branding} Runtime Environment with Hotspot - - JDK with Hotspot - {vendor_branding} Development Kit with Hotspot - {vendor_branding} JDK with Hotspot - {vendor_branding} Development Kit with Hotspot + + + + + + + + + + \ No newline at end of file diff --git a/wix/Lang/OpenJDK.hotspot.zh-cn.wxl.template b/wix/Lang/OpenJDK.hotspot.zh-cn.wxl.template index d6f013b29..0d41db79b 100644 --- a/wix/Lang/OpenJDK.hotspot.zh-cn.wxl.template +++ b/wix/Lang/OpenJDK.hotspot.zh-cn.wxl.template @@ -1,12 +1,11 @@ - - - JRE with Hotspot - {vendor_branding} Runtime Environment with Hotspot - {vendor_branding} JRE with Hotspot - {vendor_branding} Runtime Environment with Hotspot - - JDK with Hotspot - {vendor_branding} Development Kit with Hotspot - {vendor_branding} JDK with Hotspot - {vendor_branding} Development Kit with Hotspot + + + + + + + + + + \ No newline at end of file diff --git a/wix/Lang/OpenJDK.hotspot.zh-tw.wxl.template b/wix/Lang/OpenJDK.hotspot.zh-tw.wxl.template index ccd16d4f0..0b9443d4c 100644 --- a/wix/Lang/OpenJDK.hotspot.zh-tw.wxl.template +++ b/wix/Lang/OpenJDK.hotspot.zh-tw.wxl.template @@ -1,12 +1,11 @@ - - - JRE with Hotspot - {vendor_branding} Runtime Environment with Hotspot - {vendor_branding} JRE with Hotspot - {vendor_branding} Runtime Environment with Hotspot - - JDK with Hotspot - {vendor_branding} Development Kit with Hotspot - {vendor_branding} JDK with Hotspot - {vendor_branding} Development Kit with Hotspot + + + + + + + + + + \ No newline at end of file diff --git a/wix/Main.wxs.template b/wix/Main.wxs.template index 8a92056f9..2c295d5b3 100644 --- a/wix/Main.wxs.template +++ b/wix/Main.wxs.template @@ -1,238 +1,232 @@ - - - - - - - - - - - - - - - - - - = 601]]> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ALLUSERS=1 OR (ALLUSERS=2 AND Privileged) - ALLUSERS="" OR (ALLUSERS=2 AND (NOT Privileged)) - - - - - - - - - - - - - - - - ALLUSERS=1 OR (ALLUSERS=2 AND Privileged) - - - - - ALLUSERS="" OR (ALLUSERS=2 AND (NOT Privileged)) - - - - - - - - ALLUSERS=1 OR (ALLUSERS=2 AND Privileged) - - - - - ALLUSERS="" OR (ALLUSERS=2 AND (NOT Privileged)) - - - - - - - - - - - - - - "1.8" AND JAVASOFT_CURRENTVERSION < $(var.ProductMajorVersion)]]> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 1 - - 1 - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From 3fe7cbdfe904dd5a870fb7a1c7d1a23e6ba54d91 Mon Sep 17 00:00:00 2001 From: JoshMJ Date: Mon, 11 Mar 2024 13:22:33 -0700 Subject: [PATCH 03/66] Updated dragonwell + openj9 wix templates to wixv4 --- .../OpenJDK.dragonwell.de-de.wxl.template | 23 +++++++++---------- .../OpenJDK.dragonwell.en-us.wxl.template | 21 ++++++++--------- .../OpenJDK.dragonwell.es-es.wxl.template | 23 +++++++++---------- .../OpenJDK.dragonwell.fr-fr.wxl.template | 21 ++++++++--------- .../OpenJDK.dragonwell.ja-jp.wxl.template | 21 ++++++++--------- .../OpenJDK.dragonwell.zh-cn.wxl.template | 21 ++++++++--------- .../OpenJDK.dragonwell.zh-tw.wxl.template | 21 ++++++++--------- wix/Lang/OpenJDK.openj9.de-de.wxl.template | 23 +++++++++---------- wix/Lang/OpenJDK.openj9.en-us.wxl.template | 21 ++++++++--------- wix/Lang/OpenJDK.openj9.es-es.wxl.template | 23 +++++++++---------- wix/Lang/OpenJDK.openj9.fr-fr.wxl.template | 21 ++++++++--------- wix/Lang/OpenJDK.openj9.ja-jp.wxl.template | 21 ++++++++--------- wix/Lang/OpenJDK.openj9.zh-cn.wxl.template | 21 ++++++++--------- wix/Lang/OpenJDK.openj9.zh-tw.wxl.template | 21 ++++++++--------- 14 files changed, 144 insertions(+), 158 deletions(-) diff --git a/wix/Lang/OpenJDK.dragonwell.de-de.wxl.template b/wix/Lang/OpenJDK.dragonwell.de-de.wxl.template index 1f764cf5c..4753e5e4b 100644 --- a/wix/Lang/OpenJDK.dragonwell.de-de.wxl.template +++ b/wix/Lang/OpenJDK.dragonwell.de-de.wxl.template @@ -1,12 +1,11 @@ - - - JRE mit Alibaba Dragonwell - {vendor_branding} Runtime Environment mit Alibaba Dragonwell - {vendor_branding} JRE mit Alibaba Dragonwell - {vendor_branding} Runtime Environment mit Alibaba Dragonwell - - JDK mit Alibaba Dragonwell - {vendor_branding} Development Kit mit Alibaba Dragonwell - {vendor_branding} JDK mit Alibaba Dragonwell - {vendor_branding} Development Kit mit Alibaba Dragonwell - + + + + + + + + + + + diff --git a/wix/Lang/OpenJDK.dragonwell.en-us.wxl.template b/wix/Lang/OpenJDK.dragonwell.en-us.wxl.template index 88cec125b..e8b28a1d8 100644 --- a/wix/Lang/OpenJDK.dragonwell.en-us.wxl.template +++ b/wix/Lang/OpenJDK.dragonwell.en-us.wxl.template @@ -1,12 +1,11 @@ - - - JRE with Alibaba Dragonwell - {vendor_branding} Runtime Environment with Alibaba Dragonwell - {vendor_branding} JRE with Alibaba Dragonwell - {vendor_branding} Runtime Environment with Alibaba Dragonwell - - JDK with Alibaba Dragonwell - {vendor_branding} Development Kit with Alibaba Dragonwell - {vendor_branding} JDK with Alibaba Dragonwell - {vendor_branding} Development Kit with Alibaba Dragonwell + + + + + + + + + + \ No newline at end of file diff --git a/wix/Lang/OpenJDK.dragonwell.es-es.wxl.template b/wix/Lang/OpenJDK.dragonwell.es-es.wxl.template index 2f42e27a6..b8498005d 100644 --- a/wix/Lang/OpenJDK.dragonwell.es-es.wxl.template +++ b/wix/Lang/OpenJDK.dragonwell.es-es.wxl.template @@ -1,12 +1,11 @@ - - - JRE con Alibaba Dragonwell - {vendor_branding} Runtime Environment con Alibaba Dragonwell - {vendor_branding} JRE con Alibaba Dragonwell - {vendor_branding} Runtime Environment con Alibaba Dragonwell - - JDK con Alibaba Dragonwell - {vendor_branding} Development Kit con Alibaba Dragonwell - {vendor_branding} JDK con Alibaba Dragonwell - {vendor_branding} Development Kit con Alibaba Dragonwell - + + + + + + + + + + + diff --git a/wix/Lang/OpenJDK.dragonwell.fr-fr.wxl.template b/wix/Lang/OpenJDK.dragonwell.fr-fr.wxl.template index 2378a2fcb..56080e5b3 100644 --- a/wix/Lang/OpenJDK.dragonwell.fr-fr.wxl.template +++ b/wix/Lang/OpenJDK.dragonwell.fr-fr.wxl.template @@ -1,12 +1,11 @@ - - - JRE avec Alibaba Dragonwell - {vendor_branding} Runtime Environment avec Alibaba Dragonwell - {vendor_branding} JRE avec Alibaba Dragonwell - {vendor_branding} Runtime Environment avec Alibaba Dragonwell - - JDK avec Alibaba Dragonwell - {vendor_branding} Development Kit avec Alibaba Dragonwell - {vendor_branding} JDK avec Alibaba Dragonwell - {vendor_branding} Development Kit avec Alibaba Dragonwell + + + + + + + + + + \ No newline at end of file diff --git a/wix/Lang/OpenJDK.dragonwell.ja-jp.wxl.template b/wix/Lang/OpenJDK.dragonwell.ja-jp.wxl.template index d297bd43a..380529ea8 100644 --- a/wix/Lang/OpenJDK.dragonwell.ja-jp.wxl.template +++ b/wix/Lang/OpenJDK.dragonwell.ja-jp.wxl.template @@ -1,12 +1,11 @@ - - - JRE with Alibaba Dragonwell - {vendor_branding} Runtime Environment with Alibaba Dragonwell - {vendor_branding} JRE with Alibaba Dragonwell - {vendor_branding} Runtime Environment with Alibaba Dragonwell - - JDK with Alibaba Dragonwell - {vendor_branding} Development Kit with Alibaba Dragonwell - {vendor_branding} JDK with Alibaba Dragonwell - {vendor_branding} Development Kit with Alibaba Dragonwell + + + + + + + + + + \ No newline at end of file diff --git a/wix/Lang/OpenJDK.dragonwell.zh-cn.wxl.template b/wix/Lang/OpenJDK.dragonwell.zh-cn.wxl.template index 386f1c714..4189b2310 100644 --- a/wix/Lang/OpenJDK.dragonwell.zh-cn.wxl.template +++ b/wix/Lang/OpenJDK.dragonwell.zh-cn.wxl.template @@ -1,12 +1,11 @@ - - - JRE with Alibaba Dragonwell - {vendor_branding} Runtime Environment with Alibaba Dragonwell - {vendor_branding} JRE with Alibaba Dragonwell - {vendor_branding} Runtime Environment with Alibaba Dragonwell - - JDK with Alibaba Dragonwell - {vendor_branding} Development Kit with Alibaba Dragonwell - {vendor_branding} JDK with Alibaba Dragonwell - {vendor_branding} Development Kit with Alibaba Dragonwell + + + + + + + + + + \ No newline at end of file diff --git a/wix/Lang/OpenJDK.dragonwell.zh-tw.wxl.template b/wix/Lang/OpenJDK.dragonwell.zh-tw.wxl.template index f010ff39f..908feaa56 100644 --- a/wix/Lang/OpenJDK.dragonwell.zh-tw.wxl.template +++ b/wix/Lang/OpenJDK.dragonwell.zh-tw.wxl.template @@ -1,12 +1,11 @@ - - - JRE with Alibaba Dragonwell - {vendor_branding} Runtime Environment with Alibaba Dragonwell - {vendor_branding} JRE with Alibaba Dragonwell - {vendor_branding} Runtime Environment with Alibaba Dragonwell - - JDK with Alibaba Dragonwell - {vendor_branding} Development Kit with Alibaba Dragonwell - {vendor_branding} JDK with Alibaba Dragonwell - {vendor_branding} Development Kit with Alibaba Dragonwell + + + + + + + + + + \ No newline at end of file diff --git a/wix/Lang/OpenJDK.openj9.de-de.wxl.template b/wix/Lang/OpenJDK.openj9.de-de.wxl.template index 7ac83e77e..e27af1db0 100644 --- a/wix/Lang/OpenJDK.openj9.de-de.wxl.template +++ b/wix/Lang/OpenJDK.openj9.de-de.wxl.template @@ -1,12 +1,11 @@ - - - JRE mit Eclipse OpenJ9 - {vendor_branding} Runtime Environment mit Eclipse OpenJ9 - {vendor_branding} JRE mit Eclipse OpenJ9 - {vendor_branding} Runtime Environment mit Eclipse OpenJ9 - - JDK mit Eclipse OpenJ9 - {vendor_branding} Development Kit mit Eclipse OpenJ9 - {vendor_branding} JDK mit Eclipse OpenJ9 - {vendor_branding} Development Kit mit Eclipse OpenJ9 - + + + + + + + + + + + diff --git a/wix/Lang/OpenJDK.openj9.en-us.wxl.template b/wix/Lang/OpenJDK.openj9.en-us.wxl.template index 29a198014..9b1c75855 100644 --- a/wix/Lang/OpenJDK.openj9.en-us.wxl.template +++ b/wix/Lang/OpenJDK.openj9.en-us.wxl.template @@ -1,12 +1,11 @@ - - - JRE with Eclipse OpenJ9 - {vendor_branding} Runtime Environment with Eclipse OpenJ9 - {vendor_branding} JRE with Eclipse OpenJ9 - {vendor_branding} Runtime Environment with Eclipse OpenJ9 - - JDK with Eclipse OpenJ9 - {vendor_branding} Development Kit with Eclipse OpenJ9 - {vendor_branding} JDK with Eclipse OpenJ9 - {vendor_branding} Development Kit with Eclipse OpenJ9 + + + + + + + + + + \ No newline at end of file diff --git a/wix/Lang/OpenJDK.openj9.es-es.wxl.template b/wix/Lang/OpenJDK.openj9.es-es.wxl.template index cf351010f..f8d3b9608 100644 --- a/wix/Lang/OpenJDK.openj9.es-es.wxl.template +++ b/wix/Lang/OpenJDK.openj9.es-es.wxl.template @@ -1,12 +1,11 @@ - - - JRE con Eclipse OpenJ9 - {vendor_branding} Runtime Environment con Eclipse OpenJ9 - {vendor_branding} JRE con Eclipse OpenJ9 - {vendor_branding} Runtime Environment con Eclipse OpenJ9 - - JDK con Eclipse OpenJ9 - {vendor_branding} Development Kit con Eclipse OpenJ9 - {vendor_branding} JDK con Eclipse OpenJ9 - {vendor_branding} Development Kit con Eclipse OpenJ9 - + + + + + + + + + + + diff --git a/wix/Lang/OpenJDK.openj9.fr-fr.wxl.template b/wix/Lang/OpenJDK.openj9.fr-fr.wxl.template index 03c82d344..133c0eb6f 100644 --- a/wix/Lang/OpenJDK.openj9.fr-fr.wxl.template +++ b/wix/Lang/OpenJDK.openj9.fr-fr.wxl.template @@ -1,12 +1,11 @@ - - - JRE avec Eclipse OpenJ9 - {vendor_branding} Runtime Environment avec Eclipse OpenJ9 - {vendor_branding} JRE avec Eclipse OpenJ9 - {vendor_branding} Runtime Environment avec Eclipse OpenJ9 - - JDK avec Eclipse OpenJ9 - {vendor_branding} Development Kit avec Eclipse OpenJ9 - {vendor_branding} JDK avec Eclipse OpenJ9 - {vendor_branding} Development Kit avec Eclipse OpenJ9 + + + + + + + + + + \ No newline at end of file diff --git a/wix/Lang/OpenJDK.openj9.ja-jp.wxl.template b/wix/Lang/OpenJDK.openj9.ja-jp.wxl.template index 137ef672a..f27102b04 100644 --- a/wix/Lang/OpenJDK.openj9.ja-jp.wxl.template +++ b/wix/Lang/OpenJDK.openj9.ja-jp.wxl.template @@ -1,12 +1,11 @@ - - - JRE with Eclipse OpenJ9 - {vendor_branding} Runtime Environment with Eclipse OpenJ9 - {vendor_branding} JRE with Eclipse OpenJ9 - {vendor_branding} Runtime Environment with Eclipse OpenJ9 - - JDK with Eclipse OpenJ9 - {vendor_branding} Development Kit with Eclipse OpenJ9 - {vendor_branding} JDK with Eclipse OpenJ9 - {vendor_branding} Development Kit with Eclipse OpenJ9 + + + + + + + + + + \ No newline at end of file diff --git a/wix/Lang/OpenJDK.openj9.zh-cn.wxl.template b/wix/Lang/OpenJDK.openj9.zh-cn.wxl.template index 4e04c2b92..61229c6ec 100644 --- a/wix/Lang/OpenJDK.openj9.zh-cn.wxl.template +++ b/wix/Lang/OpenJDK.openj9.zh-cn.wxl.template @@ -1,12 +1,11 @@ - - - JRE with Eclipse OpenJ9 - {vendor_branding} Runtime Environment with Eclipse OpenJ9 - {vendor_branding} JRE with Eclipse OpenJ9 - {vendor_branding} Runtime Environment with Eclipse OpenJ9 - - JDK with Eclipse OpenJ9 - {vendor_branding} Development Kit with Eclipse OpenJ9 - {vendor_branding} JDK with Eclipse OpenJ9 - {vendor_branding} Development Kit with Eclipse OpenJ9 + + + + + + + + + + \ No newline at end of file diff --git a/wix/Lang/OpenJDK.openj9.zh-tw.wxl.template b/wix/Lang/OpenJDK.openj9.zh-tw.wxl.template index fcffb5233..6dde50460 100644 --- a/wix/Lang/OpenJDK.openj9.zh-tw.wxl.template +++ b/wix/Lang/OpenJDK.openj9.zh-tw.wxl.template @@ -1,12 +1,11 @@ - - - JRE with Eclipse OpenJ9 - {vendor_branding} Runtime Environment with Eclipse OpenJ9 - {vendor_branding} JRE with Eclipse OpenJ9 - {vendor_branding} Runtime Environment with Eclipse OpenJ9 - - JDK with Eclipse OpenJ9 - {vendor_branding} Development Kit with Eclipse OpenJ9 - {vendor_branding} JDK with Eclipse OpenJ9 - {vendor_branding} Development Kit with Eclipse OpenJ9 + + + + + + + + + + \ No newline at end of file From 3fc05bba1674ed110baa86e7041049e55ade634f Mon Sep 17 00:00:00 2001 From: JoshMJ Date: Tue, 12 Mar 2024 11:36:20 -0700 Subject: [PATCH 04/66] Updated remaining templates to wix v4 --- wix/Main.wxs.template | 2 +- wix/Resources/heat.icedteaweb.xslt | 24 ++++++++++++------------ wix/Resources/heat.tools.xslt | 6 +++--- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/wix/Main.wxs.template b/wix/Main.wxs.template index 2c295d5b3..fc4d76949 100644 --- a/wix/Main.wxs.template +++ b/wix/Main.wxs.template @@ -12,7 +12,7 @@ - + diff --git a/wix/Resources/heat.icedteaweb.xslt b/wix/Resources/heat.icedteaweb.xslt index 2cf8170ba..0ace4f5b4 100644 --- a/wix/Resources/heat.icedteaweb.xslt +++ b/wix/Resources/heat.icedteaweb.xslt @@ -1,13 +1,13 @@ - - - - - - - - - - IcedTeaWebBin - - + + + + + + + + + + IcedTeaWebBin + + \ No newline at end of file diff --git a/wix/Resources/heat.tools.xslt b/wix/Resources/heat.tools.xslt index 5c65a7b85..7a57e05bb 100644 --- a/wix/Resources/heat.tools.xslt +++ b/wix/Resources/heat.tools.xslt @@ -1,8 +1,8 @@ - + From c2fce7432085bc53b52b3be09d83ad4e85189db8 Mon Sep 17 00:00:00 2001 From: JoshMJ Date: Tue, 12 Mar 2024 11:38:56 -0700 Subject: [PATCH 05/66] Updated extensions used in wix commands --- wix/Build-OpenJDK.ps1 | 8 ++++---- wix/Build.OpenJDK_generic.cmd | 8 ++++---- wix/BuildSetupTranslationTransform.cmd | 4 ++-- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/wix/Build-OpenJDK.ps1 b/wix/Build-OpenJDK.ps1 index 3a60e776e..644164432 100644 --- a/wix/Build-OpenJDK.ps1 +++ b/wix/Build-OpenJDK.ps1 @@ -227,8 +227,8 @@ foreach ($A in $ARCH.Split(',')) { # # Build with extra Source Code feature (needs work) # & "$WIX\bin\heat.exe" file "$REPRO_DIR\lib\src.zip" -out "Src-$OUTPUT_BASE_FILENAME.wxs" -gg -srd -cg "SrcFiles" -var var.ReproDir -dr INSTALLDIR -platform $PLATFORM # & "$WIX\bin\heat.exe" dir "$REPRO_DIR" -out "Files-$OUTPUT_BASE_FILENAME.wxs" -t "$SETUP_RESOURCES_DIR\heat.tools.xslt" -gg -sfrag -scom -sreg -srd -ke -cg "AppFiles" -var var.ProductMajorVersion -var var.ProductMinorVersion -var var.ProductVersionString -var var.MSIProductVersion -var var.ReproDir -dr INSTALLDIR -platform $PLATFORM - # & "$WIX\bin\candle.exe" -arch $PLATFORM "$OUTPUT_BASE_FILENAME-Main.wxs" "Files-$OUTPUT_BASE_FILENAME.wxs" "Src-$OUTPUT_BASE_FILENAME.wxs" -ext WixUIExtension -ext WixUtilExtension -dProductSku="$PRODUCT_SKU" -dProductMajorVersion="$PRODUCT_MAJOR_VERSION" -dProductMinorVersion="$PRODUCT_MINOR_VERSION" -dProductVersionString="$PRODUCT_SHORT_VERSION" -dMSIProductVersion="$MSI_PRODUCT_VERSION" -dProductId="$PRODUCT_ID" -dReproDir="$REPRO_DIR" -dSetupResourcesDir="$SETUP_RESOURCES_DIR" -dCulture="$CULTURE" - # & "$WIX\bin\light.exe" $MSI_VALIDATION_OPTION "Main-$OUTPUT_BASE_FILENAME.wixobj" "Files-$OUTPUT_BASE_FILENAME.wixobj" "Src-$OUTPUT_BASE_FILENAME.wixobj" -cc $CACHE_FOLDER -ext WixUIExtension -ext WixUtilExtension -spdb -out "ReleaseDir\$OUTPUT_BASE_FILENAME.msi" -loc "Lang\$OUTPUT_BASE_FILENAME-$PRODUCT_SKU.Base.$CULTURE.wxl" -loc "Lang\$OUTPUT_BASE_FILENAME-$PRODUCT_SKU.$PACKAGE_TYPE.$CULTURE.wxl" -cultures:$CULTURE + # & "$WIX\bin\candle.exe" -arch $PLATFORM "$OUTPUT_BASE_FILENAME-Main.wxs" "Files-$OUTPUT_BASE_FILENAME.wxs" "Src-$OUTPUT_BASE_FILENAME.wxs" -ext WixToolset.UI.wixext -ext WixToolset.Util.wixext -dProductSku="$PRODUCT_SKU" -dProductMajorVersion="$PRODUCT_MAJOR_VERSION" -dProductMinorVersion="$PRODUCT_MINOR_VERSION" -dProductVersionString="$PRODUCT_SHORT_VERSION" -dMSIProductVersion="$MSI_PRODUCT_VERSION" -dProductId="$PRODUCT_ID" -dReproDir="$REPRO_DIR" -dSetupResourcesDir="$SETUP_RESOURCES_DIR" -dCulture="$CULTURE" + # & "$WIX\bin\light.exe" $MSI_VALIDATION_OPTION "Main-$OUTPUT_BASE_FILENAME.wixobj" "Files-$OUTPUT_BASE_FILENAME.wixobj" "Src-$OUTPUT_BASE_FILENAME.wixobj" -cc $CACHE_FOLDER -ext WixToolset.UI.wixext -ext WixToolset.Util.wixext -spdb -out "ReleaseDir\$OUTPUT_BASE_FILENAME.msi" -loc "Lang\$OUTPUT_BASE_FILENAME-$PRODUCT_SKU.Base.$CULTURE.wxl" -loc "Lang\$OUTPUT_BASE_FILENAME-$PRODUCT_SKU.$PACKAGE_TYPE.$CULTURE.wxl" -cultures:$CULTURE # Clean .cab cache for each run .. Cache is only used inside BuildSetupTranslationTransform.cmd to speed up MST generation if (Test-Path -Path "!CACHE_FOLDER!") { @@ -272,7 +272,7 @@ foreach ($A in $ARCH.Split(',')) { } Write-Debug "CANDLE" - & "$WIX\bin\candle.exe" -arch $PLATFORM -out "$WORKDIR" "$WORKDIR$OUTPUT_BASE_FILENAME-Main.wxs" "$WORKDIR$OUTPUT_BASE_FILENAME-Files.wxs" $ITW_WXS -ext WixUIExtension -ext WixUtilExtension -dIcedTeaWebDir="$ICEDTEAWEB_DIR" -dOutputBaseFilename="$OUTPUT_BASE_FILENAME" -dProductSku="$PRODUCT_SKU" -dProductMajorVersion="$PRODUCT_MAJOR_VERSION" -dProductMinorVersion="$PRODUCT_MINOR_VERSION" -dProductVersionString="$PRODUCT_SHORT_VERSION" -dMSIProductVersion="$MSI_PRODUCT_VERSION" -dProductId="$PRODUCT_ID" -dProductUpgradeCode="$PRODUCT_UPGRADE_CODE" -dReproDir="$REPRO_DIR" -dSetupResourcesDir="$SETUP_RESOURCES_DIR" -dCulture="$CULTURE" -dJVM="$PACKAGE_TYPE" + & "$WIX\bin\candle.exe" -arch $PLATFORM -out "$WORKDIR" "$WORKDIR$OUTPUT_BASE_FILENAME-Main.wxs" "$WORKDIR$OUTPUT_BASE_FILENAME-Files.wxs" $ITW_WXS -ext WixToolset.UI.wixext -ext WixToolset.Util.wixext -dIcedTeaWebDir="$ICEDTEAWEB_DIR" -dOutputBaseFilename="$OUTPUT_BASE_FILENAME" -dProductSku="$PRODUCT_SKU" -dProductMajorVersion="$PRODUCT_MAJOR_VERSION" -dProductMinorVersion="$PRODUCT_MINOR_VERSION" -dProductVersionString="$PRODUCT_SHORT_VERSION" -dMSIProductVersion="$MSI_PRODUCT_VERSION" -dProductId="$PRODUCT_ID" -dProductUpgradeCode="$PRODUCT_UPGRADE_CODE" -dReproDir="$REPRO_DIR" -dSetupResourcesDir="$SETUP_RESOURCES_DIR" -dCulture="$CULTURE" -dJVM="$PACKAGE_TYPE" if ($LASTEXITCODE -ne 0) { Write-Host "Failed to preprocess and compile WiX source files into object files (.wixobj)" Get-ChildItem -Path $WORKDIR -Recurse | Sort-Object -Property Name @@ -280,7 +280,7 @@ foreach ($A in $ARCH.Split(',')) { } Write-Debug "LIGHT" - & "$WIX\bin\light.exe" "$WORKDIR$OUTPUT_BASE_FILENAME-Main.wixobj" "$WORKDIR$OUTPUT_BASE_FILENAME-Files.wixobj" $ITW_WIXOBJ $MSI_VALIDATION_OPTION -cc $CACHE_FOLDER -ext WixUIExtension -ext WixUtilExtension -spdb -out "ReleaseDir\$OUTPUT_BASE_FILENAME.msi" -loc "$WORKDIR$OUTPUT_BASE_FILENAME-$PRODUCT_SKU.Base.$CULTURE.wxl" -loc "$WORKDIR$OUTPUT_BASE_FILENAME-$PRODUCT_SKU.$PACKAGE_TYPE.$CULTURE.wxl" -cultures:$CULTURE + & "$WIX\bin\light.exe" "$WORKDIR$OUTPUT_BASE_FILENAME-Main.wixobj" "$WORKDIR$OUTPUT_BASE_FILENAME-Files.wixobj" $ITW_WIXOBJ $MSI_VALIDATION_OPTION -cc $CACHE_FOLDER -ext WixToolset.UI.wixext -ext WixToolset.Util.wixext -spdb -out "ReleaseDir\$OUTPUT_BASE_FILENAME.msi" -loc "$WORKDIR$OUTPUT_BASE_FILENAME-$PRODUCT_SKU.Base.$CULTURE.wxl" -loc "$WORKDIR$OUTPUT_BASE_FILENAME-$PRODUCT_SKU.$PACKAGE_TYPE.$CULTURE.wxl" -cultures:$CULTURE if ($LASTEXITCODE -ne 0) { Write-Host "Failed to link and bind one or more .wixobj files and create a Windows Installer database (.msi or .msm)" Get-ChildItem -Path $WORKDIR -Recurse | Sort-Object -Property Name diff --git a/wix/Build.OpenJDK_generic.cmd b/wix/Build.OpenJDK_generic.cmd index f175529dd..dff639b55 100644 --- a/wix/Build.OpenJDK_generic.cmd +++ b/wix/Build.OpenJDK_generic.cmd @@ -196,8 +196,8 @@ FOR %%A IN (%ARCH%) DO ( REM Build with extra Source Code feature (needs work) REM "!WIX!bin\heat.exe" file "!REPRO_DIR!\lib\src.zip" -out Src-!OUTPUT_BASE_FILENAME!.wxs -gg -srd -cg "SrcFiles" -var var.ReproDir -dr INSTALLDIR -platform !PLATFORM! REM "!WIX!bin\heat.exe" dir "!REPRO_DIR!" -out Files-!OUTPUT_BASE_FILENAME!.wxs -t "!SETUP_RESOURCES_DIR!\heat.tools.xslt" -gg -sfrag -scom -sreg -srd -ke -cg "AppFiles" -var var.ProductMajorVersion -var var.ProductMinorVersion -var var.ProductVersionString -var var.MSIProductVersion -var var.ReproDir -dr INSTALLDIR -platform !PLATFORM! - REM "!WIX!bin\candle.exe" -arch !PLATFORM! !OUTPUT_BASE_FILENAME!-Main.wxs Files-!OUTPUT_BASE_FILENAME!.wxs Src-!OUTPUT_BASE_FILENAME!.wxs -ext WixUIExtension -ext WixUtilExtension -dProductSku="!PRODUCT_SKU!" -dProductMajorVersion="!PRODUCT_MAJOR_VERSION!" -dProductMinorVersion="!PRODUCT_MINOR_VERSION!" -dProductVersionString="!PRODUCT_SHORT_VERSION!" -dMSIProductVersion="!MSI_PRODUCT_VERSION!" -dProductId="!PRODUCT_ID!" -dReproDir="!REPRO_DIR!" -dSetupResourcesDir="!SETUP_RESOURCES_DIR!" -dCulture="!CULTURE!" - REM "!WIX!bin\light.exe" !MSI_VALIDATION_OPTION! Main-!OUTPUT_BASE_FILENAME!.wixobj Files-!OUTPUT_BASE_FILENAME!.wixobj Src-!OUTPUT_BASE_FILENAME!.wixobj -cc !CACHE_FOLDER! -ext WixUIExtension -ext WixUtilExtension -spdb -out "ReleaseDir\!OUTPUT_BASE_FILENAME!.msi" -loc "Lang\!OUTPUT_BASE_FILENAME!-!PRODUCT_SKU!.Base.!CULTURE!.wxl" -loc "Lang\!OUTPUT_BASE_FILENAME!-!PRODUCT_SKU!.!PACKAGE_TYPE!.!CULTURE!.wxl" -cultures:!CULTURE! + REM "!WIX!bin\candle.exe" -arch !PLATFORM! !OUTPUT_BASE_FILENAME!-Main.wxs Files-!OUTPUT_BASE_FILENAME!.wxs Src-!OUTPUT_BASE_FILENAME!.wxs -ext WixToolset.UI.wixext -ext WixToolset.Util.wixext -dProductSku="!PRODUCT_SKU!" -dProductMajorVersion="!PRODUCT_MAJOR_VERSION!" -dProductMinorVersion="!PRODUCT_MINOR_VERSION!" -dProductVersionString="!PRODUCT_SHORT_VERSION!" -dMSIProductVersion="!MSI_PRODUCT_VERSION!" -dProductId="!PRODUCT_ID!" -dReproDir="!REPRO_DIR!" -dSetupResourcesDir="!SETUP_RESOURCES_DIR!" -dCulture="!CULTURE!" + REM "!WIX!bin\light.exe" !MSI_VALIDATION_OPTION! Main-!OUTPUT_BASE_FILENAME!.wixobj Files-!OUTPUT_BASE_FILENAME!.wixobj Src-!OUTPUT_BASE_FILENAME!.wixobj -cc !CACHE_FOLDER! -ext WixToolset.UI.wixext -ext WixToolset.Util.wixext -spdb -out "ReleaseDir\!OUTPUT_BASE_FILENAME!.msi" -loc "Lang\!OUTPUT_BASE_FILENAME!-!PRODUCT_SKU!.Base.!CULTURE!.wxl" -loc "Lang\!OUTPUT_BASE_FILENAME!-!PRODUCT_SKU!.!PACKAGE_TYPE!.!CULTURE!.wxl" -cultures:!CULTURE! REM Clean .cab cache for each run .. Cache is only used inside BuildSetupTranslationTransform.cmd to speed up MST generation IF EXIST !CACHE_FOLDER! rmdir /S /Q !CACHE_FOLDER! @@ -242,7 +242,7 @@ FOR %%A IN (%ARCH%) DO ( ECHO CANDLE @ECHO ON - "!WIX!bin\candle.exe" -arch !PLATFORM! -out %WORKDIR% %WORKDIR%!OUTPUT_BASE_FILENAME!-Main.wxs %WORKDIR%!OUTPUT_BASE_FILENAME!-Files.wxs !ITW_WXS! -ext WixUIExtension -ext WixUtilExtension -dIcedTeaWebDir="!ICEDTEAWEB_DIR!" -dOutputBaseFilename="!OUTPUT_BASE_FILENAME!" -dProductSku="!PRODUCT_SKU!" -dProductMajorVersion="!PRODUCT_MAJOR_VERSION!" -dProductMinorVersion="!PRODUCT_MINOR_VERSION!" -dProductVersionString="!PRODUCT_SHORT_VERSION!" -dMSIProductVersion="!MSI_PRODUCT_VERSION!" -dProductId="!PRODUCT_ID!" -dProductUpgradeCode="!PRODUCT_UPGRADE_CODE!" -dReproDir="!REPRO_DIR!" -dSetupResourcesDir="!SETUP_RESOURCES_DIR!" -dCulture="!CULTURE!" -dJVM="!PACKAGE_TYPE!" + "!WIX!bin\candle.exe" -arch !PLATFORM! -out %WORKDIR% %WORKDIR%!OUTPUT_BASE_FILENAME!-Main.wxs %WORKDIR%!OUTPUT_BASE_FILENAME!-Files.wxs !ITW_WXS! -ext WixToolset.UI.wixext -ext WixToolset.Util.wixext -dIcedTeaWebDir="!ICEDTEAWEB_DIR!" -dOutputBaseFilename="!OUTPUT_BASE_FILENAME!" -dProductSku="!PRODUCT_SKU!" -dProductMajorVersion="!PRODUCT_MAJOR_VERSION!" -dProductMinorVersion="!PRODUCT_MINOR_VERSION!" -dProductVersionString="!PRODUCT_SHORT_VERSION!" -dMSIProductVersion="!MSI_PRODUCT_VERSION!" -dProductId="!PRODUCT_ID!" -dProductUpgradeCode="!PRODUCT_UPGRADE_CODE!" -dReproDir="!REPRO_DIR!" -dSetupResourcesDir="!SETUP_RESOURCES_DIR!" -dCulture="!CULTURE!" -dJVM="!PACKAGE_TYPE!" IF ERRORLEVEL 1 ( ECHO Failed to preprocesses and compiles WiX source files into object files ^(.wixobj^) dir /s /b /o:n %WORKDIR% @@ -252,7 +252,7 @@ FOR %%A IN (%ARCH%) DO ( ECHO LIGHT @ECHO ON - "!WIX!bin\light.exe" %WORKDIR%!OUTPUT_BASE_FILENAME!-Main.wixobj %WORKDIR%!OUTPUT_BASE_FILENAME!-Files.wixobj !ITW_WIXOBJ! !MSI_VALIDATION_OPTION! -cc !CACHE_FOLDER! -ext WixUIExtension -ext WixUtilExtension -spdb -out "ReleaseDir\!OUTPUT_BASE_FILENAME!.msi" -loc "%WORKDIR%!OUTPUT_BASE_FILENAME!-!PRODUCT_SKU!.Base.!CULTURE!.wxl" -loc "%WORKDIR%!OUTPUT_BASE_FILENAME!-!PRODUCT_SKU!.!PACKAGE_TYPE!.!CULTURE!.wxl" -cultures:!CULTURE! + "!WIX!bin\light.exe" %WORKDIR%!OUTPUT_BASE_FILENAME!-Main.wixobj %WORKDIR%!OUTPUT_BASE_FILENAME!-Files.wixobj !ITW_WIXOBJ! !MSI_VALIDATION_OPTION! -cc !CACHE_FOLDER! -ext WixToolset.UI.wixext -ext WixToolset.Util.wixext -spdb -out "ReleaseDir\!OUTPUT_BASE_FILENAME!.msi" -loc "%WORKDIR%!OUTPUT_BASE_FILENAME!-!PRODUCT_SKU!.Base.!CULTURE!.wxl" -loc "%WORKDIR%!OUTPUT_BASE_FILENAME!-!PRODUCT_SKU!.!PACKAGE_TYPE!.!CULTURE!.wxl" -cultures:!CULTURE! IF ERRORLEVEL 1 ( ECHO Failed to links and binds one or more .wixobj files and creates a Windows Installer database ^(.msi or .msm^) dir /s /b /o:n diff --git a/wix/BuildSetupTranslationTransform.cmd b/wix/BuildSetupTranslationTransform.cmd index 2f7a4f332..ba5de6c98 100644 --- a/wix/BuildSetupTranslationTransform.cmd +++ b/wix/BuildSetupTranslationTransform.cmd @@ -13,10 +13,10 @@ SET LANGIDS=%LANGIDS%,%LANGID% ECHO Building setup translation for culture "%1" with LangID "%2"... REM Build with extra Source Code feature (needs work) -REM IF EXIST Files-!OUTPUT_BASE_FILENAME!.wixobj "%WIX%bin\light.exe" !MSI_VALIDATION_OPTION! Main-!OUTPUT_BASE_FILENAME!.wixobj Files-!OUTPUT_BASE_FILENAME!.wixobj Src-!OUTPUT_BASE_FILENAME!.wixobj !ITW_WIXOBJ! -cc !CACHE_FOLDER! -reusecab -ext WixUIExtension -ext WixUtilExtension -spdb -out "ReleaseDir\!OUTPUT_BASE_FILENAME!.!CULTURE!.msi" -loc "Lang\%PRODUCT_SKU%.Base.!CULTURE!.wxl" -loc "Lang\%PRODUCT_SKU%.!PACKAGE_TYPE!.!CULTURE!.wxl" -cultures:!CULTURE! +REM IF EXIST Files-!OUTPUT_BASE_FILENAME!.wixobj "%WIX%bin\light.exe" !MSI_VALIDATION_OPTION! Main-!OUTPUT_BASE_FILENAME!.wixobj Files-!OUTPUT_BASE_FILENAME!.wixobj Src-!OUTPUT_BASE_FILENAME!.wixobj !ITW_WIXOBJ! -cc !CACHE_FOLDER! -reusecab -ext WixToolset.UI.wixext -ext WixToolset.Util.wixext -spdb -out "ReleaseDir\!OUTPUT_BASE_FILENAME!.!CULTURE!.msi" -loc "Lang\%PRODUCT_SKU%.Base.!CULTURE!.wxl" -loc "Lang\%PRODUCT_SKU%.!PACKAGE_TYPE!.!CULTURE!.wxl" -cultures:!CULTURE! REM Build without extra Source Code feature -IF EXIST Workdir\!OUTPUT_BASE_FILENAME!-Files.wixobj "%WIX%bin\light.exe" !MSI_VALIDATION_OPTION! Workdir\!OUTPUT_BASE_FILENAME!-Main.wixobj Workdir\!OUTPUT_BASE_FILENAME!-Files.wixobj !ITW_WIXOBJ! -cc !CACHE_FOLDER! -reusecab -ext WixUIExtension -ext WixUtilExtension -spdb -out "ReleaseDir\!OUTPUT_BASE_FILENAME!.!CULTURE!.msi" -loc "Workdir\!OUTPUT_BASE_FILENAME!-%PRODUCT_SKU%.Base.!CULTURE!.wxl" -loc "Workdir\!OUTPUT_BASE_FILENAME!-%PRODUCT_SKU%.!PACKAGE_TYPE!.!CULTURE!.wxl" -cultures:!CULTURE! +IF EXIST Workdir\!OUTPUT_BASE_FILENAME!-Files.wixobj "%WIX%bin\light.exe" !MSI_VALIDATION_OPTION! Workdir\!OUTPUT_BASE_FILENAME!-Main.wixobj Workdir\!OUTPUT_BASE_FILENAME!-Files.wixobj !ITW_WIXOBJ! -cc !CACHE_FOLDER! -reusecab -ext WixToolset.UI.wixext -ext WixToolset.Util.wixext -spdb -out "ReleaseDir\!OUTPUT_BASE_FILENAME!.!CULTURE!.msi" -loc "Workdir\!OUTPUT_BASE_FILENAME!-%PRODUCT_SKU%.Base.!CULTURE!.wxl" -loc "Workdir\!OUTPUT_BASE_FILENAME!-%PRODUCT_SKU%.!PACKAGE_TYPE!.!CULTURE!.wxl" -cultures:!CULTURE! IF ERRORLEVEL 1 ( ECHO light failed with : %ERRORLEVEL% GOTO FAILED From af7f7ea5dd580ab525b70a5958f7a51904b1c029 Mon Sep 17 00:00:00 2001 From: JoshMJ Date: Tue, 12 Mar 2024 14:42:24 -0700 Subject: [PATCH 06/66] First attempt at converting to wixv4 --- wix/Build.OpenJDK_generic.cmd | 89 +++++++++++++++++++++++++++++------ 1 file changed, 75 insertions(+), 14 deletions(-) diff --git a/wix/Build.OpenJDK_generic.cmd b/wix/Build.OpenJDK_generic.cmd index dff639b55..aee8489ab 100644 --- a/wix/Build.OpenJDK_generic.cmd +++ b/wix/Build.OpenJDK_generic.cmd @@ -133,8 +133,9 @@ FOR %%A IN (%ARCH%) DO ( ) DO ( SET REPRO_DIR=.\SourceDir\%%P IF "!PRODUCT_CATEGORY!" == "jre" ( - SET REPRO_DIR=!REPRO_DIR!-!PRODUCT_CATEGORY!) - ECHO looking for !REPRO_DIR! + SET REPRO_DIR=!REPRO_DIR!-!PRODUCT_CATEGORY! + ) + ECHO looking for !REPRO_DIR! IF EXIST "!REPRO_DIR!" ( goto CONTINUE ) @@ -220,7 +221,19 @@ FOR %%A IN (%ARCH%) DO ( SET ITW_WXS="IcedTeaWeb-!OUTPUT_BASE_FILENAME!.wxs" SET ITW_WIXOBJ=%WORKDIR%IcedTeaWeb-!OUTPUT_BASE_FILENAME!.wixobj ECHO HEAT - "!WIX!bin\heat.exe" dir "!ICEDTEAWEB_DIR!" -out !ITW_WXS! -t "!SETUP_RESOURCES_DIR!\heat.icedteaweb.xslt" -gg -sfrag -scom -sreg -srd -ke -cg "IcedTeaWebFiles" -var var.IcedTeaWebDir -dr INSTALLDIR -platform !PLATFORM! + "C:\Program Files\PackageManagement\NuGet\Packages\WixToolset.Heat.4.0.4\tools\net472\x64\heat.exe" dir "!ICEDTEAWEB_DIR!" ^ + -out !ITW_WXS! ^ + -t "!SETUP_RESOURCES_DIR!\heat.icedteaweb.xslt" ^ + -gg ^ + -sfrag ^ + -scom ^ + -sreg ^ + -srd ^ + -ke ^ + -cg "IcedTeaWebFiles" ^ + -var var.IcedTeaWebDir ^ + -dr INSTALLDIR ^ + -platform !PLATFORM! IF ERRORLEVEL 1 ( ECHO "Failed to generating Windows Installer XML Source files for IcedTea-Web (.wxs)" GOTO FAILED @@ -233,7 +246,22 @@ FOR %%A IN (%ARCH%) DO ( ECHO HEAT @ECHO ON - "!WIX!bin\heat.exe" dir "!REPRO_DIR!" -out %WORKDIR%!OUTPUT_BASE_FILENAME!-Files.wxs -gg -sfrag -scom -sreg -srd -ke -cg "AppFiles" -var var.ProductMajorVersion -var var.ProductMinorVersion -var var.ProductVersionString -var var.MSIProductVersion -var var.ReproDir -dr INSTALLDIR -platform !PLATFORM! + "C:\Program Files\PackageManagement\NuGet\Packages\WixToolset.Heat.4.0.4\tools\net472\x64\heat.exe" dir "!REPRO_DIR!" ^ + -out %WORKDIR%!OUTPUT_BASE_FILENAME!-Files.wxs ^ + -gg ^ + -sfrag ^ + -scom ^ + -sreg ^ + -srd ^ + -ke ^ + -cg "AppFiles" ^ + -var var.ProductMajorVersion ^ + -var var.ProductMinorVersion ^ + -var var.ProductVersionString ^ + -var var.MSIProductVersion ^ + -var var.ReproDir ^ + -dr INSTALLDIR ^ + -platform !PLATFORM! IF ERRORLEVEL 1 ( ECHO Failed to generating Windows Installer XML Source files ^(.wxs^) GOTO FAILED @@ -242,7 +270,33 @@ FOR %%A IN (%ARCH%) DO ( ECHO CANDLE @ECHO ON - "!WIX!bin\candle.exe" -arch !PLATFORM! -out %WORKDIR% %WORKDIR%!OUTPUT_BASE_FILENAME!-Main.wxs %WORKDIR%!OUTPUT_BASE_FILENAME!-Files.wxs !ITW_WXS! -ext WixToolset.UI.wixext -ext WixToolset.Util.wixext -dIcedTeaWebDir="!ICEDTEAWEB_DIR!" -dOutputBaseFilename="!OUTPUT_BASE_FILENAME!" -dProductSku="!PRODUCT_SKU!" -dProductMajorVersion="!PRODUCT_MAJOR_VERSION!" -dProductMinorVersion="!PRODUCT_MINOR_VERSION!" -dProductVersionString="!PRODUCT_SHORT_VERSION!" -dMSIProductVersion="!MSI_PRODUCT_VERSION!" -dProductId="!PRODUCT_ID!" -dProductUpgradeCode="!PRODUCT_UPGRADE_CODE!" -dReproDir="!REPRO_DIR!" -dSetupResourcesDir="!SETUP_RESOURCES_DIR!" -dCulture="!CULTURE!" -dJVM="!PACKAGE_TYPE!" + @REM -out %WORKDIR% ^ + @REM -spdb ^ + @REM !MSI_VALIDATION_OPTION! ^ @REM this was `-sval` + wix build ^ + -arch !PLATFORM! ^ + %WORKDIR%!OUTPUT_BASE_FILENAME!-Main.wxs ^ + %WORKDIR%!OUTPUT_BASE_FILENAME!-Files.wxs ^ + !ITW_WXS! ^ + -ext WixToolset.UI.wixext ^ + -ext WixToolset.Util.wixext ^ + -dIcedTeaWebDir="!ICEDTEAWEB_DIR!" ^ + -dOutputBaseFilename="!OUTPUT_BASE_FILENAME!" ^ + -dProductSku="!PRODUCT_SKU!" ^ + -dProductMajorVersion="!PRODUCT_MAJOR_VERSION!" ^ + -dProductMinorVersion="!PRODUCT_MINOR_VERSION!" ^ + -dProductVersionString="!PRODUCT_SHORT_VERSION!" ^ + -dMSIProductVersion="!MSI_PRODUCT_VERSION!" ^ + -dProductId="!PRODUCT_ID!" ^ + -dProductUpgradeCode="!PRODUCT_UPGRADE_CODE!" ^ + -dReproDir="!REPRO_DIR!" ^ + -dSetupResourcesDir="!SETUP_RESOURCES_DIR!" ^ + -dCulture="!CULTURE!" ^ + -dJVM="!PACKAGE_TYPE!" ^ + -cc !CACHE_FOLDER! ^ + -loc "%WORKDIR%!OUTPUT_BASE_FILENAME!-!PRODUCT_SKU!.Base.!CULTURE!.wxl" ^ + -loc "%WORKDIR%!OUTPUT_BASE_FILENAME!-!PRODUCT_SKU!.!PACKAGE_TYPE!.!CULTURE!.wxl" ^ + -out "ReleaseDir\!OUTPUT_BASE_FILENAME!.msi" IF ERRORLEVEL 1 ( ECHO Failed to preprocesses and compiles WiX source files into object files ^(.wixobj^) dir /s /b /o:n %WORKDIR% @@ -251,14 +305,21 @@ FOR %%A IN (%ARCH%) DO ( @ECHO OFF ECHO LIGHT - @ECHO ON - "!WIX!bin\light.exe" %WORKDIR%!OUTPUT_BASE_FILENAME!-Main.wixobj %WORKDIR%!OUTPUT_BASE_FILENAME!-Files.wixobj !ITW_WIXOBJ! !MSI_VALIDATION_OPTION! -cc !CACHE_FOLDER! -ext WixToolset.UI.wixext -ext WixToolset.Util.wixext -spdb -out "ReleaseDir\!OUTPUT_BASE_FILENAME!.msi" -loc "%WORKDIR%!OUTPUT_BASE_FILENAME!-!PRODUCT_SKU!.Base.!CULTURE!.wxl" -loc "%WORKDIR%!OUTPUT_BASE_FILENAME!-!PRODUCT_SKU!.!PACKAGE_TYPE!.!CULTURE!.wxl" -cultures:!CULTURE! - IF ERRORLEVEL 1 ( - ECHO Failed to links and binds one or more .wixobj files and creates a Windows Installer database ^(.msi or .msm^) - dir /s /b /o:n - GOTO FAILED - ) - @ECHO OFF + @REM @ECHO ON + @REM "!WIX!bin\light.exe" ^ + @REM %WORKDIR%!OUTPUT_BASE_FILENAME!-Main.wixobj %WORKDIR%!OUTPUT_BASE_FILENAME!-Files.wixobj !ITW_WIXOBJ! !MSI_VALIDATION_OPTION! ^ + @REM -cc !CACHE_FOLDER! + @REM -ext WixToolset.UI.wixext + @REM -ext WixToolset.Util.wixext + @REM -spdb + @REM -out "ReleaseDir\!OUTPUT_BASE_FILENAME!.msi" + @REM -cultures:!CULTURE! + @REM IF ERRORLEVEL 1 ( + @REM ECHO Failed to links and binds one or more .wixobj files and creates a Windows Installer database ^(.msi or .msm^) + @REM dir /s /b /o:n + @REM GOTO FAILED + @REM ) + @REM @ECHO OFF REM Clean up variables SET ICEDTEAWEB_DIR= @@ -285,7 +346,7 @@ FOR %%A IN (%ARCH%) DO ( IF NOT "%SKIP_MSI_VALIDATION%" == "true" ( ECHO SMOKE @ECHO ON - "!WIX!bin\smoke.exe" "ReleaseDir\!OUTPUT_BASE_FILENAME!.msi" + wix msi validate "ReleaseDir\!OUTPUT_BASE_FILENAME!.msi" IF ERRORLEVEL 1 ( ECHO Failed to validate MSI GOTO FAILED From b0d976b9ceb8aa99795100e84c2745df595275db Mon Sep 17 00:00:00 2001 From: JoshMJ Date: Wed, 3 Apr 2024 12:26:06 -0700 Subject: [PATCH 07/66] No attempting to use wix_heat_directory --- wix/Build.OpenJDK_generic.cmd | 64 ++--------------------------------- 1 file changed, 3 insertions(+), 61 deletions(-) diff --git a/wix/Build.OpenJDK_generic.cmd b/wix/Build.OpenJDK_generic.cmd index aee8489ab..f6a6bd101 100644 --- a/wix/Build.OpenJDK_generic.cmd +++ b/wix/Build.OpenJDK_generic.cmd @@ -246,57 +246,16 @@ FOR %%A IN (%ARCH%) DO ( ECHO HEAT @ECHO ON - "C:\Program Files\PackageManagement\NuGet\Packages\WixToolset.Heat.4.0.4\tools\net472\x64\heat.exe" dir "!REPRO_DIR!" ^ - -out %WORKDIR%!OUTPUT_BASE_FILENAME!-Files.wxs ^ - -gg ^ - -sfrag ^ - -scom ^ - -sreg ^ - -srd ^ - -ke ^ - -cg "AppFiles" ^ - -var var.ProductMajorVersion ^ - -var var.ProductMinorVersion ^ - -var var.ProductVersionString ^ - -var var.MSIProductVersion ^ - -var var.ReproDir ^ - -dr INSTALLDIR ^ - -platform !PLATFORM! + "!WIX_HEAT_DIR!\WixToolset.Heat.4.0.4\tools\net472\x64\heat.exe" dir "!REPRO_DIR!" -out %WORKDIR%!OUTPUT_BASE_FILENAME!-Files.wxs -gg -scom -sreg -srd -ke -cg "AppFiles" -var var.ProductMajorVersion -var var.ProductMinorVersion -var var.ProductVersionString -var var.MSIProductVersion -var var.ReproDir -dr INSTALLDIR -platform !PLATFORM! IF ERRORLEVEL 1 ( ECHO Failed to generating Windows Installer XML Source files ^(.wxs^) GOTO FAILED ) @ECHO OFF - ECHO CANDLE + ECHO BUILD @ECHO ON - @REM -out %WORKDIR% ^ - @REM -spdb ^ - @REM !MSI_VALIDATION_OPTION! ^ @REM this was `-sval` - wix build ^ - -arch !PLATFORM! ^ - %WORKDIR%!OUTPUT_BASE_FILENAME!-Main.wxs ^ - %WORKDIR%!OUTPUT_BASE_FILENAME!-Files.wxs ^ - !ITW_WXS! ^ - -ext WixToolset.UI.wixext ^ - -ext WixToolset.Util.wixext ^ - -dIcedTeaWebDir="!ICEDTEAWEB_DIR!" ^ - -dOutputBaseFilename="!OUTPUT_BASE_FILENAME!" ^ - -dProductSku="!PRODUCT_SKU!" ^ - -dProductMajorVersion="!PRODUCT_MAJOR_VERSION!" ^ - -dProductMinorVersion="!PRODUCT_MINOR_VERSION!" ^ - -dProductVersionString="!PRODUCT_SHORT_VERSION!" ^ - -dMSIProductVersion="!MSI_PRODUCT_VERSION!" ^ - -dProductId="!PRODUCT_ID!" ^ - -dProductUpgradeCode="!PRODUCT_UPGRADE_CODE!" ^ - -dReproDir="!REPRO_DIR!" ^ - -dSetupResourcesDir="!SETUP_RESOURCES_DIR!" ^ - -dCulture="!CULTURE!" ^ - -dJVM="!PACKAGE_TYPE!" ^ - -cc !CACHE_FOLDER! ^ - -loc "%WORKDIR%!OUTPUT_BASE_FILENAME!-!PRODUCT_SKU!.Base.!CULTURE!.wxl" ^ - -loc "%WORKDIR%!OUTPUT_BASE_FILENAME!-!PRODUCT_SKU!.!PACKAGE_TYPE!.!CULTURE!.wxl" ^ - -out "ReleaseDir\!OUTPUT_BASE_FILENAME!.msi" + wix build -arch !PLATFORM! %WORKDIR%!OUTPUT_BASE_FILENAME!-Main.wxs %WORKDIR%!OUTPUT_BASE_FILENAME!-Files.wxs -ext WixToolset.UI.wixext -ext WixToolset.Util.wixext -d IcedTeaWebDir="!ICEDTEAWEB_DIR!" -d OutputBaseFilename="!OUTPUT_BASE_FILENAME!" -d ProductSku="!PRODUCT_SKU!" -d ProductMajorVersion="!PRODUCT_MAJOR_VERSION!" -d ProductMinorVersion="!PRODUCT_MINOR_VERSION!" -d ProductVersionString="!PRODUCT_SHORT_VERSION!" -d MSIProductVersion="!MSI_PRODUCT_VERSION!" -d ProductId="!PRODUCT_ID!" -d ProductUpgradeCode="!PRODUCT_UPGRADE_CODE!" -d ReproDir="!REPRO_DIR!" -d SetupResourcesDir="!SETUP_RESOURCES_DIR!" -d Culture="!CULTURE!" -d JVM="!PACKAGE_TYPE!" -cc !CACHE_FOLDER! -loc "%WORKDIR%!OUTPUT_BASE_FILENAME!-!PRODUCT_SKU!.Base.!CULTURE!.wxl" -loc "%WORKDIR%!OUTPUT_BASE_FILENAME!-!PRODUCT_SKU!.!PACKAGE_TYPE!.!CULTURE!.wxl" -out "ReleaseDir\!OUTPUT_BASE_FILENAME!.msi" IF ERRORLEVEL 1 ( ECHO Failed to preprocesses and compiles WiX source files into object files ^(.wixobj^) dir /s /b /o:n %WORKDIR% @@ -304,23 +263,6 @@ FOR %%A IN (%ARCH%) DO ( ) @ECHO OFF - ECHO LIGHT - @REM @ECHO ON - @REM "!WIX!bin\light.exe" ^ - @REM %WORKDIR%!OUTPUT_BASE_FILENAME!-Main.wixobj %WORKDIR%!OUTPUT_BASE_FILENAME!-Files.wixobj !ITW_WIXOBJ! !MSI_VALIDATION_OPTION! ^ - @REM -cc !CACHE_FOLDER! - @REM -ext WixToolset.UI.wixext - @REM -ext WixToolset.Util.wixext - @REM -spdb - @REM -out "ReleaseDir\!OUTPUT_BASE_FILENAME!.msi" - @REM -cultures:!CULTURE! - @REM IF ERRORLEVEL 1 ( - @REM ECHO Failed to links and binds one or more .wixobj files and creates a Windows Installer database ^(.msi or .msm^) - @REM dir /s /b /o:n - @REM GOTO FAILED - @REM ) - @REM @ECHO OFF - REM Clean up variables SET ICEDTEAWEB_DIR= SET BUNDLE_ICEDTEAWEB= From 93cde4dc67cd0ea7169a3b674c931b6c7062abe6 Mon Sep 17 00:00:00 2001 From: JoshMJ Date: Wed, 3 Apr 2024 16:23:33 -0700 Subject: [PATCH 08/66] Now using wix 4.0.5 --- .github/workflows/wix.yml | 8 ++++- wix/Build.OpenJDK_generic.cmd | 2 +- .../CreateSourceFolder.AdoptOpenJDK.ps1 | 34 +++++++++++++++++-- 3 files changed, 39 insertions(+), 5 deletions(-) diff --git a/.github/workflows/wix.yml b/.github/workflows/wix.yml index 4acd50c63..d99850471 100644 --- a/.github/workflows/wix.yml +++ b/.github/workflows/wix.yml @@ -24,6 +24,7 @@ jobs: TAG: jdk8u362-b09 SUB_TAG: 8u362b09 JVM: hotspot + WIX_VERSION: 4.0.5 - jdk: 11 ICEDTEA_WEB_VERSION: "" PRODUCT_MAJOR_VERSION: 11 @@ -36,6 +37,7 @@ jobs: TAG: jdk-11.0.18+10 SUB_TAG: 11.0.18_10 JVM: hotspot + WIX_VERSION: 4.0.5 - jdk: 17 ICEDTEA_WEB_VERSION: "" PRODUCT_MAJOR_VERSION: 17 @@ -48,6 +50,7 @@ jobs: TAG: jdk-17.0.6+10 SUB_TAG: 17.0.6_10 JVM: hotspot + WIX_VERSION: 4.0.5 name: wix runs-on: windows-latest @@ -57,6 +60,7 @@ jobs: - name: Install dependencies run: | choco install --no-progress wget + dotnet tool install --global wix --version ${{ matrix.WIX_VERSION }} - name: Setup environment variables uses: allenevans/set-env@0f3306034af0ea21dd28983b6e7c1614ee317739 # v3.0.0 @@ -69,6 +73,7 @@ jobs: MSI_PRODUCT_VERSION: ${{ matrix.MSI_PRODUCT_VERSION }} ARCH: ${{ matrix.ARCH }} JVM: ${{ matrix.JVM }} + WIX_VERSION: ${{ matrix.WIX_VERSION }} - name: Download IcedTea-Web run: | @@ -84,7 +89,8 @@ jobs: cd wix\SourceDir wget -q "https://github.com/adoptium/temurin${{ env.PRODUCT_MAJOR_VERSION }}-binaries/releases/download/${{ matrix.TAG }}/OpenJDK${{ env.PRODUCT_MAJOR_VERSION }}U-jdk_${{ env.ARCH }}_windows_${{ env.JVM }}_${{ matrix.SUB_TAG }}.zip" wget -q "https://github.com/adoptium/temurin${{ env.PRODUCT_MAJOR_VERSION }}-binaries/releases/download/${{ matrix.TAG }}/OpenJDK${{ env.PRODUCT_MAJOR_VERSION }}U-jre_${{ env.ARCH }}_windows_${{ env.JVM }}_${{ matrix.SUB_TAG }}.zip" - ./CreateSourceFolder.AdoptOpenJDK.ps1 + ./CreateSourceFolder.AdoptOpenJDK.ps1 -wix_version ${{ env.WIX_VERSION }} + echo "WIX_HEAT_PATH=$env:WIX_HEAT_PATH" >> $env:GITHUB_ENV - name: Create JDK Installer run: | diff --git a/wix/Build.OpenJDK_generic.cmd b/wix/Build.OpenJDK_generic.cmd index f6a6bd101..7d0de4702 100644 --- a/wix/Build.OpenJDK_generic.cmd +++ b/wix/Build.OpenJDK_generic.cmd @@ -246,7 +246,7 @@ FOR %%A IN (%ARCH%) DO ( ECHO HEAT @ECHO ON - "!WIX_HEAT_DIR!\WixToolset.Heat.4.0.4\tools\net472\x64\heat.exe" dir "!REPRO_DIR!" -out %WORKDIR%!OUTPUT_BASE_FILENAME!-Files.wxs -gg -scom -sreg -srd -ke -cg "AppFiles" -var var.ProductMajorVersion -var var.ProductMinorVersion -var var.ProductVersionString -var var.MSIProductVersion -var var.ReproDir -dr INSTALLDIR -platform !PLATFORM! + !WIX_HEAT_PATH! dir "!REPRO_DIR!" -out %WORKDIR%!OUTPUT_BASE_FILENAME!-Files.wxs -gg -scom -sreg -srd -ke -cg "AppFiles" -var var.ProductMajorVersion -var var.ProductMinorVersion -var var.ProductVersionString -var var.MSIProductVersion -var var.ReproDir -dr INSTALLDIR -platform !PLATFORM! IF ERRORLEVEL 1 ( ECHO Failed to generating Windows Installer XML Source files ^(.wxs^) GOTO FAILED diff --git a/wix/SourceDir/CreateSourceFolder.AdoptOpenJDK.ps1 b/wix/SourceDir/CreateSourceFolder.AdoptOpenJDK.ps1 index 1da044277..35ebb6da2 100644 --- a/wix/SourceDir/CreateSourceFolder.AdoptOpenJDK.ps1 +++ b/wix/SourceDir/CreateSourceFolder.AdoptOpenJDK.ps1 @@ -9,14 +9,18 @@ .PARAMETER openjdk_filename_regex A regular expression that matches the OpenJDK filename. Default is ^OpenJDK(?\d*). +.PARAMETER platform_regex + A regular expression that matches the platform. Default is (?x86-32|x64|aarch64). + .PARAMETER jvm_regex A regular expression that matches the JVM. Default is (?hotspot|openj9|dragonwell). .PARAMETER jvm The JVM to be used. If not provided, the script will attempt to extract the JVM from the filename. -.PARAMETER platform_regex - A regular expression that matches the platform. Default is (?x86-32|x64|aarch64). +.PARAMETER wix_version + The version wix that is currently installed. + Used to determine WixToolset.Heat version to be installed. Default is 4.0.5. .NOTES File Name: CreateSourceFolder.AdoptOpenJDK.ps1 @@ -37,7 +41,9 @@ param ( [Parameter(Mandatory = $false)] [string]$jvm_regex = "(?hotspot|openj9|dragonwell)", [Parameter(Mandatory = $false)] - [string]$jvm = "" + [string]$jvm = "", + [Parameter(Mandatory = $false)] + [string]$wix_version = "4.0.5" ) Get-ChildItem -Path .\ -Filter *.zip -File -Name| ForEach-Object { @@ -106,3 +112,25 @@ Get-ChildItem -Path .\ -Filter *.zip -File -Name| ForEach-Object { Move-Item -Path $_.FullName -Destination $Destination -Force } } + +# Install wixtoolset.heat.4.0.5 +Write-Host "Installing WixToolset.Heat version $wix_version" +mkdir wix_extension +$sourceURI = 'https://www.nuget.org/api/v2/package/WixToolset.Heat/' + $wix_version +$outFile = '.\wix_extension\wixtoolset.heat.' + $wix_version + '.zip' +Invoke-WebRequest -Uri $sourceURI -OutFile $outFile +Expand-Archive -Path "$outFile" -DestinationPath ./wix_extension/ + +# Determine the architecture of the operating system +if ([Environment]::Is64BitOperatingSystem) { + Write-Output "x64 operating system" + $current_arch = "x64" +} +else { + Write-Output "x86 operating system" + $current_arch = "x86" +} + +# Set the path to heat.exe for later use +$env:WIX_HEAT_PATH = (Get-ChildItem -Path .\wix_extension -Recurse -Filter "heat.exe").FullName | Select-String -Pattern "$current_arch" +Write-Host "wixtoolset.heat.exe path saved at location $env:WIX_HEAT_PATH" \ No newline at end of file From 3ba44b5518d0c0334326a58e078521d32d7e0c15 Mon Sep 17 00:00:00 2001 From: JoshMJ Date: Thu, 4 Apr 2024 11:11:01 -0700 Subject: [PATCH 09/66] Now placing heat.exe in Resources dir --- wix/Build.OpenJDK_generic.cmd | 1 + wix/SourceDir/CreateSourceFolder.AdoptOpenJDK.ps1 | 13 ++++++++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/wix/Build.OpenJDK_generic.cmd b/wix/Build.OpenJDK_generic.cmd index 7d0de4702..809e22b3d 100644 --- a/wix/Build.OpenJDK_generic.cmd +++ b/wix/Build.OpenJDK_generic.cmd @@ -35,6 +35,7 @@ IF NOT DEFINED VENDOR_BRANDING_DIALOG SET VENDOR_BRANDING_DIALOG=$(var.SetupReso IF NOT DEFINED PRODUCT_HELP_LINK SET PRODUCT_HELP_LINK=https://github.com/adoptium/adoptium-support/issues/new/choose IF NOT DEFINED PRODUCT_SUPPORT_LINK SET PRODUCT_SUPPORT_LINK=https://adoptium.net/support IF NOT DEFINED PRODUCT_UPDATE_INFO_LINK SET PRODUCT_UPDATE_INFO_LINK=https://adoptium.net/temurin/releases +IF NOT DEFINED WIX_HEAT_PATH SET WIX_HEAT_PATH=$(var.SetupResourcesDir)\heat.exe powershell -ExecutionPolicy Bypass -File "%~dp0\helpers\Validate-Input.ps1" ^ -toValidate '%ARCH%' ^ diff --git a/wix/SourceDir/CreateSourceFolder.AdoptOpenJDK.ps1 b/wix/SourceDir/CreateSourceFolder.AdoptOpenJDK.ps1 index 35ebb6da2..032bf1acf 100644 --- a/wix/SourceDir/CreateSourceFolder.AdoptOpenJDK.ps1 +++ b/wix/SourceDir/CreateSourceFolder.AdoptOpenJDK.ps1 @@ -131,6 +131,13 @@ else { $current_arch = "x86" } -# Set the path to heat.exe for later use -$env:WIX_HEAT_PATH = (Get-ChildItem -Path .\wix_extension -Recurse -Filter "heat.exe").FullName | Select-String -Pattern "$current_arch" -Write-Host "wixtoolset.heat.exe path saved at location $env:WIX_HEAT_PATH" \ No newline at end of file +# Copy heat.exe to expected location in Resources Dir +$ORIG_WIX_HEAT_PATH = (Get-ChildItem -Path .\wix_extension -Recurse -Filter "heat.exe").FullName | Select-String -Pattern "$current_arch" +Copy-Item -Path $ORIG_WIX_HEAT_PATH -Destination ..\Resources\heat.exe -Force + +# Report the path to heat.exe +$env:WIX_HEAT_PATH="$PWD/../Resources/heat.exe" +Write-Host "wixtoolset.heat.exe path saved at location $env:WIX_HEAT_PATH" + +# Cleanup +Remove-Item -Path .\wix_extension -Recurse -Force \ No newline at end of file From f678094595090c5a3e451228088411c3d95c9648 Mon Sep 17 00:00:00 2001 From: JoshMJ Date: Thu, 4 Apr 2024 12:35:22 -0700 Subject: [PATCH 10/66] updated default heat path and error messages --- wix/Build.OpenJDK_generic.cmd | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/wix/Build.OpenJDK_generic.cmd b/wix/Build.OpenJDK_generic.cmd index 809e22b3d..3cfa3a53b 100644 --- a/wix/Build.OpenJDK_generic.cmd +++ b/wix/Build.OpenJDK_generic.cmd @@ -35,7 +35,7 @@ IF NOT DEFINED VENDOR_BRANDING_DIALOG SET VENDOR_BRANDING_DIALOG=$(var.SetupReso IF NOT DEFINED PRODUCT_HELP_LINK SET PRODUCT_HELP_LINK=https://github.com/adoptium/adoptium-support/issues/new/choose IF NOT DEFINED PRODUCT_SUPPORT_LINK SET PRODUCT_SUPPORT_LINK=https://adoptium.net/support IF NOT DEFINED PRODUCT_UPDATE_INFO_LINK SET PRODUCT_UPDATE_INFO_LINK=https://adoptium.net/temurin/releases -IF NOT DEFINED WIX_HEAT_PATH SET WIX_HEAT_PATH=$(var.SetupResourcesDir)\heat.exe +IF NOT DEFINED WIX_HEAT_PATH SET WIX_HEAT_PATH=.\Resources\heat.exe powershell -ExecutionPolicy Bypass -File "%~dp0\helpers\Validate-Input.ps1" ^ -toValidate '%ARCH%' ^ @@ -236,7 +236,7 @@ FOR %%A IN (%ARCH%) DO ( -dr INSTALLDIR ^ -platform !PLATFORM! IF ERRORLEVEL 1 ( - ECHO "Failed to generating Windows Installer XML Source files for IcedTea-Web (.wxs)" + ECHO "Failed to generate Windows Installer XML Source files for IcedTea-Web (.wxs)" GOTO FAILED ) ) ELSE ( @@ -249,7 +249,7 @@ FOR %%A IN (%ARCH%) DO ( @ECHO ON !WIX_HEAT_PATH! dir "!REPRO_DIR!" -out %WORKDIR%!OUTPUT_BASE_FILENAME!-Files.wxs -gg -scom -sreg -srd -ke -cg "AppFiles" -var var.ProductMajorVersion -var var.ProductMinorVersion -var var.ProductVersionString -var var.MSIProductVersion -var var.ReproDir -dr INSTALLDIR -platform !PLATFORM! IF ERRORLEVEL 1 ( - ECHO Failed to generating Windows Installer XML Source files ^(.wxs^) + ECHO Failed to generate Windows Installer XML Source files ^(.wxs^) GOTO FAILED ) @ECHO OFF From a818e88198b6b98979a953b9c0efbb21fe59f19a Mon Sep 17 00:00:00 2001 From: JoshMJ Date: Thu, 4 Apr 2024 13:02:46 -0700 Subject: [PATCH 11/66] Now adding wix extensions --- wix/Build.OpenJDK_generic.cmd | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/wix/Build.OpenJDK_generic.cmd b/wix/Build.OpenJDK_generic.cmd index 3cfa3a53b..a863e2ed9 100644 --- a/wix/Build.OpenJDK_generic.cmd +++ b/wix/Build.OpenJDK_generic.cmd @@ -36,6 +36,7 @@ IF NOT DEFINED PRODUCT_HELP_LINK SET PRODUCT_HELP_LINK=https://github.com/adopti IF NOT DEFINED PRODUCT_SUPPORT_LINK SET PRODUCT_SUPPORT_LINK=https://adoptium.net/support IF NOT DEFINED PRODUCT_UPDATE_INFO_LINK SET PRODUCT_UPDATE_INFO_LINK=https://adoptium.net/temurin/releases IF NOT DEFINED WIX_HEAT_PATH SET WIX_HEAT_PATH=.\Resources\heat.exe +IF NOT DEFINED WIX_VERSION SET WIX_VERSION=4.0.5 powershell -ExecutionPolicy Bypass -File "%~dp0\helpers\Validate-Input.ps1" ^ -toValidate '%ARCH%' ^ @@ -80,6 +81,10 @@ SET WIN_SDK_FULL_VERSION=10.0.17763.0 SET WORKDIR=Workdir\ mkdir %WORKDIR% +@REM Add necessary wix extensions here +wix extension add WixToolset.UI.wixext/%WIX_VERSION% +wix extension add WixToolset.Util.wixext/%WIX_VERSION% + REM REM Nothing below this line need to be changed normally. REM From eed8bf191ca7b02b3a6dfd05a51d2fe7cf0e1993 Mon Sep 17 00:00:00 2001 From: JoshMJ Date: Thu, 4 Apr 2024 13:40:46 -0700 Subject: [PATCH 12/66] Now keeping all heat tools files --- wix/SourceDir/CreateSourceFolder.AdoptOpenJDK.ps1 | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/wix/SourceDir/CreateSourceFolder.AdoptOpenJDK.ps1 b/wix/SourceDir/CreateSourceFolder.AdoptOpenJDK.ps1 index 032bf1acf..7e6b9a783 100644 --- a/wix/SourceDir/CreateSourceFolder.AdoptOpenJDK.ps1 +++ b/wix/SourceDir/CreateSourceFolder.AdoptOpenJDK.ps1 @@ -132,11 +132,12 @@ else { } # Copy heat.exe to expected location in Resources Dir -$ORIG_WIX_HEAT_PATH = (Get-ChildItem -Path .\wix_extension -Recurse -Filter "heat.exe").FullName | Select-String -Pattern "$current_arch" -Copy-Item -Path $ORIG_WIX_HEAT_PATH -Destination ..\Resources\heat.exe -Force +$ORIG_WIX_HEAT_DIR = (Get-ChildItem -Path .\wix_extension -Recurse -Filter "$current_arch").FullName +Copy-Item -Path $ORIG_WIX_HEAT_DIR -Destination ..\Resources -Force -Recurse +Rename-Item -Path "..\Resources\$current_arch" -NewName heat_dir # Report the path to heat.exe -$env:WIX_HEAT_PATH="$PWD/../Resources/heat.exe" +$env:WIX_HEAT_PATH = "$PWD/../Resources/heat_dir/heat.exe" Write-Host "wixtoolset.heat.exe path saved at location $env:WIX_HEAT_PATH" # Cleanup From 64c1c3b450fe122fd8894c7c039e5b9a9e7bf04b Mon Sep 17 00:00:00 2001 From: JoshMJ Date: Thu, 4 Apr 2024 13:42:31 -0700 Subject: [PATCH 13/66] updated default heat path, fixed error message --- wix/Build.OpenJDK_generic.cmd | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/wix/Build.OpenJDK_generic.cmd b/wix/Build.OpenJDK_generic.cmd index a863e2ed9..be4ba0387 100644 --- a/wix/Build.OpenJDK_generic.cmd +++ b/wix/Build.OpenJDK_generic.cmd @@ -35,7 +35,7 @@ IF NOT DEFINED VENDOR_BRANDING_DIALOG SET VENDOR_BRANDING_DIALOG=$(var.SetupReso IF NOT DEFINED PRODUCT_HELP_LINK SET PRODUCT_HELP_LINK=https://github.com/adoptium/adoptium-support/issues/new/choose IF NOT DEFINED PRODUCT_SUPPORT_LINK SET PRODUCT_SUPPORT_LINK=https://adoptium.net/support IF NOT DEFINED PRODUCT_UPDATE_INFO_LINK SET PRODUCT_UPDATE_INFO_LINK=https://adoptium.net/temurin/releases -IF NOT DEFINED WIX_HEAT_PATH SET WIX_HEAT_PATH=.\Resources\heat.exe +IF NOT DEFINED WIX_HEAT_PATH SET WIX_HEAT_PATH=.\Resources\heat_dir\heat.exe IF NOT DEFINED WIX_VERSION SET WIX_VERSION=4.0.5 powershell -ExecutionPolicy Bypass -File "%~dp0\helpers\Validate-Input.ps1" ^ @@ -227,7 +227,7 @@ FOR %%A IN (%ARCH%) DO ( SET ITW_WXS="IcedTeaWeb-!OUTPUT_BASE_FILENAME!.wxs" SET ITW_WIXOBJ=%WORKDIR%IcedTeaWeb-!OUTPUT_BASE_FILENAME!.wixobj ECHO HEAT - "C:\Program Files\PackageManagement\NuGet\Packages\WixToolset.Heat.4.0.4\tools\net472\x64\heat.exe" dir "!ICEDTEAWEB_DIR!" ^ + !WIX_HEAT_PATH! dir "!ICEDTEAWEB_DIR!" ^ -out !ITW_WXS! ^ -t "!SETUP_RESOURCES_DIR!\heat.icedteaweb.xslt" ^ -gg ^ @@ -263,7 +263,7 @@ FOR %%A IN (%ARCH%) DO ( @ECHO ON wix build -arch !PLATFORM! %WORKDIR%!OUTPUT_BASE_FILENAME!-Main.wxs %WORKDIR%!OUTPUT_BASE_FILENAME!-Files.wxs -ext WixToolset.UI.wixext -ext WixToolset.Util.wixext -d IcedTeaWebDir="!ICEDTEAWEB_DIR!" -d OutputBaseFilename="!OUTPUT_BASE_FILENAME!" -d ProductSku="!PRODUCT_SKU!" -d ProductMajorVersion="!PRODUCT_MAJOR_VERSION!" -d ProductMinorVersion="!PRODUCT_MINOR_VERSION!" -d ProductVersionString="!PRODUCT_SHORT_VERSION!" -d MSIProductVersion="!MSI_PRODUCT_VERSION!" -d ProductId="!PRODUCT_ID!" -d ProductUpgradeCode="!PRODUCT_UPGRADE_CODE!" -d ReproDir="!REPRO_DIR!" -d SetupResourcesDir="!SETUP_RESOURCES_DIR!" -d Culture="!CULTURE!" -d JVM="!PACKAGE_TYPE!" -cc !CACHE_FOLDER! -loc "%WORKDIR%!OUTPUT_BASE_FILENAME!-!PRODUCT_SKU!.Base.!CULTURE!.wxl" -loc "%WORKDIR%!OUTPUT_BASE_FILENAME!-!PRODUCT_SKU!.!PACKAGE_TYPE!.!CULTURE!.wxl" -out "ReleaseDir\!OUTPUT_BASE_FILENAME!.msi" IF ERRORLEVEL 1 ( - ECHO Failed to preprocesses and compiles WiX source files into object files ^(.wixobj^) + ECHO Failed to preprocesses and compile WiX source files into object files ^(.wixobj^) dir /s /b /o:n %WORKDIR% GOTO FAILED ) From f35ec13d4123c33ab94fe6d1bd3dbe3f40f4b2a2 Mon Sep 17 00:00:00 2001 From: JoshMJ Date: Thu, 4 Apr 2024 14:06:38 -0700 Subject: [PATCH 14/66] Removed 'ALLUSERS' property from Main.wxs.template; causing 'duplicate sybol' issue --- wix/Main.wxs.template | 1 - 1 file changed, 1 deletion(-) diff --git a/wix/Main.wxs.template b/wix/Main.wxs.template index fc4d76949..d30ff2fd1 100644 --- a/wix/Main.wxs.template +++ b/wix/Main.wxs.template @@ -7,7 +7,6 @@ - From 3e50487a8240d75b1b23593f6ed0dcfaf85758ba Mon Sep 17 00:00:00 2001 From: JoshMJ Date: Thu, 4 Apr 2024 14:08:38 -0700 Subject: [PATCH 15/66] Changed ID ALLUSERS to ALLUSERSSETUP --- wix/Main.wxs.template | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/wix/Main.wxs.template b/wix/Main.wxs.template index d30ff2fd1..98d36b8d8 100644 --- a/wix/Main.wxs.template +++ b/wix/Main.wxs.template @@ -7,6 +7,7 @@ + @@ -52,8 +53,8 @@ - - + + @@ -68,12 +69,12 @@ - + - + @@ -81,12 +82,12 @@ - + - + From 3ff5cd580b67442d843fcde388c03fc63c5f7acd Mon Sep 17 00:00:00 2001 From: JoshMJ Date: Thu, 4 Apr 2024 15:08:13 -0700 Subject: [PATCH 16/66] Updated culture translation --- wix/Build.OpenJDK_generic.cmd | 4 ++-- wix/BuildSetupTranslationTransform.cmd | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/wix/Build.OpenJDK_generic.cmd b/wix/Build.OpenJDK_generic.cmd index be4ba0387..7f43524d2 100644 --- a/wix/Build.OpenJDK_generic.cmd +++ b/wix/Build.OpenJDK_generic.cmd @@ -261,9 +261,9 @@ FOR %%A IN (%ARCH%) DO ( ECHO BUILD @ECHO ON - wix build -arch !PLATFORM! %WORKDIR%!OUTPUT_BASE_FILENAME!-Main.wxs %WORKDIR%!OUTPUT_BASE_FILENAME!-Files.wxs -ext WixToolset.UI.wixext -ext WixToolset.Util.wixext -d IcedTeaWebDir="!ICEDTEAWEB_DIR!" -d OutputBaseFilename="!OUTPUT_BASE_FILENAME!" -d ProductSku="!PRODUCT_SKU!" -d ProductMajorVersion="!PRODUCT_MAJOR_VERSION!" -d ProductMinorVersion="!PRODUCT_MINOR_VERSION!" -d ProductVersionString="!PRODUCT_SHORT_VERSION!" -d MSIProductVersion="!MSI_PRODUCT_VERSION!" -d ProductId="!PRODUCT_ID!" -d ProductUpgradeCode="!PRODUCT_UPGRADE_CODE!" -d ReproDir="!REPRO_DIR!" -d SetupResourcesDir="!SETUP_RESOURCES_DIR!" -d Culture="!CULTURE!" -d JVM="!PACKAGE_TYPE!" -cc !CACHE_FOLDER! -loc "%WORKDIR%!OUTPUT_BASE_FILENAME!-!PRODUCT_SKU!.Base.!CULTURE!.wxl" -loc "%WORKDIR%!OUTPUT_BASE_FILENAME!-!PRODUCT_SKU!.!PACKAGE_TYPE!.!CULTURE!.wxl" -out "ReleaseDir\!OUTPUT_BASE_FILENAME!.msi" + wix build -arch !PLATFORM! %WORKDIR%!OUTPUT_BASE_FILENAME!-Main.wxs %WORKDIR%!OUTPUT_BASE_FILENAME!-Files.wxs -ext WixToolset.UI.wixext -ext WixToolset.Util.wixext -d IcedTeaWebDir="!ICEDTEAWEB_DIR!" -d OutputBaseFilename="!OUTPUT_BASE_FILENAME!" -d ProductSku="!PRODUCT_SKU!" -d ProductMajorVersion="!PRODUCT_MAJOR_VERSION!" -d ProductMinorVersion="!PRODUCT_MINOR_VERSION!" -d ProductVersionString="!PRODUCT_SHORT_VERSION!" -d MSIProductVersion="!MSI_PRODUCT_VERSION!" -d ProductId="!PRODUCT_ID!" -d ProductUpgradeCode="!PRODUCT_UPGRADE_CODE!" -d ReproDir="!REPRO_DIR!" -d SetupResourcesDir="!SETUP_RESOURCES_DIR!" -d Culture="!CULTURE!" -d JVM="!PACKAGE_TYPE!" -cc !CACHE_FOLDER! -loc "%WORKDIR%!OUTPUT_BASE_FILENAME!-!PRODUCT_SKU!.Base.!CULTURE!.wxl" -loc "%WORKDIR%!OUTPUT_BASE_FILENAME!-!PRODUCT_SKU!.!PACKAGE_TYPE!.!CULTURE!.wxl" -out "ReleaseDir\!OUTPUT_BASE_FILENAME!.msi" -culture !CULTURE! -pdbtype none IF ERRORLEVEL 1 ( - ECHO Failed to preprocesses and compile WiX source files into object files ^(.wixobj^) + ECHO Failed to process and compile Windows Installer XML Source files ^(.wxs^) into installer ^(.msi^) dir /s /b /o:n %WORKDIR% GOTO FAILED ) diff --git a/wix/BuildSetupTranslationTransform.cmd b/wix/BuildSetupTranslationTransform.cmd index ba5de6c98..5811d566f 100644 --- a/wix/BuildSetupTranslationTransform.cmd +++ b/wix/BuildSetupTranslationTransform.cmd @@ -16,9 +16,9 @@ REM Build with extra Source Code feature (needs work) REM IF EXIST Files-!OUTPUT_BASE_FILENAME!.wixobj "%WIX%bin\light.exe" !MSI_VALIDATION_OPTION! Main-!OUTPUT_BASE_FILENAME!.wixobj Files-!OUTPUT_BASE_FILENAME!.wixobj Src-!OUTPUT_BASE_FILENAME!.wixobj !ITW_WIXOBJ! -cc !CACHE_FOLDER! -reusecab -ext WixToolset.UI.wixext -ext WixToolset.Util.wixext -spdb -out "ReleaseDir\!OUTPUT_BASE_FILENAME!.!CULTURE!.msi" -loc "Lang\%PRODUCT_SKU%.Base.!CULTURE!.wxl" -loc "Lang\%PRODUCT_SKU%.!PACKAGE_TYPE!.!CULTURE!.wxl" -cultures:!CULTURE! REM Build without extra Source Code feature -IF EXIST Workdir\!OUTPUT_BASE_FILENAME!-Files.wixobj "%WIX%bin\light.exe" !MSI_VALIDATION_OPTION! Workdir\!OUTPUT_BASE_FILENAME!-Main.wixobj Workdir\!OUTPUT_BASE_FILENAME!-Files.wixobj !ITW_WIXOBJ! -cc !CACHE_FOLDER! -reusecab -ext WixToolset.UI.wixext -ext WixToolset.Util.wixext -spdb -out "ReleaseDir\!OUTPUT_BASE_FILENAME!.!CULTURE!.msi" -loc "Workdir\!OUTPUT_BASE_FILENAME!-%PRODUCT_SKU%.Base.!CULTURE!.wxl" -loc "Workdir\!OUTPUT_BASE_FILENAME!-%PRODUCT_SKU%.!PACKAGE_TYPE!.!CULTURE!.wxl" -cultures:!CULTURE! +wix build -arch !PLATFORM! %WORKDIR%!OUTPUT_BASE_FILENAME!-Main.wxs %WORKDIR%!OUTPUT_BASE_FILENAME!-Files.wxs -ext WixToolset.UI.wixext -ext WixToolset.Util.wixext -d IcedTeaWebDir="!ICEDTEAWEB_DIR!" -d OutputBaseFilename="!OUTPUT_BASE_FILENAME!" -d ProductSku="!PRODUCT_SKU!" -d ProductMajorVersion="!PRODUCT_MAJOR_VERSION!" -d ProductMinorVersion="!PRODUCT_MINOR_VERSION!" -d ProductVersionString="!PRODUCT_SHORT_VERSION!" -d MSIProductVersion="!MSI_PRODUCT_VERSION!" -d ProductId="!PRODUCT_ID!" -d ProductUpgradeCode="!PRODUCT_UPGRADE_CODE!" -d ReproDir="!REPRO_DIR!" -d SetupResourcesDir="!SETUP_RESOURCES_DIR!" -d Culture="!CULTURE!" -d JVM="!PACKAGE_TYPE!" -cc !CACHE_FOLDER! -loc "%WORKDIR%!OUTPUT_BASE_FILENAME!-!PRODUCT_SKU!.Base.!CULTURE!.wxl" -loc "%WORKDIR%!OUTPUT_BASE_FILENAME!-!PRODUCT_SKU!.!PACKAGE_TYPE!.!CULTURE!.wxl" -out "ReleaseDir\!OUTPUT_BASE_FILENAME!.!CULTURE!.msi" -culture !CULTURE! -pdbtype none IF ERRORLEVEL 1 ( - ECHO light failed with : %ERRORLEVEL% + ECHO Building for culture %CULTURE% failed with errorlevel: %ERRORLEVEL% GOTO FAILED ) From 2ea3ec6f6989df900ca409437efa06b8d2001135 Mon Sep 17 00:00:00 2001 From: JoshMJ Date: Thu, 4 Apr 2024 15:38:48 -0700 Subject: [PATCH 17/66] Added + updated error messages --- wix/Build.OpenJDK_generic.cmd | 6 +++--- wix/BuildSetupTranslationTransform.cmd | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/wix/Build.OpenJDK_generic.cmd b/wix/Build.OpenJDK_generic.cmd index 7f43524d2..665a1e0a6 100644 --- a/wix/Build.OpenJDK_generic.cmd +++ b/wix/Build.OpenJDK_generic.cmd @@ -298,7 +298,9 @@ FOR %%A IN (%ARCH%) DO ( IF ERRORLEVEL 1 ( ECHO Failed to validate MSI GOTO FAILED - ) + ) ELSE ( + ECHO MSI validation passed + ) @ECHO OFF ) ELSE ( ECHO MSI validation was skipped by option SKIP_MSI_VALIDATION=true @@ -341,9 +343,7 @@ FOR %%A IN (%ARCH%) DO ( REM Remove files we do not need any longer. DEL "%WORKDIR%!OUTPUT_BASE_FILENAME!-Files.wxs" - DEL "%WORKDIR%!OUTPUT_BASE_FILENAME!-Files.wixobj" DEL "%WORKDIR%!OUTPUT_BASE_FILENAME!-Main.wxs" - DEL "%WORKDIR%!OUTPUT_BASE_FILENAME!-Main.wixobj" DEL "%WORKDIR%!OUTPUT_BASE_FILENAME!-!PRODUCT_SKU!.%JVM%.*.wxl" DEL "%WORKDIR%!OUTPUT_BASE_FILENAME!-!PRODUCT_SKU!.Base.*.wxl" DEL "%WORKDIR%!OUTPUT_BASE_FILENAME!-!PRODUCT_SKU!.Variables.wxi" diff --git a/wix/BuildSetupTranslationTransform.cmd b/wix/BuildSetupTranslationTransform.cmd index 5811d566f..680c8f79f 100644 --- a/wix/BuildSetupTranslationTransform.cmd +++ b/wix/BuildSetupTranslationTransform.cmd @@ -18,7 +18,7 @@ REM IF EXIST Files-!OUTPUT_BASE_FILENAME!.wixobj "%WIX%bin\light.exe" !MSI_VALID REM Build without extra Source Code feature wix build -arch !PLATFORM! %WORKDIR%!OUTPUT_BASE_FILENAME!-Main.wxs %WORKDIR%!OUTPUT_BASE_FILENAME!-Files.wxs -ext WixToolset.UI.wixext -ext WixToolset.Util.wixext -d IcedTeaWebDir="!ICEDTEAWEB_DIR!" -d OutputBaseFilename="!OUTPUT_BASE_FILENAME!" -d ProductSku="!PRODUCT_SKU!" -d ProductMajorVersion="!PRODUCT_MAJOR_VERSION!" -d ProductMinorVersion="!PRODUCT_MINOR_VERSION!" -d ProductVersionString="!PRODUCT_SHORT_VERSION!" -d MSIProductVersion="!MSI_PRODUCT_VERSION!" -d ProductId="!PRODUCT_ID!" -d ProductUpgradeCode="!PRODUCT_UPGRADE_CODE!" -d ReproDir="!REPRO_DIR!" -d SetupResourcesDir="!SETUP_RESOURCES_DIR!" -d Culture="!CULTURE!" -d JVM="!PACKAGE_TYPE!" -cc !CACHE_FOLDER! -loc "%WORKDIR%!OUTPUT_BASE_FILENAME!-!PRODUCT_SKU!.Base.!CULTURE!.wxl" -loc "%WORKDIR%!OUTPUT_BASE_FILENAME!-!PRODUCT_SKU!.!PACKAGE_TYPE!.!CULTURE!.wxl" -out "ReleaseDir\!OUTPUT_BASE_FILENAME!.!CULTURE!.msi" -culture !CULTURE! -pdbtype none IF ERRORLEVEL 1 ( - ECHO Building for culture %CULTURE% failed with errorlevel: %ERRORLEVEL% + ECHO Building msi for culture %CULTURE% failed with errorlevel: %ERRORLEVEL% GOTO FAILED ) From d9d4a0a1c6a3cd6ddca4947bc83a41c255020f50 Mon Sep 17 00:00:00 2001 From: JoshMJ Date: Thu, 4 Apr 2024 15:42:58 -0700 Subject: [PATCH 18/66] Updated error message --- wix/Build.OpenJDK_generic.cmd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wix/Build.OpenJDK_generic.cmd b/wix/Build.OpenJDK_generic.cmd index 665a1e0a6..178a69427 100644 --- a/wix/Build.OpenJDK_generic.cmd +++ b/wix/Build.OpenJDK_generic.cmd @@ -334,7 +334,7 @@ FOR %%A IN (%ARCH%) DO ( exit /b 1 ) ELSE ( - ECHO Ignoring signing step : not certificate configured + ECHO Ignoring signing step : no certificate configured ) :succeeded From ac2c8eaa100cb207e689a781de282edd7342fb1e Mon Sep 17 00:00:00 2001 From: JoshMJ Date: Thu, 4 Apr 2024 15:52:59 -0700 Subject: [PATCH 19/66] Updated comments and wix.yml --- .github/workflows/wix.yml | 1 - wix/SourceDir/CreateSourceFolder.AdoptOpenJDK.ps1 | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/wix.yml b/.github/workflows/wix.yml index d99850471..dd4f0f405 100644 --- a/.github/workflows/wix.yml +++ b/.github/workflows/wix.yml @@ -90,7 +90,6 @@ jobs: wget -q "https://github.com/adoptium/temurin${{ env.PRODUCT_MAJOR_VERSION }}-binaries/releases/download/${{ matrix.TAG }}/OpenJDK${{ env.PRODUCT_MAJOR_VERSION }}U-jdk_${{ env.ARCH }}_windows_${{ env.JVM }}_${{ matrix.SUB_TAG }}.zip" wget -q "https://github.com/adoptium/temurin${{ env.PRODUCT_MAJOR_VERSION }}-binaries/releases/download/${{ matrix.TAG }}/OpenJDK${{ env.PRODUCT_MAJOR_VERSION }}U-jre_${{ env.ARCH }}_windows_${{ env.JVM }}_${{ matrix.SUB_TAG }}.zip" ./CreateSourceFolder.AdoptOpenJDK.ps1 -wix_version ${{ env.WIX_VERSION }} - echo "WIX_HEAT_PATH=$env:WIX_HEAT_PATH" >> $env:GITHUB_ENV - name: Create JDK Installer run: | diff --git a/wix/SourceDir/CreateSourceFolder.AdoptOpenJDK.ps1 b/wix/SourceDir/CreateSourceFolder.AdoptOpenJDK.ps1 index 7e6b9a783..cb60ab490 100644 --- a/wix/SourceDir/CreateSourceFolder.AdoptOpenJDK.ps1 +++ b/wix/SourceDir/CreateSourceFolder.AdoptOpenJDK.ps1 @@ -113,7 +113,7 @@ Get-ChildItem -Path .\ -Filter *.zip -File -Name| ForEach-Object { } } -# Install wixtoolset.heat.4.0.5 +# Install wixtoolset.heat version $wix_version Write-Host "Installing WixToolset.Heat version $wix_version" mkdir wix_extension $sourceURI = 'https://www.nuget.org/api/v2/package/WixToolset.Heat/' + $wix_version From b138ed51d782e23c50ce964502cf4badbda81f5a Mon Sep 17 00:00:00 2001 From: JoshMJ Date: Thu, 4 Apr 2024 15:57:02 -0700 Subject: [PATCH 20/66] Deleted Build-OpenJDK.ps1 --- wix/Build-OpenJDK.ps1 | 425 ------------------------------------------ 1 file changed, 425 deletions(-) delete mode 100644 wix/Build-OpenJDK.ps1 diff --git a/wix/Build-OpenJDK.ps1 b/wix/Build-OpenJDK.ps1 deleted file mode 100644 index 644164432..000000000 --- a/wix/Build-OpenJDK.ps1 +++ /dev/null @@ -1,425 +0,0 @@ -<# - FILEPATH: /c:/dev/openjdk-installer/wix/Build-OpenJDK.ps1 - Script: Build-OpenJDK.ps1 - Description: PowerShell script to build Windows installers for the OpenJDK using the WiX Toolset - Author: Josh Martin-Jaffe - Date: Feb. 29, 2024 - - .SYNOPSIS - Build-OpenJDK.ps1 is a script used to build OpenJDK. - - .DESCRIPTION - This script is used to build OpenJDK. It takes various parameters to configure the build process. - - .PARAMETER ProductMinorVersion - The product minor version for the JDK. - - .EXAMPLE - .\Build-OpenJDK.ps1 -ProductMajorVersion "15" -ProductMinorVersion "0" -ProductMaintenanceVersion "0" -ProductPatchVersion "0" -ProductBuildNumber "1" -MSIProductVersion "15.0.0.1" -Arch "x64" -JVM "hotspot" -ProductCategory "jdk" -#> - -param ( - # Mandatory parameters - [Parameter(Mandatory = $true, HelpMessage = "Specify the major version for the JDK.")] - [string]$ProductMajorVersion, - [Parameter(Mandatory = $true, HelpMessage = "Specify the minor version for the JDK.")] - [string]$ProductMinorVersion, - [Parameter(Mandatory = $true, HelpMessage = "Specify the maintenance version for the JDK.")] - [string]$ProductMaintenanceVersion, - [Parameter(Mandatory = $true, HelpMessage = "Specify the patch version for the JDK.")] - [string]$ProductPatchVersion, - [Parameter(Mandatory = $true, HelpMessage = "Specify the build number for the JDK.")] - [string]$ProductBuildNumber, - [Parameter(Mandatory = $true, HelpMessage = "Specify the MSI product version for the JDK.")] - [string]$MSIProductVersion, - [Parameter(Mandatory = $true, HelpMessage = "Specify the architecture for the JDK. Valid values are: x64, x86-32, x86, arm64, or any combination of them separated by spaces.")] - [string]$Arch, - [Parameter(Mandatory = $true, HelpMessage = "Specify the JVM for the JDK. Valid values are: hotspot, openj9, or any combination of them separated by spaces.")] - [string]$JVM, - [Parameter(Mandatory = $true, HelpMessage = "Specify the product category for the JDK. Valid values are: jdk, jre, or any combination of them separated by spaces.")] - [string]$ProductCategory, - # Optional parameters - [Parameter(Mandatory = $false, HelpMessage = "Specify the product SKU for the JDK.")] - [string]$Vendor = "Eclipse Adoptium", - [Parameter(Mandatory = $false, HelpMessage = "Specify the vendor branding.")] - [string]$VendorBranding = "Eclipse Temurin", - [Parameter(Mandatory = $false, HelpMessage = "Specify the vendor branding logo.")] - [string]$VendorBrandingLogo = "$(var.SetupResourcesDir)\logo.ico", - [Parameter(Mandatory = $false, HelpMessage = "Specify the vendor branding banner.")] - [string]$VendorBrandingBanner = "$(var.SetupResourcesDir)\wix-banner.png", - [Parameter(Mandatory = $false, HelpMessage = "Specify the vendor branding dialog.")] - [string]$VendorBrandingDialog = "$(var.SetupResourcesDir)\wix-dialog.png", - [Parameter(Mandatory = $false, HelpMessage = "Specify the product help link.")] - [string]$ProductHelpLink = "https://github.com/adoptium/adoptium-support/issues/new/choose", - [Parameter(Mandatory = $false, HelpMessage = "Specify the product support link.")] - [string]$ProductSupportLink = "https://adoptium.net/support", - [Parameter(Mandatory = $false, HelpMessage = "Specify the product update info link.")] - [string]$ProductUpdateInfoLink = "https://adoptium.net/temurin/releases" -) - -if ($env:DEBUG -eq "true") { - $DebugPreference = "Continue" -} -else { - $DebugPreference = "SilentlyContinue" -} - -& powershell -ExecutionPolicy Bypass -File "$PSScriptRoot\helpers\Validate-Input.ps1" ` - -toValidate $ARCH ` - -validInputs "x64", "x86-32", "x86", "arm64" ` - -delimiter " " - -if ($LASTEXITCODE -eq 1) { - Write-Host "ARCH $ARCH not supported : valid values are any combination of : x64, x86-32, arm64" - exit 1 -} - -# Update to handle the change of build variant until implications -# of setting this to Temurin can be evaluated -if ($JVM -eq "temurin") { - $JVM = "hotspot" -} - -& powershell -ExecutionPolicy Bypass -File "$PSScriptRoot\helpers\Validate-Input.ps1" ` - -toValidate $JVM ` - -validInputs "hotspot,openj9,dragonwell,openj9 hotspot,hotspot openj9" ` - -delimiter "," - -if ($LASTEXITCODE -eq 1) { - Write-Host "JVM '$JVM' not supported : valid values : hotspot, openj9, dragonwell, hotspot openj9, openj9 hotspot" - goto FAILED -} - -if ($PRODUCT_CATEGORY -ne "jre" -and $PRODUCT_CATEGORY -ne "jdk") { - Write-Host "PRODUCT_CATEGORY '$PRODUCT_CATEGORY' not supported : valid values : jre, jdk" - goto FAILED -} - -if ($SKIP_MSI_VALIDATION -eq "true") { - $MSI_VALIDATION_OPTION = " -sval " -} - -# Configure available SDK version: -# See folder e.g. "C:\Program Files (x86)\Windows Kits\[10]\bin\[10.0.16299.0]\x64" -$WIN_SDK_MAJOR_VERSION = 10 -$WIN_SDK_FULL_VERSION = "10.0.17763.0" -$WORKDIR = "Workdir" -New-Item -ItemType Directory -Path $WORKDIR | Out-Null - -# Nothing below this line needs to be changed normally. - -# Cultures: https://msdn.microsoft.com/de-de/library/ee825488(v=cs.20).aspx -$PRODUCT_SKU = "OpenJDK" -$PRODUCT_FULL_VERSION = "$PRODUCT_MAJOR_VERSION.$PRODUCT_MINOR_VERSION.$PRODUCT_MAINTENANCE_VERSION.$PRODUCT_PATCH_VERSION.$PRODUCT_BUILD_NUMBER" - -$PRODUCT_SHORT_VERSION = "$PRODUCT_MAJOR_VERSION$PRODUCT_MAINTENANCE_VERSION-b$PRODUCT_BUILD_NUMBER" -if ($PRODUCT_CATEGORY -eq "jre") { - $JRE = "-jre" -} -if ($PRODUCT_MAJOR_VERSION -ge 10) { - if ($PRODUCT_BUILD_NUMBER) { - $BUILD_NUM = "+$PRODUCT_BUILD_NUMBER" - } - $PRODUCT_SHORT_VERSION = $PRODUCT_MAJOR_VERSION - if ($PRODUCT_MINOR_VERSION -ne "0") { - $PRODUCT_SHORT_VERSION = "$PRODUCT_MAJOR_VERSION.$PRODUCT_MINOR_VERSION" - } - if ($PRODUCT_MAINTENANCE_VERSION -ne "0") { - $PRODUCT_SHORT_VERSION = "$PRODUCT_MAJOR_VERSION.$PRODUCT_MINOR_VERSION.$PRODUCT_MAINTENANCE_VERSION" - } - if ($PRODUCT_PATCH_VERSION -ne "0") { - $PRODUCT_SHORT_VERSION = "$PRODUCT_MAJOR_VERSION.$PRODUCT_MINOR_VERSION.$PRODUCT_MAINTENANCE_VERSION.$PRODUCT_PATCH_VERSION" - } - $PRODUCT_SHORT_VERSION = "$PRODUCT_SHORT_VERSION$BUILD_NUM" -} - -Write-Debug "PRODUCT_FULL_VERSION=$PRODUCT_FULL_VERSION" -Write-Debug "PRODUCT_SHORT_VERSION=$PRODUCT_SHORT_VERSION" - - -# Generate platform specific builds (x86-32,x64, arm64) -foreach ($A in $ARCH.Split(',')) { - # We could build both "hotspot,openj9" in one script, but it is not clear if release cycle is the same. - foreach ($J in $JVM.Split(',')) { - $PACKAGE_TYPE = $J - $PLATFORM = $A - Write-Debug "Generate OpenJDK setup '$PACKAGE_TYPE' for '$PLATFORM' platform '$PRODUCT_CATEGORY'" - Write-Debug "****************************************************" - $CULTURE = "en-us" - $LANGIDS = 1033 - $FOLDER_PLATFORM = $PLATFORM - if ($PLATFORM -eq "x86-32") { - $PLATFORM = "x86" - } - - $SETUP_RESOURCES_DIR = ".\Resources" - - foreach ($P in @( - "$PRODUCT_SKU$PRODUCT_MAJOR_VERSION\$PACKAGE_TYPE\$FOLDER_PLATFORM\jdk-$PRODUCT_MAJOR_VERSION.$PRODUCT_MINOR_VERSION.$PRODUCT_MAINTENANCE_VERSION", - "$PRODUCT_SKU$PRODUCT_MAJOR_VERSION\$PACKAGE_TYPE\$FOLDER_PLATFORM\jdk$PRODUCT_MAJOR_VERSIONu$PRODUCT_MAINTENANCE_VERSION-b$PRODUCT_BUILD_NUMBER", - "$PRODUCT_SKU$PRODUCT_MAJOR_VERSION\$PACKAGE_TYPE\$FOLDER_PLATFORM\jdk-$PRODUCT_MAJOR_VERSION+$PRODUCT_BUILD_NUMBER", - "$PRODUCT_SKU$PRODUCT_MAJOR_VERSION\$PACKAGE_TYPE\$FOLDER_PLATFORM\jdk-$PRODUCT_MAJOR_VERSION.$PRODUCT_MINOR_VERSION.$PRODUCT_MAINTENANCE_VERSION+$PRODUCT_BUILD_NUMBER", - "$PRODUCT_SKU$PRODUCT_MAJOR_VERSION\$PACKAGE_TYPE\$FOLDER_PLATFORM\jdk-$PRODUCT_MAJOR_VERSION.$PRODUCT_MINOR_VERSION.$PRODUCT_MAINTENANCE_VERSION.$PRODUCT_PATCH_VERSION+$PRODUCT_BUILD_NUMBER", - "$PRODUCT_SKU-Latest\$PACKAGE_TYPE\$FOLDER_PLATFORM\jdk-$PRODUCT_SHORT_VERSION" - )) { - $REPRO_DIR = ".\SourceDir\$P" - if ($PRODUCT_CATEGORY -eq "jre") { - $REPRO_DIR = "$REPRO_DIR-$PRODUCT_CATEGORY" - } - Write-Debug "looking for $REPRO_DIR" - if (Test-Path $REPRO_DIR) { - goto CONTINUE - } - } - - Write-Debug "SOURCE Dir not found / failed" - Write-Debug "Listing directory :" - Get-ChildItem -Path SourceDir -Recurse -Directory | Select-Object -ExpandProperty FullName - goto FAILED - - :CONTINUE - Write-Debug "Source dir used: $REPRO_DIR" - - $OUTPUT_BASE_FILENAME = "$PRODUCT_SKU$PRODUCT_MAJOR_VERSION-$PRODUCT_CATEGORY`_$FOLDER_PLATFORM`_windows_$PACKAGE_TYPE-$PRODUCT_FULL_VERSION" - # find all *.wxi.template,*.wxl.template,*.wxs.template files and replace text with configurations - Get-ChildItem -Path . -Recurse -Include *.wxi.template, *.Base.*.wxl.template, *.!JVM!.*.wxl.template, *.wxs.template | ForEach-Object { - $INPUT_FILE = $_.Name - # Prevent concurrency issues if multiple builds are running in parallel. - $OUTPUT_FILE = "$WORKDIR$OUTPUT_BASE_FILENAME-$($INPUT_FILE -replace '.template$')" - Write-Debug "string replacement input $INPUT_FILE output $OUTPUT_FILE" - try { - $content = Get-Content -Path $_.FullName -Raw -Encoding UTF8 - $content = $content -replace '{vendor}', '!VENDOR!' -replace '{vendor_branding_logo}', '!VENDOR_BRANDING_LOGO!' -replace '{vendor_branding_banner}', '!VENDOR_BRANDING_BANNER!' -replace '{vendor_branding_dialog}', '!VENDOR_BRANDING_DIALOG!' -replace '{vendor_branding}', '!VENDOR_BRANDING!' -replace '{product_help_link}', '!PRODUCT_HELP_LINK!' -replace '{product_support_link}', '!PRODUCT_SUPPORT_LINK!' -replace '{product_update_info_link}', '!PRODUCT_UPDATE_INFO_LINK!' - $content | Out-File -Encoding UTF8 -FilePath $OUTPUT_FILE - } - catch { - Write-Debug "Unable to make string replacement" - goto FAILED - } - } - - $CACHE_BASE_FOLDER = "Cache" - # Each build has its own cache for concurrent build - $CACHE_FOLDER = "$CACHE_BASE_FOLDER\$OUTPUT_BASE_FILENAME" - - # Generate one ID per release. But do NOT use * as we need to keep the same number for all languages, but not platforms. - $PRODUCT_ID = [guid]::NewGuid().ToString('B').ToUpper() - Write-Debug "PRODUCT_ID: $PRODUCT_ID" - - if (-not $env:UPGRADE_CODE_SEED) { - # If no UPGRADE_CODE_SEED given .. we are not trying to build upgradable MSI and generate always a new PRODUCT_UPGRADE_CODE - $PRODUCT_UPGRADE_CODE = [guid]::NewGuid().ToString('B').ToUpper() - Write-Debug "Uniq PRODUCT_UPGRADE_CODE: $PRODUCT_UPGRADE_CODE" - } - else { - # It will be better if we can generate "Name-based UUID" as specified here https://tools.ietf.org/html/rfc4122#section-4.3 - # but it's too difficult so fallback to random like guid based on md5 hash with getGuid.ps1 - # We use md5 hash to always get the same PRODUCT_UPGRADE_CODE(GUID) for each MSI build with same GUID_SSED to allow upgrade from Adoptium - # IF PRODUCT_UPGRADE_CODE change from build to build, upgrade is not proposed by Windows Installer - # Never change what compose SOURCE_TEXT_GUID and args0 for getGuid.ps1 or you will never get the same GUID as previous build and MSI upgradable feature wont work - $SOURCE_TEXT_GUID = "$PRODUCT_CATEGORY-$PRODUCT_MAJOR_VERSION-$PLATFORM-$PACKAGE_TYPE" - Write-Debug "SOURCE_TEXT_GUID (without displaying secret UPGRADE_CODE_SEED): $SOURCE_TEXT_GUID" - $PRODUCT_UPGRADE_CODE = .\getGuid.ps1 "$SOURCE_TEXT_GUID-$env:UPGRADE_CODE_SEED" - Write-Debug "Constant PRODUCT_UPGRADE_CODE: $PRODUCT_UPGRADE_CODE" - } - - - # # Build with extra Source Code feature (needs work) - # & "$WIX\bin\heat.exe" file "$REPRO_DIR\lib\src.zip" -out "Src-$OUTPUT_BASE_FILENAME.wxs" -gg -srd -cg "SrcFiles" -var var.ReproDir -dr INSTALLDIR -platform $PLATFORM - # & "$WIX\bin\heat.exe" dir "$REPRO_DIR" -out "Files-$OUTPUT_BASE_FILENAME.wxs" -t "$SETUP_RESOURCES_DIR\heat.tools.xslt" -gg -sfrag -scom -sreg -srd -ke -cg "AppFiles" -var var.ProductMajorVersion -var var.ProductMinorVersion -var var.ProductVersionString -var var.MSIProductVersion -var var.ReproDir -dr INSTALLDIR -platform $PLATFORM - # & "$WIX\bin\candle.exe" -arch $PLATFORM "$OUTPUT_BASE_FILENAME-Main.wxs" "Files-$OUTPUT_BASE_FILENAME.wxs" "Src-$OUTPUT_BASE_FILENAME.wxs" -ext WixToolset.UI.wixext -ext WixToolset.Util.wixext -dProductSku="$PRODUCT_SKU" -dProductMajorVersion="$PRODUCT_MAJOR_VERSION" -dProductMinorVersion="$PRODUCT_MINOR_VERSION" -dProductVersionString="$PRODUCT_SHORT_VERSION" -dMSIProductVersion="$MSI_PRODUCT_VERSION" -dProductId="$PRODUCT_ID" -dReproDir="$REPRO_DIR" -dSetupResourcesDir="$SETUP_RESOURCES_DIR" -dCulture="$CULTURE" - # & "$WIX\bin\light.exe" $MSI_VALIDATION_OPTION "Main-$OUTPUT_BASE_FILENAME.wixobj" "Files-$OUTPUT_BASE_FILENAME.wixobj" "Src-$OUTPUT_BASE_FILENAME.wixobj" -cc $CACHE_FOLDER -ext WixToolset.UI.wixext -ext WixToolset.Util.wixext -spdb -out "ReleaseDir\$OUTPUT_BASE_FILENAME.msi" -loc "Lang\$OUTPUT_BASE_FILENAME-$PRODUCT_SKU.Base.$CULTURE.wxl" -loc "Lang\$OUTPUT_BASE_FILENAME-$PRODUCT_SKU.$PACKAGE_TYPE.$CULTURE.wxl" -cultures:$CULTURE - - # Clean .cab cache for each run .. Cache is only used inside BuildSetupTranslationTransform.cmd to speed up MST generation - if (Test-Path -Path "!CACHE_FOLDER!") { - Remove-Item -Path "!CACHE_FOLDER!" -Recurse -Force - } - New-Item -ItemType Directory -Path "!CACHE_FOLDER!" | Out-Null - if (-not (Test-Path -Path "!CACHE_FOLDER!")) { - Write-Debug "Unable to create cache folder : !CACHE_FOLDER!" - goto FAILED - } - - # Build without extra Source Code feature - - # Set default variables - $ICEDTEAWEB_DIR = ".\SourceDir\icedtea-web-image" - $BUNDLE_ICEDTEAWEB = $false - - if ($PLATFORM -eq "x64" -and $PRODUCT_MAJOR_VERSION -eq 8 -and (Test-Path $ICEDTEAWEB_DIR)) { - Write-Debug "IcedTeaWeb Directory Exists!" - $BUNDLE_ICEDTEAWEB = $true - $ITW_WXS = "IcedTeaWeb-$OUTPUT_BASE_FILENAME.wxs" - $ITW_WIXOBJ = "$WORKDIR$IcedTeaWeb-$OUTPUT_BASE_FILENAME.wixobj" - - Write-Debug "HEAT" - & "$WIX\bin\heat.exe" dir "$ICEDTEAWEB_DIR" -out $ITW_WXS -t "$SETUP_RESOURCES_DIR\heat.icedteaweb.xslt" -gg -sfrag -scom -sreg -srd -ke -cg "IcedTeaWebFiles" -var var.IcedTeaWebDir -dr INSTALLDIR -platform $PLATFORM - - if ($LASTEXITCODE -ne 0) { - Write-Debug "Failed to generate Windows Installer XML Source files for IcedTea-Web (.wxs)" - goto FAILED - } - } - else { - Write-Debug "IcedTeaWeb Directory Does Not Exist!" - } - - Write-Debug "HEAT" - & "$WIX\bin\heat.exe" dir "$REPRO_DIR" -out "$WORKDIR$OUTPUT_BASE_FILENAME-Files.wxs" -gg -sfrag -scom -sreg -srd -ke -cg "AppFiles" -var var.ProductMajorVersion -var var.ProductMinorVersion -var var.ProductVersionString -var var.MSIProductVersion -var var.ReproDir -dr INSTALLDIR -platform $PLATFORM - if ($LASTEXITCODE -ne 0) { - Write-Host "Failed to generate Windows Installer XML Source files (.wxs)" - goto FAILED - } - - Write-Debug "CANDLE" - & "$WIX\bin\candle.exe" -arch $PLATFORM -out "$WORKDIR" "$WORKDIR$OUTPUT_BASE_FILENAME-Main.wxs" "$WORKDIR$OUTPUT_BASE_FILENAME-Files.wxs" $ITW_WXS -ext WixToolset.UI.wixext -ext WixToolset.Util.wixext -dIcedTeaWebDir="$ICEDTEAWEB_DIR" -dOutputBaseFilename="$OUTPUT_BASE_FILENAME" -dProductSku="$PRODUCT_SKU" -dProductMajorVersion="$PRODUCT_MAJOR_VERSION" -dProductMinorVersion="$PRODUCT_MINOR_VERSION" -dProductVersionString="$PRODUCT_SHORT_VERSION" -dMSIProductVersion="$MSI_PRODUCT_VERSION" -dProductId="$PRODUCT_ID" -dProductUpgradeCode="$PRODUCT_UPGRADE_CODE" -dReproDir="$REPRO_DIR" -dSetupResourcesDir="$SETUP_RESOURCES_DIR" -dCulture="$CULTURE" -dJVM="$PACKAGE_TYPE" - if ($LASTEXITCODE -ne 0) { - Write-Host "Failed to preprocess and compile WiX source files into object files (.wixobj)" - Get-ChildItem -Path $WORKDIR -Recurse | Sort-Object -Property Name - goto FAILED - } - - Write-Debug "LIGHT" - & "$WIX\bin\light.exe" "$WORKDIR$OUTPUT_BASE_FILENAME-Main.wixobj" "$WORKDIR$OUTPUT_BASE_FILENAME-Files.wixobj" $ITW_WIXOBJ $MSI_VALIDATION_OPTION -cc $CACHE_FOLDER -ext WixToolset.UI.wixext -ext WixToolset.Util.wixext -spdb -out "ReleaseDir\$OUTPUT_BASE_FILENAME.msi" -loc "$WORKDIR$OUTPUT_BASE_FILENAME-$PRODUCT_SKU.Base.$CULTURE.wxl" -loc "$WORKDIR$OUTPUT_BASE_FILENAME-$PRODUCT_SKU.$PACKAGE_TYPE.$CULTURE.wxl" -cultures:$CULTURE - if ($LASTEXITCODE -ne 0) { - Write-Host "Failed to link and bind one or more .wixobj files and create a Windows Installer database (.msi or .msm)" - Get-ChildItem -Path $WORKDIR -Recurse | Sort-Object -Property Name - goto FAILED - } - - # Clean up variables - $ICEDTEAWEB_DIR = "" - $BUNDLE_ICEDTEAWEB = "" - - # Generate setup translations - Get-Content "Lang\LanguageList.config" | ForEach-Object { - $language = $_ -split " " - $languageCode = $language[0] - $languageName = $language[1] - & "BuildSetupTranslationTransform.cmd" $languageCode $languageName - if ($LASTEXITCODE -ne 0) { - Write-Debug "Failed to build translation $languageCode $languageName" - goto FAILED - } - } - - # Add all supported languages to MSI Package attribute - $wiLangIdScript = "$env:ProgramFiles(x86)\Windows Kits\$env:WIN_SDK_MAJOR_VERSION\bin\$env:WIN_SDK_FULL_VERSION\x64\WiLangId.vbs" - $msiPath = "ReleaseDir\$OUTPUT_BASE_FILENAME.msi" - $arguments = "//Nologo $msiPath Package $LANGIDS" - Start-Process -FilePath "CSCRIPT" -ArgumentList $wiLangIdScript, $arguments -NoNewWindow -Wait - if ($LASTEXITCODE -ne 0) { - Write-Debug "Failed to pack all languages into MSI : $LANGIDS" - goto FAILED - } - - # For temporarily disable the smoke test - use OPTION SKIP_MSI_VALIDATION=true - # To validate MSI only once at the end - if ($env:SKIP_MSI_VALIDATION -ne "true") { - Write-Debug "SMOKE" - & "$WIX\bin\smoke.exe" "ReleaseDir\$OUTPUT_BASE_FILENAME.msi" - if ($LASTEXITCODE -ne 0) { - Write-Host "Failed to validate MSI" - goto FAILED - } - } - else { - Write-Debug "MSI validation was skipped by option SKIP_MSI_VALIDATION=true" - } - - # SIGN the MSIs with digital signature. - # Dual-Signing with SHA-1/SHA-256 requires Win 8.1 SDK or later. - if ($env:SIGNING_CERTIFICATE) { - $timestampErrors = 0 - for ($i = 1; $i -le 15; $i++) { - Get-Content "serverTimestamp.config" | ForEach-Object { - Write-Debug "try $timestampErrors / sha256 / timestamp server : $_" - # Always hide password here - $signtoolArgs = @( - "sign", - "-f", - $env:SIGNING_CERTIFICATE, - "-p", - $env:SIGN_PASSWORD, - "-fd", - "sha256", - "-d", - "Adoptium", - "-t", - $_, - "ReleaseDir\$OUTPUT_BASE_FILENAME.msi" - ) - & "$env:ProgramFiles(x86)\Windows Kits\$env:WIN_SDK_MAJOR_VERSION\bin\$env:WIN_SDK_FULL_VERSION\x64\signtool.exe" @signtoolArgs - - # check the return value of the timestamping operation and retry a max of ten times... - if ($LASTEXITCODE -eq 0) { - goto succeeded - } - - Write-Debug "Signing failed. Probably cannot find the timestamp server at $_" - $timestampErrors++ - } - - # always wait for more seconds after each retry - Start-Sleep -Seconds $i - } - - # return an error code... - Write-Debug "sign.bat exit code is 1. There were $timestampErrors timestamping errors." - exit 1 - } - else { - Write-Debug "Ignoring signing step: no certificate configured" - } - - :succeeded - # return a successful code... - Write-Debug "sign.bat exit code is 0. There were $timestampErrors timestamping errors." - - # Remove files we do not need any longer. - Remove-Item -Path "$WORKDIR\$OUTPUT_BASE_FILENAME-Files.wxs" -Force - Remove-Item -Path "$WORKDIR\$OUTPUT_BASE_FILENAME-Files.wixobj" -Force - Remove-Item -Path "$WORKDIR\$OUTPUT_BASE_FILENAME-Main.wxs" -Force - Remove-Item -Path "$WORKDIR\$OUTPUT_BASE_FILENAME-Main.wixobj" -Force - Remove-Item -Path "$WORKDIR\$OUTPUT_BASE_FILENAME-$PRODUCT_SKU.$JVM.*.wxl" -Force - Remove-Item -Path "$WORKDIR\$OUTPUT_BASE_FILENAME-$PRODUCT_SKU.Base.*.wxl" -Force - Remove-Item -Path "$WORKDIR\$OUTPUT_BASE_FILENAME-$PRODUCT_SKU.Variables.wxi" -Force - - if ($ITW_WXS) { - Remove-Item -Path $ITW_WXS -Force - Remove-Item -Path $ITW_WIXOBJ -Force - } - - Remove-Item -Path $CACHE_FOLDER -Recurse -Force - } - - $ITW_WXS = $null - $ITW_WIXOBJ = $null -} - -# Cleanup variables -$CULTURE = $null -$LANGIDS = $null -$OUTPUT_BASE_FILENAME = $null -$PACKAGE_TYPE = $null -$PRODUCT_CATEGORY = $null -$PRODUCT_SKU = $null -$PRODUCT_MAJOR_VERSION = $null -$PRODUCT_MINOR_VERSION = $null -$PRODUCT_MAINTENANCE_VERSION = $null -$PRODUCT_PATCH_VERSION = $null -$PRODUCT_BUILD_NUMBER = $null -$MSI_PRODUCT_VERSION = $null -$PRODUCT_ID = $null -$PRODUCT_VERSION = $null -$PLATFORM = $null -$FOLDER_PLATFORM = $null -$REPRO_DIR = $null -$SETUP_RESOURCES_DIR = $null -$WIN_SDK_FULL_VERSION = $null -$WIN_SDK_MAJOR_VERSION = $null - -exit 0 - -:FAILED -exit 2 From 93da4581eb7e1528526edd08fd952178b3a31603 Mon Sep 17 00:00:00 2001 From: JoshMJ Date: Thu, 4 Apr 2024 16:38:19 -0700 Subject: [PATCH 21/66] Attempting to support icedTea again --- wix/Build.OpenJDK_generic.cmd | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/wix/Build.OpenJDK_generic.cmd b/wix/Build.OpenJDK_generic.cmd index 178a69427..40c2228b8 100644 --- a/wix/Build.OpenJDK_generic.cmd +++ b/wix/Build.OpenJDK_generic.cmd @@ -222,10 +222,9 @@ FOR %%A IN (%ARCH%) DO ( IF !PLATFORM! == x64 ( IF !PRODUCT_MAJOR_VERSION! == 8 ( IF EXIST !ICEDTEAWEB_DIR! ( - ECHO IcedTeaWeb Directory Exist! + ECHO IcedTeaWeb Directory Exists! SET BUNDLE_ICEDTEAWEB=true SET ITW_WXS="IcedTeaWeb-!OUTPUT_BASE_FILENAME!.wxs" - SET ITW_WIXOBJ=%WORKDIR%IcedTeaWeb-!OUTPUT_BASE_FILENAME!.wixobj ECHO HEAT !WIX_HEAT_PATH! dir "!ICEDTEAWEB_DIR!" ^ -out !ITW_WXS! ^ @@ -261,7 +260,7 @@ FOR %%A IN (%ARCH%) DO ( ECHO BUILD @ECHO ON - wix build -arch !PLATFORM! %WORKDIR%!OUTPUT_BASE_FILENAME!-Main.wxs %WORKDIR%!OUTPUT_BASE_FILENAME!-Files.wxs -ext WixToolset.UI.wixext -ext WixToolset.Util.wixext -d IcedTeaWebDir="!ICEDTEAWEB_DIR!" -d OutputBaseFilename="!OUTPUT_BASE_FILENAME!" -d ProductSku="!PRODUCT_SKU!" -d ProductMajorVersion="!PRODUCT_MAJOR_VERSION!" -d ProductMinorVersion="!PRODUCT_MINOR_VERSION!" -d ProductVersionString="!PRODUCT_SHORT_VERSION!" -d MSIProductVersion="!MSI_PRODUCT_VERSION!" -d ProductId="!PRODUCT_ID!" -d ProductUpgradeCode="!PRODUCT_UPGRADE_CODE!" -d ReproDir="!REPRO_DIR!" -d SetupResourcesDir="!SETUP_RESOURCES_DIR!" -d Culture="!CULTURE!" -d JVM="!PACKAGE_TYPE!" -cc !CACHE_FOLDER! -loc "%WORKDIR%!OUTPUT_BASE_FILENAME!-!PRODUCT_SKU!.Base.!CULTURE!.wxl" -loc "%WORKDIR%!OUTPUT_BASE_FILENAME!-!PRODUCT_SKU!.!PACKAGE_TYPE!.!CULTURE!.wxl" -out "ReleaseDir\!OUTPUT_BASE_FILENAME!.msi" -culture !CULTURE! -pdbtype none + wix build -arch !PLATFORM! %WORKDIR%!OUTPUT_BASE_FILENAME!-Main.wxs %WORKDIR%!OUTPUT_BASE_FILENAME!-Files.wxs !ITW_WXS! -ext WixToolset.UI.wixext -ext WixToolset.Util.wixext -d IcedTeaWebDir="!ICEDTEAWEB_DIR!" -d OutputBaseFilename="!OUTPUT_BASE_FILENAME!" -d ProductSku="!PRODUCT_SKU!" -d ProductMajorVersion="!PRODUCT_MAJOR_VERSION!" -d ProductMinorVersion="!PRODUCT_MINOR_VERSION!" -d ProductVersionString="!PRODUCT_SHORT_VERSION!" -d MSIProductVersion="!MSI_PRODUCT_VERSION!" -d ProductId="!PRODUCT_ID!" -d ProductUpgradeCode="!PRODUCT_UPGRADE_CODE!" -d ReproDir="!REPRO_DIR!" -d SetupResourcesDir="!SETUP_RESOURCES_DIR!" -d Culture="!CULTURE!" -d JVM="!PACKAGE_TYPE!" -cc !CACHE_FOLDER! -loc "%WORKDIR%!OUTPUT_BASE_FILENAME!-!PRODUCT_SKU!.Base.!CULTURE!.wxl" -loc "%WORKDIR%!OUTPUT_BASE_FILENAME!-!PRODUCT_SKU!.!PACKAGE_TYPE!.!CULTURE!.wxl" -out "ReleaseDir\!OUTPUT_BASE_FILENAME!.msi" -culture !CULTURE! -pdbtype none IF ERRORLEVEL 1 ( ECHO Failed to process and compile Windows Installer XML Source files ^(.wxs^) into installer ^(.msi^) dir /s /b /o:n %WORKDIR% @@ -349,12 +348,10 @@ FOR %%A IN (%ARCH%) DO ( DEL "%WORKDIR%!OUTPUT_BASE_FILENAME!-!PRODUCT_SKU!.Variables.wxi" IF DEFINED ITW_WXS ( DEL !ITW_WXS! - DEL !ITW_WIXOBJ! ) RMDIR /S /Q !CACHE_FOLDER! ) SET ITW_WXS= - SET ITW_WIXOBJ= ) ENDLOCAL From 491580cd6b7e1b30eae7b5fe9721f6d3edbfc369 Mon Sep 17 00:00:00 2001 From: JoshMJ Date: Thu, 4 Apr 2024 16:53:31 -0700 Subject: [PATCH 22/66] now heating jdk8 on single line --- wix/Build.OpenJDK_generic.cmd | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/wix/Build.OpenJDK_generic.cmd b/wix/Build.OpenJDK_generic.cmd index 40c2228b8..bfb32b2e8 100644 --- a/wix/Build.OpenJDK_generic.cmd +++ b/wix/Build.OpenJDK_generic.cmd @@ -226,19 +226,7 @@ FOR %%A IN (%ARCH%) DO ( SET BUNDLE_ICEDTEAWEB=true SET ITW_WXS="IcedTeaWeb-!OUTPUT_BASE_FILENAME!.wxs" ECHO HEAT - !WIX_HEAT_PATH! dir "!ICEDTEAWEB_DIR!" ^ - -out !ITW_WXS! ^ - -t "!SETUP_RESOURCES_DIR!\heat.icedteaweb.xslt" ^ - -gg ^ - -sfrag ^ - -scom ^ - -sreg ^ - -srd ^ - -ke ^ - -cg "IcedTeaWebFiles" ^ - -var var.IcedTeaWebDir ^ - -dr INSTALLDIR ^ - -platform !PLATFORM! + !WIX_HEAT_PATH! dir "!ICEDTEAWEB_DIR!" -out !ITW_WXS! -t "!SETUP_RESOURCES_DIR!\heat.icedteaweb.xslt" -gg -sfrag -scom -sreg -srd -ke -cg "IcedTeaWebFiles" -var var.IcedTeaWebDir -dr INSTALLDIR -platform !PLATFORM! IF ERRORLEVEL 1 ( ECHO "Failed to generate Windows Installer XML Source files for IcedTea-Web (.wxs)" GOTO FAILED From 2f363abd8ae14cbb6a1860a3a9dd6e2538477571 Mon Sep 17 00:00:00 2001 From: JoshMJ Date: Tue, 9 Apr 2024 16:51:25 -0700 Subject: [PATCH 23/66] Attempting to build with IcedTea --- wix/Build.OpenJDK_generic.cmd | 14 +++-- wix/BuildSetupTranslationTransform.cmd | 2 +- wix/helpers/Update-id.ps1 | 73 ++++++++++++++++++++++++++ 3 files changed, 83 insertions(+), 6 deletions(-) create mode 100644 wix/helpers/Update-id.ps1 diff --git a/wix/Build.OpenJDK_generic.cmd b/wix/Build.OpenJDK_generic.cmd index bfb32b2e8..761b280bf 100644 --- a/wix/Build.OpenJDK_generic.cmd +++ b/wix/Build.OpenJDK_generic.cmd @@ -224,13 +224,19 @@ FOR %%A IN (%ARCH%) DO ( IF EXIST !ICEDTEAWEB_DIR! ( ECHO IcedTeaWeb Directory Exists! SET BUNDLE_ICEDTEAWEB=true - SET ITW_WXS="IcedTeaWeb-!OUTPUT_BASE_FILENAME!.wxs" + SET ITW_WXS="%WORKDIR%IcedTeaWeb-!OUTPUT_BASE_FILENAME!.wxs" ECHO HEAT !WIX_HEAT_PATH! dir "!ICEDTEAWEB_DIR!" -out !ITW_WXS! -t "!SETUP_RESOURCES_DIR!\heat.icedteaweb.xslt" -gg -sfrag -scom -sreg -srd -ke -cg "IcedTeaWebFiles" -var var.IcedTeaWebDir -dr INSTALLDIR -platform !PLATFORM! IF ERRORLEVEL 1 ( ECHO "Failed to generate Windows Installer XML Source files for IcedTea-Web (.wxs)" GOTO FAILED ) + + powershell -ExecutionPolicy Bypass -File "%~dp0\helpers\Update-id.ps1" ^ + -FilePath !ITW_WXS! ^ + -Name bin ^ + -Suffix IcedTea + ) ELSE ( ECHO IcedTeaWeb Directory Does Not Exist! ) @@ -256,10 +262,6 @@ FOR %%A IN (%ARCH%) DO ( ) @ECHO OFF - REM Clean up variables - SET ICEDTEAWEB_DIR= - SET BUNDLE_ICEDTEAWEB= - REM Generate setup translations FOR /F "tokens=1-2" %%L IN (Lang\LanguageList.config) do ( CALL BuildSetupTranslationTransform.cmd %%L %%M @@ -364,6 +366,8 @@ SET REPRO_DIR= SET SETUP_RESOURCES_DIR= SET WIN_SDK_FULL_VERSION= SET WIN_SDK_MAJOR_VERSION= +SET ICEDTEAWEB_DIR= +SET BUNDLE_ICEDTEAWEB= EXIT /b 0 diff --git a/wix/BuildSetupTranslationTransform.cmd b/wix/BuildSetupTranslationTransform.cmd index 680c8f79f..bb9a935c2 100644 --- a/wix/BuildSetupTranslationTransform.cmd +++ b/wix/BuildSetupTranslationTransform.cmd @@ -16,7 +16,7 @@ REM Build with extra Source Code feature (needs work) REM IF EXIST Files-!OUTPUT_BASE_FILENAME!.wixobj "%WIX%bin\light.exe" !MSI_VALIDATION_OPTION! Main-!OUTPUT_BASE_FILENAME!.wixobj Files-!OUTPUT_BASE_FILENAME!.wixobj Src-!OUTPUT_BASE_FILENAME!.wixobj !ITW_WIXOBJ! -cc !CACHE_FOLDER! -reusecab -ext WixToolset.UI.wixext -ext WixToolset.Util.wixext -spdb -out "ReleaseDir\!OUTPUT_BASE_FILENAME!.!CULTURE!.msi" -loc "Lang\%PRODUCT_SKU%.Base.!CULTURE!.wxl" -loc "Lang\%PRODUCT_SKU%.!PACKAGE_TYPE!.!CULTURE!.wxl" -cultures:!CULTURE! REM Build without extra Source Code feature -wix build -arch !PLATFORM! %WORKDIR%!OUTPUT_BASE_FILENAME!-Main.wxs %WORKDIR%!OUTPUT_BASE_FILENAME!-Files.wxs -ext WixToolset.UI.wixext -ext WixToolset.Util.wixext -d IcedTeaWebDir="!ICEDTEAWEB_DIR!" -d OutputBaseFilename="!OUTPUT_BASE_FILENAME!" -d ProductSku="!PRODUCT_SKU!" -d ProductMajorVersion="!PRODUCT_MAJOR_VERSION!" -d ProductMinorVersion="!PRODUCT_MINOR_VERSION!" -d ProductVersionString="!PRODUCT_SHORT_VERSION!" -d MSIProductVersion="!MSI_PRODUCT_VERSION!" -d ProductId="!PRODUCT_ID!" -d ProductUpgradeCode="!PRODUCT_UPGRADE_CODE!" -d ReproDir="!REPRO_DIR!" -d SetupResourcesDir="!SETUP_RESOURCES_DIR!" -d Culture="!CULTURE!" -d JVM="!PACKAGE_TYPE!" -cc !CACHE_FOLDER! -loc "%WORKDIR%!OUTPUT_BASE_FILENAME!-!PRODUCT_SKU!.Base.!CULTURE!.wxl" -loc "%WORKDIR%!OUTPUT_BASE_FILENAME!-!PRODUCT_SKU!.!PACKAGE_TYPE!.!CULTURE!.wxl" -out "ReleaseDir\!OUTPUT_BASE_FILENAME!.!CULTURE!.msi" -culture !CULTURE! -pdbtype none +wix build -arch !PLATFORM! %WORKDIR%!OUTPUT_BASE_FILENAME!-Main.wxs %WORKDIR%!OUTPUT_BASE_FILENAME!-Files.wxs !ITW_WXS! -ext WixToolset.UI.wixext -ext WixToolset.Util.wixext -d IcedTeaWebDir="!ICEDTEAWEB_DIR!" -d OutputBaseFilename="!OUTPUT_BASE_FILENAME!" -d ProductSku="!PRODUCT_SKU!" -d ProductMajorVersion="!PRODUCT_MAJOR_VERSION!" -d ProductMinorVersion="!PRODUCT_MINOR_VERSION!" -d ProductVersionString="!PRODUCT_SHORT_VERSION!" -d MSIProductVersion="!MSI_PRODUCT_VERSION!" -d ProductId="!PRODUCT_ID!" -d ProductUpgradeCode="!PRODUCT_UPGRADE_CODE!" -d ReproDir="!REPRO_DIR!" -d SetupResourcesDir="!SETUP_RESOURCES_DIR!" -d Culture="!CULTURE!" -d JVM="!PACKAGE_TYPE!" -cc !CACHE_FOLDER! -loc "%WORKDIR%!OUTPUT_BASE_FILENAME!-!PRODUCT_SKU!.Base.!CULTURE!.wxl" -loc "%WORKDIR%!OUTPUT_BASE_FILENAME!-!PRODUCT_SKU!.!PACKAGE_TYPE!.!CULTURE!.wxl" -out "ReleaseDir\!OUTPUT_BASE_FILENAME!.!CULTURE!.msi" -culture !CULTURE! -pdbtype none IF ERRORLEVEL 1 ( ECHO Building msi for culture %CULTURE% failed with errorlevel: %ERRORLEVEL% GOTO FAILED diff --git a/wix/helpers/Update-id.ps1 b/wix/helpers/Update-id.ps1 new file mode 100644 index 000000000..1484f53e4 --- /dev/null +++ b/wix/helpers/Update-id.ps1 @@ -0,0 +1,73 @@ +<# +.SYNOPSIS +This script appends a suffix to Directory IDs to ensure they're unique> This is necessary because IDs are hashes of folder names and some subdirectories have the same name (like 'bin'). + +.DESCRIPTION +The script takes a .wxs file path, a directory name, and a suffix as input parameters. It reads the content of the .wxs file, searches for the line that matches the pattern of the specified directory name, and appends the suffix to the corresponding Directory ID. It then writes the updated content back to the file. + +.PARAMETER FilePath +The path of the .wxs file to be updated. + +.PARAMETER Name +The name of the directory whose ID needs to be updated. + +.PARAMETER Suffix +The suffix to be appended to the Directory ID. + +.EXAMPLE +Update-id.ps1 -FilePath "C:\Path\To\File.wxs" -Name "bin" -Suffix "_unique" + +This example updates the Directory ID of the "bin" directory in the specified .wxs file by appending "_unique" to the existing ID. + +#> + +param ( + [Parameter(Mandatory = $true)] + [string]$FilePath, + + [Parameter(Mandatory = $true)] + [string]$Name, + + [Parameter(Mandatory = $true)] + [string]$Suffix +) + +# Read the content of the .wxs file +$fileContent = Get-Content -Path $FilePath + +# Search for the line that matches the pattern +$pattern = ' Date: Tue, 9 Apr 2024 17:02:11 -0700 Subject: [PATCH 24/66] Added comments and updated error messages --- wix/Build.OpenJDK_generic.cmd | 2 ++ wix/helpers/Update-id.ps1 | 7 +++---- wix/helpers/Validate-Input.ps1 | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/wix/Build.OpenJDK_generic.cmd b/wix/Build.OpenJDK_generic.cmd index 761b280bf..f79e7df43 100644 --- a/wix/Build.OpenJDK_generic.cmd +++ b/wix/Build.OpenJDK_generic.cmd @@ -232,6 +232,8 @@ FOR %%A IN (%ARCH%) DO ( GOTO FAILED ) + @REM Add suffix to declaration and references of the IcedTeaWebDir 'bin' subfolder + @REM This is to avoid dubplicate Id conflict with INSTALLDER 'bin' subfolder powershell -ExecutionPolicy Bypass -File "%~dp0\helpers\Update-id.ps1" ^ -FilePath !ITW_WXS! ^ -Name bin ^ diff --git a/wix/helpers/Update-id.ps1 b/wix/helpers/Update-id.ps1 index 1484f53e4..d996b1ec9 100644 --- a/wix/helpers/Update-id.ps1 +++ b/wix/helpers/Update-id.ps1 @@ -44,15 +44,14 @@ if ($firstMatch -match $pattern) { $directoryId = $matches[1] } -# If the directory ID is found, update it +# If the directory ID is found, append the suffix to it's ID if (-not $directoryId) { Write-Host "Directory '$Name' not found in the file." } else { - Write-Host "Found Directory ID: $directoryId" $updatedDirectoryId = $directoryId + $Suffix - Write-Host "updatedDirectoryId: $updatedDirectoryId" + # Replace declaration and references of the old ID with the updated ID $IdRegex = $('Id="' + [regex]::Escape($directoryId) + '"') $updatedContent = $fileContent | ForEach-Object { if ($_ -match $IdRegex) { @@ -60,7 +59,7 @@ else { $_ -replace $IdRegex, $('Id="' + [regex]::Escape($updatedDirectoryId) + '"') } else { - # Replace all instances of Directory="$FoundID" with Directory="$updatedDirectoryId" + # Replace all Directory ID references to the old ID with the updated ID $_ -replace $('Directory="' + [regex]::Escape($directoryId) + '"'), $('Directory="' + [regex]::Escape($updatedDirectoryId) + '"') } } diff --git a/wix/helpers/Validate-Input.ps1 b/wix/helpers/Validate-Input.ps1 index 1349a335c..9fcdde70f 100644 --- a/wix/helpers/Validate-Input.ps1 +++ b/wix/helpers/Validate-Input.ps1 @@ -46,7 +46,7 @@ $inputArray = $toValidate -split "$delimiter" for ($i = 0; $i -lt $inputArray.Length; $i++) { if ($validInputArray -notcontains $inputArray[$i]) { - echo $inputArray[$i] ' is an invalid input' + Write-Output $inputArray[$i] ' is an invalid input' exit 1 # Invalid input } } From b5e3123e1238a370934896f1f4afb75e705ca96a Mon Sep 17 00:00:00 2001 From: JoshMJ Date: Tue, 9 Apr 2024 17:17:41 -0700 Subject: [PATCH 25/66] Added back -sfrag flag and added comments --- wix/Build.OpenJDK_generic.cmd | 4 ++-- wix/SourceDir/CreateSourceFolder.AdoptOpenJDK.ps1 | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/wix/Build.OpenJDK_generic.cmd b/wix/Build.OpenJDK_generic.cmd index f79e7df43..57b93d013 100644 --- a/wix/Build.OpenJDK_generic.cmd +++ b/wix/Build.OpenJDK_generic.cmd @@ -247,7 +247,7 @@ FOR %%A IN (%ARCH%) DO ( ECHO HEAT @ECHO ON - !WIX_HEAT_PATH! dir "!REPRO_DIR!" -out %WORKDIR%!OUTPUT_BASE_FILENAME!-Files.wxs -gg -scom -sreg -srd -ke -cg "AppFiles" -var var.ProductMajorVersion -var var.ProductMinorVersion -var var.ProductVersionString -var var.MSIProductVersion -var var.ReproDir -dr INSTALLDIR -platform !PLATFORM! + !WIX_HEAT_PATH! dir "!REPRO_DIR!" -out %WORKDIR%!OUTPUT_BASE_FILENAME!-Files.wxs -gg -sfrag -scom -sreg -srd -ke -cg "AppFiles" -var var.ProductMajorVersion -var var.ProductMinorVersion -var var.ProductVersionString -var var.MSIProductVersion -var var.ReproDir -dr INSTALLDIR -platform !PLATFORM! IF ERRORLEVEL 1 ( ECHO Failed to generate Windows Installer XML Source files ^(.wxs^) GOTO FAILED @@ -325,7 +325,7 @@ FOR %%A IN (%ARCH%) DO ( exit /b 1 ) ELSE ( - ECHO Ignoring signing step : no certificate configured + ECHO Ignoring signing step : certificate not configured ) :succeeded diff --git a/wix/SourceDir/CreateSourceFolder.AdoptOpenJDK.ps1 b/wix/SourceDir/CreateSourceFolder.AdoptOpenJDK.ps1 index cb60ab490..d1c5accfb 100644 --- a/wix/SourceDir/CreateSourceFolder.AdoptOpenJDK.ps1 +++ b/wix/SourceDir/CreateSourceFolder.AdoptOpenJDK.ps1 @@ -1,9 +1,11 @@ <# .SYNOPSIS This script extracts the contents of a zip file to a directory structure that is expected by the Wix toolset. + This script also downloads WixToolset.Heat and puts it in the expected location. .DESCRIPTION The script takes a zip file and extracts its contents to a directory structure that is expected by the Wix toolset. + This script also downloads WixToolset.Heat and puts it in the expected location. The script also performs some cleanup on the extracted files. .PARAMETER openjdk_filename_regex From c055f90d13f496527ec8201fa56b127f91730a43 Mon Sep 17 00:00:00 2001 From: JoshMJ Date: Wed, 10 Apr 2024 10:55:42 -0700 Subject: [PATCH 26/66] Updated installer version from 200 to 500 to get rid of warning --- wix/Main.wxs.template | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wix/Main.wxs.template b/wix/Main.wxs.template index 98d36b8d8..4dcc26fa7 100644 --- a/wix/Main.wxs.template +++ b/wix/Main.wxs.template @@ -1,7 +1,7 @@  - + From 54c93abf846b9b42b7482241b91f470581bc1fcc Mon Sep 17 00:00:00 2001 From: JoshMJ Date: Wed, 10 Apr 2024 14:04:07 -0700 Subject: [PATCH 27/66] Updated old source code comments --- wix/Build.OpenJDK_generic.cmd | 7 +++---- wix/BuildSetupTranslationTransform.cmd | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/wix/Build.OpenJDK_generic.cmd b/wix/Build.OpenJDK_generic.cmd index 57b93d013..b198db379 100644 --- a/wix/Build.OpenJDK_generic.cmd +++ b/wix/Build.OpenJDK_generic.cmd @@ -201,10 +201,9 @@ FOR %%A IN (%ARCH%) DO ( REM Build with extra Source Code feature (needs work) - REM "!WIX!bin\heat.exe" file "!REPRO_DIR!\lib\src.zip" -out Src-!OUTPUT_BASE_FILENAME!.wxs -gg -srd -cg "SrcFiles" -var var.ReproDir -dr INSTALLDIR -platform !PLATFORM! - REM "!WIX!bin\heat.exe" dir "!REPRO_DIR!" -out Files-!OUTPUT_BASE_FILENAME!.wxs -t "!SETUP_RESOURCES_DIR!\heat.tools.xslt" -gg -sfrag -scom -sreg -srd -ke -cg "AppFiles" -var var.ProductMajorVersion -var var.ProductMinorVersion -var var.ProductVersionString -var var.MSIProductVersion -var var.ReproDir -dr INSTALLDIR -platform !PLATFORM! - REM "!WIX!bin\candle.exe" -arch !PLATFORM! !OUTPUT_BASE_FILENAME!-Main.wxs Files-!OUTPUT_BASE_FILENAME!.wxs Src-!OUTPUT_BASE_FILENAME!.wxs -ext WixToolset.UI.wixext -ext WixToolset.Util.wixext -dProductSku="!PRODUCT_SKU!" -dProductMajorVersion="!PRODUCT_MAJOR_VERSION!" -dProductMinorVersion="!PRODUCT_MINOR_VERSION!" -dProductVersionString="!PRODUCT_SHORT_VERSION!" -dMSIProductVersion="!MSI_PRODUCT_VERSION!" -dProductId="!PRODUCT_ID!" -dReproDir="!REPRO_DIR!" -dSetupResourcesDir="!SETUP_RESOURCES_DIR!" -dCulture="!CULTURE!" - REM "!WIX!bin\light.exe" !MSI_VALIDATION_OPTION! Main-!OUTPUT_BASE_FILENAME!.wixobj Files-!OUTPUT_BASE_FILENAME!.wixobj Src-!OUTPUT_BASE_FILENAME!.wixobj -cc !CACHE_FOLDER! -ext WixToolset.UI.wixext -ext WixToolset.Util.wixext -spdb -out "ReleaseDir\!OUTPUT_BASE_FILENAME!.msi" -loc "Lang\!OUTPUT_BASE_FILENAME!-!PRODUCT_SKU!.Base.!CULTURE!.wxl" -loc "Lang\!OUTPUT_BASE_FILENAME!-!PRODUCT_SKU!.!PACKAGE_TYPE!.!CULTURE!.wxl" -cultures:!CULTURE! + REM !WIX_HEAT_PATH! file "!REPRO_DIR!\lib\src.zip" -out !OUTPUT_BASE_FILENAME!-Src.wxs -gg -srd -cg "SrcFiles" -var var.ReproDir -dr INSTALLDIR -platform !PLATFORM! + REM !WIX_HEAT_PATH! dir "!REPRO_DIR!" -out !OUTPUT_BASE_FILENAME!-Files.wxs -t "!SETUP_RESOURCES_DIR!\heat.tools.xslt" -gg -sfrag -scom -sreg -srd -ke -cg "AppFiles" -var var.ProductMajorVersion -var var.ProductMinorVersion -var var.ProductVersionString -var var.MSIProductVersion -var var.ReproDir -dr INSTALLDIR -platform !PLATFORM! + REM wix -arch !PLATFORM! !OUTPUT_BASE_FILENAME!-Main.wxs !OUTPUT_BASE_FILENAME!-Files.wxs !OUTPUT_BASE_FILENAME!-Src.wxs -ext WixToolset.UI.wixext -ext WixToolset.Util.wixext -d ProductSku="!PRODUCT_SKU!" -d ProductMajorVersion="!PRODUCT_MAJOR_VERSION!" -d ProductMinorVersion="!PRODUCT_MINOR_VERSION!" -d ProductVersionString="!PRODUCT_SHORT_VERSION!" -d MSIProductVersion="!MSI_PRODUCT_VERSION!" -d ProductId="!PRODUCT_ID!" -d ReproDir="!REPRO_DIR!" -d SetupResourcesDir="!SETUP_RESOURCES_DIR!" -d Culture="!CULTURE!" -cc !CACHE_FOLDER! -out "ReleaseDir\!OUTPUT_BASE_FILENAME!.msi" -loc "%WORKDIR%!OUTPUT_BASE_FILENAME!-!PRODUCT_SKU!.Base.!CULTURE!.wxl" -loc "%WORKDIR%!OUTPUT_BASE_FILENAME!-!PRODUCT_SKU!.!PACKAGE_TYPE!.!CULTURE!.wxl" -culture !CULTURE! REM Clean .cab cache for each run .. Cache is only used inside BuildSetupTranslationTransform.cmd to speed up MST generation IF EXIST !CACHE_FOLDER! rmdir /S /Q !CACHE_FOLDER! diff --git a/wix/BuildSetupTranslationTransform.cmd b/wix/BuildSetupTranslationTransform.cmd index bb9a935c2..4384ae0e5 100644 --- a/wix/BuildSetupTranslationTransform.cmd +++ b/wix/BuildSetupTranslationTransform.cmd @@ -13,7 +13,7 @@ SET LANGIDS=%LANGIDS%,%LANGID% ECHO Building setup translation for culture "%1" with LangID "%2"... REM Build with extra Source Code feature (needs work) -REM IF EXIST Files-!OUTPUT_BASE_FILENAME!.wixobj "%WIX%bin\light.exe" !MSI_VALIDATION_OPTION! Main-!OUTPUT_BASE_FILENAME!.wixobj Files-!OUTPUT_BASE_FILENAME!.wixobj Src-!OUTPUT_BASE_FILENAME!.wixobj !ITW_WIXOBJ! -cc !CACHE_FOLDER! -reusecab -ext WixToolset.UI.wixext -ext WixToolset.Util.wixext -spdb -out "ReleaseDir\!OUTPUT_BASE_FILENAME!.!CULTURE!.msi" -loc "Lang\%PRODUCT_SKU%.Base.!CULTURE!.wxl" -loc "Lang\%PRODUCT_SKU%.!PACKAGE_TYPE!.!CULTURE!.wxl" -cultures:!CULTURE! +REM wix build -arch !PLATFORM! %WORKDIR%!OUTPUT_BASE_FILENAME!-Main.wxs %WORKDIR%!OUTPUT_BASE_FILENAME!-Files.wxs %WORKDIR%!OUTPUT_BASE_FILENAME!-Src.wxs !ITW_WXS! -ext WixToolset.UI.wixext -ext WixToolset.Util.wixext -d IcedTeaWebDir="!ICEDTEAWEB_DIR!" -d OutputBaseFilename="!OUTPUT_BASE_FILENAME!" -d ProductSku="!PRODUCT_SKU!" -d ProductMajorVersion="!PRODUCT_MAJOR_VERSION!" -d ProductMinorVersion="!PRODUCT_MINOR_VERSION!" -d ProductVersionString="!PRODUCT_SHORT_VERSION!" -d MSIProductVersion="!MSI_PRODUCT_VERSION!" -d ProductId="!PRODUCT_ID!" -d ProductUpgradeCode="!PRODUCT_UPGRADE_CODE!" -d ReproDir="!REPRO_DIR!" -d SetupResourcesDir="!SETUP_RESOURCES_DIR!" -d Culture="!CULTURE!" -d JVM="!PACKAGE_TYPE!" -cc !CACHE_FOLDER! -loc "%WORKDIR%!OUTPUT_BASE_FILENAME!-!PRODUCT_SKU!.Base.!CULTURE!.wxl" -loc "%WORKDIR%!OUTPUT_BASE_FILENAME!-!PRODUCT_SKU!.!PACKAGE_TYPE!.!CULTURE!.wxl" -out "ReleaseDir\!OUTPUT_BASE_FILENAME!.!CULTURE!.msi" -culture !CULTURE! -pdbtype none REM Build without extra Source Code feature wix build -arch !PLATFORM! %WORKDIR%!OUTPUT_BASE_FILENAME!-Main.wxs %WORKDIR%!OUTPUT_BASE_FILENAME!-Files.wxs !ITW_WXS! -ext WixToolset.UI.wixext -ext WixToolset.Util.wixext -d IcedTeaWebDir="!ICEDTEAWEB_DIR!" -d OutputBaseFilename="!OUTPUT_BASE_FILENAME!" -d ProductSku="!PRODUCT_SKU!" -d ProductMajorVersion="!PRODUCT_MAJOR_VERSION!" -d ProductMinorVersion="!PRODUCT_MINOR_VERSION!" -d ProductVersionString="!PRODUCT_SHORT_VERSION!" -d MSIProductVersion="!MSI_PRODUCT_VERSION!" -d ProductId="!PRODUCT_ID!" -d ProductUpgradeCode="!PRODUCT_UPGRADE_CODE!" -d ReproDir="!REPRO_DIR!" -d SetupResourcesDir="!SETUP_RESOURCES_DIR!" -d Culture="!CULTURE!" -d JVM="!PACKAGE_TYPE!" -cc !CACHE_FOLDER! -loc "%WORKDIR%!OUTPUT_BASE_FILENAME!-!PRODUCT_SKU!.Base.!CULTURE!.wxl" -loc "%WORKDIR%!OUTPUT_BASE_FILENAME!-!PRODUCT_SKU!.!PACKAGE_TYPE!.!CULTURE!.wxl" -out "ReleaseDir\!OUTPUT_BASE_FILENAME!.!CULTURE!.msi" -culture !CULTURE! -pdbtype none From 784c8de36e8507f3cd349d38c5536f6a3c0faaa6 Mon Sep 17 00:00:00 2001 From: JoshMJ Date: Wed, 10 Apr 2024 14:17:24 -0700 Subject: [PATCH 28/66] Updated wix/README.md --- wix/README.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/wix/README.md b/wix/README.md index dde23eab9..ec3c08343 100644 --- a/wix/README.md +++ b/wix/README.md @@ -16,12 +16,14 @@ call powershell.exe ./CreateSourceFolder.AdoptOpenJDK.ps1 ``` If your file structure/names are different than expected, we now support user-input regexes: -(default values shown below. Note: `-jvm` flag also available, used in place of `-jvm_regex` result ) +- Note: the wix_version should be set to whichever version of wix is available on the buld machine +- default values shown below. Note: `-jvm` flag also available, used in place of `-jvm_regex` result ```batch call powershell.exe ./CreateSourceFolder.AdoptOpenJDK.ps1 ^ -openjdk_filename_regex "^OpenJDK(?\d*)" ^ -platform_regex "(?x86-32|x64|aarch64)" ^ - -jvm_regex "(?hotspot|openj9|dragonwell)" + -jvm_regex "(?hotspot|openj9|dragonwell)" ^ + -wix_version "4.0.5" ``` 3. Export the following environment variables: @@ -36,6 +38,7 @@ call powershell.exe ./CreateSourceFolder.AdoptOpenJDK.ps1 ^ SET ARCH=x64|x86-32|x86|arm64 or all "x64 x86-32 arm64" SET JVM=hotspot|openj9|dragonwell or both JVM=hotspot openj9 SET PRODUCT_CATEGORY=jre|jdk (only one at a time) + SET WIX_VERSION=4.0.5 (make sure this is the same version that is installed on the build machine) cmd /c Build.OpenJDK_generic.cmd ``` From 3c91bded2e486ae80e4ac6bc7b02bc3c8b2a3394 Mon Sep 17 00:00:00 2001 From: JoshMJ Date: Wed, 10 Apr 2024 14:33:56 -0700 Subject: [PATCH 29/66] Seperated heat and build commands out for readability. Now there is 1 flag per line --- wix/Build.OpenJDK_generic.cmd | 52 ++++++++++++++++++++++++-- wix/BuildSetupTranslationTransform.cmd | 26 ++++++++++++- 2 files changed, 74 insertions(+), 4 deletions(-) diff --git a/wix/Build.OpenJDK_generic.cmd b/wix/Build.OpenJDK_generic.cmd index b198db379..b518677f9 100644 --- a/wix/Build.OpenJDK_generic.cmd +++ b/wix/Build.OpenJDK_generic.cmd @@ -225,7 +225,19 @@ FOR %%A IN (%ARCH%) DO ( SET BUNDLE_ICEDTEAWEB=true SET ITW_WXS="%WORKDIR%IcedTeaWeb-!OUTPUT_BASE_FILENAME!.wxs" ECHO HEAT - !WIX_HEAT_PATH! dir "!ICEDTEAWEB_DIR!" -out !ITW_WXS! -t "!SETUP_RESOURCES_DIR!\heat.icedteaweb.xslt" -gg -sfrag -scom -sreg -srd -ke -cg "IcedTeaWebFiles" -var var.IcedTeaWebDir -dr INSTALLDIR -platform !PLATFORM! + !WIX_HEAT_PATH! dir "!ICEDTEAWEB_DIR!" ^ + -out !ITW_WXS! ^ + -t "!SETUP_RESOURCES_DIR!\heat.icedteaweb.xslt" ^ + -gg ^ + -sfrag ^ + -scom ^ + -sreg ^ + -srd ^ + -ke ^ + -cg "IcedTeaWebFiles" ^ + -var var.IcedTeaWebDir ^ + -dr INSTALLDIR ^ + -platform !PLATFORM! IF ERRORLEVEL 1 ( ECHO "Failed to generate Windows Installer XML Source files for IcedTea-Web (.wxs)" GOTO FAILED @@ -246,7 +258,17 @@ FOR %%A IN (%ARCH%) DO ( ECHO HEAT @ECHO ON - !WIX_HEAT_PATH! dir "!REPRO_DIR!" -out %WORKDIR%!OUTPUT_BASE_FILENAME!-Files.wxs -gg -sfrag -scom -sreg -srd -ke -cg "AppFiles" -var var.ProductMajorVersion -var var.ProductMinorVersion -var var.ProductVersionString -var var.MSIProductVersion -var var.ReproDir -dr INSTALLDIR -platform !PLATFORM! + !WIX_HEAT_PATH! dir "!REPRO_DIR!" ^ + -out %WORKDIR%!OUTPUT_BASE_FILENAME!-Files.wxs ^ + -gg -sfrag -scom -sreg -srd -ke ^ + -cg "AppFiles" ^ + -var var.ProductMajorVersion ^ + -var var.ProductMinorVersion ^ + -var var.ProductVersionString ^ + -var var.MSIProductVersion ^ + -var var.ReproDir ^ + -dr INSTALLDIR ^ + -platform !PLATFORM! IF ERRORLEVEL 1 ( ECHO Failed to generate Windows Installer XML Source files ^(.wxs^) GOTO FAILED @@ -255,7 +277,31 @@ FOR %%A IN (%ARCH%) DO ( ECHO BUILD @ECHO ON - wix build -arch !PLATFORM! %WORKDIR%!OUTPUT_BASE_FILENAME!-Main.wxs %WORKDIR%!OUTPUT_BASE_FILENAME!-Files.wxs !ITW_WXS! -ext WixToolset.UI.wixext -ext WixToolset.Util.wixext -d IcedTeaWebDir="!ICEDTEAWEB_DIR!" -d OutputBaseFilename="!OUTPUT_BASE_FILENAME!" -d ProductSku="!PRODUCT_SKU!" -d ProductMajorVersion="!PRODUCT_MAJOR_VERSION!" -d ProductMinorVersion="!PRODUCT_MINOR_VERSION!" -d ProductVersionString="!PRODUCT_SHORT_VERSION!" -d MSIProductVersion="!MSI_PRODUCT_VERSION!" -d ProductId="!PRODUCT_ID!" -d ProductUpgradeCode="!PRODUCT_UPGRADE_CODE!" -d ReproDir="!REPRO_DIR!" -d SetupResourcesDir="!SETUP_RESOURCES_DIR!" -d Culture="!CULTURE!" -d JVM="!PACKAGE_TYPE!" -cc !CACHE_FOLDER! -loc "%WORKDIR%!OUTPUT_BASE_FILENAME!-!PRODUCT_SKU!.Base.!CULTURE!.wxl" -loc "%WORKDIR%!OUTPUT_BASE_FILENAME!-!PRODUCT_SKU!.!PACKAGE_TYPE!.!CULTURE!.wxl" -out "ReleaseDir\!OUTPUT_BASE_FILENAME!.msi" -culture !CULTURE! -pdbtype none + wix build -arch !PLATFORM! ^ + %WORKDIR%!OUTPUT_BASE_FILENAME!-Main.wxs ^ + %WORKDIR%!OUTPUT_BASE_FILENAME!-Files.wxs ^ + !ITW_WXS! ^ + -ext WixToolset.UI.wixext ^ + -ext WixToolset.Util.wixext ^ + -d IcedTeaWebDir="!ICEDTEAWEB_DIR!" ^ + -d OutputBaseFilename="!OUTPUT_BASE_FILENAME!" ^ + -d ProductSku="!PRODUCT_SKU!" ^ + -d ProductMajorVersion="!PRODUCT_MAJOR_VERSION!" ^ + -d ProductMinorVersion="!PRODUCT_MINOR_VERSION!" ^ + -d ProductVersionString="!PRODUCT_SHORT_VERSION!" ^ + -d MSIProductVersion="!MSI_PRODUCT_VERSION!" ^ + -d ProductId="!PRODUCT_ID!" ^ + -d ProductUpgradeCode="!PRODUCT_UPGRADE_CODE!" ^ + -d ReproDir="!REPRO_DIR!" ^ + -d SetupResourcesDir="!SETUP_RESOURCES_DIR!" ^ + -d Culture="!CULTURE!" ^ + -d JVM="!PACKAGE_TYPE!" ^ + -cc !CACHE_FOLDER! ^ + -loc "%WORKDIR%!OUTPUT_BASE_FILENAME!-!PRODUCT_SKU!.Base.!CULTURE!.wxl" ^ + -loc "%WORKDIR%!OUTPUT_BASE_FILENAME!-!PRODUCT_SKU!.!PACKAGE_TYPE!.!CULTURE!.wxl" ^ + -out "ReleaseDir\!OUTPUT_BASE_FILENAME!.msi" ^ + -culture !CULTURE! ^ + -pdbtype none IF ERRORLEVEL 1 ( ECHO Failed to process and compile Windows Installer XML Source files ^(.wxs^) into installer ^(.msi^) dir /s /b /o:n %WORKDIR% diff --git a/wix/BuildSetupTranslationTransform.cmd b/wix/BuildSetupTranslationTransform.cmd index 4384ae0e5..61c68d008 100644 --- a/wix/BuildSetupTranslationTransform.cmd +++ b/wix/BuildSetupTranslationTransform.cmd @@ -16,7 +16,31 @@ REM Build with extra Source Code feature (needs work) REM wix build -arch !PLATFORM! %WORKDIR%!OUTPUT_BASE_FILENAME!-Main.wxs %WORKDIR%!OUTPUT_BASE_FILENAME!-Files.wxs %WORKDIR%!OUTPUT_BASE_FILENAME!-Src.wxs !ITW_WXS! -ext WixToolset.UI.wixext -ext WixToolset.Util.wixext -d IcedTeaWebDir="!ICEDTEAWEB_DIR!" -d OutputBaseFilename="!OUTPUT_BASE_FILENAME!" -d ProductSku="!PRODUCT_SKU!" -d ProductMajorVersion="!PRODUCT_MAJOR_VERSION!" -d ProductMinorVersion="!PRODUCT_MINOR_VERSION!" -d ProductVersionString="!PRODUCT_SHORT_VERSION!" -d MSIProductVersion="!MSI_PRODUCT_VERSION!" -d ProductId="!PRODUCT_ID!" -d ProductUpgradeCode="!PRODUCT_UPGRADE_CODE!" -d ReproDir="!REPRO_DIR!" -d SetupResourcesDir="!SETUP_RESOURCES_DIR!" -d Culture="!CULTURE!" -d JVM="!PACKAGE_TYPE!" -cc !CACHE_FOLDER! -loc "%WORKDIR%!OUTPUT_BASE_FILENAME!-!PRODUCT_SKU!.Base.!CULTURE!.wxl" -loc "%WORKDIR%!OUTPUT_BASE_FILENAME!-!PRODUCT_SKU!.!PACKAGE_TYPE!.!CULTURE!.wxl" -out "ReleaseDir\!OUTPUT_BASE_FILENAME!.!CULTURE!.msi" -culture !CULTURE! -pdbtype none REM Build without extra Source Code feature -wix build -arch !PLATFORM! %WORKDIR%!OUTPUT_BASE_FILENAME!-Main.wxs %WORKDIR%!OUTPUT_BASE_FILENAME!-Files.wxs !ITW_WXS! -ext WixToolset.UI.wixext -ext WixToolset.Util.wixext -d IcedTeaWebDir="!ICEDTEAWEB_DIR!" -d OutputBaseFilename="!OUTPUT_BASE_FILENAME!" -d ProductSku="!PRODUCT_SKU!" -d ProductMajorVersion="!PRODUCT_MAJOR_VERSION!" -d ProductMinorVersion="!PRODUCT_MINOR_VERSION!" -d ProductVersionString="!PRODUCT_SHORT_VERSION!" -d MSIProductVersion="!MSI_PRODUCT_VERSION!" -d ProductId="!PRODUCT_ID!" -d ProductUpgradeCode="!PRODUCT_UPGRADE_CODE!" -d ReproDir="!REPRO_DIR!" -d SetupResourcesDir="!SETUP_RESOURCES_DIR!" -d Culture="!CULTURE!" -d JVM="!PACKAGE_TYPE!" -cc !CACHE_FOLDER! -loc "%WORKDIR%!OUTPUT_BASE_FILENAME!-!PRODUCT_SKU!.Base.!CULTURE!.wxl" -loc "%WORKDIR%!OUTPUT_BASE_FILENAME!-!PRODUCT_SKU!.!PACKAGE_TYPE!.!CULTURE!.wxl" -out "ReleaseDir\!OUTPUT_BASE_FILENAME!.!CULTURE!.msi" -culture !CULTURE! -pdbtype none +wix build -arch !PLATFORM! ^ + %WORKDIR%!OUTPUT_BASE_FILENAME!-Main.wxs ^ + %WORKDIR%!OUTPUT_BASE_FILENAME!-Files.wxs ^ + !ITW_WXS! ^ + -ext WixToolset.UI.wixext ^ + -ext WixToolset.Util.wixext ^ + -d IcedTeaWebDir="!ICEDTEAWEB_DIR!" ^ + -d OutputBaseFilename="!OUTPUT_BASE_FILENAME!" ^ + -d ProductSku="!PRODUCT_SKU!" ^ + -d ProductMajorVersion="!PRODUCT_MAJOR_VERSION!" ^ + -d ProductMinorVersion="!PRODUCT_MINOR_VERSION!" ^ + -d ProductVersionString="!PRODUCT_SHORT_VERSION!" ^ + -d MSIProductVersion="!MSI_PRODUCT_VERSION!" ^ + -d ProductId="!PRODUCT_ID!" ^ + -d ProductUpgradeCode="!PRODUCT_UPGRADE_CODE!" ^ + -d ReproDir="!REPRO_DIR!" ^ + -d SetupResourcesDir="!SETUP_RESOURCES_DIR!" ^ + -d Culture="!CULTURE!" ^ + -d JVM="!PACKAGE_TYPE!" ^ + -cc !CACHE_FOLDER! ^ + -loc "%WORKDIR%!OUTPUT_BASE_FILENAME!-!PRODUCT_SKU!.Base.!CULTURE!.wxl" ^ + -loc "%WORKDIR%!OUTPUT_BASE_FILENAME!-!PRODUCT_SKU!.!PACKAGE_TYPE!.!CULTURE!.wxl" ^ + -out "ReleaseDir\!OUTPUT_BASE_FILENAME!.!CULTURE!.msi" ^ + -culture !CULTURE! ^ + -pdbtype none IF ERRORLEVEL 1 ( ECHO Building msi for culture %CULTURE% failed with errorlevel: %ERRORLEVEL% GOTO FAILED From e0d2273d2e08af21c00299c55a2f6b899bf3b38e Mon Sep 17 00:00:00 2001 From: JoshMJ Date: Wed, 10 Apr 2024 14:41:23 -0700 Subject: [PATCH 30/66] Updated debug and error messages --- wix/Build.OpenJDK_generic.cmd | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/wix/Build.OpenJDK_generic.cmd b/wix/Build.OpenJDK_generic.cmd index b518677f9..86d5ce73e 100644 --- a/wix/Build.OpenJDK_generic.cmd +++ b/wix/Build.OpenJDK_generic.cmd @@ -44,7 +44,7 @@ powershell -ExecutionPolicy Bypass -File "%~dp0\helpers\Validate-Input.ps1" ^ -delimiter " " IF %ERRORLEVEL% == 1 ( - ECHO ARCH %ARCH% not supported : valid values are any combination of : x64, x86-32, arm64 + ECHO ARCH %ARCH% not supported : valid values are any combination of : x64, (x86 or x86-32), arm64 GOTO FAILED ) @@ -183,7 +183,7 @@ FOR %%A IN (%ARCH%) DO ( REM If no UPGRADE_CODE_SEED given .. we are not trying to build upgradable MSI and generate always a new PRODUCT_UPGRADE_CODE FOR /F %%F IN ('POWERSHELL -COMMAND "$([guid]::NewGuid().ToString('b').ToUpper())"') DO ( SET PRODUCT_UPGRADE_CODE=%%F - ECHO Uniq PRODUCT_UPGRADE_CODE: !PRODUCT_UPGRADE_CODE! + ECHO Unique PRODUCT_UPGRADE_CODE: !PRODUCT_UPGRADE_CODE! ) ) ELSE ( REM It will be better if we can generate "Name-based UUID" as specified here https://tools.ietf.org/html/rfc4122#section-4.3 @@ -224,7 +224,8 @@ FOR %%A IN (%ARCH%) DO ( ECHO IcedTeaWeb Directory Exists! SET BUNDLE_ICEDTEAWEB=true SET ITW_WXS="%WORKDIR%IcedTeaWeb-!OUTPUT_BASE_FILENAME!.wxs" - ECHO HEAT + ECHO HEAT IcedTeaWeb + @ECHO ON !WIX_HEAT_PATH! dir "!ICEDTEAWEB_DIR!" ^ -out !ITW_WXS! ^ -t "!SETUP_RESOURCES_DIR!\heat.icedteaweb.xslt" ^ @@ -242,6 +243,7 @@ FOR %%A IN (%ARCH%) DO ( ECHO "Failed to generate Windows Installer XML Source files for IcedTea-Web (.wxs)" GOTO FAILED ) + @ECHO OFF @REM Add suffix to declaration and references of the IcedTeaWebDir 'bin' subfolder @REM This is to avoid dubplicate Id conflict with INSTALLDER 'bin' subfolder @@ -328,7 +330,7 @@ FOR %%A IN (%ARCH%) DO ( REM For temporarily disable the smoke test - use OPTION SKIP_MSI_VALIDATION=true REM To validate MSI only once at the end IF NOT "%SKIP_MSI_VALIDATION%" == "true" ( - ECHO SMOKE + ECHO VALIDATE @ECHO ON wix msi validate "ReleaseDir\!OUTPUT_BASE_FILENAME!.msi" IF ERRORLEVEL 1 ( From 960e7dff706b912605f49dc4e79519fd22d16267 Mon Sep 17 00:00:00 2001 From: JoshMJ Date: Wed, 10 Apr 2024 14:54:50 -0700 Subject: [PATCH 31/66] Fixed typo --- wix/Build.OpenJDK_generic.cmd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wix/Build.OpenJDK_generic.cmd b/wix/Build.OpenJDK_generic.cmd index 86d5ce73e..29ee9cf12 100644 --- a/wix/Build.OpenJDK_generic.cmd +++ b/wix/Build.OpenJDK_generic.cmd @@ -44,7 +44,7 @@ powershell -ExecutionPolicy Bypass -File "%~dp0\helpers\Validate-Input.ps1" ^ -delimiter " " IF %ERRORLEVEL% == 1 ( - ECHO ARCH %ARCH% not supported : valid values are any combination of : x64, (x86 or x86-32), arm64 + ECHO ARCH %ARCH% not supported : valid values are any combination of : x64, ^(x86 or x86-32^), arm64 GOTO FAILED ) From 5af48b99fd010b37fe698aae1874d4fa4e629943 Mon Sep 17 00:00:00 2001 From: JoshMJ Date: Wed, 10 Apr 2024 15:49:32 -0700 Subject: [PATCH 32/66] Now using wix v5 by default --- .github/workflows/wix.yml | 6 +-- wix/Build.OpenJDK_generic.cmd | 2 +- wix/README.md | 10 +++-- .../CreateSourceFolder.AdoptOpenJDK.ps1 | 44 ++++++++++--------- 4 files changed, 33 insertions(+), 29 deletions(-) diff --git a/.github/workflows/wix.yml b/.github/workflows/wix.yml index dd4f0f405..0b8bfb078 100644 --- a/.github/workflows/wix.yml +++ b/.github/workflows/wix.yml @@ -24,7 +24,7 @@ jobs: TAG: jdk8u362-b09 SUB_TAG: 8u362b09 JVM: hotspot - WIX_VERSION: 4.0.5 + WIX_VERSION: 5.0.0 - jdk: 11 ICEDTEA_WEB_VERSION: "" PRODUCT_MAJOR_VERSION: 11 @@ -37,7 +37,7 @@ jobs: TAG: jdk-11.0.18+10 SUB_TAG: 11.0.18_10 JVM: hotspot - WIX_VERSION: 4.0.5 + WIX_VERSION: 5.0.0 - jdk: 17 ICEDTEA_WEB_VERSION: "" PRODUCT_MAJOR_VERSION: 17 @@ -50,7 +50,7 @@ jobs: TAG: jdk-17.0.6+10 SUB_TAG: 17.0.6_10 JVM: hotspot - WIX_VERSION: 4.0.5 + WIX_VERSION: 5.0.0 name: wix runs-on: windows-latest diff --git a/wix/Build.OpenJDK_generic.cmd b/wix/Build.OpenJDK_generic.cmd index 29ee9cf12..d03c829e4 100644 --- a/wix/Build.OpenJDK_generic.cmd +++ b/wix/Build.OpenJDK_generic.cmd @@ -36,7 +36,7 @@ IF NOT DEFINED PRODUCT_HELP_LINK SET PRODUCT_HELP_LINK=https://github.com/adopti IF NOT DEFINED PRODUCT_SUPPORT_LINK SET PRODUCT_SUPPORT_LINK=https://adoptium.net/support IF NOT DEFINED PRODUCT_UPDATE_INFO_LINK SET PRODUCT_UPDATE_INFO_LINK=https://adoptium.net/temurin/releases IF NOT DEFINED WIX_HEAT_PATH SET WIX_HEAT_PATH=.\Resources\heat_dir\heat.exe -IF NOT DEFINED WIX_VERSION SET WIX_VERSION=4.0.5 +IF NOT DEFINED WIX_VERSION SET WIX_VERSION=5.0.0 powershell -ExecutionPolicy Bypass -File "%~dp0\helpers\Validate-Input.ps1" ^ -toValidate '%ARCH%' ^ diff --git a/wix/README.md b/wix/README.md index ec3c08343..ec8f1be5a 100644 --- a/wix/README.md +++ b/wix/README.md @@ -16,14 +16,16 @@ call powershell.exe ./CreateSourceFolder.AdoptOpenJDK.ps1 ``` If your file structure/names are different than expected, we now support user-input regexes: + - Note: the wix_version should be set to whichever version of wix is available on the buld machine - default values shown below. Note: `-jvm` flag also available, used in place of `-jvm_regex` result + ```batch call powershell.exe ./CreateSourceFolder.AdoptOpenJDK.ps1 ^ -openjdk_filename_regex "^OpenJDK(?\d*)" ^ -platform_regex "(?x86-32|x64|aarch64)" ^ -jvm_regex "(?hotspot|openj9|dragonwell)" ^ - -wix_version "4.0.5" + -wix_version "5.0.0" ``` 3. Export the following environment variables: @@ -38,7 +40,7 @@ call powershell.exe ./CreateSourceFolder.AdoptOpenJDK.ps1 ^ SET ARCH=x64|x86-32|x86|arm64 or all "x64 x86-32 arm64" SET JVM=hotspot|openj9|dragonwell or both JVM=hotspot openj9 SET PRODUCT_CATEGORY=jre|jdk (only one at a time) - SET WIX_VERSION=4.0.5 (make sure this is the same version that is installed on the build machine) + SET WIX_VERSION=5.0.0 (make sure this is the same version that is installed on the build machine) cmd /c Build.OpenJDK_generic.cmd ``` @@ -148,7 +150,7 @@ Upgradable MSI work only for first 3 digit from the build number (due to MSI lim - Upgradable : 8.0.2.1 -> 8.0.3.1 Yes - Upgradable : 8.0.2.1 -> 8.0.2.2 No ( You must uninstall previous msi and install new one ) - Upgradable : 8.0.2.1 -> 8.1.2.1 Yes -- Upgradable : 8.0.2.1 -> 11.0.2.1 No ( Adoptium does not provide upgrade for different major version ( jdk 8 -> jdk 11 ) (You can keep both or uninstall older jdk yourself ) +- Upgradable : 8.0.2.1 -> 11.0.2.1 No ( Adoptium does not provide upgrade for different major version ( jdk 8 -> jdk 11 ) (You can keep both or uninstall older jdk yourself ) ## Troubleshooting @@ -163,7 +165,7 @@ C:\WINDOWS\System32\msiexec.exe /i "C:\Users\Administrator\Downloads\OpenJDK11U- If you have trouble with the GUI installer, changes to the registry are needed to enable logging (copy into `cmd.exe`): ```cmd -reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\Installer" /v Debug /t REG_DWORD /d 7 /f +reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\Installer" /v Debug /t REG_DWORD /d 7 /f reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\Installer" /v Logging /t REG_SZ /d voicewarmupx! /f ``` diff --git a/wix/SourceDir/CreateSourceFolder.AdoptOpenJDK.ps1 b/wix/SourceDir/CreateSourceFolder.AdoptOpenJDK.ps1 index d1c5accfb..30e30dba3 100644 --- a/wix/SourceDir/CreateSourceFolder.AdoptOpenJDK.ps1 +++ b/wix/SourceDir/CreateSourceFolder.AdoptOpenJDK.ps1 @@ -22,7 +22,7 @@ .PARAMETER wix_version The version wix that is currently installed. - Used to determine WixToolset.Heat version to be installed. Default is 4.0.5. + Used to determine WixToolset.Heat version to be installed. Default is 5.0.0. .NOTES File Name: CreateSourceFolder.AdoptOpenJDK.ps1 @@ -36,19 +36,19 @@ #> param ( - [Parameter(Mandatory = $false)] - [string]$openjdk_filename_regex = "^OpenJDK(?\d*)", - [Parameter(Mandatory = $false)] - [string]$platform_regex = "(?x86-32|x64|aarch64)", - [Parameter(Mandatory = $false)] - [string]$jvm_regex = "(?hotspot|openj9|dragonwell)", - [Parameter(Mandatory = $false)] - [string]$jvm = "", - [Parameter(Mandatory = $false)] - [string]$wix_version = "4.0.5" + [Parameter(Mandatory = $false)] + [string]$openjdk_filename_regex = "^OpenJDK(?\d*)", + [Parameter(Mandatory = $false)] + [string]$platform_regex = "(?x86-32|x64|aarch64)", + [Parameter(Mandatory = $false)] + [string]$jvm_regex = "(?hotspot|openj9|dragonwell)", + [Parameter(Mandatory = $false)] + [string]$jvm = "", + [Parameter(Mandatory = $false)] + [string]$wix_version = "5.0.0" ) -Get-ChildItem -Path .\ -Filter *.zip -File -Name| ForEach-Object { +Get-ChildItem -Path .\ -Filter *.zip -File -Name | ForEach-Object { $filename = [System.IO.Path]::GetFileName($_) Write-Output "Processing filename : $filename" @@ -60,13 +60,14 @@ Get-ChildItem -Path .\ -Filter *.zip -File -Name| ForEach-Object { exit 2 } - $openjdk_basedir="OpenJDK" + $openjdk_basedir = "OpenJDK" if ([string]::IsNullOrEmpty($matches.major)) { # put unnumbered OpenJDK filename into OpenJDK-Latest directory # see Build.OpenJDK_generic.cmd who's going to look at it - $major=$openjdk_basedir + "-Latest" - } else { - $major=$openjdk_basedir + $Matches.major + $major = $openjdk_basedir + "-Latest" + } + else { + $major = $openjdk_basedir + $Matches.major } if ([string]::IsNullOrEmpty($jvm)) { @@ -90,7 +91,7 @@ Get-ChildItem -Path .\ -Filter *.zip -File -Name| ForEach-Object { # Wix toolset expects this to be called arm64 if ($platform -eq "aarch64") { - $platform="arm64" + $platform = "arm64" } # extract now @@ -99,13 +100,14 @@ Get-ChildItem -Path .\ -Filter *.zip -File -Name| ForEach-Object { Expand-Archive -Force -Path $filename -DestinationPath $unzip_dest # do some cleanup in path - Get-ChildItem -Directory $unzip_dest | Where-Object {$_ -match ".*_.*"} | ForEach-Object { + Get-ChildItem -Directory $unzip_dest | Where-Object { $_ -match ".*_.*" } | ForEach-Object { $SourcePath = [System.IO.Path]::GetDirectoryName($_.FullName) if ( $_.Name -Match "(.*)_(.*)-jre$" ) { - $NewName = $_.Name -replace "(.*)_(.*)$",'$1-jre' - } elseif ( $_.Name -Match "(.*)_(.*)$" ) { - $NewName = $_.Name -replace "(.*)_(.*)$",'$1' + $NewName = $_.Name -replace "(.*)_(.*)$", '$1-jre' + } + elseif ( $_.Name -Match "(.*)_(.*)$" ) { + $NewName = $_.Name -replace "(.*)_(.*)$", '$1' } $Destination = Join-Path -Path $SourcePath -ChildPath $NewName From 07b7ed98e91245a6ac3221a55f38d76393ce8f1c Mon Sep 17 00:00:00 2001 From: JoshMJ Date: Tue, 16 Apr 2024 13:33:10 -0700 Subject: [PATCH 33/66] Added ability for custom output file names --- wix/Build.OpenJDK_generic.cmd | 3 ++- wix/README.md | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/wix/Build.OpenJDK_generic.cmd b/wix/Build.OpenJDK_generic.cmd index d03c829e4..4e55c03f1 100644 --- a/wix/Build.OpenJDK_generic.cmd +++ b/wix/Build.OpenJDK_generic.cmd @@ -12,6 +12,7 @@ REM JVM=hotspot|openj9|dragonwell or both JVM=hotspot openj9 REM PRODUCT_CATEGORY=jre|jdk (only one at a time) REM SKIP_MSI_VALIDATION=true (Add -sval option to light.exe to skip MSI/MSM validation and skip smoke.exe ) REM UPGRADE_CODE_SEED=thisIsAPrivateSecretSeed ( optional ) for upgradable MSI (If none, new PRODUCT_UPGRADE_CODE is generate for each run) +REM OUTPUT_BASE_FILENAME=customFileName (optional) for setting file names that are not based on the default naming convention SETLOCAL ENABLEEXTENSIONS SET ERR=0 @@ -155,7 +156,7 @@ FOR %%A IN (%ARCH%) DO ( :CONTINUE ECHO Source dir used : !REPRO_DIR! - SET OUTPUT_BASE_FILENAME=!PRODUCT_SKU!!PRODUCT_MAJOR_VERSION!-!PRODUCT_CATEGORY!_!FOLDER_PLATFORM!_windows_!PACKAGE_TYPE!-!PRODUCT_FULL_VERSION! + IF NOT DEFINED OUTPUT_BASE_FILENAME SET OUTPUT_BASE_FILENAME=!PRODUCT_SKU!!PRODUCT_MAJOR_VERSION!-!PRODUCT_CATEGORY!_!FOLDER_PLATFORM!_windows_!PACKAGE_TYPE!-!PRODUCT_FULL_VERSION! REM find all *.wxi.template,*.wxl.template,*.wxs.template files and replace text with configurations FOR /f %%i IN ('dir /s /b *.wxi.template, *.Base.*.wxl.template *.!JVM!.*.wxl.template,*.wxs.template') DO ( SET INPUT_FILE=%%~ni diff --git a/wix/README.md b/wix/README.md index ec8f1be5a..275aba419 100644 --- a/wix/README.md +++ b/wix/README.md @@ -55,6 +55,7 @@ call powershell.exe ./CreateSourceFolder.AdoptOpenJDK.ps1 ^ set VENDOR_BRANDING_LOGO=$(var.SetupResourcesDir)\logo.ico set VENDOR_BRANDING_BANNER=$(var.SetupResourcesDir)\wix-banner.png set VENDOR_BRANDING_DIALOG=$(var.SetupResourcesDir)\wix-dialog.png + set OUTPUT_BASE_FILENAME=%PRODUCT_SKU%%PRODUCT_MAJOR_VERSION%-%PRODUCT_CATEGORY%_%FOLDER_PLATFORM%_windows_%PACKAGE_TYPE%-%PRODUCT_FULL_VERSION% ``` `Build.OpenJDK_generic.cmd` statically depend on this SDK version (edit if needed): From 352bf89a842907dcd004edffe19f675702bad0a5 Mon Sep 17 00:00:00 2001 From: JoshMJ Date: Thu, 18 Apr 2024 13:56:10 -0700 Subject: [PATCH 34/66] Removed old comments --- wix/Build.OpenJDK_generic.cmd | 8 -------- wix/BuildSetupTranslationTransform.cmd | 4 ---- 2 files changed, 12 deletions(-) diff --git a/wix/Build.OpenJDK_generic.cmd b/wix/Build.OpenJDK_generic.cmd index 4e55c03f1..4ee2e384a 100644 --- a/wix/Build.OpenJDK_generic.cmd +++ b/wix/Build.OpenJDK_generic.cmd @@ -200,12 +200,6 @@ FOR %%A IN (%ARCH%) DO ( ) ) - - REM Build with extra Source Code feature (needs work) - REM !WIX_HEAT_PATH! file "!REPRO_DIR!\lib\src.zip" -out !OUTPUT_BASE_FILENAME!-Src.wxs -gg -srd -cg "SrcFiles" -var var.ReproDir -dr INSTALLDIR -platform !PLATFORM! - REM !WIX_HEAT_PATH! dir "!REPRO_DIR!" -out !OUTPUT_BASE_FILENAME!-Files.wxs -t "!SETUP_RESOURCES_DIR!\heat.tools.xslt" -gg -sfrag -scom -sreg -srd -ke -cg "AppFiles" -var var.ProductMajorVersion -var var.ProductMinorVersion -var var.ProductVersionString -var var.MSIProductVersion -var var.ReproDir -dr INSTALLDIR -platform !PLATFORM! - REM wix -arch !PLATFORM! !OUTPUT_BASE_FILENAME!-Main.wxs !OUTPUT_BASE_FILENAME!-Files.wxs !OUTPUT_BASE_FILENAME!-Src.wxs -ext WixToolset.UI.wixext -ext WixToolset.Util.wixext -d ProductSku="!PRODUCT_SKU!" -d ProductMajorVersion="!PRODUCT_MAJOR_VERSION!" -d ProductMinorVersion="!PRODUCT_MINOR_VERSION!" -d ProductVersionString="!PRODUCT_SHORT_VERSION!" -d MSIProductVersion="!MSI_PRODUCT_VERSION!" -d ProductId="!PRODUCT_ID!" -d ReproDir="!REPRO_DIR!" -d SetupResourcesDir="!SETUP_RESOURCES_DIR!" -d Culture="!CULTURE!" -cc !CACHE_FOLDER! -out "ReleaseDir\!OUTPUT_BASE_FILENAME!.msi" -loc "%WORKDIR%!OUTPUT_BASE_FILENAME!-!PRODUCT_SKU!.Base.!CULTURE!.wxl" -loc "%WORKDIR%!OUTPUT_BASE_FILENAME!-!PRODUCT_SKU!.!PACKAGE_TYPE!.!CULTURE!.wxl" -culture !CULTURE! - REM Clean .cab cache for each run .. Cache is only used inside BuildSetupTranslationTransform.cmd to speed up MST generation IF EXIST !CACHE_FOLDER! rmdir /S /Q !CACHE_FOLDER! MKDIR !CACHE_FOLDER! @@ -214,8 +208,6 @@ FOR %%A IN (%ARCH%) DO ( GOTO FAILED ) - REM Build without extra Source Code feature - REM Set default variable SET ICEDTEAWEB_DIR=.\SourceDir\icedtea-web-image SET BUNDLE_ICEDTEAWEB=false diff --git a/wix/BuildSetupTranslationTransform.cmd b/wix/BuildSetupTranslationTransform.cmd index 61c68d008..9726e7081 100644 --- a/wix/BuildSetupTranslationTransform.cmd +++ b/wix/BuildSetupTranslationTransform.cmd @@ -12,10 +12,6 @@ SET LANGID=%2 SET LANGIDS=%LANGIDS%,%LANGID% ECHO Building setup translation for culture "%1" with LangID "%2"... -REM Build with extra Source Code feature (needs work) -REM wix build -arch !PLATFORM! %WORKDIR%!OUTPUT_BASE_FILENAME!-Main.wxs %WORKDIR%!OUTPUT_BASE_FILENAME!-Files.wxs %WORKDIR%!OUTPUT_BASE_FILENAME!-Src.wxs !ITW_WXS! -ext WixToolset.UI.wixext -ext WixToolset.Util.wixext -d IcedTeaWebDir="!ICEDTEAWEB_DIR!" -d OutputBaseFilename="!OUTPUT_BASE_FILENAME!" -d ProductSku="!PRODUCT_SKU!" -d ProductMajorVersion="!PRODUCT_MAJOR_VERSION!" -d ProductMinorVersion="!PRODUCT_MINOR_VERSION!" -d ProductVersionString="!PRODUCT_SHORT_VERSION!" -d MSIProductVersion="!MSI_PRODUCT_VERSION!" -d ProductId="!PRODUCT_ID!" -d ProductUpgradeCode="!PRODUCT_UPGRADE_CODE!" -d ReproDir="!REPRO_DIR!" -d SetupResourcesDir="!SETUP_RESOURCES_DIR!" -d Culture="!CULTURE!" -d JVM="!PACKAGE_TYPE!" -cc !CACHE_FOLDER! -loc "%WORKDIR%!OUTPUT_BASE_FILENAME!-!PRODUCT_SKU!.Base.!CULTURE!.wxl" -loc "%WORKDIR%!OUTPUT_BASE_FILENAME!-!PRODUCT_SKU!.!PACKAGE_TYPE!.!CULTURE!.wxl" -out "ReleaseDir\!OUTPUT_BASE_FILENAME!.!CULTURE!.msi" -culture !CULTURE! -pdbtype none - -REM Build without extra Source Code feature wix build -arch !PLATFORM! ^ %WORKDIR%!OUTPUT_BASE_FILENAME!-Main.wxs ^ %WORKDIR%!OUTPUT_BASE_FILENAME!-Files.wxs ^ From d0136daaa82991c9e9c68a4f8d894355788d5875 Mon Sep 17 00:00:00 2001 From: JoshMJ Date: Mon, 22 Apr 2024 11:00:12 -0700 Subject: [PATCH 35/66] applied feedback from code review --- .github/workflows/wix.yml | 8 ++------ wix/helpers/Update-id.ps1 | 3 --- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/.github/workflows/wix.yml b/.github/workflows/wix.yml index 0b8bfb078..9ad354c78 100644 --- a/.github/workflows/wix.yml +++ b/.github/workflows/wix.yml @@ -24,7 +24,6 @@ jobs: TAG: jdk8u362-b09 SUB_TAG: 8u362b09 JVM: hotspot - WIX_VERSION: 5.0.0 - jdk: 11 ICEDTEA_WEB_VERSION: "" PRODUCT_MAJOR_VERSION: 11 @@ -37,7 +36,6 @@ jobs: TAG: jdk-11.0.18+10 SUB_TAG: 11.0.18_10 JVM: hotspot - WIX_VERSION: 5.0.0 - jdk: 17 ICEDTEA_WEB_VERSION: "" PRODUCT_MAJOR_VERSION: 17 @@ -50,7 +48,6 @@ jobs: TAG: jdk-17.0.6+10 SUB_TAG: 17.0.6_10 JVM: hotspot - WIX_VERSION: 5.0.0 name: wix runs-on: windows-latest @@ -60,7 +57,7 @@ jobs: - name: Install dependencies run: | choco install --no-progress wget - dotnet tool install --global wix --version ${{ matrix.WIX_VERSION }} + dotnet tool install --global wix --version 5.0.0 - name: Setup environment variables uses: allenevans/set-env@0f3306034af0ea21dd28983b6e7c1614ee317739 # v3.0.0 @@ -73,7 +70,6 @@ jobs: MSI_PRODUCT_VERSION: ${{ matrix.MSI_PRODUCT_VERSION }} ARCH: ${{ matrix.ARCH }} JVM: ${{ matrix.JVM }} - WIX_VERSION: ${{ matrix.WIX_VERSION }} - name: Download IcedTea-Web run: | @@ -89,7 +85,7 @@ jobs: cd wix\SourceDir wget -q "https://github.com/adoptium/temurin${{ env.PRODUCT_MAJOR_VERSION }}-binaries/releases/download/${{ matrix.TAG }}/OpenJDK${{ env.PRODUCT_MAJOR_VERSION }}U-jdk_${{ env.ARCH }}_windows_${{ env.JVM }}_${{ matrix.SUB_TAG }}.zip" wget -q "https://github.com/adoptium/temurin${{ env.PRODUCT_MAJOR_VERSION }}-binaries/releases/download/${{ matrix.TAG }}/OpenJDK${{ env.PRODUCT_MAJOR_VERSION }}U-jre_${{ env.ARCH }}_windows_${{ env.JVM }}_${{ matrix.SUB_TAG }}.zip" - ./CreateSourceFolder.AdoptOpenJDK.ps1 -wix_version ${{ env.WIX_VERSION }} + ./CreateSourceFolder.AdoptOpenJDK.ps1 - name: Create JDK Installer run: | diff --git a/wix/helpers/Update-id.ps1 b/wix/helpers/Update-id.ps1 index d996b1ec9..a06455f73 100644 --- a/wix/helpers/Update-id.ps1 +++ b/wix/helpers/Update-id.ps1 @@ -67,6 +67,3 @@ else { # Write the updated content back to the file $updatedContent | Set-Content -Path $FilePath } - - - From ad44594cc73291b9b247c81ac177428838b1930a Mon Sep 17 00:00:00 2001 From: JoshMJ Date: Mon, 22 Apr 2024 11:11:25 -0700 Subject: [PATCH 36/66] Added xml tagging back --- wix/Includes/OpenJDK.Variables.wxi.template | 3 ++- wix/Lang/OpenJDK.Base.de-de.wxl.template | 3 ++- wix/Lang/OpenJDK.Base.en-us.wxl.template | 3 ++- wix/Lang/OpenJDK.Base.es-es.wxl.template | 3 ++- wix/Lang/OpenJDK.Base.fr-fr.wxl.template | 3 ++- wix/Lang/OpenJDK.Base.ja-jp.wxl.template | 3 ++- wix/Lang/OpenJDK.Base.zh-cn.wxl.template | 3 ++- wix/Lang/OpenJDK.Base.zh-tw.wxl.template | 3 ++- wix/Lang/OpenJDK.dragonwell.de-de.wxl.template | 3 ++- wix/Lang/OpenJDK.dragonwell.en-us.wxl.template | 3 ++- wix/Lang/OpenJDK.dragonwell.es-es.wxl.template | 3 ++- wix/Lang/OpenJDK.dragonwell.fr-fr.wxl.template | 3 ++- wix/Lang/OpenJDK.dragonwell.ja-jp.wxl.template | 3 ++- wix/Lang/OpenJDK.dragonwell.zh-cn.wxl.template | 3 ++- wix/Lang/OpenJDK.dragonwell.zh-tw.wxl.template | 3 ++- wix/Lang/OpenJDK.hotspot.de-de.wxl.template | 3 ++- wix/Lang/OpenJDK.hotspot.en-us.wxl.template | 3 ++- wix/Lang/OpenJDK.hotspot.es-es.wxl.template | 3 ++- wix/Lang/OpenJDK.hotspot.fr-fr.wxl.template | 3 ++- wix/Lang/OpenJDK.hotspot.ja-jp.wxl.template | 3 ++- wix/Lang/OpenJDK.hotspot.zh-cn.wxl.template | 3 ++- wix/Lang/OpenJDK.hotspot.zh-tw.wxl.template | 3 ++- wix/Lang/OpenJDK.openj9.de-de.wxl.template | 3 ++- wix/Lang/OpenJDK.openj9.en-us.wxl.template | 3 ++- wix/Lang/OpenJDK.openj9.es-es.wxl.template | 3 ++- wix/Lang/OpenJDK.openj9.fr-fr.wxl.template | 3 ++- wix/Lang/OpenJDK.openj9.ja-jp.wxl.template | 3 ++- wix/Lang/OpenJDK.openj9.zh-cn.wxl.template | 3 ++- wix/Lang/OpenJDK.openj9.zh-tw.wxl.template | 3 ++- wix/Main.wxs.template | 3 ++- 30 files changed, 60 insertions(+), 30 deletions(-) diff --git a/wix/Includes/OpenJDK.Variables.wxi.template b/wix/Includes/OpenJDK.Variables.wxi.template index c3d61098d..21e7434a9 100644 --- a/wix/Includes/OpenJDK.Variables.wxi.template +++ b/wix/Includes/OpenJDK.Variables.wxi.template @@ -1,4 +1,5 @@ - + + diff --git a/wix/Lang/OpenJDK.Base.de-de.wxl.template b/wix/Lang/OpenJDK.Base.de-de.wxl.template index cefaf1fa5..b7f0818b8 100644 --- a/wix/Lang/OpenJDK.Base.de-de.wxl.template +++ b/wix/Lang/OpenJDK.Base.de-de.wxl.template @@ -1,4 +1,5 @@ - + + diff --git a/wix/Lang/OpenJDK.Base.en-us.wxl.template b/wix/Lang/OpenJDK.Base.en-us.wxl.template index 4d7606695..ad8f64653 100644 --- a/wix/Lang/OpenJDK.Base.en-us.wxl.template +++ b/wix/Lang/OpenJDK.Base.en-us.wxl.template @@ -1,4 +1,5 @@ - + + diff --git a/wix/Lang/OpenJDK.Base.es-es.wxl.template b/wix/Lang/OpenJDK.Base.es-es.wxl.template index e7a5aa853..9704a0d60 100644 --- a/wix/Lang/OpenJDK.Base.es-es.wxl.template +++ b/wix/Lang/OpenJDK.Base.es-es.wxl.template @@ -1,4 +1,5 @@ - + + diff --git a/wix/Lang/OpenJDK.Base.fr-fr.wxl.template b/wix/Lang/OpenJDK.Base.fr-fr.wxl.template index b17d03ce5..b9dfdff1f 100644 --- a/wix/Lang/OpenJDK.Base.fr-fr.wxl.template +++ b/wix/Lang/OpenJDK.Base.fr-fr.wxl.template @@ -1,4 +1,5 @@ - + + diff --git a/wix/Lang/OpenJDK.Base.ja-jp.wxl.template b/wix/Lang/OpenJDK.Base.ja-jp.wxl.template index 048c9a4a9..3f01690b5 100644 --- a/wix/Lang/OpenJDK.Base.ja-jp.wxl.template +++ b/wix/Lang/OpenJDK.Base.ja-jp.wxl.template @@ -1,4 +1,5 @@ - + + diff --git a/wix/Lang/OpenJDK.Base.zh-cn.wxl.template b/wix/Lang/OpenJDK.Base.zh-cn.wxl.template index 9072a0f30..6b5c9fbbe 100644 --- a/wix/Lang/OpenJDK.Base.zh-cn.wxl.template +++ b/wix/Lang/OpenJDK.Base.zh-cn.wxl.template @@ -1,4 +1,5 @@ - + + diff --git a/wix/Lang/OpenJDK.Base.zh-tw.wxl.template b/wix/Lang/OpenJDK.Base.zh-tw.wxl.template index 2a4dbc760..f605bd5ae 100644 --- a/wix/Lang/OpenJDK.Base.zh-tw.wxl.template +++ b/wix/Lang/OpenJDK.Base.zh-tw.wxl.template @@ -1,4 +1,5 @@ - + + diff --git a/wix/Lang/OpenJDK.dragonwell.de-de.wxl.template b/wix/Lang/OpenJDK.dragonwell.de-de.wxl.template index 4753e5e4b..77e57aea6 100644 --- a/wix/Lang/OpenJDK.dragonwell.de-de.wxl.template +++ b/wix/Lang/OpenJDK.dragonwell.de-de.wxl.template @@ -1,4 +1,5 @@ - + + diff --git a/wix/Lang/OpenJDK.dragonwell.en-us.wxl.template b/wix/Lang/OpenJDK.dragonwell.en-us.wxl.template index e8b28a1d8..0a28616a5 100644 --- a/wix/Lang/OpenJDK.dragonwell.en-us.wxl.template +++ b/wix/Lang/OpenJDK.dragonwell.en-us.wxl.template @@ -1,4 +1,5 @@ - + + diff --git a/wix/Lang/OpenJDK.dragonwell.es-es.wxl.template b/wix/Lang/OpenJDK.dragonwell.es-es.wxl.template index b8498005d..22138d5f2 100644 --- a/wix/Lang/OpenJDK.dragonwell.es-es.wxl.template +++ b/wix/Lang/OpenJDK.dragonwell.es-es.wxl.template @@ -1,4 +1,5 @@ - + + diff --git a/wix/Lang/OpenJDK.dragonwell.fr-fr.wxl.template b/wix/Lang/OpenJDK.dragonwell.fr-fr.wxl.template index 56080e5b3..b2f3478a3 100644 --- a/wix/Lang/OpenJDK.dragonwell.fr-fr.wxl.template +++ b/wix/Lang/OpenJDK.dragonwell.fr-fr.wxl.template @@ -1,4 +1,5 @@ - + + diff --git a/wix/Lang/OpenJDK.dragonwell.ja-jp.wxl.template b/wix/Lang/OpenJDK.dragonwell.ja-jp.wxl.template index 380529ea8..b932325fe 100644 --- a/wix/Lang/OpenJDK.dragonwell.ja-jp.wxl.template +++ b/wix/Lang/OpenJDK.dragonwell.ja-jp.wxl.template @@ -1,4 +1,5 @@ - + + diff --git a/wix/Lang/OpenJDK.dragonwell.zh-cn.wxl.template b/wix/Lang/OpenJDK.dragonwell.zh-cn.wxl.template index 4189b2310..9e3431093 100644 --- a/wix/Lang/OpenJDK.dragonwell.zh-cn.wxl.template +++ b/wix/Lang/OpenJDK.dragonwell.zh-cn.wxl.template @@ -1,4 +1,5 @@ - + + diff --git a/wix/Lang/OpenJDK.dragonwell.zh-tw.wxl.template b/wix/Lang/OpenJDK.dragonwell.zh-tw.wxl.template index 908feaa56..96e17efa5 100644 --- a/wix/Lang/OpenJDK.dragonwell.zh-tw.wxl.template +++ b/wix/Lang/OpenJDK.dragonwell.zh-tw.wxl.template @@ -1,4 +1,5 @@ - + + diff --git a/wix/Lang/OpenJDK.hotspot.de-de.wxl.template b/wix/Lang/OpenJDK.hotspot.de-de.wxl.template index 5e697ebdf..754ba2b36 100644 --- a/wix/Lang/OpenJDK.hotspot.de-de.wxl.template +++ b/wix/Lang/OpenJDK.hotspot.de-de.wxl.template @@ -1,4 +1,5 @@ - + + diff --git a/wix/Lang/OpenJDK.hotspot.en-us.wxl.template b/wix/Lang/OpenJDK.hotspot.en-us.wxl.template index 8cd92ae50..a93468caa 100644 --- a/wix/Lang/OpenJDK.hotspot.en-us.wxl.template +++ b/wix/Lang/OpenJDK.hotspot.en-us.wxl.template @@ -1,4 +1,5 @@ - + + diff --git a/wix/Lang/OpenJDK.hotspot.es-es.wxl.template b/wix/Lang/OpenJDK.hotspot.es-es.wxl.template index 3f0124e99..fea6ef40a 100644 --- a/wix/Lang/OpenJDK.hotspot.es-es.wxl.template +++ b/wix/Lang/OpenJDK.hotspot.es-es.wxl.template @@ -1,4 +1,5 @@ - + + diff --git a/wix/Lang/OpenJDK.hotspot.fr-fr.wxl.template b/wix/Lang/OpenJDK.hotspot.fr-fr.wxl.template index 495057cf1..0b3d9d3e8 100644 --- a/wix/Lang/OpenJDK.hotspot.fr-fr.wxl.template +++ b/wix/Lang/OpenJDK.hotspot.fr-fr.wxl.template @@ -1,4 +1,5 @@ - + + diff --git a/wix/Lang/OpenJDK.hotspot.ja-jp.wxl.template b/wix/Lang/OpenJDK.hotspot.ja-jp.wxl.template index 278cb1686..6956c6257 100644 --- a/wix/Lang/OpenJDK.hotspot.ja-jp.wxl.template +++ b/wix/Lang/OpenJDK.hotspot.ja-jp.wxl.template @@ -1,4 +1,5 @@ - + + diff --git a/wix/Lang/OpenJDK.hotspot.zh-cn.wxl.template b/wix/Lang/OpenJDK.hotspot.zh-cn.wxl.template index 0d41db79b..ecdca8a4f 100644 --- a/wix/Lang/OpenJDK.hotspot.zh-cn.wxl.template +++ b/wix/Lang/OpenJDK.hotspot.zh-cn.wxl.template @@ -1,4 +1,5 @@ - + + diff --git a/wix/Lang/OpenJDK.hotspot.zh-tw.wxl.template b/wix/Lang/OpenJDK.hotspot.zh-tw.wxl.template index 0b9443d4c..ebf12e516 100644 --- a/wix/Lang/OpenJDK.hotspot.zh-tw.wxl.template +++ b/wix/Lang/OpenJDK.hotspot.zh-tw.wxl.template @@ -1,4 +1,5 @@ - + + diff --git a/wix/Lang/OpenJDK.openj9.de-de.wxl.template b/wix/Lang/OpenJDK.openj9.de-de.wxl.template index e27af1db0..d3b7a65d7 100644 --- a/wix/Lang/OpenJDK.openj9.de-de.wxl.template +++ b/wix/Lang/OpenJDK.openj9.de-de.wxl.template @@ -1,4 +1,5 @@ - + + diff --git a/wix/Lang/OpenJDK.openj9.en-us.wxl.template b/wix/Lang/OpenJDK.openj9.en-us.wxl.template index 9b1c75855..55b8b3eac 100644 --- a/wix/Lang/OpenJDK.openj9.en-us.wxl.template +++ b/wix/Lang/OpenJDK.openj9.en-us.wxl.template @@ -1,4 +1,5 @@ - + + diff --git a/wix/Lang/OpenJDK.openj9.es-es.wxl.template b/wix/Lang/OpenJDK.openj9.es-es.wxl.template index f8d3b9608..58f43e680 100644 --- a/wix/Lang/OpenJDK.openj9.es-es.wxl.template +++ b/wix/Lang/OpenJDK.openj9.es-es.wxl.template @@ -1,4 +1,5 @@ - + + diff --git a/wix/Lang/OpenJDK.openj9.fr-fr.wxl.template b/wix/Lang/OpenJDK.openj9.fr-fr.wxl.template index 133c0eb6f..3a41ab2a5 100644 --- a/wix/Lang/OpenJDK.openj9.fr-fr.wxl.template +++ b/wix/Lang/OpenJDK.openj9.fr-fr.wxl.template @@ -1,4 +1,5 @@ - + + diff --git a/wix/Lang/OpenJDK.openj9.ja-jp.wxl.template b/wix/Lang/OpenJDK.openj9.ja-jp.wxl.template index f27102b04..51e945414 100644 --- a/wix/Lang/OpenJDK.openj9.ja-jp.wxl.template +++ b/wix/Lang/OpenJDK.openj9.ja-jp.wxl.template @@ -1,4 +1,5 @@ - + + diff --git a/wix/Lang/OpenJDK.openj9.zh-cn.wxl.template b/wix/Lang/OpenJDK.openj9.zh-cn.wxl.template index 61229c6ec..8c356bfc9 100644 --- a/wix/Lang/OpenJDK.openj9.zh-cn.wxl.template +++ b/wix/Lang/OpenJDK.openj9.zh-cn.wxl.template @@ -1,4 +1,5 @@ - + + diff --git a/wix/Lang/OpenJDK.openj9.zh-tw.wxl.template b/wix/Lang/OpenJDK.openj9.zh-tw.wxl.template index 6dde50460..9669ecebb 100644 --- a/wix/Lang/OpenJDK.openj9.zh-tw.wxl.template +++ b/wix/Lang/OpenJDK.openj9.zh-tw.wxl.template @@ -1,4 +1,5 @@ - + + diff --git a/wix/Main.wxs.template b/wix/Main.wxs.template index 36dbf29b0..fd06ca94a 100644 --- a/wix/Main.wxs.template +++ b/wix/Main.wxs.template @@ -1,4 +1,5 @@ - + + From 2c000cbb51e3e132632076971808b2dbe7a94854 Mon Sep 17 00:00:00 2001 From: JoshMJ Date: Mon, 22 Apr 2024 11:18:36 -0700 Subject: [PATCH 37/66] Updated README.md --- wix/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/wix/README.md b/wix/README.md index 275aba419..b6b7e001e 100644 --- a/wix/README.md +++ b/wix/README.md @@ -7,6 +7,8 @@ ## How to upgrade to a new OpenJDK version +0. Ensure the necessary dependencies are installed (`wget` and `wix` version 5.0.0 or higher). If you do not have wix installed, you can followe the instructions [here](https://wixtoolset.org/docs/intro/#nettool) to install it. + 1. Download latest OpenJDK zip to the SourceDir directory. 2. Extract the content and setup the expected file structure: From 791cb722ffc6942c536932f6dd7a8801f65986c2 Mon Sep 17 00:00:00 2001 From: JoshMJ Date: Mon, 22 Apr 2024 15:38:46 -0700 Subject: [PATCH 38/66] Fixed 'ALLUSERS' property --- wix/Main.wxs.template | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/wix/Main.wxs.template b/wix/Main.wxs.template index fd06ca94a..508c0412b 100644 --- a/wix/Main.wxs.template +++ b/wix/Main.wxs.template @@ -2,13 +2,12 @@ - + - @@ -54,8 +53,8 @@ - - + + @@ -70,12 +69,12 @@ - + - + @@ -83,12 +82,12 @@ - + - + From 293dee6889b448b9ffdde97e7fc421d2c2bcd6ef Mon Sep 17 00:00:00 2001 From: JoshMJ Date: Mon, 22 Apr 2024 15:46:11 -0700 Subject: [PATCH 39/66] Fixed typo --- wix/Main.wxs.template | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wix/Main.wxs.template b/wix/Main.wxs.template index 508c0412b..ab763bd53 100644 --- a/wix/Main.wxs.template +++ b/wix/Main.wxs.template @@ -2,7 +2,7 @@ - + From 814a501db0931ec7706c31e501cb757a433b9872 Mon Sep 17 00:00:00 2001 From: JoshMJ Date: Mon, 22 Apr 2024 15:55:53 -0700 Subject: [PATCH 40/66] Updated wxs spacing and added a comment --- wix/Main.wxs.template | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wix/Main.wxs.template b/wix/Main.wxs.template index ab763bd53..dcfb8ef4d 100644 --- a/wix/Main.wxs.template +++ b/wix/Main.wxs.template @@ -2,7 +2,8 @@ - + + From 7e5c691a79f4cfe9292f03a5cd06b29770ceb34d Mon Sep 17 00:00:00 2001 From: JoshMJ Date: Tue, 23 Apr 2024 10:39:11 -0700 Subject: [PATCH 41/66] Updated README.md with new URL and more md style --- wix/README.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/wix/README.md b/wix/README.md index b6b7e001e..b84fc7003 100644 --- a/wix/README.md +++ b/wix/README.md @@ -1,17 +1,15 @@ # Requirements for build environment -1. [Windows Installer XML (WiX) toolset, 3.11 or later](http://wixtoolset.org/releases/) +1. [Windows Installer XML (WiX) toolset, 4.0.0 or later (5.0.X recommended)](https://wixtoolset.org/docs/intro/#nettool) 2. Install ["Windows SDK for Desktop C++ amd64 Apps" feature from Windows SDK 10](https://developer.microsoft.com/en-us/windows/downloads/windows-10-sdk) for building multi-lingual setups. 3. Digital signature service if the MSI should be signed (optional). If you plan to sign the MSI, you need to install the Windows SDK 10 feature "Windows SDK Signing Tools for Desktops Apps". 4. For reviewing the MSI setup or creating custom MST transforms you can install feature "MSI Tools" from Windows SDK 10 (optional). ## How to upgrade to a new OpenJDK version -0. Ensure the necessary dependencies are installed (`wget` and `wix` version 5.0.0 or higher). If you do not have wix installed, you can followe the instructions [here](https://wixtoolset.org/docs/intro/#nettool) to install it. - 1. Download latest OpenJDK zip to the SourceDir directory. -2. Extract the content and setup the expected file structure: +1. Extract the content and setup the expected file structure: ```batch call powershell.exe ./CreateSourceFolder.AdoptOpenJDK.ps1 From 9791b5306c0721fe37fcf04f5c8c5d43bca0bcdc Mon Sep 17 00:00:00 2001 From: JoshMJ Date: Tue, 23 Apr 2024 10:43:12 -0700 Subject: [PATCH 42/66] More md style number bullets --- wix/README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/wix/README.md b/wix/README.md index b84fc7003..ff0663e4b 100644 --- a/wix/README.md +++ b/wix/README.md @@ -1,9 +1,9 @@ # Requirements for build environment 1. [Windows Installer XML (WiX) toolset, 4.0.0 or later (5.0.X recommended)](https://wixtoolset.org/docs/intro/#nettool) -2. Install ["Windows SDK for Desktop C++ amd64 Apps" feature from Windows SDK 10](https://developer.microsoft.com/en-us/windows/downloads/windows-10-sdk) for building multi-lingual setups. -3. Digital signature service if the MSI should be signed (optional). If you plan to sign the MSI, you need to install the Windows SDK 10 feature "Windows SDK Signing Tools for Desktops Apps". -4. For reviewing the MSI setup or creating custom MST transforms you can install feature "MSI Tools" from Windows SDK 10 (optional). +1. Install ["Windows SDK for Desktop C++ amd64 Apps" feature from Windows SDK 10](https://developer.microsoft.com/en-us/windows/downloads/windows-10-sdk) for building multi-lingual setups. +1. Digital signature service if the MSI should be signed (optional). If you plan to sign the MSI, you need to install the Windows SDK 10 feature "Windows SDK Signing Tools for Desktops Apps". +1. For reviewing the MSI setup or creating custom MST transforms you can install feature "MSI Tools" from Windows SDK 10 (optional). ## How to upgrade to a new OpenJDK version From 1602161e8dc9befcf0917131512bca99405e079d Mon Sep 17 00:00:00 2001 From: JoshMJ Date: Tue, 23 Apr 2024 10:53:13 -0700 Subject: [PATCH 43/66] Added other necessary env vars to README.md --- wix/README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/wix/README.md b/wix/README.md index ff0663e4b..edb6de49b 100644 --- a/wix/README.md +++ b/wix/README.md @@ -35,8 +35,10 @@ call powershell.exe ./CreateSourceFolder.AdoptOpenJDK.ps1 ^ ```batch SET PRODUCT_MAJOR_VERSION=11 SET PRODUCT_MINOR_VERSION=0 - SET PRODUCT_MAINTENANCE_VERSION=2 - SET PRODUCT_PATCH_VERSION=8 + SET PRODUCT_MAINTENANCE_VERSION=18 + SET PRODUCT_PATCH_VERSION=0 + SET PRODUCT_BUILD_NUMBER=10 + SET MSI_PRODUCT_VERSION=11.0.18.10 SET ARCH=x64|x86-32|x86|arm64 or all "x64 x86-32 arm64" SET JVM=hotspot|openj9|dragonwell or both JVM=hotspot openj9 SET PRODUCT_CATEGORY=jre|jdk (only one at a time) From 5d1ffd9eb8fd953c01525f0224bf9588e137f978 Mon Sep 17 00:00:00 2001 From: JoshMJ Date: Tue, 23 Apr 2024 10:59:20 -0700 Subject: [PATCH 44/66] Fixed README.md typos --- wix/README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/wix/README.md b/wix/README.md index edb6de49b..93e554750 100644 --- a/wix/README.md +++ b/wix/README.md @@ -43,7 +43,6 @@ call powershell.exe ./CreateSourceFolder.AdoptOpenJDK.ps1 ^ SET JVM=hotspot|openj9|dragonwell or both JVM=hotspot openj9 SET PRODUCT_CATEGORY=jre|jdk (only one at a time) SET WIX_VERSION=5.0.0 (make sure this is the same version that is installed on the build machine) - cmd /c Build.OpenJDK_generic.cmd ``` To customize branding information you can export the following environment variables to override the default values. The default values are listed below: @@ -60,7 +59,7 @@ call powershell.exe ./CreateSourceFolder.AdoptOpenJDK.ps1 ^ set OUTPUT_BASE_FILENAME=%PRODUCT_SKU%%PRODUCT_MAJOR_VERSION%-%PRODUCT_CATEGORY%_%FOLDER_PLATFORM%_windows_%PACKAGE_TYPE%-%PRODUCT_FULL_VERSION% ``` - `Build.OpenJDK_generic.cmd` statically depend on this SDK version (edit if needed): + `Build.OpenJDK_generic.cmd` statically depends on this SDK version (edit if needed): ```batch SET WIN_SDK_MAJOR_VERSION=10 From 4510eae4ced2400c9329bedf7d37583afe17bfc7 Mon Sep 17 00:00:00 2001 From: JoshMJ Date: Wed, 24 Apr 2024 09:37:04 -0700 Subject: [PATCH 45/66] Testing changes to fix default installdir --- wix/Main.wxs.template | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wix/Main.wxs.template b/wix/Main.wxs.template index dcfb8ef4d..a1f6895c2 100644 --- a/wix/Main.wxs.template +++ b/wix/Main.wxs.template @@ -2,7 +2,7 @@ - + From a96f09547569d8bf4d23870d7a4a30c41a63569f Mon Sep 17 00:00:00 2001 From: JoshMJ Date: Wed, 24 Apr 2024 11:10:49 -0700 Subject: [PATCH 46/66] Now able to set installation scope --- wix/Build.OpenJDK_generic.cmd | 3 ++- wix/Main.wxs.template | 2 +- wix/README.md | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/wix/Build.OpenJDK_generic.cmd b/wix/Build.OpenJDK_generic.cmd index 4ee2e384a..4259598f5 100644 --- a/wix/Build.OpenJDK_generic.cmd +++ b/wix/Build.OpenJDK_generic.cmd @@ -38,6 +38,7 @@ IF NOT DEFINED PRODUCT_SUPPORT_LINK SET PRODUCT_SUPPORT_LINK=https://adoptium.ne IF NOT DEFINED PRODUCT_UPDATE_INFO_LINK SET PRODUCT_UPDATE_INFO_LINK=https://adoptium.net/temurin/releases IF NOT DEFINED WIX_HEAT_PATH SET WIX_HEAT_PATH=.\Resources\heat_dir\heat.exe IF NOT DEFINED WIX_VERSION SET WIX_VERSION=5.0.0 +IF NOT DEFINED INSTALL_SCOPE SET INSTALL_SCOPE=perMachine powershell -ExecutionPolicy Bypass -File "%~dp0\helpers\Validate-Input.ps1" ^ -toValidate '%ARCH%' ^ @@ -163,7 +164,7 @@ FOR %%A IN (%ARCH%) DO ( REM Prevent concurrency issues if multiple builds are running in parallel. SET OUTPUT_FILE=%WORKDIR%!OUTPUT_BASE_FILENAME!-!INPUT_FILE:.template=%! ECHO string replacement input !INPUT_FILE! output !OUTPUT_FILE! - powershell -Command "(gc -Raw -encoding utf8 %%i) -replace '{vendor}', '!VENDOR!' -replace '{vendor_branding_logo}', '!VENDOR_BRANDING_LOGO!' -replace '{vendor_branding_banner}', '!VENDOR_BRANDING_BANNER!' -replace '{vendor_branding_dialog}', '!VENDOR_BRANDING_DIALOG!' -replace '{vendor_branding}', '!VENDOR_BRANDING!' -replace '{product_help_link}', '!PRODUCT_HELP_LINK!' -replace '{product_support_link}', '!PRODUCT_SUPPORT_LINK!' -replace '{product_update_info_link}', '!PRODUCT_UPDATE_INFO_LINK!' | Out-File -encoding utf8 !OUTPUT_FILE!" + powershell -Command "(gc -Raw -encoding utf8 %%i) -replace '{vendor}', '!VENDOR!' -replace '{vendor_branding_logo}', '!VENDOR_BRANDING_LOGO!' -replace '{vendor_branding_banner}', '!VENDOR_BRANDING_BANNER!' -replace '{vendor_branding_dialog}', '!VENDOR_BRANDING_DIALOG!' -replace '{vendor_branding}', '!VENDOR_BRANDING!' -replace '{product_help_link}', '!PRODUCT_HELP_LINK!' -replace '{product_support_link}', '!PRODUCT_SUPPORT_LINK!' -replace '{product_update_info_link}', '!PRODUCT_UPDATE_INFO_LINK!' -replace '{InstallScope}', '!INSTALL_SCOPE!' | Out-File -encoding utf8 !OUTPUT_FILE!" IF ERRORLEVEL 1 ( ECHO Unable to make string replacement GOTO FAILED diff --git a/wix/Main.wxs.template b/wix/Main.wxs.template index a1f6895c2..546001438 100644 --- a/wix/Main.wxs.template +++ b/wix/Main.wxs.template @@ -2,7 +2,7 @@ - + diff --git a/wix/README.md b/wix/README.md index 93e554750..fc86129e3 100644 --- a/wix/README.md +++ b/wix/README.md @@ -57,6 +57,7 @@ call powershell.exe ./CreateSourceFolder.AdoptOpenJDK.ps1 ^ set VENDOR_BRANDING_BANNER=$(var.SetupResourcesDir)\wix-banner.png set VENDOR_BRANDING_DIALOG=$(var.SetupResourcesDir)\wix-dialog.png set OUTPUT_BASE_FILENAME=%PRODUCT_SKU%%PRODUCT_MAJOR_VERSION%-%PRODUCT_CATEGORY%_%FOLDER_PLATFORM%_windows_%PACKAGE_TYPE%-%PRODUCT_FULL_VERSION% + set INSTALL_SCOPE=perMachine | perUser | perUserOrMachine (default is 'perMachine', note that 'perUserOrMachine' has not been fully implemented in wix v4 or v5 yet) ``` `Build.OpenJDK_generic.cmd` statically depends on this SDK version (edit if needed): From f7ca8d5345a69c716e0520e360089f39ccfbb8b9 Mon Sep 17 00:00:00 2001 From: JoshMJ Date: Wed, 24 Apr 2024 11:35:13 -0700 Subject: [PATCH 47/66] Updated comments --- wix/Build.OpenJDK_generic.cmd | 2 ++ 1 file changed, 2 insertions(+) diff --git a/wix/Build.OpenJDK_generic.cmd b/wix/Build.OpenJDK_generic.cmd index 4259598f5..e80d34cc3 100644 --- a/wix/Build.OpenJDK_generic.cmd +++ b/wix/Build.OpenJDK_generic.cmd @@ -13,6 +13,8 @@ REM PRODUCT_CATEGORY=jre|jdk (only one at a time) REM SKIP_MSI_VALIDATION=true (Add -sval option to light.exe to skip MSI/MSM validation and skip smoke.exe ) REM UPGRADE_CODE_SEED=thisIsAPrivateSecretSeed ( optional ) for upgradable MSI (If none, new PRODUCT_UPGRADE_CODE is generate for each run) REM OUTPUT_BASE_FILENAME=customFileName (optional) for setting file names that are not based on the default naming convention +REM WIX_VERSION=5.0.0 (optional) for setting the version of Wix Toolset to use +REM INSTALL_SCOPE=perMachine|perUser (default is perMachine) SETLOCAL ENABLEEXTENSIONS SET ERR=0 From 18ec3e16956b6283f87d4aaab9f7cb884b157431 Mon Sep 17 00:00:00 2001 From: gdams Date: Tue, 30 Apr 2024 12:17:22 +0000 Subject: [PATCH 48/66] support perUser and perMachine --- wix/Build.OpenJDK_generic.cmd | 4 +- wix/Lang/OpenJDK.Base.de-de.wxl.template | 4 ++ wix/Lang/OpenJDK.Base.en-us.wxl.template | 4 ++ wix/Lang/OpenJDK.Base.es-es.wxl.template | 4 ++ wix/Lang/OpenJDK.Base.fr-fr.wxl.template | 4 ++ wix/Lang/OpenJDK.Base.ja-jp.wxl.template | 4 ++ wix/Lang/OpenJDK.Base.zh-cn.wxl.template | 4 ++ wix/Lang/OpenJDK.Base.zh-tw.wxl.template | 4 ++ wix/Main.wxs.template | 78 +++++++++++++++++------- wix/README.md | 3 +- wix/Resources/heat.icedteaweb.xslt | 26 ++++---- wix/Resources/heat.tools.xslt | 4 +- 12 files changed, 100 insertions(+), 43 deletions(-) diff --git a/wix/Build.OpenJDK_generic.cmd b/wix/Build.OpenJDK_generic.cmd index e80d34cc3..04bbea766 100644 --- a/wix/Build.OpenJDK_generic.cmd +++ b/wix/Build.OpenJDK_generic.cmd @@ -14,7 +14,6 @@ REM SKIP_MSI_VALIDATION=true (Add -sval option to light.exe to skip MSI/MSM vali REM UPGRADE_CODE_SEED=thisIsAPrivateSecretSeed ( optional ) for upgradable MSI (If none, new PRODUCT_UPGRADE_CODE is generate for each run) REM OUTPUT_BASE_FILENAME=customFileName (optional) for setting file names that are not based on the default naming convention REM WIX_VERSION=5.0.0 (optional) for setting the version of Wix Toolset to use -REM INSTALL_SCOPE=perMachine|perUser (default is perMachine) SETLOCAL ENABLEEXTENSIONS SET ERR=0 @@ -40,7 +39,6 @@ IF NOT DEFINED PRODUCT_SUPPORT_LINK SET PRODUCT_SUPPORT_LINK=https://adoptium.ne IF NOT DEFINED PRODUCT_UPDATE_INFO_LINK SET PRODUCT_UPDATE_INFO_LINK=https://adoptium.net/temurin/releases IF NOT DEFINED WIX_HEAT_PATH SET WIX_HEAT_PATH=.\Resources\heat_dir\heat.exe IF NOT DEFINED WIX_VERSION SET WIX_VERSION=5.0.0 -IF NOT DEFINED INSTALL_SCOPE SET INSTALL_SCOPE=perMachine powershell -ExecutionPolicy Bypass -File "%~dp0\helpers\Validate-Input.ps1" ^ -toValidate '%ARCH%' ^ @@ -166,7 +164,7 @@ FOR %%A IN (%ARCH%) DO ( REM Prevent concurrency issues if multiple builds are running in parallel. SET OUTPUT_FILE=%WORKDIR%!OUTPUT_BASE_FILENAME!-!INPUT_FILE:.template=%! ECHO string replacement input !INPUT_FILE! output !OUTPUT_FILE! - powershell -Command "(gc -Raw -encoding utf8 %%i) -replace '{vendor}', '!VENDOR!' -replace '{vendor_branding_logo}', '!VENDOR_BRANDING_LOGO!' -replace '{vendor_branding_banner}', '!VENDOR_BRANDING_BANNER!' -replace '{vendor_branding_dialog}', '!VENDOR_BRANDING_DIALOG!' -replace '{vendor_branding}', '!VENDOR_BRANDING!' -replace '{product_help_link}', '!PRODUCT_HELP_LINK!' -replace '{product_support_link}', '!PRODUCT_SUPPORT_LINK!' -replace '{product_update_info_link}', '!PRODUCT_UPDATE_INFO_LINK!' -replace '{InstallScope}', '!INSTALL_SCOPE!' | Out-File -encoding utf8 !OUTPUT_FILE!" + powershell -Command "(gc -Raw -encoding utf8 %%i) -replace '{vendor}', '!VENDOR!' -replace '{vendor_branding_logo}', '!VENDOR_BRANDING_LOGO!' -replace '{vendor_branding_banner}', '!VENDOR_BRANDING_BANNER!' -replace '{vendor_branding_dialog}', '!VENDOR_BRANDING_DIALOG!' -replace '{vendor_branding}', '!VENDOR_BRANDING!' -replace '{product_help_link}', '!PRODUCT_HELP_LINK!' -replace '{product_support_link}', '!PRODUCT_SUPPORT_LINK!' -replace '{product_update_info_link}', '!PRODUCT_UPDATE_INFO_LINK!' | Out-File -encoding utf8 !OUTPUT_FILE!" IF ERRORLEVEL 1 ( ECHO Unable to make string replacement GOTO FAILED diff --git a/wix/Lang/OpenJDK.Base.de-de.wxl.template b/wix/Lang/OpenJDK.Base.de-de.wxl.template index b7f0818b8..f898783a7 100644 --- a/wix/Lang/OpenJDK.Base.de-de.wxl.template +++ b/wix/Lang/OpenJDK.Base.de-de.wxl.template @@ -21,4 +21,8 @@ + + + + diff --git a/wix/Lang/OpenJDK.Base.en-us.wxl.template b/wix/Lang/OpenJDK.Base.en-us.wxl.template index ad8f64653..1eb239c45 100644 --- a/wix/Lang/OpenJDK.Base.en-us.wxl.template +++ b/wix/Lang/OpenJDK.Base.en-us.wxl.template @@ -22,4 +22,8 @@ + + + + diff --git a/wix/Lang/OpenJDK.Base.es-es.wxl.template b/wix/Lang/OpenJDK.Base.es-es.wxl.template index 9704a0d60..0298c5222 100644 --- a/wix/Lang/OpenJDK.Base.es-es.wxl.template +++ b/wix/Lang/OpenJDK.Base.es-es.wxl.template @@ -21,4 +21,8 @@ + + + + diff --git a/wix/Lang/OpenJDK.Base.fr-fr.wxl.template b/wix/Lang/OpenJDK.Base.fr-fr.wxl.template index b9dfdff1f..adccfd1fb 100644 --- a/wix/Lang/OpenJDK.Base.fr-fr.wxl.template +++ b/wix/Lang/OpenJDK.Base.fr-fr.wxl.template @@ -22,4 +22,8 @@ + + + + diff --git a/wix/Lang/OpenJDK.Base.ja-jp.wxl.template b/wix/Lang/OpenJDK.Base.ja-jp.wxl.template index 3f01690b5..79917b48a 100644 --- a/wix/Lang/OpenJDK.Base.ja-jp.wxl.template +++ b/wix/Lang/OpenJDK.Base.ja-jp.wxl.template @@ -21,4 +21,8 @@ + + + + diff --git a/wix/Lang/OpenJDK.Base.zh-cn.wxl.template b/wix/Lang/OpenJDK.Base.zh-cn.wxl.template index 6b5c9fbbe..aa6c004cf 100644 --- a/wix/Lang/OpenJDK.Base.zh-cn.wxl.template +++ b/wix/Lang/OpenJDK.Base.zh-cn.wxl.template @@ -21,4 +21,8 @@ + + + + diff --git a/wix/Lang/OpenJDK.Base.zh-tw.wxl.template b/wix/Lang/OpenJDK.Base.zh-tw.wxl.template index f605bd5ae..913a0ae06 100644 --- a/wix/Lang/OpenJDK.Base.zh-tw.wxl.template +++ b/wix/Lang/OpenJDK.Base.zh-tw.wxl.template @@ -21,4 +21,8 @@ + + + + diff --git a/wix/Main.wxs.template b/wix/Main.wxs.template index 546001438..aad2d6f12 100644 --- a/wix/Main.wxs.template +++ b/wix/Main.wxs.template @@ -2,7 +2,7 @@ - + @@ -37,26 +37,28 @@ --> - + + + + - - - - - - - - - - + + + + - - - + + + + + + + + + + + @@ -199,13 +201,43 @@ + - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/wix/README.md b/wix/README.md index fc86129e3..7245390c6 100644 --- a/wix/README.md +++ b/wix/README.md @@ -56,8 +56,7 @@ call powershell.exe ./CreateSourceFolder.AdoptOpenJDK.ps1 ^ set VENDOR_BRANDING_LOGO=$(var.SetupResourcesDir)\logo.ico set VENDOR_BRANDING_BANNER=$(var.SetupResourcesDir)\wix-banner.png set VENDOR_BRANDING_DIALOG=$(var.SetupResourcesDir)\wix-dialog.png - set OUTPUT_BASE_FILENAME=%PRODUCT_SKU%%PRODUCT_MAJOR_VERSION%-%PRODUCT_CATEGORY%_%FOLDER_PLATFORM%_windows_%PACKAGE_TYPE%-%PRODUCT_FULL_VERSION% - set INSTALL_SCOPE=perMachine | perUser | perUserOrMachine (default is 'perMachine', note that 'perUserOrMachine' has not been fully implemented in wix v4 or v5 yet) + set OUTPUT_BASE_FILENAME=%PRODUCT_SKU%%PRODUCT_MAJOR_VERSION%-%PRODUCT_CATEGORY%_%FOLDER_PLATFORM%_windows_%PACKAGE_TYPE%-%PRODUCT_FULL_VERSION%F ``` `Build.OpenJDK_generic.cmd` statically depends on this SDK version (edit if needed): diff --git a/wix/Resources/heat.icedteaweb.xslt b/wix/Resources/heat.icedteaweb.xslt index 0ace4f5b4..b941aa962 100644 --- a/wix/Resources/heat.icedteaweb.xslt +++ b/wix/Resources/heat.icedteaweb.xslt @@ -1,13 +1,13 @@ - - - - - - - - - - IcedTeaWebBin - - - \ No newline at end of file + + + + + + + + + + IcedTeaWebBin + + + diff --git a/wix/Resources/heat.tools.xslt b/wix/Resources/heat.tools.xslt index 7a57e05bb..6e2d1e424 100644 --- a/wix/Resources/heat.tools.xslt +++ b/wix/Resources/heat.tools.xslt @@ -1,4 +1,4 @@ - + - \ No newline at end of file + From e6bb06ae9d50276b2cc36f11a27ba9d40f930589 Mon Sep 17 00:00:00 2001 From: George Adams Date: Tue, 30 Apr 2024 13:23:58 +0100 Subject: [PATCH 49/66] formatting tweaks --- wix/Lang/OpenJDK.Base.de-de.wxl.template | 4 +- wix/Lang/OpenJDK.Base.es-es.wxl.template | 4 +- wix/Lang/OpenJDK.Base.fr-fr.wxl.template | 4 +- wix/Main.wxs.template | 387 +++++++++++++++-------- wix/Resources/heat.icedteaweb.xslt | 23 +- wix/Resources/heat.tools.xslt | 29 +- 6 files changed, 282 insertions(+), 169 deletions(-) diff --git a/wix/Lang/OpenJDK.Base.de-de.wxl.template b/wix/Lang/OpenJDK.Base.de-de.wxl.template index f898783a7..8f024083e 100644 --- a/wix/Lang/OpenJDK.Base.de-de.wxl.template +++ b/wix/Lang/OpenJDK.Base.de-de.wxl.template @@ -23,6 +23,6 @@ - - + + diff --git a/wix/Lang/OpenJDK.Base.es-es.wxl.template b/wix/Lang/OpenJDK.Base.es-es.wxl.template index 0298c5222..8705ab6d7 100644 --- a/wix/Lang/OpenJDK.Base.es-es.wxl.template +++ b/wix/Lang/OpenJDK.Base.es-es.wxl.template @@ -23,6 +23,6 @@ - - + + diff --git a/wix/Lang/OpenJDK.Base.fr-fr.wxl.template b/wix/Lang/OpenJDK.Base.fr-fr.wxl.template index adccfd1fb..44470b96a 100644 --- a/wix/Lang/OpenJDK.Base.fr-fr.wxl.template +++ b/wix/Lang/OpenJDK.Base.fr-fr.wxl.template @@ -24,6 +24,6 @@ - - + + diff --git a/wix/Main.wxs.template b/wix/Main.wxs.template index aad2d6f12..364c7ecf4 100644 --- a/wix/Main.wxs.template +++ b/wix/Main.wxs.template @@ -1,9 +1,14 @@  - - + + - - + + @@ -15,15 +20,20 @@ - + - - - - - + + + + - - - - + + + + - + - - + + - - + + - - + + - + - - - - + + + + - - - - + + + + - + - - - - + + + + + + + + + - - - - - - + - - + + - + - - - + + + - + - - + + - + - - + + - - - - - - + + - - - - - + + + + + - + - + - - - - - - - - - + + + + + + + + + - - - + - - - - - - - - - - + + + + + + + + + + - @@ -204,62 +294,83 @@ - - + + - - - - - - - - + + + + + + + + - + - - - - - - - + + + + + + + - - + + - - - - - + + + + + - + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - + - + \ No newline at end of file diff --git a/wix/Resources/heat.icedteaweb.xslt b/wix/Resources/heat.icedteaweb.xslt index b941aa962..454c6a5bc 100644 --- a/wix/Resources/heat.icedteaweb.xslt +++ b/wix/Resources/heat.icedteaweb.xslt @@ -1,13 +1,14 @@ - - - - - - - + + + + + + + - - IcedTeaWebBin - + + IcedTeaWebBin + - + \ No newline at end of file diff --git a/wix/Resources/heat.tools.xslt b/wix/Resources/heat.tools.xslt index 6e2d1e424..6b8b7ad26 100644 --- a/wix/Resources/heat.tools.xslt +++ b/wix/Resources/heat.tools.xslt @@ -1,29 +1,30 @@ - + - + + match="wix:Component[contains(wix:File/@Source, '$(var.ReproDir)\src.zip')]" + use="@Id" /> - + match="wix:Component[contains(wix:File/@Source, '$(var.ReproDir)\lib\src.zip')]" + use="@Id" /> + - + - - + \ No newline at end of file From 6f6a569e556efa02047a0465ac6a734f1e3440aa Mon Sep 17 00:00:00 2001 From: George Adams Date: Tue, 30 Apr 2024 15:44:38 +0100 Subject: [PATCH 50/66] use API to fetch versions to build --- .github/workflows/wix.yml | 95 +++++++++++++++++++-------------------- 1 file changed, 45 insertions(+), 50 deletions(-) diff --git a/.github/workflows/wix.yml b/.github/workflows/wix.yml index 0e47defb9..bb5729c04 100644 --- a/.github/workflows/wix.yml +++ b/.github/workflows/wix.yml @@ -12,43 +12,14 @@ permissions: jobs: wix: strategy: + fail-fast: false matrix: - jdk: [8, 11, 17] + jdk: [8, 11, 17, 21] + arch: [x64] + jvm: [hotspot] include: - jdk: 8 ICEDTEA_WEB_VERSION: "icedtea-web-1.8.6" - PRODUCT_MAJOR_VERSION: 8 - PRODUCT_MINOR_VERSION: 0 - PRODUCT_MAINTENANCE_VERSION: 362 - PRODUCT_PATCH_VERSION: 0 - PRODUCT_BUILD_NUMBER: "09" - MSI_PRODUCT_VERSION: 8.0.362.9 - ARCH: x64 - TAG: jdk8u362-b09 - SUB_TAG: 8u362b09 - JVM: hotspot - - jdk: 11 - PRODUCT_MAJOR_VERSION: 11 - PRODUCT_MINOR_VERSION: 0 - PRODUCT_MAINTENANCE_VERSION: 18 - PRODUCT_PATCH_VERSION: 0 - PRODUCT_BUILD_NUMBER: 10 - MSI_PRODUCT_VERSION: 11.0.18.10 - ARCH: x64 - TAG: jdk-11.0.18+10 - SUB_TAG: 11.0.18_10 - JVM: hotspot - - jdk: 17 - PRODUCT_MAJOR_VERSION: 17 - PRODUCT_MINOR_VERSION: 0 - PRODUCT_MAINTENANCE_VERSION: 6 - PRODUCT_PATCH_VERSION: 0 - PRODUCT_BUILD_NUMBER: 10 - MSI_PRODUCT_VERSION: 17.0.6.10 - ARCH: x64 - TAG: jdk-17.0.6+10 - SUB_TAG: 17.0.6_10 - JVM: hotspot name: wix runs-on: windows-latest @@ -58,6 +29,42 @@ jobs: - name: Install wix toolset run: dotnet tool install --global wix --version 5.0.0 + - name: Fetch latest Windows version from Adoptium API + run: | + $response = Invoke-WebRequest -Uri "https://api.adoptium.net/v3/assets/feature_releases/${{ matrix.jdk }}/ga?architecture=${{ matrix.arch }}&image_type=jdk&os=windows&page=0&page_size=1" -UseBasicParsing + $json = $response.Content | ConvertFrom-Json + + $major = $json.version_data.major + $minor = $json.version_data.minor + $security = $json.version_data.security + $patch = 0 + $build = $json.version_data.build + + echo "PRODUCT_MAJOR_VERSION=$major" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append + echo "PRODUCT_MINOR_VERSION=$minor" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append + echo "PRODUCT_MAINTENANCE_VERSION=$security"| Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append + echo "PRODUCT_PATCH_VERSION=$patch" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append + + # if jdk8 and build is a single digit, add a 0 to the front + if ($major -eq 8 -and $build -lt 10) { + echo "PRODUCT_BUILD_NUMBER=0$build" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append + } else { + echo "PRODUCT_BUILD_NUMBER=$build" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append + } + echo "MSI_PRODUCT_VERSION=$major.$minor.$security.$build" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append + echo "TAG=$($json.release_name)" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append + # SUB_TAG is used to create the file name of the JDK/JRE zip file + # For jdk8 strip the jdk and the - from the release name + if ($major -eq 8) { + $subTag = $json.release_name -replace "jdk", "" + $subTag = $subTag -replace "-", "" + # For JDK9 and above remove jdk- and replace + with _ + } else { + $subTag = $json.release_name -replace "jdk-", "" + $subTag = $subTag -replace "\+", "_" + } + echo "SUB_TAG=$subTag" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append + - name: Download IcedTea-Web run: | Invoke-WebRequest -Uri "https://github.com/AdoptOpenJDK/IcedTea-Web/releases/download/${{ matrix.ICEDTEA_WEB_VERSION }}/${{ matrix.ICEDTEA_WEB_VERSION }}.win.bin.zip" ` @@ -70,10 +77,10 @@ jobs: - name: Download Prebuilt JDK/JRE run: | - Invoke-WebRequest -Uri "https://github.com/adoptium/temurin${{ matrix.PRODUCT_MAJOR_VERSION }}-binaries/releases/download/${{ matrix.TAG }}/OpenJDK${{ matrix.PRODUCT_MAJOR_VERSION }}U-jdk_${{ matrix.ARCH }}_windows_${{ matrix.JVM }}_${{ matrix.SUB_TAG }}.zip" ` - -OutFile "OpenJDK${{ matrix.PRODUCT_MAJOR_VERSION }}U-jdk_${{ matrix.ARCH }}_windows_${{ matrix.JVM }}_${{ matrix.SUB_TAG }}.zip" - Invoke-WebRequest -Uri "https://github.com/adoptium/temurin${{ matrix.PRODUCT_MAJOR_VERSION }}-binaries/releases/download/${{ matrix.TAG }}/OpenJDK${{ matrix.PRODUCT_MAJOR_VERSION }}U-jre_${{ matrix.ARCH }}_windows_${{ matrix.JVM }}_${{ matrix.SUB_TAG }}.zip" ` - -OutFile "OpenJDK${{ matrix.PRODUCT_MAJOR_VERSION }}U-jre_${{ matrix.ARCH }}_windows_${{ matrix.JVM }}_${{ matrix.SUB_TAG }}.zip" + Invoke-WebRequest -Uri "https://github.com/adoptium/temurin${{ env.PRODUCT_MAJOR_VERSION }}-binaries/releases/download/${{ env.TAG }}/OpenJDK${{ env.PRODUCT_MAJOR_VERSION }}U-jdk_${{ matrix.ARCH }}_windows_${{ matrix.JVM }}_${{ env.SUB_TAG }}.zip" ` + -OutFile "OpenJDK${{ env.PRODUCT_MAJOR_VERSION }}U-jdk_${{ matrix.ARCH }}_windows_${{ matrix.JVM }}_${{ env.SUB_TAG }}.zip" + Invoke-WebRequest -Uri "https://github.com/adoptium/temurin${{ env.PRODUCT_MAJOR_VERSION }}-binaries/releases/download/${{ env.TAG }}/OpenJDK${{ env.PRODUCT_MAJOR_VERSION }}U-jre_${{ matrix.ARCH }}_windows_${{ matrix.JVM }}_${{ env.SUB_TAG }}.zip" ` + -OutFile "OpenJDK${{ env.PRODUCT_MAJOR_VERSION }}U-jre_${{ matrix.ARCH }}_windows_${{ matrix.JVM }}_${{ env.SUB_TAG }}.zip" ./CreateSourceFolder.AdoptOpenJDK.ps1 working-directory: wix/SourceDir @@ -82,12 +89,6 @@ jobs: working-directory: wix env: PRODUCT_CATEGORY: jdk - PRODUCT_MAJOR_VERSION: ${{ matrix.PRODUCT_MAJOR_VERSION }} - PRODUCT_MINOR_VERSION: ${{ matrix.PRODUCT_MINOR_VERSION }} - PRODUCT_MAINTENANCE_VERSION: ${{ matrix.PRODUCT_MAINTENANCE_VERSION }} - PRODUCT_PATCH_VERSION: ${{ matrix.PRODUCT_PATCH_VERSION }} - PRODUCT_BUILD_NUMBER: ${{ matrix.PRODUCT_BUILD_NUMBER }} - MSI_PRODUCT_VERSION: ${{ matrix.MSI_PRODUCT_VERSION }} ARCH: ${{ matrix.ARCH }} JVM: ${{ matrix.JVM }} shell: cmd @@ -97,17 +98,11 @@ jobs: working-directory: wix env: PRODUCT_CATEGORY: jre - PRODUCT_MAJOR_VERSION: ${{ matrix.PRODUCT_MAJOR_VERSION }} - PRODUCT_MINOR_VERSION: ${{ matrix.PRODUCT_MINOR_VERSION }} - PRODUCT_MAINTENANCE_VERSION: ${{ matrix.PRODUCT_MAINTENANCE_VERSION }} - PRODUCT_PATCH_VERSION: ${{ matrix.PRODUCT_PATCH_VERSION }} - PRODUCT_BUILD_NUMBER: ${{ matrix.PRODUCT_BUILD_NUMBER }} - MSI_PRODUCT_VERSION: ${{ matrix.MSI_PRODUCT_VERSION }} ARCH: ${{ matrix.ARCH }} JVM: ${{ matrix.JVM }} shell: cmd - uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3 with: - name: windows-${{ matrix.PRODUCT_MAJOR_VERSION }} + name: windows-${{ env.PRODUCT_MAJOR_VERSION }} path: wix/ReleaseDir/*.msi From 311d9ea36654b1579d2f2bdd4a37bb4acf44223f Mon Sep 17 00:00:00 2001 From: George Adams Date: Tue, 30 Apr 2024 17:50:47 +0100 Subject: [PATCH 51/66] remove PerUserOrMachine-Example --- .github/workflows/wix.yml | 5 ++++- wix/Main.wxs.template | 12 ++++++++++-- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/.github/workflows/wix.yml b/.github/workflows/wix.yml index bb5729c04..6189f74a9 100644 --- a/.github/workflows/wix.yml +++ b/.github/workflows/wix.yml @@ -20,6 +20,9 @@ jobs: include: - jdk: 8 ICEDTEA_WEB_VERSION: "icedtea-web-1.8.6" + - jdk: 11 + arch: x86-32 + jvm: hotspot name: wix runs-on: windows-latest @@ -31,7 +34,7 @@ jobs: - name: Fetch latest Windows version from Adoptium API run: | - $response = Invoke-WebRequest -Uri "https://api.adoptium.net/v3/assets/feature_releases/${{ matrix.jdk }}/ga?architecture=${{ matrix.arch }}&image_type=jdk&os=windows&page=0&page_size=1" -UseBasicParsing + $response = Invoke-WebRequest -Uri "https://api.adoptium.net/v3/assets/feature_releases/${{ matrix.jdk }}/ga?architecture=${{ matrix.arch == 'x86-32' ? 'x86' : matrix.arch }}&image_type=jdk&os=windows&page=0&page_size=1" -UseBasicParsing $json = $response.Content | ConvertFrom-Json $major = $json.version_data.major diff --git a/wix/Main.wxs.template b/wix/Main.wxs.template index 364c7ecf4..1c4c14b1e 100644 --- a/wix/Main.wxs.template +++ b/wix/Main.wxs.template @@ -46,15 +46,23 @@ --> - + + + + + + + + + + Value="[PROGRAMFILESFOLDER][ApplicationFolderName]" Execute="immediate" /> Date: Tue, 30 Apr 2024 14:43:24 -0700 Subject: [PATCH 52/66] Re-added ability for vendor to choose not to show the end-user license agreement --- wix/Includes/OpenJDK.Variables.wxi.template | 9 +++++++-- wix/Main.wxs.template | 17 +++++++++++------ 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/wix/Includes/OpenJDK.Variables.wxi.template b/wix/Includes/OpenJDK.Variables.wxi.template index 21e7434a9..99c20e3e8 100644 --- a/wix/Includes/OpenJDK.Variables.wxi.template +++ b/wix/Includes/OpenJDK.Variables.wxi.template @@ -60,8 +60,13 @@ - - + + + + + + + diff --git a/wix/Main.wxs.template b/wix/Main.wxs.template index 8fd409050..18d70c015 100644 --- a/wix/Main.wxs.template +++ b/wix/Main.wxs.template @@ -298,13 +298,18 @@ - - + + + + + + + - Date: Tue, 30 Apr 2024 14:55:04 -0700 Subject: [PATCH 53/66] Fixed back button --- wix/Main.wxs.template | 2 ++ 1 file changed, 2 insertions(+) diff --git a/wix/Main.wxs.template b/wix/Main.wxs.template index 18d70c015..6ccf07209 100644 --- a/wix/Main.wxs.template +++ b/wix/Main.wxs.template @@ -308,6 +308,8 @@ + Date: Tue, 30 Apr 2024 15:10:24 -0700 Subject: [PATCH 54/66] Test --- wix/Includes/OpenJDK.Variables.wxi.template | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wix/Includes/OpenJDK.Variables.wxi.template b/wix/Includes/OpenJDK.Variables.wxi.template index 99c20e3e8..294977c18 100644 --- a/wix/Includes/OpenJDK.Variables.wxi.template +++ b/wix/Includes/OpenJDK.Variables.wxi.template @@ -60,7 +60,7 @@ - + From 40c4f7e5fbba3653ecb9fdf7c37e744fef218388 Mon Sep 17 00:00:00 2001 From: JoshMJ Date: Tue, 30 Apr 2024 15:15:11 -0700 Subject: [PATCH 55/66] Now installing wix quietly --- .github/workflows/wix.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/wix.yml b/.github/workflows/wix.yml index 3083de3fc..3141a34de 100644 --- a/.github/workflows/wix.yml +++ b/.github/workflows/wix.yml @@ -18,19 +18,19 @@ jobs: arch: [x64] jvm: [hotspot] include: - - jdk: 8 - ICEDTEA_WEB_VERSION: "icedtea-web-1.8.6" - - jdk: 11 - arch: x86-32 - jvm: hotspot + - jdk: 8 + ICEDTEA_WEB_VERSION: "icedtea-web-1.8.6" + - jdk: 11 + arch: x86-32 + jvm: hotspot name: wix runs-on: windows-latest steps: - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 - + - name: Install wix toolset - run: dotnet tool install --global wix --version 5.0.0 + run: dotnet tool install --global wix --version 5.0.0 --verbosity quiet - name: Fetch latest Windows version from Adoptium API run: | From 8243553bcbffb435a50089726ffe9392c31de8d7 Mon Sep 17 00:00:00 2001 From: JoshMJ Date: Tue, 30 Apr 2024 15:22:23 -0700 Subject: [PATCH 56/66] Now using format closer to what existed previously --- wix/Main.wxs.template | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/wix/Main.wxs.template b/wix/Main.wxs.template index 6ccf07209..6f83d9458 100644 --- a/wix/Main.wxs.template +++ b/wix/Main.wxs.template @@ -298,18 +298,18 @@ - + + + + - - - Date: Tue, 30 Apr 2024 15:33:54 -0700 Subject: [PATCH 57/66] Removed test code --- wix/Includes/OpenJDK.Variables.wxi.template | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wix/Includes/OpenJDK.Variables.wxi.template b/wix/Includes/OpenJDK.Variables.wxi.template index 294977c18..99c20e3e8 100644 --- a/wix/Includes/OpenJDK.Variables.wxi.template +++ b/wix/Includes/OpenJDK.Variables.wxi.template @@ -60,7 +60,7 @@ - + From 6149aef57601af91f2bccc1ec9461bcbe1bea291 Mon Sep 17 00:00:00 2001 From: JoshMJ Date: Tue, 30 Apr 2024 15:42:10 -0700 Subject: [PATCH 58/66] Added sample code and comment --- wix/Includes/OpenJDK.Variables.wxi.template | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wix/Includes/OpenJDK.Variables.wxi.template b/wix/Includes/OpenJDK.Variables.wxi.template index 99c20e3e8..d6780911f 100644 --- a/wix/Includes/OpenJDK.Variables.wxi.template +++ b/wix/Includes/OpenJDK.Variables.wxi.template @@ -60,7 +60,7 @@ - + "?> From eb0b6787617b1ca8848a9d11ba37601b546a824e Mon Sep 17 00:00:00 2001 From: JoshMJ Date: Tue, 30 Apr 2024 16:05:24 -0700 Subject: [PATCH 59/66] Added license end-user license behavior section to README.md --- wix/README.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/wix/README.md b/wix/README.md index 7245390c6..a7dfe0532 100644 --- a/wix/README.md +++ b/wix/README.md @@ -72,6 +72,20 @@ call powershell.exe ./CreateSourceFolder.AdoptOpenJDK.ps1 ^ call Build.OpenJDK_generic.cmd ``` +## Custom end-user license agreement behavior + +If a vendor would like to implement custom end-user license agreement behavior for a hotspot JVM: +``` +Note: default behavior is to use the GPLv2 license and to skip past the license agreement page. This license does not affect end users, only software redistribution +``` +1. Copy the desired plaintext license into the wix/Resources folder (with the .rtf file extension) +1. Go to `wix/Includes/OpenJDK.Variables.wxi.template` and find the line ``. Below that line is an if-statment with example code. + + a. Create an `"?>` statment (replacing the comparison text on the right side with your vendor name). + + b. Set ` Date: Wed, 1 May 2024 09:24:54 -0700 Subject: [PATCH 60/66] Now using env var for vendor --- wix/Includes/OpenJDK.Variables.wxi.template | 2 +- wix/README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/wix/Includes/OpenJDK.Variables.wxi.template b/wix/Includes/OpenJDK.Variables.wxi.template index d6780911f..25399649d 100644 --- a/wix/Includes/OpenJDK.Variables.wxi.template +++ b/wix/Includes/OpenJDK.Variables.wxi.template @@ -60,7 +60,7 @@ - "?> + "?> diff --git a/wix/README.md b/wix/README.md index a7dfe0532..76cc365ca 100644 --- a/wix/README.md +++ b/wix/README.md @@ -81,7 +81,7 @@ Note: default behavior is to use the GPLv2 license and to skip past the license 1. Copy the desired plaintext license into the wix/Resources folder (with the .rtf file extension) 1. Go to `wix/Includes/OpenJDK.Variables.wxi.template` and find the line ``. Below that line is an if-statment with example code. - a. Create an `"?>` statment (replacing the comparison text on the right side with your vendor name). + a. Create an `"?>` statment (replacing the comparison text on the right side with your vendor name). b. Set ` Date: Wed, 1 May 2024 09:53:50 -0700 Subject: [PATCH 61/66] Took out vendor logic for end-user license agreements (as requested), updated README.md --- wix/Includes/OpenJDK.Variables.wxi.template | 10 +++------- wix/README.md | 12 ++++++------ 2 files changed, 9 insertions(+), 13 deletions(-) diff --git a/wix/Includes/OpenJDK.Variables.wxi.template b/wix/Includes/OpenJDK.Variables.wxi.template index 25399649d..354683a4a 100644 --- a/wix/Includes/OpenJDK.Variables.wxi.template +++ b/wix/Includes/OpenJDK.Variables.wxi.template @@ -60,13 +60,9 @@ - "?> - - - - - - + + + diff --git a/wix/README.md b/wix/README.md index 76cc365ca..df73133d7 100644 --- a/wix/README.md +++ b/wix/README.md @@ -76,16 +76,16 @@ call Build.OpenJDK_generic.cmd If a vendor would like to implement custom end-user license agreement behavior for a hotspot JVM: ``` -Note: default behavior is to use the GPLv2 license and to skip past the license agreement page. This license does not affect end users, only software redistribution +Note: default behavior is to use the GPLv2 license and to skip past the license agreement page. This license does not affect end users, only software redistribution. ``` -1. Copy the desired plaintext license into the wix/Resources folder (with the .rtf file extension) -1. Go to `wix/Includes/OpenJDK.Variables.wxi.template` and find the line ``. Below that line is an if-statment with example code. +1. If using a new license agreement, copy the desired plaintext license into the wix/Resources folder (with the .rtf file extension). +1. Go to `wix/Includes/OpenJDK.Variables.wxi.template` and find the line ``. - a. Create an `"?>` statment (replacing the comparison text on the right side with your vendor name). + a. Create an inner `"?>` statement. - b. Set ` Date: Thu, 2 May 2024 10:13:43 -0700 Subject: [PATCH 62/66] Updated wix installer changelog.md --- wix/InstallerChangelog.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/wix/InstallerChangelog.md b/wix/InstallerChangelog.md index 1257671b7..e5a8edfb3 100644 --- a/wix/InstallerChangelog.md +++ b/wix/InstallerChangelog.md @@ -8,6 +8,11 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +## 2024-05-02 +### Changed +- Update to wix v5 +- Fixed windows Arm installation path + ## 2021-02-23 ### Changed - Update IcedTea-Web to 1.8.6 From 00f04bb182fd57b93405a90a7f3db58334c68900 Mon Sep 17 00:00:00 2001 From: JoshMJ Date: Thu, 2 May 2024 11:10:15 -0700 Subject: [PATCH 63/66] Fixed formatting --- wix/Main.wxs.template | 124 +++++++++++++++++++++--------------------- 1 file changed, 62 insertions(+), 62 deletions(-) diff --git a/wix/Main.wxs.template b/wix/Main.wxs.template index 6f83d9458..fd26c31b4 100644 --- a/wix/Main.wxs.template +++ b/wix/Main.wxs.template @@ -178,51 +178,51 @@ Key="SOFTWARE\JavaSoft\$(var.OracleJavasoftBaseKey)\$(var.OracleVersionKey)" Name="JavaHome" Type="string" Value="[INSTALLDIR]" KeyPath="yes" /> - - + + - - + + - - - - - - + HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.jnlp\OpenWithProgids + is automatically created by Windows when running jnlp file for the first time + --> + + - - - - - + + + + + @@ -270,20 +270,20 @@ - - - - - - - - - - + + + + + + + + + + - - - - - + + + + + - - - - - + + + + + - - - + + + + - From 1bcb898e8c0aa82b83a469e409079a10e6c3a46d Mon Sep 17 00:00:00 2001 From: George Adams Date: Fri, 3 May 2024 16:27:12 +0100 Subject: [PATCH 64/66] Update .github/workflows/wix.yml Co-authored-by: Martijn Verburg --- .github/workflows/wix.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/wix.yml b/.github/workflows/wix.yml index 3141a34de..d08548e32 100644 --- a/.github/workflows/wix.yml +++ b/.github/workflows/wix.yml @@ -19,7 +19,7 @@ jobs: jvm: [hotspot] include: - jdk: 8 - ICEDTEA_WEB_VERSION: "icedtea-web-1.8.6" + ICEDTEA_WEB_VERSION: "icedtea-web-1.8.8" - jdk: 11 arch: x86-32 jvm: hotspot From bd16b790538267670499347a085378c55906c6f9 Mon Sep 17 00:00:00 2001 From: JoshMJ Date: Fri, 3 May 2024 11:34:38 -0700 Subject: [PATCH 65/66] Updated README.md minimum supported wix version --- wix/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wix/README.md b/wix/README.md index df73133d7..e52487f1f 100644 --- a/wix/README.md +++ b/wix/README.md @@ -1,6 +1,6 @@ # Requirements for build environment -1. [Windows Installer XML (WiX) toolset, 4.0.0 or later (5.0.X recommended)](https://wixtoolset.org/docs/intro/#nettool) +1. [Windows Installer XML (WiX) toolset, 5.0.0 or later](https://wixtoolset.org/docs/intro/#nettool) 1. Install ["Windows SDK for Desktop C++ amd64 Apps" feature from Windows SDK 10](https://developer.microsoft.com/en-us/windows/downloads/windows-10-sdk) for building multi-lingual setups. 1. Digital signature service if the MSI should be signed (optional). If you plan to sign the MSI, you need to install the Windows SDK 10 feature "Windows SDK Signing Tools for Desktops Apps". 1. For reviewing the MSI setup or creating custom MST transforms you can install feature "MSI Tools" from Windows SDK 10 (optional). From 35d0e6903613c777e0109667d0210a2839f389f2 Mon Sep 17 00:00:00 2001 From: JoshMJ Date: Fri, 3 May 2024 11:43:18 -0700 Subject: [PATCH 66/66] formatting tweak --- wix/Main.wxs.template | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wix/Main.wxs.template b/wix/Main.wxs.template index fd26c31b4..9d37caf3a 100644 --- a/wix/Main.wxs.template +++ b/wix/Main.wxs.template @@ -381,7 +381,7 @@ - + \ No newline at end of file