1
0
mirror of https://github.com/alliedmodders/hl2sdk.git synced 2025-09-20 12:36:05 +08:00

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
This commit is contained in:
Nicholas Hastings
2023-11-15 18:58:12 -05:00
committed by GitHub
parent e6dc3f8a40
commit c5d57c03ee
3189 changed files with 984655 additions and 514607 deletions

View File

@ -0,0 +1,25 @@
var pbjs = require("./protobuf.js/cli").pbjs
var argv = [];
var protoFiles = [];
var prefix = "";
process.argv.forEach(function(val, index) {
var arg = val;
if (arg.length > 6 && arg.substring(arg.length - 6) == ".proto") {
protoFiles.push(arg);
} else if (arg.length > 15 && arg.substring(0, 15) == "--include_path=") {
prefix = arg.substring(15);
} else if (index >= 2) {
argv.push(arg);
}
});
protoFiles.forEach(function(val) {
argv.push(prefix + "/" + val);
});
pbjs.main(argv, function(err, output){
if (err) {
console.log(err);
}
});