2018-01-03 18:46:30 +00:00
|
|
|
@ECHO OFF
|
|
|
|
SETLOCAL ENABLEDELAYEDEXPANSION
|
2017-10-15 19:19:48 +00:00
|
|
|
|
2018-01-03 18:46:30 +00:00
|
|
|
FOR %%i IN (python.exe) DO (IF NOT DEFINED PYTHON SET PYTHON=%%~dp$PATH:i)
|
2017-10-15 19:19:48 +00:00
|
|
|
|
2018-01-03 18:46:30 +00:00
|
|
|
IF NOT DEFINED PYTHON SET PYTHON=C:\Program Files\Python36
|
|
|
|
IF NOT DEFINED NINJA_URL SET NINJA_URL=https://github.com/ninja-build/ninja/releases/download/v1.8.2/ninja-win.zip
|
|
|
|
IF NOT DEFINED VSVARSALLPATH SET VSVARSALLPATH=C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat
|
|
|
|
|
2018-02-09 19:51:30 +00:00
|
|
|
IF "%1" == "32" (
|
|
|
|
CALL "%VSVARSALLPATH%" x86
|
|
|
|
) ELSE IF "%1" == "64" (
|
|
|
|
CALL "%VSVARSALLPATH%" x64
|
|
|
|
) ELSE (
|
|
|
|
ECHO Usage: %0 {32^|64}
|
|
|
|
EXIT /B 1
|
|
|
|
)
|
|
|
|
SET BITS=%1
|
2017-10-15 19:19:48 +00:00
|
|
|
|
2018-02-09 19:51:30 +00:00
|
|
|
SET "PATH=%CD%;%PYTHON%;%PATH%"
|
2017-10-15 19:19:48 +00:00
|
|
|
|
2018-01-03 18:46:30 +00:00
|
|
|
git submodule update --init
|
|
|
|
|
|
|
|
ECHO Downloading meson and ninja
|
|
|
|
python -m pip install meson
|
2018-02-09 19:51:30 +00:00
|
|
|
IF !ERRORLEVEL! NEQ 0 EXIT /B 1
|
2018-01-03 18:46:30 +00:00
|
|
|
IF NOT EXIST ninja.exe (
|
|
|
|
powershell -Command wget %NINJA_URL% -OutFile ninja.zip && powershell -Command Expand-Archive .\ninja.zip -DestinationPath .\ && DEL ninja.zip
|
2018-02-09 19:51:30 +00:00
|
|
|
IF !ERRORLEVEL! NEQ 0 EXIT /B 1
|
2018-01-03 18:46:30 +00:00
|
|
|
)
|
2017-10-15 19:19:48 +00:00
|
|
|
|
2018-02-09 19:51:30 +00:00
|
|
|
ECHO Building radare2 (%BITS%)
|
2018-01-03 18:46:30 +00:00
|
|
|
CD radare2
|
2017-10-15 19:19:48 +00:00
|
|
|
git clean -xfd
|
2018-02-09 19:51:30 +00:00
|
|
|
RMDIR /S /Q ..\dist%BITS%
|
|
|
|
python sys\meson.py --release --install=..\dist%BITS% --shared --copylib
|
2018-01-03 18:46:30 +00:00
|
|
|
IF !ERRORLEVEL! NEQ 0 EXIT /B 1
|
2018-01-23 18:43:49 +00:00
|
|
|
COPY /Y build\r_userconf.h ..\dist%BITS%\include\libr\
|
|
|
|
COPY /Y build\r_version.h ..\dist%BITS%\include\libr\
|
|
|
|
COPY /Y build\shlr\liblibr2sdb.a ..\dist%BITS%\r_sdb.lib
|
2018-01-03 18:46:30 +00:00
|
|
|
CD ..
|
2018-01-23 18:43:49 +00:00
|
|
|
COPY /Y dist%BITS%\*.lib cutter_win32\radare2\lib%BITS%\
|
2018-02-09 19:51:30 +00:00
|
|
|
|
|
|
|
ECHO Copying relevant files in cutter_win32
|
|
|
|
XCOPY /S /Y dist%BITS%\include\libr cutter_win32\radare2\include\libr\
|