chore: update protobuf version to 31.0 and use C++ lite runtime (#417)

This commit is contained in:
parhelia512 2025-05-17 13:47:37 +08:00 committed by GitHub
parent fd5f048ad9
commit dcaed20863
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 3 additions and 3 deletions

View File

@ -2,6 +2,7 @@ syntax = "proto3";
package libcore;
option go_package = "grpc_server/gen";
option optimize_for = LITE_RUNTIME;
service LibcoreService {
rpc Exit(EmptyReq) returns (EmptyResp);

View File

@ -36,7 +36,7 @@ ninja && ninja install
cd ../..
#### protobuf ####
git clone --recurse-submodules -b v30.2 --depth 1 --shallow-submodules https://github.com/parhelia512/protobuf
git clone --recurse-submodules -b v31.0 --depth 1 --shallow-submodules https://github.com/protocolbuffers/protobuf
mkdir -p protobuf/build
cd protobuf/build
@ -44,7 +44,6 @@ cd protobuf/build
$cmake .. -GNinja \
-DCMAKE_BUILD_TYPE=Release \
-DBUILD_SHARED_LIBS=OFF \
-Dprotobuf_MSVC_STATIC_RUNTIME=OFF \
-Dprotobuf_BUILD_TESTS=OFF \
-DCMAKE_INSTALL_PREFIX=$INSTALL_PREFIX \
-Dprotobuf_BUILD_PROTOBUF_BINARIES=ON \

View File

@ -144,7 +144,7 @@ namespace QtGrpc {
}
QNetworkReply::NetworkError Call(const QString &methodName,
const google::protobuf::Message &req, google::protobuf::Message *rsp,
const google::protobuf::MessageLite &req, google::protobuf::MessageLite *rsp,
int timeout_ms = 0) {
if (!NekoGui::dataStore->core_running) return QNetworkReply::NetworkError(-1919);