简化配置表读取

This commit is contained in:
flswld
2023-03-16 16:26:14 +08:00
parent 2a3ce25898
commit 5e5492943d
51 changed files with 418 additions and 2560 deletions

View File

@@ -8,8 +8,8 @@ all: build
# 清理
.PHONY: clean
clean:
rm -rf ./bin
rm -rf ./protocol/proto
rm -rf ./bin/*
rm -rf ./protocol/proto/*
rm -rf ./gate/client_proto/client_proto_gen.go
rm -rf ./gs/api/*.pb.go && rm -rf ./node/api/*.pb.go
@@ -24,14 +24,14 @@ docker_clean:
rm -rf ./docker/node/bin/node
rm -rf ./docker/dispatch/bin/dispatch
rm -rf ./docker/gate/bin/gate
rm -rf ./docker/fight/bin/fight
rm -rf ./docker/anticheat/bin/anticheat
rm -rf ./docker/pathfinding/bin/pathfinding
rm -rf ./docker/gs/bin/gs
rm -rf ./docker/gm/bin/gm
docker rmi flswld/node:$(VERSION)
docker rmi flswld/dispatch:$(VERSION)
docker rmi flswld/gate:$(VERSION)
docker rmi flswld/fight:$(VERSION)
docker rmi flswld/anticheat:$(VERSION)
docker rmi flswld/pathfinding:$(VERSION)
docker rmi flswld/gs:$(VERSION)
docker rmi flswld/gm:$(VERSION)
@@ -43,7 +43,7 @@ docker_config:
mkdir -p ./docker/node/bin && cp -rf ./cmd/node/* ./docker/node/bin/
mkdir -p ./docker/dispatch/bin && cp -rf ./cmd/dispatch/* ./docker/dispatch/bin/
mkdir -p ./docker/gate/bin && cp -rf ./cmd/gate/* ./docker/gate/bin/
mkdir -p ./docker/fight/bin && cp -rf ./cmd/fight/* ./docker/fight/bin/
mkdir -p ./docker/anticheat/bin && cp -rf ./cmd/anticheat/* ./docker/anticheat/bin/
mkdir -p ./docker/pathfinding/bin && cp -rf ./cmd/pathfinding/* ./docker/pathfinding/bin/
mkdir -p ./docker/gs/bin && cp -rf ./cmd/gs/* ./docker/gs/bin/
mkdir -p ./docker/gm/bin && cp -rf ./cmd/gm/* ./docker/gm/bin/
@@ -54,14 +54,14 @@ docker_build:
mkdir -p ./docker/node/bin && cp -rf ./bin/node ./docker/node/bin/
mkdir -p ./docker/dispatch/bin && cp -rf ./bin/dispatch ./docker/dispatch/bin/
mkdir -p ./docker/gate/bin && cp -rf ./bin/gate ./docker/gate/bin/
mkdir -p ./docker/fight/bin && cp -rf ./bin/fight ./docker/fight/bin/
mkdir -p ./docker/anticheat/bin && cp -rf ./bin/anticheat ./docker/anticheat/bin/
mkdir -p ./docker/pathfinding/bin && cp -rf ./bin/pathfinding ./docker/pathfinding/bin/
mkdir -p ./docker/gs/bin && cp -rf ./bin/gs ./docker/gs/bin/
mkdir -p ./docker/gm/bin && cp -rf ./bin/gm ./docker/gm/bin/
docker build -t flswld/node:$(VERSION) ./docker/node
docker build -t flswld/dispatch:$(VERSION) ./docker/dispatch
docker build -t flswld/gate:$(VERSION) ./docker/gate
docker build -t flswld/fight:$(VERSION) ./docker/fight
docker build -t flswld/anticheat:$(VERSION) ./docker/anticheat
docker build -t flswld/pathfinding:$(VERSION) ./docker/pathfinding
docker build -t flswld/gs:$(VERSION) ./docker/gs
docker build -t flswld/gm:$(VERSION) ./docker/gm
@@ -69,7 +69,7 @@ docker_build:
# 安装natsrpc生成工具
.PHONY: dev_tool
dev_tool:
go install github.com/golang/protobuf/protoc-gen-go@v1.5.2
go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.28.1
go install github.com/byebyebruce/natsrpc/cmd/protoc-gen-natsrpc@develop
# 生成natsrpc协议代码
@@ -101,11 +101,6 @@ gen_proto:
rm -rf ../proto && mkdir -p ../proto && mv ./proto/* ../proto/ && rm -rf ./proto && \
cd ../../
# 生成服务器配置表
.PHONY: gen_csv
gen_csv:
cd gdconf && mkdir -p ./game_data_config/csv && go test -count=1 -v -run TestGenGdCsv .
# 生成客户端协议代理功能所需的代码
.PHONY: gen_client_proto
gen_client_proto: