aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorMelanie Thielker2009-02-10 12:25:29 +0000
committerMelanie Thielker2009-02-10 12:25:29 +0000
commita1393db7f0cb542f10f52ac739c78f15ee28ce77 (patch)
tree4b4349f350255103d0073fce34a2d80d7d66e389
parentCommented out a problematic test that needs more careful revision. (diff)
downloadopensim-SC-a1393db7f0cb542f10f52ac739c78f15ee28ce77.zip
opensim-SC-a1393db7f0cb542f10f52ac739c78f15ee28ce77.tar.gz
opensim-SC-a1393db7f0cb542f10f52ac739c78f15ee28ce77.tar.bz2
opensim-SC-a1393db7f0cb542f10f52ac739c78f15ee28ce77.tar.xz
Stopgap measure: To use gridlaunch, or GUI, start opensim with
OpenSim.exe -gui=true
Diffstat (limited to '')
-rw-r--r--OpenSim/Framework/Console/ConsoleBase.cs30
-rw-r--r--OpenSim/Region/Application/Application.cs2
-rw-r--r--OpenSim/Region/Application/OpenSim.cs4
3 files changed, 35 insertions, 1 deletions
diff --git a/OpenSim/Framework/Console/ConsoleBase.cs b/OpenSim/Framework/Console/ConsoleBase.cs
index 7e4397b..e98944c 100644
--- a/OpenSim/Framework/Console/ConsoleBase.cs
+++ b/OpenSim/Framework/Console/ConsoleBase.cs
@@ -379,6 +379,7 @@ namespace OpenSim.Framework.Console
379 public Commands Commands = new Commands(); 379 public Commands Commands = new Commands();
380 private bool echo = true; 380 private bool echo = true;
381 private List<string> history = new List<string>(); 381 private List<string> history = new List<string>();
382 private bool gui = false;
382 383
383 public object ConsoleScene = null; 384 public object ConsoleScene = null;
384 385
@@ -401,6 +402,11 @@ namespace OpenSim.Framework.Console
401 "Get general command list or more detailed help on a specific command", Help); 402 "Get general command list or more detailed help on a specific command", Help);
402 } 403 }
403 404
405 public void SetGuiMode(bool mode)
406 {
407 gui = mode;
408 }
409
404 private void AddToHistory(string text) 410 private void AddToHistory(string text)
405 { 411 {
406 while (history.Count >= 100) 412 while (history.Count >= 100)
@@ -813,6 +819,30 @@ namespace OpenSim.Framework.Console
813 echo = e; 819 echo = e;
814 int historyLine = history.Count; 820 int historyLine = history.Count;
815 821
822 if (gui)
823 {
824 System.Console.Write("{0}", prompt);
825 string cmdinput = System.Console.ReadLine();
826
827 if (isCommand)
828 {
829 string[] cmd = Commands.Resolve(Parser.Parse(cmdinput));
830
831 if (cmd.Length != 0)
832 {
833 int i;
834
835 for (i=0 ; i < cmd.Length ; i++)
836 {
837 if (cmd[i].Contains(" "))
838 cmd[i] = "\"" + cmd[i] + "\"";
839 }
840 return String.Empty;
841 }
842 }
843 return cmdinput;
844 }
845
816 System.Console.CursorLeft = 0; // Needed for mono 846 System.Console.CursorLeft = 0; // Needed for mono
817 System.Console.Write(" "); // Needed for mono 847 System.Console.Write(" "); // Needed for mono
818 848
diff --git a/OpenSim/Region/Application/Application.cs b/OpenSim/Region/Application/Application.cs
index 7a427dc..b9e82a4 100644
--- a/OpenSim/Region/Application/Application.cs
+++ b/OpenSim/Region/Application/Application.cs
@@ -84,13 +84,13 @@ namespace OpenSim
84 configSource.AddSwitch("Startup", "physics"); 84 configSource.AddSwitch("Startup", "physics");
85 configSource.AddSwitch("Startup", "useexecutepath"); 85 configSource.AddSwitch("Startup", "useexecutepath");
86 configSource.AddSwitch("Startup", "hypergrid"); 86 configSource.AddSwitch("Startup", "hypergrid");
87 configSource.AddSwitch("Startup", "gui");
87 88
88 configSource.AddConfig("StandAlone"); 89 configSource.AddConfig("StandAlone");
89 configSource.AddConfig("Network"); 90 configSource.AddConfig("Network");
90 91
91 bool background = configSource.Configs["Startup"].GetBoolean("background", false); 92 bool background = configSource.Configs["Startup"].GetBoolean("background", false);
92 bool hgrid = configSource.Configs["Startup"].GetBoolean("hypergrid", false); 93 bool hgrid = configSource.Configs["Startup"].GetBoolean("hypergrid", false);
93
94 m_saveCrashDumps = configSource.Configs["Startup"].GetBoolean("save_crashes", false); 94 m_saveCrashDumps = configSource.Configs["Startup"].GetBoolean("save_crashes", false);
95 m_crashDir = configSource.Configs["Startup"].GetString("crash_dir", m_crashDir); 95 m_crashDir = configSource.Configs["Startup"].GetString("crash_dir", m_crashDir);
96 96
diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs
index d706e05..1c7751d 100644
--- a/OpenSim/Region/Application/OpenSim.cs
+++ b/OpenSim/Region/Application/OpenSim.cs
@@ -58,6 +58,7 @@ namespace OpenSim
58 58
59 private string m_timedScript = "disabled"; 59 private string m_timedScript = "disabled";
60 private Timer m_scriptTimer; 60 private Timer m_scriptTimer;
61 private bool m_gui = false;
61 62
62 public OpenSim(IConfigSource configSource) : base(configSource) 63 public OpenSim(IConfigSource configSource) : base(configSource)
63 { 64 {
@@ -74,6 +75,8 @@ namespace OpenSim
74 m_startupCommandsFile = startupConfig.GetString("startup_console_commands_file", String.Empty); 75 m_startupCommandsFile = startupConfig.GetString("startup_console_commands_file", String.Empty);
75 m_shutdownCommandsFile = startupConfig.GetString("shutdown_console_commands_file", String.Empty); 76 m_shutdownCommandsFile = startupConfig.GetString("shutdown_console_commands_file", String.Empty);
76 77
78 m_gui = startupConfig.GetBoolean("gui", false);
79
77 m_timedScript = startupConfig.GetString("timer_Script", "disabled"); 80 m_timedScript = startupConfig.GetString("timer_Script", "disabled");
78 } 81 }
79 } 82 }
@@ -93,6 +96,7 @@ namespace OpenSim
93 //m_log.InfoFormat("[OPENSIM MAIN]: GC Latency Mode: {0}", GCSettings.LatencyMode.ToString()); 96 //m_log.InfoFormat("[OPENSIM MAIN]: GC Latency Mode: {0}", GCSettings.LatencyMode.ToString());
94 97
95 m_console = new ConsoleBase("Region"); 98 m_console = new ConsoleBase("Region");
99 m_console.SetGuiMode(m_gui);
96 MainConsole.Instance = m_console; 100 MainConsole.Instance = m_console;
97 101
98 m_console.Commands.AddCommand("region", "clear assets", 102 m_console.Commands.AddCommand("region", "clear assets",