2015-04-13 14:11:40 -03:00
|
|
|
@echo off
|
|
|
|
setlocal
|
|
|
|
set D=%~dp0
|
|
|
|
set PCBUILD=%D%..\..\PCBuild\
|
|
|
|
|
|
|
|
set BUILDX86=
|
|
|
|
set BUILDX64=
|
|
|
|
set BUILDDOC=
|
2015-07-16 20:33:55 -03:00
|
|
|
set BUILDPX=
|
2015-08-15 18:38:16 -03:00
|
|
|
set BUILDPACK=
|
2015-04-13 14:11:40 -03:00
|
|
|
|
|
|
|
:CheckOpts
|
2015-07-09 00:18:44 -03:00
|
|
|
if "%~1" EQU "-h" goto Help
|
|
|
|
if "%~1" EQU "-x86" (set BUILDX86=1) && shift && goto CheckOpts
|
|
|
|
if "%~1" EQU "-x64" (set BUILDX64=1) && shift && goto CheckOpts
|
|
|
|
if "%~1" EQU "--doc" (set BUILDDOC=1) && shift && goto CheckOpts
|
2015-07-16 20:33:55 -03:00
|
|
|
if "%~1" EQU "--test-marker" (set BUILDPX=1) && shift && goto CheckOpts
|
2015-08-15 18:38:16 -03:00
|
|
|
if "%~1" EQU "--pack" (set BUILDPACK=1) && shift && goto CheckOpts
|
2015-04-13 14:11:40 -03:00
|
|
|
|
|
|
|
if not defined BUILDX86 if not defined BUILDX64 (set BUILDX86=1) && (set BUILDX64=1)
|
|
|
|
|
|
|
|
call "%PCBUILD%env.bat" x86
|
|
|
|
|
|
|
|
if defined BUILDX86 (
|
2015-09-09 01:39:01 -03:00
|
|
|
call "%PCBUILD%build.bat" -d -e
|
2015-04-13 14:11:40 -03:00
|
|
|
if errorlevel 1 goto :eof
|
2015-09-09 01:39:01 -03:00
|
|
|
call "%PCBUILD%build.bat" -e
|
2015-04-13 14:11:40 -03:00
|
|
|
if errorlevel 1 goto :eof
|
|
|
|
)
|
|
|
|
if defined BUILDX64 (
|
2015-09-09 01:39:01 -03:00
|
|
|
call "%PCBUILD%build.bat" -p x64 -d -e
|
2015-04-13 14:11:40 -03:00
|
|
|
if errorlevel 1 goto :eof
|
2015-09-09 01:39:01 -03:00
|
|
|
call "%PCBUILD%build.bat" -p x64 -e
|
2015-04-13 14:11:40 -03:00
|
|
|
if errorlevel 1 goto :eof
|
|
|
|
)
|
|
|
|
|
|
|
|
if defined BUILDDOC (
|
|
|
|
call "%PCBUILD%..\Doc\make.bat" htmlhelp
|
|
|
|
if errorlevel 1 goto :eof
|
|
|
|
)
|
|
|
|
|
2015-07-16 20:33:55 -03:00
|
|
|
set BUILD_CMD="%D%bundle\snapshot.wixproj"
|
|
|
|
if defined BUILDPX (
|
|
|
|
set BUILD_CMD=%BUILD_CMD% /p:UseTestMarker=true
|
|
|
|
)
|
2015-08-15 18:38:16 -03:00
|
|
|
if defined BUILDPACK (
|
|
|
|
set BUILD_CMD=%BUILD_CMD% /p:Pack=true
|
|
|
|
)
|
2015-07-16 20:33:55 -03:00
|
|
|
|
2015-04-13 14:11:40 -03:00
|
|
|
if defined BUILDX86 (
|
|
|
|
"%PCBUILD%win32\python.exe" "%D%get_wix.py"
|
2015-07-16 20:33:55 -03:00
|
|
|
msbuild %BUILD_CMD%
|
2015-04-13 14:11:40 -03:00
|
|
|
if errorlevel 1 goto :eof
|
|
|
|
)
|
|
|
|
if defined BUILDX64 (
|
|
|
|
"%PCBUILD%amd64\python.exe" "%D%get_wix.py"
|
2015-07-16 20:33:55 -03:00
|
|
|
msbuild /p:Platform=x64 %BUILD_CMD%
|
2015-04-13 14:11:40 -03:00
|
|
|
if errorlevel 1 goto :eof
|
|
|
|
)
|
2015-07-04 15:48:37 -03:00
|
|
|
|
|
|
|
exit /B 0
|
|
|
|
|
|
|
|
:Help
|
2015-08-15 18:38:16 -03:00
|
|
|
echo build.bat [-x86] [-x64] [--doc] [-h] [--test-marker] [--pack]
|
2015-07-04 15:48:37 -03:00
|
|
|
echo.
|
|
|
|
echo -x86 Build x86 installers
|
|
|
|
echo -x64 Build x64 installers
|
|
|
|
echo --doc Build CHM documentation
|
2015-07-16 20:33:55 -03:00
|
|
|
echo --test-marker Build installers with 'x' markers
|
2015-08-15 18:38:16 -03:00
|
|
|
echo --pack Embed core MSIs into installer
|