forked from rizinorg/cutter
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprepare_r2.bat
More file actions
22 lines (19 loc) · 813 Bytes
/
prepare_r2.bat
File metadata and controls
22 lines (19 loc) · 813 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
@ECHO OFF
SETLOCAL ENABLEDELAYEDEXPANSION
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 "PATH=%CD%;%PATH%"
SET "R2DIST=r2_dist"
ECHO Building radare2 (%PLATFORM%)
CD radare2
git clean -xfd
RMDIR /S /Q ..\%R2DIST%
rem python sys\meson.py --release --shared --install=..\%R2DIST% --options "r2_datdir=radare2/share" "r2_libdir=radare2/lib" #"c_args=-D_UNICODE -DUNICODE"
meson.exe r2_builddir --buildtype=release --prefix=%CD%\..\%R2DIST% || EXIT /B 1
ninja -C r2_builddir install || EXIT /B 1
IF !ERRORLEVEL! NEQ 0 EXIT /B 1