2021-08-17 19:53:14 +00:00
|
|
|
:: Build (and eventually install) r2 for windows
|
2021-08-17 20:18:43 +00:00
|
|
|
@echo off
|
2021-11-14 02:04:05 +01:00
|
|
|
if "%*" == "clean" (
|
2025-08-20 07:05:08 +08:00
|
|
|
rmdir /s /q b 2> NUL
|
|
|
|
|
rmdir /s /q vs 2> NUL
|
2021-11-29 10:19:52 +01:00
|
|
|
exit /b 0
|
2021-11-14 02:04:05 +01:00
|
|
|
)
|
2022-01-31 23:54:00 +01:00
|
|
|
|
2021-11-14 17:59:38 +01:00
|
|
|
call ninja.exe --version > NUL 2> NUL && (
|
2021-08-17 20:18:43 +00:00
|
|
|
if EXIST b (
|
2021-11-14 00:57:35 +01:00
|
|
|
REM meson compile -C b
|
2021-11-14 21:09:42 +01:00
|
|
|
call ninja.exe -C b -j 2 && (
|
2021-10-26 17:01:50 +02:00
|
|
|
echo Installing r2 in %CD%\prefix
|
|
|
|
|
set DESTDIR=%CD%\prefix
|
2021-11-14 21:09:42 +01:00
|
|
|
rmdir /q /s prefix 2> NUL
|
2021-11-14 00:57:35 +01:00
|
|
|
REM meson install -C b
|
2021-11-14 17:59:38 +01:00
|
|
|
call ninja -C b install > NUL
|
2021-10-26 17:01:50 +02:00
|
|
|
copy /y C:\WINDOWS\System32\vcruntime140.dll %DESTDIR%\bin\vcruntime140.dll
|
2021-11-14 21:09:42 +01:00
|
|
|
exit /b 0
|
2021-11-14 17:59:38 +01:00
|
|
|
) || (
|
2021-11-14 21:09:42 +01:00
|
|
|
echo Ninja compilation has failed
|
2021-10-26 17:01:50 +02:00
|
|
|
exit /b 1
|
|
|
|
|
)
|
2021-08-18 01:41:30 +02:00
|
|
|
) else (
|
2021-10-26 17:01:50 +02:00
|
|
|
echo Please run configure before make
|
2021-08-18 01:41:30 +02:00
|
|
|
exit /b 1
|
|
|
|
|
)
|
2021-11-14 17:59:38 +01:00
|
|
|
) || (
|
|
|
|
|
echo Cannot find the ninja. Please run preconfigure
|
2021-08-17 20:18:43 +00:00
|
|
|
exit /b 1
|
2021-10-26 17:01:50 +02:00
|
|
|
)
|