Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated msi windows installers to use wix v5 #851

Merged
merged 72 commits into from
May 9, 2024
Merged
Show file tree
Hide file tree
Changes from 32 commits
Commits
Show all changes
72 commits
Select commit Hold shift + click to select a range
0dc7ad5
First attempt at converting wix/Build.OpenJDK_generic.cmd to .ps1 file
jmjaffe37 Mar 11, 2024
3dd44ad
Updated main + base + hotspot wix xml templates
jmjaffe37 Mar 11, 2024
3fe7cbd
Updated dragonwell + openj9 wix templates to wixv4
jmjaffe37 Mar 11, 2024
3fc05bb
Updated remaining templates to wix v4
jmjaffe37 Mar 12, 2024
c2fce74
Updated extensions used in wix commands
jmjaffe37 Mar 12, 2024
af7f7ea
First attempt at converting to wixv4
jmjaffe37 Mar 12, 2024
b0d976b
No attempting to use wix_heat_directory
jmjaffe37 Apr 3, 2024
93cde4d
Now using wix 4.0.5
jmjaffe37 Apr 3, 2024
3ba44b5
Now placing heat.exe in Resources dir
jmjaffe37 Apr 4, 2024
f678094
updated default heat path and error messages
jmjaffe37 Apr 4, 2024
a818e88
Now adding wix extensions
jmjaffe37 Apr 4, 2024
eed8bf1
Now keeping all heat tools files
jmjaffe37 Apr 4, 2024
64c1c3b
updated default heat path, fixed error message
jmjaffe37 Apr 4, 2024
f35ec13
Removed 'ALLUSERS' property from Main.wxs.template; causing 'duplicat…
jmjaffe37 Apr 4, 2024
3e50487
Changed ID ALLUSERS to ALLUSERSSETUP
jmjaffe37 Apr 4, 2024
3ff5cd5
Updated culture translation
jmjaffe37 Apr 4, 2024
2ea3ec6
Added + updated error messages
jmjaffe37 Apr 4, 2024
d9d4a0a
Updated error message
jmjaffe37 Apr 4, 2024
ac2c8ea
Updated comments and wix.yml
jmjaffe37 Apr 4, 2024
b138ed5
Deleted Build-OpenJDK.ps1
jmjaffe37 Apr 4, 2024
93da458
Attempting to support icedTea again
jmjaffe37 Apr 4, 2024
491580c
now heating jdk8 on single line
jmjaffe37 Apr 4, 2024
2f363ab
Attempting to build with IcedTea
jmjaffe37 Apr 9, 2024
d6c7ac4
Added comments and updated error messages
jmjaffe37 Apr 10, 2024
b5e3123
Added back -sfrag flag and added comments
jmjaffe37 Apr 10, 2024
c055f90
Updated installer version from 200 to 500 to get rid of warning
jmjaffe37 Apr 10, 2024
54c93ab
Updated old source code comments
jmjaffe37 Apr 10, 2024
784c8de
Updated wix/README.md
jmjaffe37 Apr 10, 2024
3c91bde
Seperated heat and build commands out for readability. Now there is 1…
jmjaffe37 Apr 10, 2024
e0d2273
Updated debug and error messages
jmjaffe37 Apr 10, 2024
960e7df
Fixed typo
jmjaffe37 Apr 10, 2024
5af48b9
Now using wix v5 by default
jmjaffe37 Apr 10, 2024
07b7ed9
Added ability for custom output file names
jmjaffe37 Apr 16, 2024
352bf89
Removed old comments
jmjaffe37 Apr 18, 2024
351d7f7
Merge branch 'master' into jmj/wix4_update
jmjaffe37 Apr 19, 2024
d0136da
applied feedback from code review
jmjaffe37 Apr 22, 2024
ad44594
Added xml tagging back
jmjaffe37 Apr 22, 2024
2c000cb
Updated README.md
jmjaffe37 Apr 22, 2024
791cb72
Fixed 'ALLUSERS' property
jmjaffe37 Apr 22, 2024
293dee6
Fixed typo
jmjaffe37 Apr 22, 2024
814a501
Updated wxs spacing and added a comment
jmjaffe37 Apr 22, 2024
7e5c691
Updated README.md with new URL and more md style
jmjaffe37 Apr 23, 2024
9791b53
More md style number bullets
jmjaffe37 Apr 23, 2024
1602161
Added other necessary env vars to README.md
jmjaffe37 Apr 23, 2024
5d1ffd9
Fixed README.md typos
jmjaffe37 Apr 23, 2024
bcc4707
Merge branch 'master' into jmj/wix4_update
gdams Apr 24, 2024
4510eae
Testing changes to fix default installdir
jmjaffe37 Apr 24, 2024
a96f095
Now able to set installation scope
jmjaffe37 Apr 24, 2024
f7ca8d5
Updated comments
jmjaffe37 Apr 24, 2024
18ec3e1
support perUser and perMachine
gdams Apr 30, 2024
0698685
Merge branch 'master' into jmj/wix4_update
gdams Apr 30, 2024
e6bb06a
formatting tweaks
gdams Apr 30, 2024
6f6a569
use API to fetch versions to build
gdams Apr 30, 2024
311d9ea
remove PerUserOrMachine-Example
gdams Apr 30, 2024
ab6da46
Merge branch 'master' into jmj/wix4_update
gdams Apr 30, 2024
434a247
Re-added ability for vendor to choose not to show the end-user licens…
jmjaffe37 Apr 30, 2024
a03a907
Fixed back button
jmjaffe37 Apr 30, 2024
19a400b
Test
jmjaffe37 Apr 30, 2024
40c4f7e
Now installing wix quietly
jmjaffe37 Apr 30, 2024
8243553
Now using format closer to what existed previously
jmjaffe37 Apr 30, 2024
c57f896
Removed test code
jmjaffe37 Apr 30, 2024
6149aef
Added sample code and comment
jmjaffe37 Apr 30, 2024
eb0b678
Added license end-user license behavior section to README.md
jmjaffe37 Apr 30, 2024
ccab40c
Now using env var for vendor
jmjaffe37 May 1, 2024
0507767
Took out vendor logic for end-user license agreements (as requested),…
jmjaffe37 May 1, 2024
375429d
Updated wix installer changelog.md
jmjaffe37 May 2, 2024
00f04bb
Fixed formatting
jmjaffe37 May 2, 2024
1bcb898
Update .github/workflows/wix.yml
gdams May 3, 2024
bd16b79
Updated README.md minimum supported wix version
jmjaffe37 May 3, 2024
35d0e69
formatting tweak
jmjaffe37 May 3, 2024
6d8c0b3
Merge branch 'master' into jmj/wix4_update
jmjaffe37 May 3, 2024
9dd8b96
Merge branch 'master' into jmj/wix4_update
jmjaffe37 May 8, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion .github/workflows/wix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ jobs:
TAG: jdk8u362-b09
SUB_TAG: 8u362b09
JVM: hotspot
WIX_VERSION: 5.0.0
gdams marked this conversation as resolved.
Show resolved Hide resolved
- jdk: 11
ICEDTEA_WEB_VERSION: ""
PRODUCT_MAJOR_VERSION: 11
Expand All @@ -36,6 +37,7 @@ 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
Expand All @@ -48,6 +50,7 @@ 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
Expand All @@ -57,6 +60,7 @@ jobs:
- name: Install dependencies
run: |
choco install --no-progress wget
gdams marked this conversation as resolved.
Show resolved Hide resolved
dotnet tool install --global wix --version ${{ matrix.WIX_VERSION }}

