2020-09-27 20:33:49 +02:00
|
|
|
@echo off
|
|
|
|
setlocal enabledelayedexpansion
|
|
|
|
cd /d "%~dp0"
|
|
|
|
|
|
|
|
set "MSYS2_DIR=C:\msys64"
|
2020-10-02 19:54:02 +02:00
|
|
|
set "JAVA_HOME=C:\Java\jdk-8.0.265.01-hotspot"
|
|
|
|
set "ANT_HOME=C:\Program Files (x86)\Ant"
|
2020-09-27 20:33:49 +02:00
|
|
|
|
|
|
|
if not exist "%MSYS2_DIR%\msys2_shell.cmd" (
|
|
|
|
echo MSYS2 SHELL not found. Please check MSYS2_DIR and try again^^!
|
|
|
|
pause
|
|
|
|
goto:eof
|
|
|
|
)
|
|
|
|
|
2020-10-02 19:54:02 +02:00
|
|
|
if not exist "%JAVA_HOME%\bin\java.exe" (
|
|
|
|
echo Java not found. Please check JAVA_HOME and try again^^!
|
|
|
|
pause
|
|
|
|
goto:eof
|
|
|
|
)
|
|
|
|
|
|
|
|
if not exist "%ANT_HOME%\bin\ant.bat" (
|
|
|
|
echo Ant not found. Please check ANT_HOME and try again^^!
|
|
|
|
pause
|
|
|
|
goto:eof
|
|
|
|
)
|
|
|
|
|
|
|
|
REM ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
REM Build!
|
|
|
|
REM ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
|
2020-09-27 20:33:49 +02:00
|
|
|
echo ========================================================================
|
|
|
|
echo Clean
|
|
|
|
echo ========================================================================
|
|
|
|
echo.
|
|
|
|
call "%MSYS2_DIR%\msys2_shell.cmd" -mingw32 -no-start -defterm -where "%~dp0" -c "make clean"
|
|
|
|
echo.
|
|
|
|
|
|
|
|
for %%m in (32,64) do (
|
|
|
|
echo ========================================================================
|
|
|
|
echo Build %%m-Bit
|
|
|
|
echo ========================================================================
|
|
|
|
echo.
|
2020-10-02 19:01:29 +02:00
|
|
|
call "%MSYS2_DIR%\msys2_shell.cmd" -mingw%%m -no-start -defterm -where "%~dp0" -c "make -B -j8"
|
2020-10-02 19:54:02 +02:00
|
|
|
if not "!ERRORLEVEL!"=="0" goto:BuildHasFailed
|
2020-09-27 20:33:49 +02:00
|
|
|
echo.
|
|
|
|
)
|
|
|
|
|
2020-10-02 19:54:02 +02:00
|
|
|
echo ========================================================================
|
|
|
|
echo Build example
|
|
|
|
echo ========================================================================
|
|
|
|
echo.
|
|
|
|
set "PATH=%ANT_HOME%\bin;%JAVA_HOME%\bin;%PATH%"
|
|
|
|
call "%ANT_HOME%\bin\ant.bat" -f "%~dp0.\etc\example\build.xml"
|
|
|
|
|
|
|
|
echo.
|
|
|
|
echo BUILD COMPLETED.
|
|
|
|
echo.
|
|
|
|
|
|
|
|
if not "%MAKE_NONINTERACTIVE%"=="1" pause
|
|
|
|
exit /B 0
|
|
|
|
|
|
|
|
REM ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
REM Failed
|
|
|
|
REM ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
|
|
|
|
:BuildHasFailed
|
|
|
|
|
|
|
|
echo.
|
|
|
|
echo BUILD HAS FAILED ^^!^^!^^!
|
|
|
|
echo.
|
2020-09-27 20:33:49 +02:00
|
|
|
|
2020-10-02 19:54:02 +02:00
|
|
|
if not "%MAKE_NONINTERACTIVE%"=="1" pause
|
|
|
|
exit /B 1
|