File: build.bat

package info (click to toggle)
radare2-cutter 1.12.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 6,768 kB
  • sloc: cpp: 38,432; python: 507; sh: 505; xml: 115; makefile: 89; ansic: 10; javascript: 3
file content (46 lines) | stat: -rw-r--r-- 1,339 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
@ECHO off
SETLOCAL ENABLEDELAYEDEXPANSION
SETLOCAL ENABLEEXTENSIONS

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
)

SET "R2DIST=r2_dist"
SET "BUILDDIR=build_%PLATFORM%"
SET "BREAKPAD_SOURCE_DIR=%CD%\src\breakpad\src\src"

ECHO Preparing directory
RMDIR /S /Q %BUILDDIR%
MKDIR %BUILDDIR%

ECHO Prepare translations
FOR %%i in (src\translations\*.ts) DO lrelease %%i

CD %BUILDDIR%

IF NOT DEFINED CUTTER_ENABLE_CRASH_REPORTS (
SET "CUTTER_ENABLE_CRASH_REPORTS=false"
)

ECHO Building cutter
qmake BREAKPAD_SOURCE_DIR=%BREAKPAD_SOURCE_DIR% CUTTER_ENABLE_CRASH_REPORTS=%CUTTER_ENABLE_CRASH_REPORTS% %* ..\src\cutter.pro -config release
IF !ERRORLEVEL! NEQ 0 EXIT /B 1
nmake
IF !ERRORLEVEL! NEQ 0 EXIT /B 1

ECHO Deploying cutter
MKDIR cutter
COPY release\cutter.exe cutter\cutter.exe
XCOPY /S /I ..\%R2DIST%\share cutter\share
XCOPY /S /I ..\%R2DIST%\lib cutter\lib
DEL cutter\lib\*.lib
COPY ..\%R2DIST%\bin\*.dll cutter\
windeployqt cutter\cutter.exe
FOR %%i in (..\src\translations\*.qm) DO MOVE "%%~fi" cutter\translations

ENDLOCAL