- name: Setup environment variables
uses: allenevans/set-env@0f3306034af0ea21dd28983b6e7c1614ee317739 # v3.0.0
Expand All @@ -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: |
Expand All @@ -84,7 +89,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
./CreateSourceFolder.AdoptOpenJDK.ps1 -wix_version ${{ env.WIX_VERSION }}

- name: Create JDK Installer
run: |
Expand Down
129 changes: 88 additions & 41 deletions wix/Build.OpenJDK_generic.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,16 @@ 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%' ^
-validInputs "x64 x86-32 x86 arm64" ^
-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
)

Expand Down Expand Up @@ -79,6 +81,10 @@ SET WIN_SDK_FULL_VERSION=10.0.17763.0
SET WORKDIR=Workdir\
mkdir %WORKDIR%

@REM Add necessary wix extensions here
gdams marked this conversation as resolved.
Show resolved Hide resolved
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
Expand Down Expand Up @@ -133,8 +139,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
)
Expand Down Expand Up @@ -176,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
Expand All @@ -194,10 +201,9 @@ FOR %%A IN (%ARCH%) DO (


REM Build with extra Source Code feature (needs work)
gdams marked this conversation as resolved.
Show resolved Hide resolved
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_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!
Expand All @@ -215,16 +221,37 @@ 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!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!
)
Expand All @@ -233,37 +260,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
Expand All @@ -283,13 +330,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
Expand Down Expand Up @@ -323,7 +372,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
Expand All @@ -332,20 +381,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

Expand All @@ -370,6 +415,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

Expand Down
30 changes: 27 additions & 3 deletions wix/BuildSetupTranslationTransform.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,36 @@ SET LANGIDS=%LANGIDS%,%LANGID%

ECHO Building setup translation for culture "%1" with LangID "%2"...
REM Build with extra Source Code feature (needs work)
gdams marked this conversation as resolved.
Show resolved Hide resolved
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 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
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
)

Expand Down
Loading
Loading