(tools, client, server) feat: Remove gRPC support, add TCP back and reorganized project
This commit is contained in:
@ -1,35 +1,30 @@
|
||||
from subprocess import Popen
|
||||
from os import path
|
||||
import subprocess
|
||||
import os
|
||||
import shutil
|
||||
|
||||
|
||||
protoc_dir = "./bin/protoc.exe"
|
||||
grpc_cs_plugin_dir = "./bin/grpc_csharp_plugin.exe"
|
||||
|
||||
proto_dir = "./proto"
|
||||
message_dir = proto_dir + "/message.proto"
|
||||
message_dir = f"{proto_dir}/message.proto"
|
||||
|
||||
gen_dir = "./gen"
|
||||
gen_code_dst_dir = "../../Client/Assets/Scripts/Protocol"
|
||||
|
||||
|
||||
def GenerateProtocol():
|
||||
if not path.exists(gen_dir):
|
||||
if not os.path.exists(gen_dir):
|
||||
os.makedirs(gen_dir)
|
||||
|
||||
result = Popen(
|
||||
gen_code = subprocess.Popen(
|
||||
[
|
||||
protoc_dir,
|
||||
f"--proto_path={proto_dir}",
|
||||
f"--csharp_out={gen_dir}",
|
||||
f"--grpc_out={gen_dir}",
|
||||
f"--plugin=protoc-gen-grpc={grpc_cs_plugin_dir}",
|
||||
message_dir,
|
||||
]
|
||||
)
|
||||
|
||||
result.wait()
|
||||
gen_code.wait()
|
||||
|
||||
|
||||
def MoveGeneratedCode():
|
||||
|
Reference in New Issue
Block a user