PROJECT: Update most batch scripts
This commit is contained in:
parent
772167b29e
commit
e61921d449
86
build.bat
86
build.bat
|
|
@ -1,74 +1,60 @@
|
|||
@echo off
|
||||
|
||||
echo Saving PATH
|
||||
if "%OLDPATH%"=="" set OLDPATH=%PATH%
|
||||
cd %~dp0
|
||||
|
||||
if /i "%1"=="x32" call setenv.bat x32&set type="Release|Win32"&goto build
|
||||
if /i "%1"=="x64" call setenv.bat x64&set type="Release|x64"&goto build
|
||||
if /i "%1"=="coverity" goto coverity
|
||||
if /i "%1"=="doxygen" call setenv.bat doxygen&goto doxygen
|
||||
if /i "%1"=="chm" call setenv.bat chm&goto chm
|
||||
|
||||
goto usage
|
||||
|
||||
if "%1"=="x32" (
|
||||
call setenv.bat x32
|
||||
set type=Win32
|
||||
goto build
|
||||
) else if "%1"=="x64" (
|
||||
call setenv.bat x64
|
||||
set type=x64
|
||||
goto build
|
||||
) else if "%1"=="coverity" (
|
||||
if "%2"=="" (
|
||||
echo "usage: build.bat coverity x32/x64"
|
||||
goto :eof
|
||||
)
|
||||
goto coverity
|
||||
) else if "%1"=="doxygen" (
|
||||
goto doxygen
|
||||
) else if "%1"=="chm" (
|
||||
goto chm
|
||||
) else (
|
||||
echo "usage: build.bat x32/x64/coverity/doxygen/chm"
|
||||
goto :eof
|
||||
)
|
||||
|
||||
:build
|
||||
echo Building DBG...
|
||||
devenv /Rebuild "Release|%type%" x64_dbg.sln
|
||||
|
||||
echo GUI prebuildStep
|
||||
cd x64_dbg_gui\Project
|
||||
cmd /k "prebuildStep.bat %1"
|
||||
cd ..
|
||||
cd ..
|
||||
devenv /Rebuild %type% x64dbg.sln
|
||||
|
||||
echo Building GUI...
|
||||
rmdir /S /Q build
|
||||
mkdir build
|
||||
cd build
|
||||
qmake ..\x64_dbg_gui\Project\x64_dbg.pro CONFIG+=release
|
||||
cd /src/gui
|
||||
qmake x64dbg.pro CONFIG+=release
|
||||
jom
|
||||
cd ..
|
||||
cd ..
|
||||
goto :EOF
|
||||
|
||||
echo GUI afterbuildStep
|
||||
cd x64_dbg_gui\Project
|
||||
call afterbuildStep.bat %1 ..\..\build\release
|
||||
cd ..
|
||||
cd ..
|
||||
goto restorepath
|
||||
|
||||
:coverity
|
||||
if "%2"=="" (
|
||||
echo "Usage: build.bat coverity x32/x64"
|
||||
goto usage
|
||||
)
|
||||
|
||||
call setenv.bat coverity
|
||||
echo Building with Coverity
|
||||
cov-configure --msvc
|
||||
cov-build --dir cov-int --instrument build.bat %2%
|
||||
goto restorepath
|
||||
goto :EOF
|
||||
|
||||
|
||||
:doxygen
|
||||
call setenv.bat doxygen
|
||||
doxygen
|
||||
goto restorepath
|
||||
goto :EOF
|
||||
|
||||
|
||||
:chm
|
||||
call setenv.bat chm
|
||||
start /w "" winchm.exe help\x64_dbg.wcp /h
|
||||
goto restorepath
|
||||
goto :EOF
|
||||
|
||||
:restorepath
|
||||
echo Resetting PATH
|
||||
set PATH=%OLDPATH%
|
||||
set OLDPATH=
|
||||
|
||||
: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
|
||||
goto :EOF
|
||||
88
clean.bat
88
clean.bat
|
|
@ -1,58 +1,40 @@
|
|||
@echo off
|
||||
echo cleaning base directory...
|
||||
|
||||
echo Cleaning base directory...
|
||||
del /Q *.sdf
|
||||
del /Q *.layout
|
||||
del /Q /A H *.suo
|
||||
rmdir /S /Q ipch
|
||||
rmdir /S /Q release
|
||||
echo cleaning x64_dbg_bridge...
|
||||
cd x64_dbg_bridge
|
||||
rmdir /S /Q obj
|
||||
rmdir /S /Q Win32
|
||||
rmdir /S /Q x64
|
||||
del /Q *.bmarks
|
||||
del /Q *.layout
|
||||
del /Q *.depend
|
||||
|
||||
echo Cleaning BRIDGE...
|
||||
cd src/bridge
|
||||
call :delfiles
|
||||
|
||||
echo Cleaning DBG...
|
||||
cd src/dbg
|
||||
call :delfiles
|
||||
|
||||
echo Cleaning EXE...
|
||||
cd src/exe
|
||||
call :delfiles
|
||||
|
||||
echo Cleaning GUI...
|
||||
cd src/gui
|
||||
rmdir /S /Q build
|
||||
del /Q Makefile*
|
||||
cd ..
|
||||
echo cleaning x64_dbg_dbg...
|
||||
cd x64_dbg_dbg
|
||||
rmdir /S /Q obj
|
||||
rmdir /S /Q Win32
|
||||
rmdir /S /Q x64
|
||||
del /Q *.bmarks
|
||||
del /Q *.layout
|
||||
del /Q *.depend
|
||||
cd ..
|
||||
echo cleaning x64_dbg_exe...
|
||||
cd x64_dbg_exe
|
||||
rmdir /S /Q obj
|
||||
rmdir /S /Q Win32
|
||||
rmdir /S /Q x64
|
||||
del /Q *.bmarks
|
||||
del /Q *.layout
|
||||
del /Q *.depend
|
||||
cd ..
|
||||
echo cleaning x64_dbg_gui...
|
||||
cd x64_dbg_gui
|
||||
rmdir /S /Q bin
|
||||
rmdir /S /Q Project\GeneratedFiles
|
||||
rmdir /S /Q Project\release
|
||||
rmdir /S /Q Project\debug
|
||||
rmdir /S /Q Project\Win32
|
||||
rmdir /S /Q Project\x64
|
||||
del /Q Project\Src\Bridge\libx32bridge.a
|
||||
del /Q Project\Src\Bridge\libx64bridge.a
|
||||
del /Q Project\Src\Bridge\x32bridge.lib
|
||||
del /Q Project\Src\Bridge\x64bridge.lib
|
||||
cd ..
|
||||
echo cleaning bin\
|
||||
|
||||
echo Cleaning bin\
|
||||
del /Q bin\*.pdb
|
||||
del /Q bin\*.exp
|
||||
del /Q bin\*.a
|
||||
del /Q bin\*.lib
|
||||
del /Q bin\*.def
|
||||
del /Q bin\x96_dbg.exe
|
||||
echo cleaning bin\x32...
|
||||
del /Q bin\x96dbg.exe
|
||||
|
||||
echo Cleaning bin\x32...
|
||||
rmdir /S /Q bin\x32\db
|
||||
del /Q bin\x32\*.pdb
|
||||
del /Q bin\x32\*.exp
|
||||
|
|
@ -63,7 +45,8 @@ del /Q bin\x32\x32dbg.exe
|
|||
del /Q bin\x32\x32dbg.dll
|
||||
del /Q bin\x32\x32gui.dll
|
||||
del /Q bin\x32\x32bridge.dll
|
||||
echo cleaning bin\x64...
|
||||
|
||||
echo Cleaning bin\x64...
|
||||
rmdir /S /Q bin\x64\db
|
||||
del /Q bin\x64\*.pdb
|
||||
del /Q bin\x64\*.exp
|
||||
|
|
@ -74,8 +57,23 @@ del /Q bin\x64\x64dbg.exe
|
|||
del /Q bin\x64\x64dbg.dll
|
||||
del /Q bin\x64\x64gui.dll
|
||||
del /Q bin\x64\x64bridge.dll
|
||||
echo cleaning help...
|
||||
|
||||
echo Cleaning help...
|
||||
cd help
|
||||
del /Q *.chm
|
||||
rmdir /S /Q output
|
||||
exit 0
|
||||
|
||||
echo Done!
|
||||
exit 0
|
||||
|
||||
|
||||
|
||||
:delfiles
|
||||
rmdir /S /Q obj
|
||||
rmdir /S /Q Win32
|
||||
rmdir /S /Q x64
|
||||
del /Q *.bmarks
|
||||
del /Q *.layout
|
||||
del /Q *.depend
|
||||
cd ..
|
||||
cd ..
|
||||
|
|
|
|||
45
setenv.bat
45
setenv.bat
|
|
@ -1,11 +1,8 @@
|
|||
@echo off
|
||||
|
||||
if "%OLDPATH%"=="" set OLDPATH=%PATH%
|
||||
|
||||
if "%QT32PATH%"=="" set QT32PATH=c:\Qt\qt-4.8.6-x86-msvc2013\qt-4.8.6-x86-msvc2013\bin
|
||||
if "%QT64PATH%"=="" set QT64PATH=c:\Qt\qt-4.8.6-x64-msvc2013\qt-4.8.6-x64-msvc2013\bin
|
||||
if "%QTCREATORPATH%"=="" set QTCREATORPATH=c:\Qt\qtcreator-3.1.1\bin
|
||||
if "%VSVARSALLPATH%"=="" set VSVARSALLPATH=c:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat
|
||||
if "%COVERITYPATH%"=="" set COVERITYPATH=c:\coverity\bin
|
||||
if "%DOXYGENPATH%"=="" set DOXYGENPATH=C:\Program Files\doxygen\bin
|
||||
if "%CHMPATH%"=="" set CHMPATH=c:\Program Files (x86)\Softany\WinCHM
|
||||
|
|
@ -21,7 +18,7 @@ if "%1"=="x32" (
|
|||
) else if "%1"=="chm" (
|
||||
goto chm
|
||||
) else (
|
||||
echo "usage: setenv x32/x64/coverity/doxygen/chm"
|
||||
echo "Usage: setenv x32/x64/coverity/doxygen/chm"
|
||||
goto :eof
|
||||
)
|
||||
|
||||
|
|
@ -30,7 +27,7 @@ echo Setting Qt in PATH
|
|||
set PATH=%PATH%;%QT32PATH%
|
||||
set PATH=%PATH%;%QTCREATORPATH%
|
||||
echo Setting VS in PATH
|
||||
call "%VSVARSALLPATH%"
|
||||
call :vc-set-2015
|
||||
goto :eof
|
||||
|
||||
:x64
|
||||
|
|
@ -38,7 +35,7 @@ echo Setting Qt in PATH
|
|||
set PATH=%PATH%;%QT64PATH%
|
||||
set PATH=%PATH%;%QTCREATORPATH%
|
||||
echo Setting VS in PATH
|
||||
call "%VSVARSALLPATH%" amd64
|
||||
call :vc-set-2015 amd64
|
||||
goto :eof
|
||||
|
||||
:coverity
|
||||
|
|
@ -54,4 +51,38 @@ goto :eof
|
|||
:chm
|
||||
echo Setting CHM in PATH
|
||||
set PATH=%PATH%;%CHMPATH%
|
||||
goto :eof
|
||||
goto :eof
|
||||
|
||||
|
||||
|
||||
|
||||
@rem Look for Visual Studio 2015
|
||||
:vc-set-2015
|
||||
if not defined VS140COMNTOOLS goto vc-set-2013
|
||||
if not exist "%VS140COMNTOOLS%\..\..\vc\vcvarsall.bat" goto vc-set-2013
|
||||
if "%VCVARS_VER%" NEQ "140" (
|
||||
call "%VS140COMNTOOLS%\..\..\vc\vcvarsall.bat" %1%
|
||||
SET VCVARS_VER=140
|
||||
)
|
||||
if not defined VCINSTALLDIR goto msbuild-not-found
|
||||
set GYP_MSVS_VERSION=2015
|
||||
goto msbuild-found
|
||||
|
||||
@rem Look for Visual Studio 2013
|
||||
:vc-set-2013
|
||||
if not defined VS120COMNTOOLS goto goto msbuild-not-found
|
||||
if not exist "%VS120COMNTOOLS%\..\..\vc\vcvarsall.bat" goto msbuild-not-found
|
||||
if "%VCVARS_VER%" NEQ "120" (
|
||||
call "%VS120COMNTOOLS%\..\..\vc\vcvarsall.bat" %1%
|
||||
SET VCVARS_VER=120
|
||||
)
|
||||
if not defined VCINSTALLDIR goto msbuild-not-found
|
||||
set GYP_MSVS_VERSION=2013
|
||||
goto msbuild-found
|
||||
|
||||
:msbuild-found
|
||||
goto :EOF
|
||||
|
||||
:msbuild-not-found
|
||||
echo ERROR: Visual Studio 2013/2015 wasn't found!
|
||||
exit 1
|
||||
|
|
@ -38,19 +38,20 @@ QT += core gui network
|
|||
# QT5 requires widgets
|
||||
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
|
||||
|
||||
# Removes all debug output when defined
|
||||
#DEFINES += QT_NO_DEBUG_OUTPUT
|
||||
|
||||
##
|
||||
## Build flags
|
||||
##
|
||||
# Generate debug symbols in release mode
|
||||
QMAKE_CFLAGS_RELEASE += -Zi #-O3 # C?
|
||||
#QMAKE_CXXFLAGS_RELEASE += -O3 # C++?
|
||||
QMAKE_CXXFLAGS_RELEASE += -Zi #-O3 # Compiler
|
||||
QMAKE_LFLAGS_RELEASE += /DEBUG # Linker
|
||||
|
||||
# Build as a library
|
||||
DEFINES += BUILD_LIB NOMINMAX
|
||||
TEMPLATE = lib
|
||||
|
||||
# External include paths
|
||||
##
|
||||
## Includes
|
||||
##
|
||||
INCLUDEPATH += \
|
||||
$${X64_SRC_DIR} \
|
||||
Src \
|
||||
|
|
@ -250,16 +251,12 @@ FORMS += \
|
|||
LIBS += -luser32
|
||||
|
||||
!contains(QMAKE_HOST.arch, x86_64) {
|
||||
#
|
||||
# Windows x86 (32bit) specific build
|
||||
#
|
||||
LIBS += -L"$$PWD/Src/ThirdPartyLibs/BeaEngine/" -lBeaEngine
|
||||
LIBS += -L"$$PWD/Src/ThirdPartyLibs/snowman/" -lsnowman_x86
|
||||
LIBS += -L"$${X64_BIN_DIR}" -lx32bridge
|
||||
} else {
|
||||
#
|
||||
# Windows x64 (64bit) specific build
|
||||
#
|
||||
LIBS += -L"$$PWD/Src/ThirdPartyLibs/BeaEngine/" -lBeaEngine_64
|
||||
LIBS += -L"$$PWD/Src/ThirdPartyLibs/snowman/" -lsnowman_x64
|
||||
LIBS += -L"$${X64_BIN_DIR}" -lx64bridge
|
||||
|
|
|
|||
Loading…
Reference in New Issue