diff --git a/.github/workflows/wix.yml b/.github/workflows/wix.yml index f988ef61f..7bd0a8428 100644 --- a/.github/workflows/wix.yml +++ b/.github/workflows/wix.yml @@ -12,49 +12,62 @@ 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 + - jdk: 8 + ICEDTEA_WEB_VERSION: "icedtea-web-1.8.8" + - jdk: 11 + arch: x86-32 + jvm: hotspot name: wix runs-on: windows-latest steps: - uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5 + - name: Install wix toolset + run: dotnet tool install --global wix --version 5.0.0 --verbosity quiet + + - 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=x64&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" ` @@ -67,10 +80,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 @@ -79,12 +92,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 @@ -94,17 +101,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 }}-${{ matrix.arch }} path: wix/ReleaseDir/*.msi diff --git a/wix/Build.OpenJDK_generic.cmd b/wix/Build.OpenJDK_generic.cmd index cdcf92aeb..04bbea766 100644 --- a/wix/Build.OpenJDK_generic.cmd +++ b/wix/Build.OpenJDK_generic.cmd @@ -13,6 +13,7 @@ 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 SETLOCAL ENABLEEXTENSIONS SET ERR=0 @@ -36,6 +37,8 @@ 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_dir\heat.exe +IF NOT DEFINED WIX_VERSION SET WIX_VERSION=5.0.0 powershell -ExecutionPolicy Bypass -File "%~dp0\helpers\Validate-Input.ps1" ^ -toValidate '%ARCH%' ^ @@ -43,7 +46,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 ) @@ -80,6 +83,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 @@ -134,8 +141,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 ) @@ -177,7 +185,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 @@ -193,13 +201,6 @@ 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 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! @@ -208,24 +209,43 @@ 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 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!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! + SET ITW_WXS="%WORKDIR%IcedTeaWeb-!OUTPUT_BASE_FILENAME!.wxs" + ECHO HEAT IcedTeaWeb + @ECHO ON + !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 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 ) + @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 + powershell -ExecutionPolicy Bypass -File "%~dp0\helpers\Update-id.ps1" ^ + -FilePath !ITW_WXS! ^ + -Name bin ^ + -Suffix IcedTea + ) ELSE ( ECHO IcedTeaWeb Directory Does Not Exist! ) @@ -234,37 +254,57 @@ 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! + !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 generating Windows Installer XML Source files ^(.wxs^) + ECHO Failed to generate Windows Installer XML Source files ^(.wxs^) GOTO FAILED ) @ECHO OFF - ECHO CANDLE + ECHO BUILD @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 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 preprocesses and compiles 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 ) @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 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 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 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 @@ -284,13 +324,15 @@ 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!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 - ) + ) ELSE ( + ECHO MSI validation passed + ) @ECHO OFF ) ELSE ( ECHO MSI validation was skipped by option SKIP_MSI_VALIDATION=true @@ -324,7 +366,7 @@ FOR %%A IN (%ARCH%) DO ( exit /b 1 ) ELSE ( - ECHO Ignoring signing step : not certificate configured + ECHO Ignoring signing step : certificate not configured ) :succeeded @@ -333,20 +375,16 @@ 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" IF DEFINED ITW_WXS ( DEL !ITW_WXS! - DEL !ITW_WIXOBJ! ) RMDIR /S /Q !CACHE_FOLDER! ) SET ITW_WXS= - SET ITW_WIXOBJ= ) ENDLOCAL @@ -371,6 +409,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 2f7a4f332..9726e7081 100644 --- a/wix/BuildSetupTranslationTransform.cmd +++ b/wix/BuildSetupTranslationTransform.cmd @@ -12,13 +12,33 @@ 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 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 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! +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 light failed with : %ERRORLEVEL% + ECHO Building msi for culture %CULTURE% failed with errorlevel: %ERRORLEVEL% GOTO FAILED ) diff --git a/wix/Includes/OpenJDK.Variables.wxi.template b/wix/Includes/OpenJDK.Variables.wxi.template index 95464b23d..354683a4a 100644 --- a/wix/Includes/OpenJDK.Variables.wxi.template +++ b/wix/Includes/OpenJDK.Variables.wxi.template @@ -1,97 +1,98 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - =9?> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - =9?> - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + =9?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + =9?> + + + + + + + + + + + + + + + + + + + + + + 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 diff --git a/wix/Lang/OpenJDK.Base.de-de.wxl.template b/wix/Lang/OpenJDK.Base.de-de.wxl.template index c5c882069..8f024083e 100644 --- a/wix/Lang/OpenJDK.Base.de-de.wxl.template +++ b/wix/Lang/OpenJDK.Base.de-de.wxl.template @@ -1,24 +1,28 @@ - - - 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..1eb239c45 100644 --- a/wix/Lang/OpenJDK.Base.en-us.wxl.template +++ b/wix/Lang/OpenJDK.Base.en-us.wxl.template @@ -1,25 +1,29 @@ - - - 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..8705ab6d7 100644 --- a/wix/Lang/OpenJDK.Base.es-es.wxl.template +++ b/wix/Lang/OpenJDK.Base.es-es.wxl.template @@ -1,24 +1,28 @@ - - - 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..44470b96a 100644 --- a/wix/Lang/OpenJDK.Base.fr-fr.wxl.template +++ b/wix/Lang/OpenJDK.Base.fr-fr.wxl.template @@ -1,25 +1,29 @@ - - - 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..79917b48a 100644 --- a/wix/Lang/OpenJDK.Base.ja-jp.wxl.template +++ b/wix/Lang/OpenJDK.Base.ja-jp.wxl.template @@ -1,24 +1,28 @@ - - - 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..aa6c004cf 100644 --- a/wix/Lang/OpenJDK.Base.zh-cn.wxl.template +++ b/wix/Lang/OpenJDK.Base.zh-cn.wxl.template @@ -1,24 +1,28 @@ - - - 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..913a0ae06 100644 --- a/wix/Lang/OpenJDK.Base.zh-tw.wxl.template +++ b/wix/Lang/OpenJDK.Base.zh-tw.wxl.template @@ -1,24 +1,28 @@ - - - 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.dragonwell.de-de.wxl.template b/wix/Lang/OpenJDK.dragonwell.de-de.wxl.template index 1f764cf5c..77e57aea6 100644 --- a/wix/Lang/OpenJDK.dragonwell.de-de.wxl.template +++ b/wix/Lang/OpenJDK.dragonwell.de-de.wxl.template @@ -1,12 +1,12 @@ - - - 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..0a28616a5 100644 --- a/wix/Lang/OpenJDK.dragonwell.en-us.wxl.template +++ b/wix/Lang/OpenJDK.dragonwell.en-us.wxl.template @@ -1,12 +1,12 @@ - - - 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..22138d5f2 100644 --- a/wix/Lang/OpenJDK.dragonwell.es-es.wxl.template +++ b/wix/Lang/OpenJDK.dragonwell.es-es.wxl.template @@ -1,12 +1,12 @@ - - - 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..b2f3478a3 100644 --- a/wix/Lang/OpenJDK.dragonwell.fr-fr.wxl.template +++ b/wix/Lang/OpenJDK.dragonwell.fr-fr.wxl.template @@ -1,12 +1,12 @@ - - - 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..b932325fe 100644 --- a/wix/Lang/OpenJDK.dragonwell.ja-jp.wxl.template +++ b/wix/Lang/OpenJDK.dragonwell.ja-jp.wxl.template @@ -1,12 +1,12 @@ - - - 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..9e3431093 100644 --- a/wix/Lang/OpenJDK.dragonwell.zh-cn.wxl.template +++ b/wix/Lang/OpenJDK.dragonwell.zh-cn.wxl.template @@ -1,12 +1,12 @@ - - - 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..96e17efa5 100644 --- a/wix/Lang/OpenJDK.dragonwell.zh-tw.wxl.template +++ b/wix/Lang/OpenJDK.dragonwell.zh-tw.wxl.template @@ -1,12 +1,12 @@ - - - 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.hotspot.de-de.wxl.template b/wix/Lang/OpenJDK.hotspot.de-de.wxl.template index 2674fec9c..754ba2b36 100644 --- a/wix/Lang/OpenJDK.hotspot.de-de.wxl.template +++ b/wix/Lang/OpenJDK.hotspot.de-de.wxl.template @@ -1,12 +1,12 @@ - - - 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..a93468caa 100644 --- a/wix/Lang/OpenJDK.hotspot.en-us.wxl.template +++ b/wix/Lang/OpenJDK.hotspot.en-us.wxl.template @@ -1,12 +1,12 @@ - - - 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..fea6ef40a 100644 --- a/wix/Lang/OpenJDK.hotspot.es-es.wxl.template +++ b/wix/Lang/OpenJDK.hotspot.es-es.wxl.template @@ -1,12 +1,12 @@ - - - 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..0b3d9d3e8 100644 --- a/wix/Lang/OpenJDK.hotspot.fr-fr.wxl.template +++ b/wix/Lang/OpenJDK.hotspot.fr-fr.wxl.template @@ -1,12 +1,12 @@ - - - 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..6956c6257 100644 --- a/wix/Lang/OpenJDK.hotspot.ja-jp.wxl.template +++ b/wix/Lang/OpenJDK.hotspot.ja-jp.wxl.template @@ -1,12 +1,12 @@ - - - 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..ecdca8a4f 100644 --- a/wix/Lang/OpenJDK.hotspot.zh-cn.wxl.template +++ b/wix/Lang/OpenJDK.hotspot.zh-cn.wxl.template @@ -1,12 +1,12 @@ - - - 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..ebf12e516 100644 --- a/wix/Lang/OpenJDK.hotspot.zh-tw.wxl.template +++ b/wix/Lang/OpenJDK.hotspot.zh-tw.wxl.template @@ -1,12 +1,12 @@ - - - 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.openj9.de-de.wxl.template b/wix/Lang/OpenJDK.openj9.de-de.wxl.template index 7ac83e77e..d3b7a65d7 100644 --- a/wix/Lang/OpenJDK.openj9.de-de.wxl.template +++ b/wix/Lang/OpenJDK.openj9.de-de.wxl.template @@ -1,12 +1,12 @@ - - - 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..55b8b3eac 100644 --- a/wix/Lang/OpenJDK.openj9.en-us.wxl.template +++ b/wix/Lang/OpenJDK.openj9.en-us.wxl.template @@ -1,12 +1,12 @@ - - - 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..58f43e680 100644 --- a/wix/Lang/OpenJDK.openj9.es-es.wxl.template +++ b/wix/Lang/OpenJDK.openj9.es-es.wxl.template @@ -1,12 +1,12 @@ - - - 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..3a41ab2a5 100644 --- a/wix/Lang/OpenJDK.openj9.fr-fr.wxl.template +++ b/wix/Lang/OpenJDK.openj9.fr-fr.wxl.template @@ -1,12 +1,12 @@ - - - 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..51e945414 100644 --- a/wix/Lang/OpenJDK.openj9.ja-jp.wxl.template +++ b/wix/Lang/OpenJDK.openj9.ja-jp.wxl.template @@ -1,12 +1,12 @@ - - - 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..8c356bfc9 100644 --- a/wix/Lang/OpenJDK.openj9.zh-cn.wxl.template +++ b/wix/Lang/OpenJDK.openj9.zh-cn.wxl.template @@ -1,12 +1,12 @@ - - - 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..9669ecebb 100644 --- a/wix/Lang/OpenJDK.openj9.zh-tw.wxl.template +++ b/wix/Lang/OpenJDK.openj9.zh-tw.wxl.template @@ -1,12 +1,12 @@ - - - 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/Main.wxs.template b/wix/Main.wxs.template index 329e50ed0..9d37caf3a 100644 --- a/wix/Main.wxs.template +++ b/wix/Main.wxs.template @@ -1,238 +1,387 @@ - - - - - - - - - - - - - - - - - - = 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 - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/wix/README.md b/wix/README.md index 65e2c0960..e52487f1f 100644 --- a/wix/README.md +++ b/wix/README.md @@ -1,27 +1,31 @@ # Requirements for build environment -1. [Windows Installer XML (WiX) toolset, 3.11 or later](http://wixtoolset.org/releases/) -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. [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). ## How to upgrade to a new OpenJDK version 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 ``` 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 "5.0.0" ``` 3. Export the following environment variables: @@ -31,12 +35,14 @@ 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) - cmd /c Build.OpenJDK_generic.cmd + SET WIX_VERSION=5.0.0 (make sure this is the same version that is installed on the build machine) ``` To customize branding information you can export the following environment variables to override the default values. The default values are listed below: @@ -50,11 +56,10 @@ 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_F -ULL_VERSION% + 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 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 @@ -67,6 +72,20 @@ ULL_VERSION% 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. 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 inner `"?>` statement. + + b. Set ` 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 @@ -162,7 +181,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/Resources/heat.icedteaweb.xslt b/wix/Resources/heat.icedteaweb.xslt index 2cf8170ba..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 5c65a7b85..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 diff --git a/wix/SourceDir/CreateSourceFolder.AdoptOpenJDK.ps1 b/wix/SourceDir/CreateSourceFolder.AdoptOpenJDK.ps1 index 1da044277..30e30dba3 100644 --- a/wix/SourceDir/CreateSourceFolder.AdoptOpenJDK.ps1 +++ b/wix/SourceDir/CreateSourceFolder.AdoptOpenJDK.ps1 @@ -1,22 +1,28 @@ <# .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 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 5.0.0. .NOTES File Name: CreateSourceFolder.AdoptOpenJDK.ps1 @@ -30,17 +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]$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" @@ -52,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)) { @@ -82,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 @@ -91,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 @@ -106,3 +116,33 @@ Get-ChildItem -Path .\ -Filter *.zip -File -Name| ForEach-Object { Move-Item -Path $_.FullName -Destination $Destination -Force } } + +# 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 +$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" +} + +# Copy heat.exe to expected location in Resources Dir +$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_dir/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 diff --git a/wix/helpers/Update-id.ps1 b/wix/helpers/Update-id.ps1 new file mode 100644 index 000000000..a06455f73 --- /dev/null +++ b/wix/helpers/Update-id.ps1 @@ -0,0 +1,69 @@ +<# +.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 = '