2015-04-06 10:27:28 +08:00
|
|
|
@echo off
|
|
|
|
|
2015-11-07 14:29:35 +08:00
|
|
|
echo Saving PATH
|
|
|
|
if "%OLDPATH%"=="" set OLDPATH=%PATH%
|
|
|
|
|
2015-10-18 06:58:15 +08:00
|
|
|
cd %~dp0
|
|
|
|
|
2015-11-07 14:29:35 +08:00
|
|
|
if /i "%1"=="x32" call setenv.bat x32&set type=Configuration=Release;Platform=Win32&goto build
|
|
|
|
if /i "%1"=="x64" call setenv.bat x64&set type=Configuration=Release;Platform=x64&goto build
|
2015-10-18 06:58:15 +08:00
|
|
|
if /i "%1"=="coverity" goto coverity
|
|
|
|
if /i "%1"=="doxygen" call setenv.bat doxygen&goto doxygen
|
|
|
|
|
|
|
|
goto usage
|
2015-04-06 10:37:39 +08:00
|
|
|
|
2015-04-06 10:27:28 +08:00
|
|
|
|
2015-04-06 11:36:13 +08:00
|
|
|
:build
|
2015-04-06 10:27:28 +08:00
|
|
|
echo Building DBG...
|
2016-06-24 00:56:43 +08:00
|
|
|
if "%MAXCORES%"=="" (
|
|
|
|
msbuild.exe x64dbg.sln /m /verbosity:minimal /t:Rebuild /p:%type%
|
|
|
|
) else (
|
|
|
|
set CL=/MP%MAXCORES%
|
|
|
|
msbuild.exe x64dbg.sln /m:1 /verbosity:minimal /t:Rebuild /p:%type%
|
|
|
|
)
|
2015-04-06 10:27:28 +08:00
|
|
|
|
|
|
|
echo Building GUI...
|
2015-11-16 22:07:52 +08:00
|
|
|
rmdir /S /Q src\gui_build
|
2015-11-07 14:29:35 +08:00
|
|
|
cd src\gui
|
2015-10-18 06:58:15 +08:00
|
|
|
qmake x64dbg.pro CONFIG+=release
|
2016-06-24 00:56:43 +08:00
|
|
|
if "%MAXCORES%"=="" (
|
|
|
|
jom
|
|
|
|
) else (
|
|
|
|
jom /J %MAXCORES%
|
|
|
|
)
|
2015-11-07 14:29:35 +08:00
|
|
|
cd ..\..
|
|
|
|
goto :restorepath
|
2015-10-18 06:58:15 +08:00
|
|
|
|
2015-04-06 11:36:13 +08:00
|
|
|
|
|
|
|
:coverity
|
2015-10-19 00:58:08 +08:00
|
|
|
if "%2"=="" (
|
|
|
|
echo "Usage: build.bat coverity x32/x64"
|
|
|
|
goto usage
|
|
|
|
)
|
2015-10-18 06:58:15 +08:00
|
|
|
|
2015-04-06 11:36:13 +08:00
|
|
|
call setenv.bat coverity
|
|
|
|
echo Building with Coverity
|
|
|
|
cov-configure --msvc
|
|
|
|
cov-build --dir cov-int --instrument build.bat %2%
|
2015-11-07 14:29:35 +08:00
|
|
|
goto :restorepath
|
2015-10-18 06:58:15 +08:00
|
|
|
|
2015-04-06 11:36:13 +08:00
|
|
|
|
|
|
|
:doxygen
|
|
|
|
doxygen
|
2015-11-07 14:29:35 +08:00
|
|
|
goto :restorepath
|
2015-10-18 06:58:15 +08:00
|
|
|
|
2015-04-06 11:36:13 +08:00
|
|
|
|
2015-10-18 06:58:15 +08:00
|
|
|
:usage
|
|
|
|
echo "Usage: build.bat x32/x64/coverity (x32/x64)/doxygen/chm"
|
|
|
|
echo.
|
|
|
|
echo Examples:
|
|
|
|
echo build.bat x32 : builds 32-bit release build
|
|
|
|
echo build.bat x64 : builds 64-bit release build
|
|
|
|
echo build.bat coverity x32 : builds 32-bit coverity build
|
|
|
|
echo build.bat coverity x64 : builds 64-bit coverity build
|
|
|
|
echo build.bat doxygen : generate doxygen documentation
|
|
|
|
echo build.bat chm : generate windows help format documentation
|
2015-11-07 14:29:35 +08:00
|
|
|
goto :restorepath
|
|
|
|
|
|
|
|
:restorepath
|
|
|
|
echo Resetting PATH
|
|
|
|
set PATH=%OLDPATH%
|
|
|
|
set OLDPATH=
|