-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path_build.bat
More file actions
45 lines (31 loc) · 1.3 KB
/
Copy path_build.bat
File metadata and controls
45 lines (31 loc) · 1.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
@ECHO OFF
VERIFY OTHER 2>nul
SETLOCAL ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION
IF NOT ERRORLEVEL 0 (
echo Unable to enable extensions
)
FOR /F "delims=" %%A IN ('cd') DO SET "ORIGINAL_DIR=%%A"
ECHO orig dir: %ORIGINAL_DIR%
SET "logFolder=.\_build_logs"
GOTO :main
:doCommand
SET "logFile=%logFolder%\%~1.log"
SET "command=%~2"
ECHO %command%>"%logFile%" 2>&1
%command%>>"%logFile%" 2>&1
EXIT /B %ERRORLEVEL%
:main
RMDIR /S /Q %logFolder%
MKDIR %logFolder%
CALL :doCommand "00_made_build_logs" "echo we did it" && cd>NUL || Goto :END
CALL :doCommand "01_xmake_set_theme" "xmake global --theme=plain" && cd>NUL || Goto :END
CALL :doCommand "02_xmake_configure" "xmake config --import=.vscode\xmake.windows.shared.release.MD.conf -vD -y" && cd>NUL || Goto :END
CALL :doCommand "03_xmake_build" "xmake build -a -vD" && cd>NUL || Goto :END
CALL :doCommand "05_xmake_test_Configuration-Test" "xmake run -vD Configuration-Test" && cd>NUL || Goto :END
CALL :doCommand "05_xmake_test_Logger-Test" "xmake run -vD Logger-Test" && cd>NUL || Goto :END
CALL :doCommand "05_xmake_test_Network-Messages-Test" "xmake run -vD Network-Messages-Test" && cd>NUL || Goto :END
CALL :doCommand "05_xmake_test_Sdl-Wrapper-Test" "xmake run -vD Sdl-Wrapper-Test" && cd>NUL || Goto :END
:END
cd %ORIGINAL_DIR%
ENDLOCAL
EXIT /B %ERRORLEVEL%