-
Notifications
You must be signed in to change notification settings - Fork 16
/
build.bat
80 lines (49 loc) · 1.31 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
set SYSTEM2_DIR=%cd%
set BUILD_DIR=%SYSTEM2_DIR%\build-windows
set VCVARSALL="C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Auxiliary\Build\vcvarsall.bat"
if not exist "%BUILD_DIR%" (
mkdir "%BUILD_DIR%"
)
cd %BUILD_DIR%
if "%VSCMD_VER%"=="" (
set MAKE=
set CC=
set CXX=
call %VCVARSALL% x86
)
REM Zlib
echo "Building zlib"
if not exist "zlib.zip" (
curl https://zlib.net/zlib1211.zip -o zlib.zip
unzip -q zlib.zip
)
cd zlib-1.2.11
nmake /f win32/Makefile.msc LOC=-MT
md lib include
copy /Y zlib.lib lib
copy /Y *h include
set ZLIB=%cd%
cd %BUILD_DIR%
REM Libcurl
echo "Building curl"
if not exist "curl.zip" (
curl https://curl.se/download/curl-7.76.0.zip -o curl.zip
unzip -q curl.zip
)
cd curl-7.76.0\winbuild
nmake /f Makefile.vc mode=static WITH_ZLIB=static ZLIB_PATH=%ZLIB% RTLIBCFG=static VC=16 MACHINE=x86
cd ..\builds\libcurl-vc16-x86-release-static-zlib-static-ipv6-sspi-schannel
set CURL=%cd%
cd %BUILD_DIR%
REM Sourcemod
echo "Getting sourcemod"
if not exist "sourcemod-%SMBRANCH%" (
git clone https://github.com/alliedmodders/sourcemod --recursive --branch %SMBRANCH% --single-branch sourcemod-%SMBRANCH%
)
cd sourcemod-%SMBRANCH%
set SOURCEMOD=%cd%
cd %BUILD_DIR%
REM System2
echo "Building system2"
cd %SYSTEM2_DIR%
msbuild msvc19/system2.sln /p:Platform="win32"