cutter/build.bat

37 lines
1.0 KiB
Batchfile
Raw Normal View History

2018-01-03 18:46:30 +00:00
@ECHO off
SETLOCAL ENABLEDELAYEDEXPANSION
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
)
2018-04-05 08:05:00 +00:00
SET "R2DIST=r2_dist_%PLATFORM%"
SET "BUILDDIR=build_%PLATFORM%"
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%
2018-01-03 18:46:30 +00:00
ECHO Building cutter
2018-03-20 20:44:00 +00:00
qmake %* ..\src\cutter.pro -config release -tp vc
IF !ERRORLEVEL! NEQ 0 EXIT /B 1
2018-04-05 08:05:00 +00:00
msbuild /m cutter.vcxproj /p:Configuration=Release
IF !ERRORLEVEL! NEQ 0 EXIT /B 1
2018-01-03 18:46:30 +00:00
ECHO Deploying cutter
MKDIR cutter
2018-04-05 08:05:00 +00:00
COPY release\cutter.exe cutter\cutter.exe
XCOPY /S /I ..\%R2DIST%\radare2 cutter\radare2
2018-04-05 08:05:00 +00:00
COPY ..\%R2DIST%\*.dll cutter\
windeployqt cutter\cutter.exe
2019-01-05 11:32:03 +00:00
FOR %%i in (..\src\translations\*.qm) DO MOVE "%%~fi" cutter\translations