-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.bat
55 lines (41 loc) · 1.17 KB
/
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
echo "Set environment"
set EXT_DIR=%cd%
set DEP_DIR=%EXT_DIR%\build-windows
set VCVARSALL="C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Auxiliary\Build\vcvarsall.bat"
mkdir "%DEP_DIR%"
cd %DEP_DIR%
if "%VSCMD_VER%"=="" (
set MAKE=
set CC=
set CXX=
call %VCVARSALL% x86
)
:: Install ambuild
echo "Install ambuild"
git clone https://github.com/alliedmodders/ambuild
pushd ambuild
python setup.py install
popd
:: Getting sourcemod
echo "Download sourcemod"
git clone https://github.com/alliedmodders/sourcemod --recursive --branch %SMBRANCH% --single-branch sourcemod
pushd sourcemod
set SOURCEMOD=%cd%
popd
:: Getting metamod
echo "Download metamod"
git clone https://github.com/alliedmodders/metamod-source --recursive --branch %MMBRANCH% --single-branch metamod
pushd metamod
set METAMOD=%cd%
popd
:: Getting hl2sdk
echo "Download hl2sdk-csgo"
git clone https://github.com/alliedmodders/hl2sdk --recursive --branch csgo --single-branch hl2sdk-csgo
:: Start build
echo "Build"
cd %EXT_DIR%
mkdir build
pushd build
python "%EXT_DIR%/configure.py" --enable-optimize --sm-path "%SOURCEMOD%" --mms-path "%METAMOD%" --hl2sdk-root "%DEP_DIR%" --sdks=csgo
ambuild
popd