private string GenerateStartCommand(ClusterNode Node) { string commandCmd; // Executable commandCmd = string.Format("{0} \"{1}\"", CommandStartApp, SelectedApplication); // Custom common arguments if (!string.IsNullOrWhiteSpace(CustomCommonParams)) { commandCmd = string.Format("{0} {1}", commandCmd, CustomCommonParams.Trim()); } // Mandatory arguments commandCmd = string.Format("{0} {1}", commandCmd, ArgMandatory); // Config file commandCmd = string.Format("{0} {1}=\"{2}\"", commandCmd, ArgConfig, SelectedConfig); // Render API and mode commandCmd = string.Format("{0} {1} {2}", commandCmd, SelectedRenderApiParam.Value, SelectedRenderModeParam.Value); // Camera if (!string.IsNullOrWhiteSpace(Node.camera)) { commandCmd = string.Format("{0} {1}={2}", commandCmd, ArgCamera, Node.camera); } // No texture streaming if (IsNotextureStreaming) { commandCmd = string.Format("{0} {1}", commandCmd, ArgNoTextureStreaming); } // Use all available cores if (IsUseAllCores) { commandCmd = string.Format("{0} {1}", commandCmd, ArgUseAllAvailableCores); } // Fullscreen/windowed commandCmd = string.Format("{0} {1}", commandCmd, Node.isWindowed ? ArgWindowed : ArgFullscreen); // Window mode, location and size commandCmd = string.Format("{0} {1} {2} {3} {4}", commandCmd, string.IsNullOrEmpty(Node.winX) ? string.Empty : string.Format("WinX={0}", Node.winX), string.IsNullOrEmpty(Node.winY) ? string.Empty : string.Format("WinY={0}", Node.winY), string.IsNullOrEmpty(Node.resX) ? string.Empty : string.Format("ResX={0}", Node.resX), string.IsNullOrEmpty(Node.resY) ? string.Empty : string.Format("ResY={0}", Node.resY)); // Node ID commandCmd = string.Format("{0} {1}={2}", commandCmd, ArgNode, Node.id); return(commandCmd); }
private string GenerateStartCommand(EntityClusterNode Node, Configuration Config) { string commandCmd = string.Empty; string Application = SelectedApplication; string ExtraAppParams = string.Empty; // Start command at first commandCmd = CommandStartApp; // Get file(s) List <string> Params = SplitAppLineParameters(SelectedApplication); foreach (string Param in Params) { commandCmd = string.Format("{0} {1}", commandCmd, Param); } // Custom common arguments if (!string.IsNullOrWhiteSpace(CustomCommonParams)) { commandCmd = string.Format("{0} {1}", commandCmd, CustomCommonParams.Trim()); } // Mandatory arguments commandCmd = string.Format("{0} {1}", commandCmd, ArgMandatory); // Config file commandCmd = string.Format("{0} {1}=\"{2}\"", commandCmd, ArgConfig, SelectedConfig); // Render API and mode commandCmd = string.Format("{0} {1} {2}", commandCmd, SelectedRenderApiParam.Value, SelectedRenderModeParam.Value); // No texture streaming if (IsNotextureStreaming) { commandCmd = string.Format("{0} {1}", commandCmd, ArgNoTextureStreaming); } // Use all available cores if (IsUseAllCores) { commandCmd = string.Format("{0} {1}", commandCmd, ArgUseAllAvailableCores); } // Set custom GPU selection policy if (Node.GPU != int.MinValue) { commandCmd = string.Format("{0} {1}={2}", commandCmd, ArgGpu, Node.GPU); } if (!Config.Windows.ContainsKey(Node.Window)) { throw new Exception(string.Format("Node {0} has no windows property specified", Node.Id)); } // Get window settings for the node EntityWindow Window = Config.Windows[Node.Window]; // Fullscreen/windowed commandCmd = string.Format("{0} {1}", commandCmd, Window.IsFullscreen ? ArgFullscreen : ArgWindowed); // If windowed, we need to add -ForceRes parameter if (!Window.IsFullscreen) { commandCmd = string.Format("{0} {1}", commandCmd, ArgForceRes); } // Window location and size if (Window.ResX > 0 && Window.ResY > 0) { commandCmd = string.Format("{0} {1} {2} {3} {4}", commandCmd, string.Format("WinX={0}", Window.WinX), string.Format("WinY={0}", Window.WinY), string.Format("ResX={0}", Window.ResX), string.Format("ResY={0}", Window.ResY)); } // Node ID commandCmd = string.Format("{0} {1}={2}", commandCmd, ArgNode, Node.Id); // additional launch arguments commandCmd = string.Format("{0} {1}", commandCmd, "-noxrstereo -messaging -concertisheadless"); // Log file commandCmd = string.Format("{0} Log={1}.log", commandCmd, Node.Id); // Logging verbosity if (IsCustomLogsUsed) { string LogCmds = string.Format( "LogDisplayClusterPlugin {0}, " + "LogDisplayClusterEngine {1}, " + "LogDisplayClusterConfig {2}, " + "LogDisplayClusterCluster {3}, " + "LogDisplayClusterGame {4}, " + "LogDisplayClusterGameMode {5}, " + "LogDisplayClusterInput {6}, " + "LogDisplayClusterInputVRPN {7}, " + "LogDisplayClusterNetwork {8}, " + "LogDisplayClusterNetworkMsg {9}, " + "LogDisplayClusterRender {10}, " + "LogDisplayClusterRenderSync {11}, " + "LogDisplayClusterBlueprint {12}" , SelectedVerbocityPlugin , SelectedVerbocityEngine , SelectedVerbocityConfig , SelectedVerbocityCluster , SelectedVerbocityGame , SelectedVerbocityGameMode , SelectedVerbocityInput , SelectedVerbocityVrpn , SelectedVerbocityNetwork , SelectedVerbocityNetworkMsg , SelectedVerbocityRender , SelectedVerbocityRenderSync , SelectedVerbocityBlueprint); commandCmd = string.Format("{0} -LogCmds=\"{1}\"", commandCmd, LogCmds); } // Custom ExecCmds string CleanCustomCommonExecCmds = CustomCommonExecCmds.Trim(); if (!string.IsNullOrEmpty(CleanCustomCommonExecCmds)) { commandCmd = string.Format("{0} -ExecCmds=\"{1}\"", commandCmd, CleanCustomCommonExecCmds); } return(commandCmd); }
private string GenerateStartCommand(EntityClusterNode Node, Configuration Config) { string commandCmd = string.Empty; // Executable commandCmd = string.Format("{0} \"{1}\"", CommandStartApp, SelectedApplication); // Custom common arguments if (!string.IsNullOrWhiteSpace(CustomCommonParams)) { commandCmd = string.Format("{0} {1}", commandCmd, CustomCommonParams.Trim()); } // Mandatory arguments commandCmd = string.Format("{0} {1}", commandCmd, ArgMandatory); // Config file commandCmd = string.Format("{0} {1}=\"{2}\"", commandCmd, ArgConfig, SelectedConfig); // Render API and mode commandCmd = string.Format("{0} {1} {2}", commandCmd, SelectedRenderApiParam.Value, SelectedRenderModeParam.Value); // No texture streaming if (IsNotextureStreaming) { commandCmd = string.Format("{0} {1}", commandCmd, ArgNoTextureStreaming); } // Use all available cores if (IsUseAllCores) { commandCmd = string.Format("{0} {1}", commandCmd, ArgUseAllAvailableCores); } if (!Config.Windows.ContainsKey(Node.Window)) { throw new Exception("Node {0} has no windows property specified"); } // Get window settings for the node EntityWindow Window = Config.Windows[Node.Window]; // Fullscreen/windowed commandCmd = string.Format("{0} {1}", commandCmd, Window.IsFullscreen ? ArgFullscreen : ArgWindowed); // Window location and size if (Window.ResX > 0 && Window.ResY > 0) { commandCmd = string.Format("{0} {1} {2} {3} {4}", commandCmd, string.Format("WinX={0}", Window.WinX), string.Format("WinY={0}", Window.WinY), string.Format("ResX={0}", Window.ResX), string.Format("ResY={0}", Window.ResY)); } // Node ID commandCmd = string.Format("{0} {1}={2}", commandCmd, ArgNode, Node.Id); // Log file commandCmd = string.Format("{0} Log={1}.log", commandCmd, Node.Id); // Logging verbosity if (IsCustomLogsUsed) { string LogCmds = string.Format( "LogDisplayClusterPlugin {0}, " + "LogDisplayClusterEngine {1}, " + "LogDisplayClusterConfig {2}, " + "LogDisplayClusterCluster {3}, " + "LogDisplayClusterGame {4}, " + "LogDisplayClusterGameMode {5}, " + "LogDisplayClusterInput {6}, " + "LogDisplayClusterInputVRPN {7}, " + "LogDisplayClusterNetwork {8}, " + "LogDisplayClusterNetworkMsg {9}, " + "LogDisplayClusterRender {10}, " + "LogDisplayClusterBlueprint {11}" , SelectedVerbocityPlugin , SelectedVerbocityEngine , SelectedVerbocityConfig , SelectedVerbocityCluster , SelectedVerbocityGame , SelectedVerbocityGameMode , SelectedVerbocityInput , SelectedVerbocityVrpn , SelectedVerbocityNetwork , SelectedVerbocityNetworkMsg , SelectedVerbocityRender , SelectedVerbocityBlueprint); commandCmd = string.Format("{0} -LogCmds=\"{1}\"", commandCmd, LogCmds); } // Custom ExecCmds string CleanCustomCommonExecCmds = CustomCommonExecCmds.Trim(); if (!string.IsNullOrEmpty(CleanCustomCommonExecCmds)) { commandCmd = string.Format("{0} -ExecCmds=\"{1}\"", commandCmd, CleanCustomCommonExecCmds); } return(commandCmd); }