From 35c4a7fccc62df60e5ff1e0dbeaa7ad8d90eb084 Mon Sep 17 00:00:00 2001 From: Detanup01 <91248446+Detanup01@users.noreply.github.com> Date: Tue, 14 May 2024 15:40:30 +0200 Subject: [PATCH] linux protobuf gen --- premake5.lua | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/premake5.lua b/premake5.lua index bf421270..f9f8b67b 100644 --- a/premake5.lua +++ b/premake5.lua @@ -183,8 +183,15 @@ local x64_include_linux = { if _ACTION == "generateproto" then print("Generating from .proto file!") - -- todo edit this path! - os.execute('call ' .. _MAIN_SCRIPT_DIR ..'/build/deps/win/protobuf/install32/bin/protoc.exe dll/net.proto -I./dll/ --cpp_out=dll/proto_gen/win') + if os.target() == "windows" then + os.mkdir("dll/proto_gen/win") + os.execute('call ' .. _MAIN_SCRIPT_DIR ..'/build/deps/win/protobuf/install32/bin/protoc.exe dll/net.proto -I./dll/ --cpp_out=dll/proto_gen/win') + end + else then + os.mkdir("dll/proto_gen/linux") + os.chmod(_MAIN_SCRIPT_DIR ..'/build/deps/linux/protobuf/install32/bin/protoc', "777") + os.execute(_MAIN_SCRIPT_DIR ..'/build/deps/linux/protobuf/install32/bin/protoc dll/net.proto -I./dll/ --cpp_out=dll/proto_gen/linux') + end print("Generation success!") end