2018-01-03 18:46:30 +00:00
|
|
|
@ECHO OFF
|
|
|
|
SETLOCAL ENABLEDELAYEDEXPANSION
|
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
|
2018-01-03 18:46:30 +00:00
|
|
|
)
|
2017-10-15 19:19:48 +00:00
|
|
|
|
2018-03-11 13:18:30 +00:00
|
|
|
SET "PATH=%CD%;%PATH%"
|
2020-08-08 15:43:43 +00:00
|
|
|
SET "R2DIST=r2_dist"
|
2018-03-11 13:18:30 +00:00
|
|
|
|
2018-04-05 08:05:00 +00:00
|
|
|
ECHO Building radare2 (%PLATFORM%)
|
2018-01-03 18:46:30 +00:00
|
|
|
CD radare2
|
2017-10-15 19:19:48 +00:00
|
|
|
git clean -xfd
|
2018-04-05 08:05:00 +00:00
|
|
|
RMDIR /S /Q ..\%R2DIST%
|
2020-08-13 14:08:39 +00:00
|
|
|
rem python sys\meson.py --release --shared --install --prefix=%CD%\..\%R2DIST% --options "r2_datdir=radare2/share" "r2_libdir=radare2/lib" #"c_args=-D_UNICODE -DUNICODE"
|
2020-08-08 15:43:43 +00:00
|
|
|
meson.exe r2_builddir --buildtype=release --prefix=%CD%\..\%R2DIST% || EXIT /B 1
|
|
|
|
ninja -C r2_builddir install || EXIT /B 1
|
2018-01-03 18:46:30 +00:00
|
|
|
IF !ERRORLEVEL! NEQ 0 EXIT /B 1
|