2018-01-03 18:46:30 +00:00
|
|
|
@ECHO off
|
|
|
|
SETLOCAL ENABLEDELAYEDEXPANSION
|
2017-10-15 19:19:48 +00:00
|
|
|
|
2018-01-03 18:46:30 +00:00
|
|
|
IF NOT DEFINED QT32PATH SET QT32PATH=C:\Qt\5.9.2\msvc2015
|
|
|
|
IF NOT DEFINED QT64PATH SET QT64PATH=C:\Qt\5.9.2\msvc2015_64
|
|
|
|
IF NOT DEFINED VSVARSALLPATH SET VSVARSALLPATH=C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat
|
2017-10-15 19:19:48 +00:00
|
|
|
|
2018-01-03 18:46:30 +00:00
|
|
|
if "%1" == "32" (
|
|
|
|
SET "PATH=%QT32PATH%\bin;%PATH%"
|
|
|
|
CALL "%VSVARSALLPATH%" x86
|
|
|
|
SET MSBUILDPLATFORM=Win32
|
|
|
|
) else if "%1" == "64" (
|
|
|
|
SET "PATH=%QT64PATH%\bin;%PATH%"
|
|
|
|
CALL "%VSVARSALLPATH%" x64
|
|
|
|
SET MSBUILDPLATFORM=x64
|
2017-10-15 19:19:48 +00:00
|
|
|
) else (
|
2018-01-03 18:46:30 +00:00
|
|
|
ECHO Usage: %0 {32^|64}
|
|
|
|
EXIT /B
|
2017-10-15 19:19:48 +00:00
|
|
|
)
|
|
|
|
|
2018-01-03 18:46:30 +00:00
|
|
|
ECHO Preparing directory
|
|
|
|
RMDIR /S /Q build%1
|
|
|
|
MKDIR build%1
|
|
|
|
CD build%1
|
2017-10-15 19:19:48 +00:00
|
|
|
|
2018-01-03 18:46:30 +00:00
|
|
|
ECHO Building cutter
|
2017-10-15 19:19:48 +00:00
|
|
|
qmake ..\src\cutter.pro -config release -tp vc
|
2018-01-03 18:46:30 +00:00
|
|
|
IF !ERRORLEVEL! NEQ 0 EXIT /B
|
2017-10-15 19:19:48 +00:00
|
|
|
msbuild /m cutter.vcxproj /p:Configuration=Release;Platform=%MSBUILDPLATFORM%
|
2018-01-03 18:46:30 +00:00
|
|
|
IF !ERRORLEVEL! NEQ 0 EXIT /B
|
2017-10-15 19:19:48 +00:00
|
|
|
|
2018-01-03 18:46:30 +00:00
|
|
|
ECHO Deploying cutter
|
|
|
|
MKDIR cutter%1
|
|
|
|
MOVE release\cutter.exe cutter%1\cutter.exe
|
|
|
|
XCOPY /S ..\dist%1 cutter%1\
|
2017-10-15 19:19:48 +00:00
|
|
|
windeployqt cutter%1\cutter.exe
|
2018-01-03 18:46:30 +00:00
|
|
|
CD ..
|