diff --git a/public b/public index f317779..6390826 160000 --- a/public +++ b/public @@ -1 +1 @@ -Subproject commit f317779a9675bcfd4741c351b69f532fa930cec8 +Subproject commit 6390826abfd45829c1122c39b9f0455b1b82a940 diff --git a/tools/upload/config.json b/tools/upload/config.json new file mode 100644 index 0000000..b3c35ad --- /dev/null +++ b/tools/upload/config.json @@ -0,0 +1,7 @@ +{ + "Name": "root", + "Passwd": "123456", + "Addr": "127.0.0.1", + "RemoteDir": "/root/win88", + "LocalDir": "D:\\trunk\\src\\mongo.games.com\\game" +} \ No newline at end of file diff --git a/tools/upload/doc b/tools/upload/doc new file mode 100644 index 0000000..671af4f --- /dev/null +++ b/tools/upload/doc @@ -0,0 +1,8 @@ +1.安装 WinSCP +2.执行 build_linux.bat +3.执行 winscp_upload.bat + +copy data: + +cd /home/gamer/win88/data +put E:\gocode\trunk\src\games.yol.com\win88\data\* \ No newline at end of file diff --git a/tools/upload/main.go b/tools/upload/main.go new file mode 100644 index 0000000..c07f6fd --- /dev/null +++ b/tools/upload/main.go @@ -0,0 +1,44 @@ +package main + +import ( + "encoding/json" + "fmt" + "log" + "os" + "text/template" +) + +type Config struct { + Name string + Passwd string + Addr string + RemoteDir string + LocalDir string +} + +func main() { + data, err := os.ReadFile("./config.json") + if err != nil { + log.Fatal(err) + } + + var cfg Config + if err = json.Unmarshal(data, &cfg); err != nil { + log.Fatal(err) + } + + tmpl, err := template.ParseFiles("./upload.temp") + if err != nil { + log.Fatal(err) + } + + f, err := os.OpenFile("./upload.txt", os.O_RDWR|os.O_TRUNC|os.O_CREATE, 0666) + if err != nil { + log.Fatal(err) + } + + if err = tmpl.Execute(f, cfg); err != nil { + log.Fatal(err) + } + fmt.Println("success.") +} diff --git a/tools/upload/upload.temp b/tools/upload/upload.temp new file mode 100644 index 0000000..1f73541 --- /dev/null +++ b/tools/upload/upload.temp @@ -0,0 +1,38 @@ +echo 连接服务器 +open scp://{{.Name}}:{{.Passwd}}@{{.Addr}} + +cd {{.RemoteDir}}/dbproxy +put {{.LocalDir}}\dbproxy\dbproxy +call mv dbproxy win88_dbproxy +chmod 755 win88_dbproxy + +cd {{.RemoteDir}}/mgrsrv +put {{.LocalDir}}\mgrsrv\mgrsrv +call mv mgrsrv win88_mgrsrv +chmod 755 win88_mgrsrv + +cd {{.RemoteDir}}/gatesrv +put {{.LocalDir}}\gatesrv\gatesrv +call mv gatesrv win88_gatesrv +chmod 755 win88_gatesrv + +cd {{.RemoteDir}}/worldsrv +put {{.LocalDir}}\worldsrv\worldsrv +call mv worldsrv win88_worldsrv +chmod 755 win88_worldsrv + +cd {{.RemoteDir}}/gamesrv +put {{.LocalDir}}\gamesrv\gamesrv +call mv gamesrv win88_gamesrv +chmod 755 win88_gamesrv + +cd {{.RemoteDir}}/ranksrv +put {{.LocalDir}}\ranksrv\ranksrv +call mv ranksrv win88_ranksrv +chmod 755 win88_ranksrv + +cd {{.RemoteDir}}/robot +put {{.LocalDir}}\robot\robot +call mv robot win88_robot +chmod 755 win88_robot + diff --git a/tools/upload/upload.txt b/tools/upload/upload.txt new file mode 100644 index 0000000..e937c32 --- /dev/null +++ b/tools/upload/upload.txt @@ -0,0 +1,7 @@ +echo 连接服务器 +open scp://root:PogoRockGames1903@47.105.78.29 + +cd /root/win88/worldsrv +put D:\trunk\src\mongo.games.com\game\worldsrv\worldsrv +call mv worldsrv win88_worldsrv +chmod 755 win88_worldsrv \ No newline at end of file diff --git a/tools/upload/winscp_upload.bat b/tools/upload/winscp_upload.bat new file mode 100644 index 0000000..7ed618c --- /dev/null +++ b/tools/upload/winscp_upload.bat @@ -0,0 +1 @@ +WinSCP.exe /console /script=upload.txt /log=upload.log \ No newline at end of file diff --git a/worldsrv/config-local.json b/worldsrv/config-local.json deleted file mode 100644 index 11ea932..0000000 --- a/worldsrv/config-local.json +++ /dev/null @@ -1,159 +0,0 @@ -{ - "netlib":{ - "SrvInfo":{ - "Name":"WorldServer", - "Type":6, - "Id":601, - "AreaID":1, - "Banner":[ - "=================", - "world server", - "=================" - ] - }, - "IoServices":[ - { - "Id":601, - "Type":6, - "AreaId":1, - "Name":"WorldService", - "Ip":"127.0.0.1", - "Port":0, - "MaxDone":40000, - "MaxPend":2000000, - "MaxPacket":6553500, - "MaxConn":200, - "RcvBuff":4096000, - "SndBuff":10240000, - "WriteTimeout":30, - "ReadTimeout":30, - "IsInnerLink":true, - "NoDelay":true, - "SupportFragment":true, - "AuthKey":"1234567890", - "FilterChain":[ - "session-filter-auth" - ], - "HandlerChain":[ - "session-srv-registe", - "handler-world-close" - ] - }, - { - "Id":501, - "Type":5, - "AreaId":1, - "Name":"ManagerService", - "Ip":"127.0.0.1", - "Port":3002, - "MaxDone":20, - "MaxPend":20, - "MaxPacket":6553500, - "MaxConn":10, - "RcvBuff":8192, - "SndBuff":8192, - "WriteTimeout":30, - "ReadTimeout":30, - "IsInnerLink":true, - "NoDelay":true, - "IsClient":true, - "IsAutoReconn":true, - "SupportFragment":true, - "AuthKey":"1234567890", - "FilterChain":[ - "session-filter-auth" - ], - "HandlerChain":[ - "session-srv-registe", - "srv-service-handler" - ] - } - ] - }, - "module":{ - "Options":{ - "QueueBacklog":1024, - "MaxDone":1024, - "Interval":100 - } - }, - "tx":{ - "TxSkeletonName":"github.com/idealeak/goserver/srvlib/txcommskeleton" - }, - "executor":{ - "Options":{ - "QueueBacklog":1024, - "MaxDone":1024, - "Interval":0 - }, - "Worker":{ - "WorkerCnt":8, - "Options":{ - "QueueBacklog":1024, - "MaxDone":1024, - "Interval":0 - } - } - }, - "timer":{ - "Options":{ - "QueueBacklog":1024, - "MaxDone":1024, - "Interval":100 - } - }, - "core":{ - "MaxProcs":4 - }, - "cmdline":{ - "SupportCmdLine":true - }, - "signal":{ - "SupportSignal":true - }, - "common":{ - "AppId":"5c56d1644966f078bfb90c71", - "IsDevMode":true - }, - "costum":{ - "PromotersUrl":"http://192.168.0.65/jxjy/tg/game/push_order", - "etcdurl":["127.0.0.1:2379"], - "etcduser":"root", - "etcdpwd":"win88", - "PltName":"xiaoxin", - "LogicLevelUrl":"http://127.0.0.1:8000", - "MgoRpcCliNet": "tcp", - "MgoRpcCliAddr": "127.0.0.1:8999", - "MgoRpcCliReconnInterV": 3, - - "RabbitMQURL": "amqp://win88:123456@127.0.0.1:5672/win88", - "RMQExchange": "win88", - "RMQPublishBacklog":1024 - }, - "webapi":{ - "GameApiURL":"http://127.0.0.1:8000/api/game_srv" - }, - "data":{ - "RootPath":"../data", - "Files":[ - "DB_Sensitive_Words.dat", - "DB_MatchFree.dat", - "DB_MatchRule.dat", - "DB_Task.dat", - "DB_GameFree.dat", - "DB_GameRule.dat", - "DB_Shop.dat", - "DB_Condition.dat", - "DB_Limit_Times.dat", - "DB_Sign.dat", - "DB_Activity1.dat", - "DB_VIP.dat" - ] - }, - "gameconfig":{ - "RootPath":"../data/gameconfig" - }, - "i18n":{ - "RootPath":"../data/i18n" - } -} \ No newline at end of file diff --git a/worldsrv/config_18.json b/worldsrv/config_18.json deleted file mode 100644 index a2f7799..0000000 --- a/worldsrv/config_18.json +++ /dev/null @@ -1,159 +0,0 @@ -{ - "netlib":{ - "SrvInfo":{ - "Name":"WorldServer", - "Type":6, - "Id":601, - "AreaID":1, - "Banner":[ - "=================", - "world server", - "=================" - ] - }, - "IoServices":[ - { - "Id":601, - "Type":6, - "AreaId":1, - "Name":"WorldService", - "Ip":"127.0.0.1", - "Port":0, - "MaxDone":40000, - "MaxPend":2000000, - "MaxPacket":6553500, - "MaxConn":200, - "RcvBuff":4096000, - "SndBuff":10240000, - "WriteTimeout":30, - "ReadTimeout":30, - "IsInnerLink":true, - "NoDelay":true, - "SupportFragment":true, - "AuthKey":"1234567890", - "FilterChain":[ - "session-filter-auth" - ], - "HandlerChain":[ - "session-srv-registe", - "handler-world-close" - ] - }, - { - "Id":501, - "Type":5, - "AreaId":1, - "Name":"ManagerService", - "Ip":"127.0.0.1", - "Port":3002, - "MaxDone":20, - "MaxPend":20, - "MaxPacket":6553500, - "MaxConn":10, - "RcvBuff":8192, - "SndBuff":8192, - "WriteTimeout":30, - "ReadTimeout":30, - "IsInnerLink":true, - "NoDelay":true, - "IsClient":true, - "IsAutoReconn":true, - "SupportFragment":true, - "AuthKey":"1234567890", - "FilterChain":[ - "session-filter-auth" - ], - "HandlerChain":[ - "session-srv-registe", - "srv-service-handler" - ] - } - ] - }, - "module":{ - "Options":{ - "QueueBacklog":1024, - "MaxDone":1024, - "Interval":100 - } - }, - "tx":{ - "TxSkeletonName":"github.com/idealeak/goserver/srvlib/txcommskeleton" - }, - "executor":{ - "Options":{ - "QueueBacklog":1024, - "MaxDone":1024, - "Interval":0 - }, - "Worker":{ - "WorkerCnt":8, - "Options":{ - "QueueBacklog":1024, - "MaxDone":1024, - "Interval":0 - } - } - }, - "timer":{ - "Options":{ - "QueueBacklog":1024, - "MaxDone":1024, - "Interval":100 - } - }, - "core":{ - "MaxProcs":4 - }, - "cmdline":{ - "SupportCmdLine":true - }, - "signal":{ - "SupportSignal":true - }, - "common":{ - "AppId":"5c56d1644966f078bfb90c71", - "IsDevMode":true - }, - "costum":{ - "PromotersUrl":"http://192.168.0.65/jxjy/tg/game/push_order", - "etcdurl":["192.168.31.18:2379"], - "etcduser":"root", - "etcdpwd":"win88", - "PltName":"xiaoxin", - "LogicLevelUrl":"http://192.168.31.18:8000", - "MgoRpcCliNet": "tcp", - "MgoRpcCliAddr": "127.0.0.1:8999", - "MgoRpcCliReconnInterV": 3, - - "RabbitMQURL": "amqp://win88:123456@192.168.31.18:5672/win88", - "RMQExchange": "win88", - "RMQPublishBacklog":1024 - }, - "webapi":{ - "GameApiURL":"http://192.168.31.18:8000/api/game_srv" - }, - "data":{ - "RootPath":"../data", - "Files":[ - "DB_Sensitive_Words.dat", - "DB_MatchFree.dat", - "DB_MatchRule.dat", - "DB_Task.dat", - "DB_GameFree.dat", - "DB_GameRule.dat", - "DB_Shop.dat", - "DB_Condition.dat", - "DB_Limit_Times.dat", - "DB_Sign.dat", - "DB_Activity1.dat", - "DB_VIP.dat" - ] - }, - "gameconfig":{ - "RootPath":"../data/gameconfig" - }, - "i18n":{ - "RootPath":"../data/i18n" - } -} \ No newline at end of file