aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Application/Application.cs
diff options
context:
space:
mode:
authorSean Dague2007-07-16 15:40:11 +0000
committerSean Dague2007-07-16 15:40:11 +0000
commit2a3c79df83e800d5dfe75a1a3b140ed81da2b1d6 (patch)
treee3f80ad51736cf17e856547b1bcf956010927434 /OpenSim/Region/Application/Application.cs
parent*Trunk compiles now (diff)
downloadopensim-SC_OLD-2a3c79df83e800d5dfe75a1a3b140ed81da2b1d6.zip
opensim-SC_OLD-2a3c79df83e800d5dfe75a1a3b140ed81da2b1d6.tar.gz
opensim-SC_OLD-2a3c79df83e800d5dfe75a1a3b140ed81da2b1d6.tar.bz2
opensim-SC_OLD-2a3c79df83e800d5dfe75a1a3b140ed81da2b1d6.tar.xz
changed to native line ending encoding
Diffstat (limited to 'OpenSim/Region/Application/Application.cs')
-rw-r--r--OpenSim/Region/Application/Application.cs250
1 files changed, 125 insertions, 125 deletions
diff --git a/OpenSim/Region/Application/Application.cs b/OpenSim/Region/Application/Application.cs
index 10beaff..666be33 100644
--- a/OpenSim/Region/Application/Application.cs
+++ b/OpenSim/Region/Application/Application.cs
@@ -1,125 +1,125 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28using System; 28using System;
29using OpenSim.Framework.Console; 29using OpenSim.Framework.Console;
30using OpenSim.Region.Environment.Scenes; 30using OpenSim.Region.Environment.Scenes;
31 31
32namespace OpenSim 32namespace OpenSim
33{ 33{
34 public class Application 34 public class Application
35 { 35 {
36 //could move our main function into OpenSimMain and kill this class 36 //could move our main function into OpenSimMain and kill this class
37 [STAThread] 37 [STAThread]
38 public static void Main(string[] args) 38 public static void Main(string[] args)
39 { 39 {
40 Console.WriteLine("OpenSim " + VersionInfo.Version + "\n"); 40 Console.WriteLine("OpenSim " + VersionInfo.Version + "\n");
41 Console.WriteLine("Starting...\n"); 41 Console.WriteLine("Starting...\n");
42 42
43 bool sandBoxMode = false; 43 bool sandBoxMode = false;
44 bool startLoginServer = false; 44 bool startLoginServer = false;
45 string physicsEngine = "basicphysics"; 45 string physicsEngine = "basicphysics";
46 bool allowFlying = false; 46 bool allowFlying = false;
47 bool userAccounts = false; 47 bool userAccounts = false;
48 bool gridLocalAsset = false; 48 bool gridLocalAsset = false;
49 bool useConfigFile = false; 49 bool useConfigFile = false;
50 bool silent = false; 50 bool silent = false;
51 string configFile = "simconfig.xml"; 51 string configFile = "simconfig.xml";
52 52
53 for (int i = 0; i < args.Length; i++) 53 for (int i = 0; i < args.Length; i++)
54 { 54 {
55 if (args[i] == "-sandbox") 55 if (args[i] == "-sandbox")
56 { 56 {
57 sandBoxMode = true; 57 sandBoxMode = true;
58 startLoginServer = true; 58 startLoginServer = true;
59 } 59 }
60 /* 60 /*
61 if (args[i] == "-loginserver") 61 if (args[i] == "-loginserver")
62 { 62 {
63 startLoginServer = true; 63 startLoginServer = true;
64 }*/ 64 }*/
65 if (args[i] == "-accounts") 65 if (args[i] == "-accounts")
66 { 66 {
67 userAccounts = true; 67 userAccounts = true;
68 } 68 }
69 if (args[i] == "-realphysx") 69 if (args[i] == "-realphysx")
70 { 70 {
71 physicsEngine = "RealPhysX"; 71 physicsEngine = "RealPhysX";
72 allowFlying = true; 72 allowFlying = true;
73 } 73 }
74 if (args[i] == "-bulletX") 74 if (args[i] == "-bulletX")
75 { 75 {
76 physicsEngine = "BulletXEngine"; 76 physicsEngine = "BulletXEngine";
77 allowFlying = true; 77 allowFlying = true;
78 } 78 }
79 if (args[i] == "-ode") 79 if (args[i] == "-ode")
80 { 80 {
81 physicsEngine = "OpenDynamicsEngine"; 81 physicsEngine = "OpenDynamicsEngine";
82 allowFlying = true; 82 allowFlying = true;
83 } 83 }
84 if (args[i] == "-localasset") 84 if (args[i] == "-localasset")
85 { 85 {
86 gridLocalAsset = true; 86 gridLocalAsset = true;
87 } 87 }
88 if (args[i] == "-configfile") 88 if (args[i] == "-configfile")
89 { 89 {
90 useConfigFile = true; 90 useConfigFile = true;
91 } 91 }
92 if (args[i] == "-noverbose") 92 if (args[i] == "-noverbose")
93 { 93 {
94 silent = true; 94 silent = true;
95 } 95 }
96 if (args[i] == "-config") 96 if (args[i] == "-config")
97 { 97 {
98 try 98 try
99 { 99 {
100 i++; 100 i++;
101 configFile = args[i]; 101 configFile = args[i];
102 } 102 }
103 catch (Exception e) 103 catch (Exception e)
104 { 104 {
105 Console.WriteLine("-config: Please specify a config file. (" + e.ToString() + ")"); 105 Console.WriteLine("-config: Please specify a config file. (" + e.ToString() + ")");
106 } 106 }
107 } 107 }
108 } 108 }
109 109
110 OpenSimMain sim = new OpenSimMain(sandBoxMode, startLoginServer, physicsEngine, useConfigFile, silent, configFile); 110 OpenSimMain sim = new OpenSimMain(sandBoxMode, startLoginServer, physicsEngine, useConfigFile, silent, configFile);
111 // OpenSimRoot.Instance.Application = sim; 111 // OpenSimRoot.Instance.Application = sim;
112 sim.m_sandbox = sandBoxMode; 112 sim.m_sandbox = sandBoxMode;
113 sim.user_accounts = userAccounts; 113 sim.user_accounts = userAccounts;
114 sim.gridLocalAsset = gridLocalAsset; 114 sim.gridLocalAsset = gridLocalAsset;
115 ScenePresence.PhysicsEngineFlying = allowFlying; 115 ScenePresence.PhysicsEngineFlying = allowFlying;
116 116
117 sim.StartUp(); 117 sim.StartUp();
118 118
119 while (true) 119 while (true)
120 { 120 {
121 MainLog.Instance.MainLogPrompt(); 121 MainLog.Instance.MainLogPrompt();
122 } 122 }
123 } 123 }
124 } 124 }
125} 125}