hl2sdk/thirdparty/protobuf-3.21.8/kokoro/release/protoc/windows/build.bat
Nicholas Hastings c5d57c03ee
Update Protobuf and add protos for CS2 (#176)
* Replace protobuf 2.6.1 with 3.21.8

* Update/add protobuf libs

* Add CS2 protos

* Remove old csgo/dota protos

* Add versioned protoc bin

* Comment out Valve's `schema` define for now

* Use ENetworkDisconnectionReason

* Fix-up `offsetof` to avoid errors on some Clang versions
2023-11-15 23:58:12 +00:00

33 lines
880 B
Batchfile

set PATH=C:\Program Files (x86)\MSBuild\14.0\bin\;%PATH%
set generator32=Visual Studio 14
set generator64=Visual Studio 14 Win64
set vcplatform32=win32
set vcplatform64=x64
set configuration=Release
echo Building protoc
cd github\protobuf
echo Update Submodules
echo This is needed because this build uses CMake <3.13.
git submodule update --init --recursive
set ABSL_ROOT_DIR=%cd%\third_party\abseil-cpp
mkdir build32
cd build32
cmake -G "%generator32%" -Dprotobuf_BUILD_TESTS=OFF -Dprotobuf_BUILD_SHARED_LIBS=OFF -Dprotobuf_UNICODE=ON ../cmake
msbuild protobuf.sln /p:Platform=%vcplatform32% || goto error
cd ..
mkdir build64
cd build64
cmake -G "%generator64%" -Dprotobuf_BUILD_TESTS=OFF -Dprotobuf_BUILD_SHARED_LIBS=OFF -Dprotobuf_UNICODE=ON ../cmake
msbuild protobuf.sln /p:Platform=%vcplatform64% || goto error
cd ..
goto :EOF
:error
echo Failed!
exit /b %ERRORLEVEL%