From 3ec5a87d40598294c593f9cf4326adc471a083f3 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Mon, 7 Jun 2021 19:56:35 +0800 Subject: [PATCH] Generate script to launch tabbed --- .../spt_server_patch_terminal.cpp | 29 ++++--------------- 1 file changed, 6 insertions(+), 23 deletions(-) diff --git a/ryzom/server/src/patchman_service/spt_server_patch_terminal.cpp b/ryzom/server/src/patchman_service/spt_server_patch_terminal.cpp index 729801d56..c668b8894 100644 --- a/ryzom/server/src/patchman_service/spt_server_patch_terminal.cpp +++ b/ryzom/server/src/patchman_service/spt_server_patch_terminal.cpp @@ -76,8 +76,9 @@ NLMISC::CVariable NumSPTWatches("spt","NumSPTWatches","number of SPT wat NLMISC::CVariable DevConfigDirectory("spt", "DevConfigDirectory", "Directory used to build developer configuration file", "../../save/dev", 0, true); NLMISC::CVariable DevWorkingDirectory("spt", "DevWorkingDirectory", "Directory set as default directory in generated startup batch", "%RC_ROOT%\\save\\dev", 0, true); -NLMISC::CVariable DevSleepCmd("spt", "DevSleepCmd", "Directory set as default directory in generated startup batch", "%RC_ROOT%\\distribution\\ryzom_tools_win_x64-distribution\\nircmd.exe wait 100", 0, true); -NLMISC::CVariable DevExeSuffix("spt", "DevExeSuffix", "Executable suffix used in development startup batch", ".exe", 0, true); +NLMISC::CVariable DevSleepCmd("spt", "DevSleepCmd", "Directory set as default directory in generated startup batch", "%RC_ROOT%\\distribution\\ryzom_tools_win_x64-distribution\\nircmd.exe wait 1000", 0, true); +NLMISC::CVariable DevExePrefix("spt", "DevExePrefix", "Executable prefix used in development startup batch", "", 0, true); +NLMISC::CVariable DevExeSuffix("spt", "DevExeSuffix", "Executable suffix used in development startup batch", ".exe -new_console", 0, true); static void addSPTMessage(const CSString& moduleName, const CSString& msgText) { @@ -788,28 +789,12 @@ NLMISC_CLASS_COMMAND_IMPL(CServerPatchTerminal, depDevCfg) // remapping exe names to cfg names // TODO: fix services to be consistent - /* static map cfgMap; if (cfgMap.empty()) { - cfgMap["ryzom_admin_service"] = "admin_service"; - cfgMap["ryzom_shard_unifier_service"] = "shard_unifier_service"; - cfgMap["ryzom_mail_forum_service"] = "mail_forum_service"; - cfgMap["ryzom_logger_service"] = "logger_service"; - cfgMap["ryzom_backup_service"] = "backup_service"; cfgMap["ryzom_naming_service"] = "naming_service"; cfgMap["ryzom_welcome_service"] = "welcome_service"; - cfgMap["ryzom_tick_service"] = "tick_service"; - cfgMap["ryzom_mirror_service"] = "mirror_service"; - cfgMap["ryzom_ios_service"] = "input_output_service"; - cfgMap["ryzom_gpm_service"] = "gpm_service"; - cfgMap["ryzom_session_browser_service"] = "session_browser_server"; - cfgMap["ryzom_entities_game_service"] = "entities_game_service"; - cfgMap["ryzom_ai_service"] = "ai_service"; - cfgMap["ryzom_frontend_service"] = "frontend_service"; - cfgMap["ryzom_dynamic_scenario_service"] = "dynamic_scenario_service"; - } - */ + } vector appNames; CDeploymentConfiguration::getInstance().getAppNames(IService::getInstance()->getHostName(), "dev", appNames); @@ -839,13 +824,11 @@ NLMISC_CLASS_COMMAND_IMPL(CServerPatchTerminal, depDevCfg) CFile::createDirectoryTree(configDirectory); // ok, write the configuration file in the config directory - /* string cfgName = appDesc.CmdLine.firstWord(); map::iterator cfgNameIt = cfgMap.find(toLowerAscii(cfgName)); if (cfgNameIt != cfgMap.end()) cfgName = cfgNameIt->second; - */ - CSString cfgFileName = appDesc.CmdLine.firstWord() + ".cfg"; // NOTE: This uses the original cfg names + CSString cfgFileName = cfgName + ".cfg"; // NOTE: This uses the original cfg names string fileName = configDirectory + cfgFileName; FILE *fp = nlfopen(fileName, "wt"); @@ -905,7 +888,7 @@ NLMISC_CLASS_COMMAND_IMPL(CServerPatchTerminal, depDevCfg) batchIt = batches.insert(pair(appDesc.ShardName, stringstream())).first; stringstream &batch = batchIt->second; batch << "cd \"" << DevWorkingDirectory.get() << "\\" << appDesc.AppName << "\"\n"; - batch << "start " << cmdLine << "\n"; + batch << DevExePrefix.get() << cmdLine << "\n"; batch << DevSleepCmd.get() << "\n"; batch << "\n"; #endif