Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

Auto-detect WiX location in build process

  • Loading branch information...
commit 85abb6a37e739dbc7cfda3a06180d8de3f93547a 1 parent 6b4812d
@cbas cbas authored
Showing with 7 additions and 8 deletions.
  1. +7 −8 Installer/WiX/build_msi.bat
15 Installer/WiX/build_msi.bat
@@ -5,11 +5,10 @@
IF NOT DEFINED BUILD_CONFIG CALL "..\..\build_config.bat"
-:: This script creates an MSI package for Windows Installer.
-:: Dependency: WiX 3.5
-:: Note: heat/candle/light need to be accessible in the PATH.
-:: Default location:
-:: C:\Program Files (x86)\Windows Installer XML v3.5\bin
+IF NOT DEFINED WIX ECHO Error: WiX 3.5 is required. See: && EXIT /B 1
+SET HEAT=%WIX%\bin\heat.exe
+SET CANDLE=%WIX%\bin\candle.exe
+SET LIGHT=%WIX%\bin\light.exe
ECHO Creating temporary copy...
ROBOCOPY "../../Client" "./Temp" /MIR /XF ".gitignore" "*.pdb" "*_debug.exe" /E /NJH /NJS /NS /NC /NFL /NDL
@@ -24,17 +23,17 @@ ECHO %VERSION_BUILD% > "./Temp/settings/build.txt"
:: Generate a list of files as a component group.
ECHO Harvesting components...
-heat.exe dir "./Temp" -nologo -cg "CoreFiles" -dr "DESTINATION" -srd -template fragment -ke -gg -out "./components.wxs"
+%HEAT% dir "./Temp" -nologo -cg "CoreFiles" -dr "DESTINATION" -srd -template fragment -ke -gg -out "./components.wxs"
IF %ERRORLEVEL% NEQ 0 ECHO Error: Failed to harvest components && EXIT /B 1
:: Transform the XML.
ECHO Compiling installer...
-candle.exe -nologo -sw1077 "./product.wxs" "./components.wxs" "./WixUI_ZeroClick.wxs"
+%CANDLE% -nologo -sw1077 "./product.wxs" "./components.wxs" "./WixUI_ZeroClick.wxs"
IF %ERRORLEVEL% NEQ 0 ECHO Error: Failed to compile installer && EXIT /B 1
:: Create the MSI distributable.
ECHO Linking installer...
-light.exe -nologo -b "./Temp" -ext "WixUIExtension" -ext "WixUtilExtension" -cultures:en-us -sice:ICE38 -sice:ICE64 -sice:ICE91 -out "./%PACKAGE%" "./product.wixobj" "./components.wixobj" "./WixUI_ZeroClick.wixobj"
+%LIGHT% -nologo -b "./Temp" -ext "WixUIExtension" -ext "WixUtilExtension" -cultures:en-us -sice:ICE38 -sice:ICE64 -sice:ICE91 -out "./%PACKAGE%" "./product.wixobj" "./components.wixobj" "./WixUI_ZeroClick.wixobj"
IF %ERRORLEVEL% NEQ 0 ECHO Error: Failed to link installer && EXIT /B 1
ECHO Cleaning up...

0 comments on commit 85abb6a

Please sign in to comment.
Something went wrong with that request. Please try again.