make-msi.bat.in 1.2 KB

1234567891011121314151617181920212223242526
  1. @echo off
  2. set HarvestAppDir=%~1
  3. set BuildArch=@MSI_BUILD_ARCH@
  4. if "%HarvestAppDir%" == "" (
  5. echo "Missing parameter: Please specify file collection source path (HarvestAppDir)."
  6. exit 1
  7. )
  8. if "%WIX%" == "" (
  9. echo "WiX Toolset path not set (environment variable 'WIX'). Please install the WiX Toolset."
  10. exit 1
  11. )
  12. Rem Generate collect.wxs
  13. "%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
  14. if %ERRORLEVEL% neq 0 exit %ERRORLEVEL%
  15. Rem Compile en-US (https://www.firegiant.com/wix/tutorial/transforms/morphing-installers/)
  16. "%WIX%\bin\candle.exe" -dcodepage=1252 -dPlatform=%BuildArch% -arch %BuildArch% -dHarvestAppDir="%HarvestAppDir%" -ext WixUtilExtension NCMsiHelper.wxs WinShellExt.wxs collect.wxs Nextcloud.wxs RegistryCleanupCustomAction.wxs
  17. if %ERRORLEVEL% neq 0 exit %ERRORLEVEL%
  18. Rem Link MSI package
  19. "%WIX%\bin\light.exe" -sw1076 -ext WixUIExtension -ext WixUtilExtension -cultures:en-us NCMsiHelper.wixobj WinShellExt.wixobj collect.wixobj Nextcloud.wixobj RegistryCleanupCustomAction.wixobj -out "@MSI_INSTALLER_FILENAME@"
  20. exit %ERRORLEVEL%