1
This commit is contained in:
parent
3b30957e37
commit
90b90c1d44
@ -1,11 +0,0 @@
|
||||
path_arr=$(echo $PWD|tr '/' '\n')
|
||||
path_arr=(${path_arr})
|
||||
GAME_ID=${path_arr[-5]}
|
||||
|
||||
if echo $GAME_ID | grep -q '[^0-9]'
|
||||
then
|
||||
echo 'game_id参数必须为数字'
|
||||
exit 1
|
||||
fi
|
||||
|
||||
python ../../third_party/tools/scripts/server/monitor.py masterserver${GAME_ID} '-n1 -i1'
|
@ -79,9 +79,15 @@ aux_source_directory(.
|
||||
SRC_LIST
|
||||
)
|
||||
|
||||
set(EXECUTABLE_OUTPUT_PATH
|
||||
${PROJECT_BINARY_DIR}/../bin
|
||||
)
|
||||
if (CMAKE_BUILD_TYPE STREQUAL "Debug")
|
||||
set(EXECUTABLE_OUTPUT_PATH
|
||||
${PROJECT_BINARY_DIR}/../bin/masterserver/bin
|
||||
)
|
||||
else ()
|
||||
set(EXECUTABLE_OUTPUT_PATH
|
||||
${PROJECT_BINARY_DIR}/../bin
|
||||
)
|
||||
endif()
|
||||
|
||||
add_executable(
|
||||
masterserver${GAME_ID} ${SRC_LIST}
|
||||
|
@ -7,30 +7,13 @@
|
||||
|
||||
void JsonDataMgr::Init()
|
||||
{
|
||||
std::string masterserver_cluster_json_file;
|
||||
if (!f8::IsOnlineEnv()) {
|
||||
if (f8::IsTestEnv()) {
|
||||
work_path_ = a8::Format("/root/pub/%d/%d/conf_test/game%d/masterserver.test",
|
||||
{
|
||||
GAME_ID,
|
||||
f8::App::Instance()->GetInstanceId(),
|
||||
GAME_ID
|
||||
});
|
||||
} else {
|
||||
work_path_ = a8::Format("/root/pub/%d/%d/conf_test/game%d/masterserver.dev",
|
||||
{
|
||||
GAME_ID,
|
||||
f8::App::Instance()->GetInstanceId(),
|
||||
GAME_ID
|
||||
});
|
||||
}
|
||||
}
|
||||
masterserver_cluster_json_file = a8::Format("%s/node%d/game%d.masterserver.cluster.json",
|
||||
{
|
||||
work_path_,
|
||||
f8::App::Instance()->GetNodeId(),
|
||||
GAME_ID
|
||||
});
|
||||
std::string masterserver_cluster_json_file = a8::Format
|
||||
("%s/node%d/game%d.masterserver.cluster.json",
|
||||
{
|
||||
work_path_,
|
||||
f8::App::Instance()->GetNodeId(),
|
||||
GAME_ID
|
||||
});
|
||||
masterserver_cluster_json_.ReadFromFile(masterserver_cluster_json_file);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user