-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.bat
34 lines (27 loc) · 1008 Bytes
/
build.bat
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
@echo off
setlocal
REM Define directories
set BUILD_DIR=build
set BIN_DIR=xspeedhack\bin
REM Clean previous build
if exist %BUILD_DIR% rmdir /s /q %BUILD_DIR%
REM Create necessary directories
if not exist %BIN_DIR% mkdir %BIN_DIR%
REM Build for x86 architecture
cmake -S . -B %BUILD_DIR%\x86 -A Win32
if %ERRORLEVEL% neq 0 exit /b %ERRORLEVEL%
cmake --build %BUILD_DIR%\x86 --config Release
if %ERRORLEVEL% neq 0 exit /b %ERRORLEVEL%
REM Build for x64 architecture
cmake -S . -B %BUILD_DIR%\x64 -A x64
if %ERRORLEVEL% neq 0 exit /b %ERRORLEVEL%
cmake --build %BUILD_DIR%\x64 --config Release
if %ERRORLEVEL% neq 0 exit /b %ERRORLEVEL%
REM Copy executables
copy /y %BUILD_DIR%\x86\Release\injector.exe %BIN_DIR%\injector32.exe
copy /y %BUILD_DIR%\x86\Release\speedhack.dll %BIN_DIR%\speedhack32.dll
copy /y %BUILD_DIR%\x64\Release\injector.exe %BIN_DIR%\injector64.exe
copy /y %BUILD_DIR%\x64\Release\speedhack.dll %BIN_DIR%\speedhack64.dll
if %ERRORLEVEL% neq 0 exit /b %ERRORLEVEL%
endlocal
@echo on