Stopgap measure: To use gridlaunch, or GUI, start opensim with

OpenSim.exe -gui=true
0.6.3-post-fixes
Melanie Thielker 2009-02-10 12:25:29 +00:00
parent 08ef0ddd22
commit a1393db7f0
3 changed files with 35 additions and 1 deletions

View File

@ -379,6 +379,7 @@ namespace OpenSim.Framework.Console
public Commands Commands = new Commands(); public Commands Commands = new Commands();
private bool echo = true; private bool echo = true;
private List<string> history = new List<string>(); private List<string> history = new List<string>();
private bool gui = false;
public object ConsoleScene = null; public object ConsoleScene = null;
@ -401,6 +402,11 @@ namespace OpenSim.Framework.Console
"Get general command list or more detailed help on a specific command", Help); "Get general command list or more detailed help on a specific command", Help);
} }
public void SetGuiMode(bool mode)
{
gui = mode;
}
private void AddToHistory(string text) private void AddToHistory(string text)
{ {
while (history.Count >= 100) while (history.Count >= 100)
@ -813,6 +819,30 @@ namespace OpenSim.Framework.Console
echo = e; echo = e;
int historyLine = history.Count; int historyLine = history.Count;
if (gui)
{
System.Console.Write("{0}", prompt);
string cmdinput = System.Console.ReadLine();
if (isCommand)
{
string[] cmd = Commands.Resolve(Parser.Parse(cmdinput));
if (cmd.Length != 0)
{
int i;
for (i=0 ; i < cmd.Length ; i++)
{
if (cmd[i].Contains(" "))
cmd[i] = "\"" + cmd[i] + "\"";
}
return String.Empty;
}
}
return cmdinput;
}
System.Console.CursorLeft = 0; // Needed for mono System.Console.CursorLeft = 0; // Needed for mono
System.Console.Write(" "); // Needed for mono System.Console.Write(" "); // Needed for mono

View File

@ -84,13 +84,13 @@ namespace OpenSim
configSource.AddSwitch("Startup", "physics"); configSource.AddSwitch("Startup", "physics");
configSource.AddSwitch("Startup", "useexecutepath"); configSource.AddSwitch("Startup", "useexecutepath");
configSource.AddSwitch("Startup", "hypergrid"); configSource.AddSwitch("Startup", "hypergrid");
configSource.AddSwitch("Startup", "gui");
configSource.AddConfig("StandAlone"); configSource.AddConfig("StandAlone");
configSource.AddConfig("Network"); configSource.AddConfig("Network");
bool background = configSource.Configs["Startup"].GetBoolean("background", false); bool background = configSource.Configs["Startup"].GetBoolean("background", false);
bool hgrid = configSource.Configs["Startup"].GetBoolean("hypergrid", false); bool hgrid = configSource.Configs["Startup"].GetBoolean("hypergrid", false);
m_saveCrashDumps = configSource.Configs["Startup"].GetBoolean("save_crashes", false); m_saveCrashDumps = configSource.Configs["Startup"].GetBoolean("save_crashes", false);
m_crashDir = configSource.Configs["Startup"].GetString("crash_dir", m_crashDir); m_crashDir = configSource.Configs["Startup"].GetString("crash_dir", m_crashDir);

View File

@ -58,6 +58,7 @@ namespace OpenSim
private string m_timedScript = "disabled"; private string m_timedScript = "disabled";
private Timer m_scriptTimer; private Timer m_scriptTimer;
private bool m_gui = false;
public OpenSim(IConfigSource configSource) : base(configSource) public OpenSim(IConfigSource configSource) : base(configSource)
{ {
@ -74,6 +75,8 @@ namespace OpenSim
m_startupCommandsFile = startupConfig.GetString("startup_console_commands_file", String.Empty); m_startupCommandsFile = startupConfig.GetString("startup_console_commands_file", String.Empty);
m_shutdownCommandsFile = startupConfig.GetString("shutdown_console_commands_file", String.Empty); m_shutdownCommandsFile = startupConfig.GetString("shutdown_console_commands_file", String.Empty);
m_gui = startupConfig.GetBoolean("gui", false);
m_timedScript = startupConfig.GetString("timer_Script", "disabled"); m_timedScript = startupConfig.GetString("timer_Script", "disabled");
} }
} }
@ -93,6 +96,7 @@ namespace OpenSim
//m_log.InfoFormat("[OPENSIM MAIN]: GC Latency Mode: {0}", GCSettings.LatencyMode.ToString()); //m_log.InfoFormat("[OPENSIM MAIN]: GC Latency Mode: {0}", GCSettings.LatencyMode.ToString());
m_console = new ConsoleBase("Region"); m_console = new ConsoleBase("Region");
m_console.SetGuiMode(m_gui);
MainConsole.Instance = m_console; MainConsole.Instance = m_console;
m_console.Commands.AddCommand("region", "clear assets", m_console.Commands.AddCommand("region", "clear assets",