2018-01-03 18:46:30 +00:00
|
|
|
@ECHO off
|
|
|
|
SETLOCAL ENABLEDELAYEDEXPANSION
|
2019-04-09 07:44:44 +00:00
|
|
|
SETLOCAL ENABLEEXTENSIONS
|
2017-10-15 19:19:48 +00:00
|
|
|
|
2018-04-05 08:05:00 +00:00
|
|
|
IF "%VisualStudioVersion%" == "14.0" ( IF NOT DEFINED Platform SET "Platform=X86" )
|
|
|
|
FOR /F %%i IN ('powershell -c "\"%Platform%\".toLower()"') DO SET PLATFORM=%%i
|
|
|
|
powershell -c "if ('%PLATFORM%' -notin ('x86', 'x64')) {Exit 1}"
|
|
|
|
IF !ERRORLEVEL! NEQ 0 (
|
|
|
|
ECHO Unknown platform: %PLATFORM%
|
|
|
|
EXIT /B 1
|
2017-10-15 19:19:48 +00:00
|
|
|
)
|
|
|
|
|
2020-12-16 10:59:23 +00:00
|
|
|
SET "RZDIST=rz_dist"
|
2018-04-05 08:05:00 +00:00
|
|
|
SET "BUILDDIR=build_%PLATFORM%"
|
2019-04-09 07:44:44 +00:00
|
|
|
SET "BREAKPAD_SOURCE_DIR=%CD%\src\breakpad\src\src"
|
2018-04-05 08:05:00 +00:00
|
|
|
|
2018-01-03 18:46:30 +00:00
|
|
|
ECHO Preparing directory
|
2018-04-05 08:05:00 +00:00
|
|
|
RMDIR /S /Q %BUILDDIR%
|
|
|
|
MKDIR %BUILDDIR%
|
2018-10-31 16:07:53 +00:00
|
|
|
|
|
|
|
ECHO Prepare translations
|
2019-01-05 11:32:03 +00:00
|
|
|
FOR %%i in (src\translations\*.ts) DO lrelease %%i
|
2018-10-31 16:07:53 +00:00
|
|
|
|
2018-04-05 08:05:00 +00:00
|
|
|
CD %BUILDDIR%
|
2017-10-15 19:19:48 +00:00
|
|
|
|
2019-04-09 07:44:44 +00:00
|
|
|
IF NOT DEFINED CUTTER_ENABLE_CRASH_REPORTS (
|
|
|
|
SET "CUTTER_ENABLE_CRASH_REPORTS=false"
|
|
|
|
)
|
|
|
|
|
2018-01-03 18:46:30 +00:00
|
|
|
ECHO Building cutter
|
2019-04-09 07:44:44 +00:00
|
|
|
qmake BREAKPAD_SOURCE_DIR=%BREAKPAD_SOURCE_DIR% CUTTER_ENABLE_CRASH_REPORTS=%CUTTER_ENABLE_CRASH_REPORTS% %* ..\src\cutter.pro -config release
|
2018-02-09 19:51:30 +00:00
|
|
|
IF !ERRORLEVEL! NEQ 0 EXIT /B 1
|
2019-03-16 10:35:31 +00:00
|
|
|
nmake
|
2018-02-09 19:51:30 +00:00
|
|
|
IF !ERRORLEVEL! NEQ 0 EXIT /B 1
|
2017-10-15 19:19:48 +00:00
|
|
|
|
2018-01-03 18:46:30 +00:00
|
|
|
ECHO Deploying cutter
|
2018-02-27 08:57:53 +00:00
|
|
|
MKDIR cutter
|
2018-04-05 08:05:00 +00:00
|
|
|
COPY release\cutter.exe cutter\cutter.exe
|
2020-12-16 10:59:23 +00:00
|
|
|
XCOPY /S /I ..\%RZDIST%\share cutter\share
|
|
|
|
XCOPY /S /I ..\%RZDIST%\lib cutter\lib
|
2020-08-08 15:43:43 +00:00
|
|
|
DEL cutter\lib\*.lib
|
2020-12-16 10:59:23 +00:00
|
|
|
COPY ..\%RZDIST%\bin\*.dll cutter\
|
2018-02-27 08:57:53 +00:00
|
|
|
windeployqt cutter\cutter.exe
|
2019-01-05 11:32:03 +00:00
|
|
|
FOR %%i in (..\src\translations\*.qm) DO MOVE "%%~fi" cutter\translations
|
2019-04-09 07:44:44 +00:00
|
|
|
|
|
|
|
ENDLOCAL
|