1
This commit is contained in:
parent
ef8ae29680
commit
3fe5d3e7a3
@ -1,6 +1,6 @@
|
|||||||
cd third_party/wsproxy/server/wsproxy
|
cd third_party/wsproxy/server/wsproxy
|
||||||
python ../tools/scripts/construct/build_pb.py
|
python ../tools/scripts/construct/build_pb.py --nohooks 1
|
||||||
cmake .
|
cmake $1 .
|
||||||
make clean
|
make clean
|
||||||
make
|
make
|
||||||
cp ../bin/wsproxy ../../../../bin/
|
cp ../bin/wsproxy ../../../../bin/
|
||||||
|
@ -6,6 +6,7 @@ import sys
|
|||||||
import time
|
import time
|
||||||
import threading
|
import threading
|
||||||
import subprocess
|
import subprocess
|
||||||
|
from optparse import OptionParser
|
||||||
|
|
||||||
g_is_terminated = False
|
g_is_terminated = False
|
||||||
def is_terminated():
|
def is_terminated():
|
||||||
@ -64,7 +65,17 @@ def rebuild():
|
|||||||
def repair_githooks():
|
def repair_githooks():
|
||||||
os.system('/bin/bash ../tools/scripts/githooks/install.sh')
|
os.system('/bin/bash ../tools/scripts/githooks/install.sh')
|
||||||
|
|
||||||
repair_githooks()
|
parser = OptionParser(usage="%prog [options]")
|
||||||
|
parser.add_option(
|
||||||
|
"-n",
|
||||||
|
"--nohooks",
|
||||||
|
dest = "nohooks",
|
||||||
|
help = "no repair git hooks",
|
||||||
|
)
|
||||||
|
(options, args) = parser.parse_args()
|
||||||
|
if not options.nohooks:
|
||||||
|
repair_githooks()
|
||||||
|
|
||||||
if need_rebuild():
|
if need_rebuild():
|
||||||
rebuild()
|
rebuild()
|
||||||
else:
|
else:
|
||||||
|
@ -1,9 +1,17 @@
|
|||||||
project(wsproxy)
|
project(wsproxy)
|
||||||
cmake_minimum_required(VERSION 2.8)
|
cmake_minimum_required(VERSION 2.8)
|
||||||
|
|
||||||
|
if (${GAME_ID})
|
||||||
|
message(GAME_ID: ${GAME_ID})
|
||||||
|
else()
|
||||||
|
set(GAME_ID 1008)
|
||||||
|
message(GAME_ID: ${GAME_ID})
|
||||||
|
endif()
|
||||||
|
|
||||||
set(CMAKE_BUILD_TYPE "Debug")
|
set(CMAKE_BUILD_TYPE "Debug")
|
||||||
set(CMAKE_CXX_FLAGS_RELEASE "-std=gnu++11 -fsanitize=address -fno-omit-frame-pointer")
|
set(CMAKE_CXX_FLAGS_RELEASE "-std=gnu++11 -fsanitize=address -fno-omit-frame-pointer")
|
||||||
set(CMAKE_CXX_FLAGS_DEBUG "-Wall -g -std=gnu++11")
|
set(CMAKE_CXX_FLAGS_DEBUG "-Wall -g -std=gnu++11")
|
||||||
|
set(CMAKE_CXX_FLAGS_DEBUG "-Wall -g -std=gnu++11 -DGAME_ID=${GAME_ID}")
|
||||||
|
|
||||||
include_directories(
|
include_directories(
|
||||||
AFTER
|
AFTER
|
||||||
|
@ -31,7 +31,7 @@ enum PlayerState_e
|
|||||||
PS_WaitingMatch
|
PS_WaitingMatch
|
||||||
};
|
};
|
||||||
|
|
||||||
const char* const PROJ_NAME = "game1008_wsproxy";
|
const char* const PROJ_NAME = "game" A8_MACRO_STR(GAME_ID) "_gameserver";
|
||||||
const char* const PROJ_ROOT = "/data/logs/%s";
|
const char* const PROJ_ROOT = "/data/logs/%s";
|
||||||
|
|
||||||
const int POSTFIX_LEN = 7;
|
const int POSTFIX_LEN = 7;
|
||||||
|
@ -8,11 +8,13 @@ void JsonDataMgr::Init()
|
|||||||
std::string wsproxyserver_cluster_json_file;
|
std::string wsproxyserver_cluster_json_file;
|
||||||
std::string targetserver_cluster_json_file;
|
std::string targetserver_cluster_json_file;
|
||||||
if (getenv("is_dev_env")) {
|
if (getenv("is_dev_env")) {
|
||||||
wsproxyserver_cluster_json_file = "/var/data/conf_test/game1008/wsproxy/game1008.wsproxy.cluster.json";
|
wsproxyserver_cluster_json_file = a8::Format("/var/data/conf_test/game%d/wsproxy/game%d.wsproxy.cluster.json",
|
||||||
targetserver_cluster_json_file = "/var/data/conf_test/game1008/wsproxy/game1008.gameserver.cluster.json";
|
{GAME_ID, GAME_ID});
|
||||||
|
targetserver_cluster_json_file = a8::Format("/var/data/conf_test/game%d/wsproxy/game%d.gameserver.cluster.json",
|
||||||
|
{GAME_ID, GAME_ID});
|
||||||
} else {
|
} else {
|
||||||
wsproxyserver_cluster_json_file = "../config/game1008.wsproxy.cluster.json";
|
wsproxyserver_cluster_json_file = a8::Format("../config/game%d.wsproxy.cluster.json", {GAME_ID});
|
||||||
targetserver_cluster_json_file = "../config/game1008.gameserver.cluster.json";
|
targetserver_cluster_json_file = a8::Format("../config/game%d.gameserver.cluster.json", {GAME_ID});
|
||||||
}
|
}
|
||||||
wsproxyserver_cluster_json_.ReadFromFile(wsproxyserver_cluster_json_file);
|
wsproxyserver_cluster_json_.ReadFromFile(wsproxyserver_cluster_json_file);
|
||||||
targetserver_cluster_json_.ReadFromFile(targetserver_cluster_json_file);
|
targetserver_cluster_json_.ReadFromFile(targetserver_cluster_json_file);
|
||||||
|
2
third_party/a8engine
vendored
2
third_party/a8engine
vendored
@ -1 +1 @@
|
|||||||
Subproject commit 972852f335e1245614b2349a780de93b4d1d7bcb
|
Subproject commit ab6f41321c5925b5a26f4a106f784551a172ecc9
|
2
third_party/framework
vendored
2
third_party/framework
vendored
@ -1 +1 @@
|
|||||||
Subproject commit 803b1812d08fe8c3b3eea9371f8d9b0bead93c6d
|
Subproject commit 18133846b6672634219c080064b7a24720d17588
|
Loading…
x
Reference in New Issue
Block a user