radare2/make.bat

34 lines
927 B
Batchfile
Raw Normal View History

:: Build (and eventually install) r2 for windows
2021-08-17 20:18:43 +00:00
@echo off
2021-11-14 01:04:05 +00:00
if "%*" == "clean" (
wsl rm -rf b vs
exit /b 0
2021-11-14 01:04:05 +00:00
)
call ninja.exe --version > NUL 2> NUL && (
2021-08-17 20:18:43 +00:00
if EXIST b (
REM meson compile -C b
call ninja.exe -C b -j 2 && (
2021-10-26 15:01:50 +00:00
echo Installing r2 in %CD%\prefix
set DESTDIR=%CD%\prefix
rmdir /q /s prefix 2> NUL
REM meson install -C b
call ninja -C b install > NUL
2021-10-26 15:01:50 +00:00
copy /y %DESTDIR%\bin\radare2.exe %DESTDIR%\bin\r2.exe
REM COPY ASAN DLL FROM HERE
REM "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\bin\Hostx64\x64"
2021-10-26 15:01:50 +00:00
copy /y C:\WINDOWS\System32\vcruntime140.dll %DESTDIR%\bin\vcruntime140.dll
exit /b 0
) || (
echo Ninja compilation has failed
2021-10-26 15:01:50 +00:00
exit /b 1
)
) else (
2021-10-26 15:01:50 +00:00
echo Please run configure before make
exit /b 1
)
) || (
echo Cannot find the ninja. Please run preconfigure
2021-08-17 20:18:43 +00:00
exit /b 1
2021-10-26 15:01:50 +00:00
)