nextcloud-desktop/admin/win/msi/make-msi.bat.in
Michael Schuster a9014f9852
Windows MSI: Add MSI scripts and UI resources
Uses CMake to generate and install all required files in the "msi/" directory.

Signed-off-by: Michael Schuster <michael@schuster.ms>
2020-09-21 16:40:19 +02:00

26 lines
1.1 KiB
Batchfile

@echo off
set HarvestAppDir=%~1
set BuildArch=@MSI_BUILD_ARCH@
if "%HarvestAppDir%" == "" (
echo "Missing parameter: Please specify file collection source path (HarvestAppDir)."
exit 1
)
if "%WIX%" == "" (
echo "WiX Toolset path not set (environment variable 'WIX'). Please install the WiX Toolset."
exit 1
)
Rem Generate collect.wxs
"%WIX%\bin\heat.exe" dir "%HarvestAppDir%" -dr INSTALLDIR -sreg -srd -sfrag -ag -cg ClientFiles -var var.HarvestAppDir -platform='%BuildArch%' -t collect-transform.xsl -out collect.wxs
if %ERRORLEVEL% neq 0 exit %ERRORLEVEL%
Rem Compile en-US (https://www.firegiant.com/wix/tutorial/transforms/morphing-installers/)
"%WIX%\bin\candle.exe" -dcodepage=1252 -dPlatform=%BuildArch% -arch %BuildArch% -dHarvestAppDir="%HarvestAppDir%" -ext WixUtilExtension NCMsiHelper.wxs WinShellExt.wxs collect.wxs Nextcloud.wxs
if %ERRORLEVEL% neq 0 exit %ERRORLEVEL%
Rem Link MSI package
"%WIX%\bin\light.exe" -sw1076 -ext WixUIExtension -ext WixUtilExtension -cultures:en-us NCMsiHelper.wixobj WinShellExt.wixobj collect.wixobj Nextcloud.wixobj -out "@MSI_INSTALLER_FILENAME@"
exit %ERRORLEVEL%