mirror of
https://github.com/nextcloud/desktop.git
synced 2024-12-18 11:51:51 +03:00
27 lines
1.1 KiB
Batchfile
27 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%
|