Added missing build files

Added sanity checking for config options in OpenSimMain.cs
0.1-prestable
gareth 2007-05-06 18:05:51 +00:00
parent 33b7869b85
commit c77c688a50
4 changed files with 115 additions and 79 deletions

View File

@ -22,7 +22,6 @@
<include name="UserProfileManager.cs" />
<include name="UserProfileManagerBase.cs" />
<include name="Util.cs" />
<include name="VersionInfo.cs" />
<include name="Interfaces/IAssetServer.cs" />
<include name="Interfaces/IConfig.cs" />
<include name="Interfaces/IGenericConfig.cs" />

View File

@ -19,6 +19,7 @@
<include name="QueItem.cs" />
<include name="RegionInfo.cs" />
<include name="SimClient.cs" />
<include name="VersionInfo.cs" />
<include name="Assets/AssetCache.cs" />
<include name="Assets/InventoryCache.cs" />
<include name="CAPS/AdminWebFront.cs" />

View File

@ -347,85 +347,106 @@ namespace OpenSim
// SandBoxMode
string attri = "";
attri = configData.GetAttribute("SandBox");
if (attri == "")
if ((attri == "")^(attri == "false"))
{
this.m_sandbox = false;
configData.SetAttribute("SandBox", "false");
}
else
else if (attri == "true")
{
this.m_sandbox = Convert.ToBoolean(attri);
} else {
m_console.WriteLine("Main.cs: SetupFromConfig() - Invalid value for SandBox attribute, terminating");
Environment.Exit(1);
}
// LoginServer
attri = "";
attri = configData.GetAttribute("LoginServer");
if (attri == "")
if ((attri == "")^(attri == "false"))
{
this.m_loginserver = false;
configData.SetAttribute("LoginServer", "false");
}
else
else if (attri == "true")
{
this.m_loginserver = Convert.ToBoolean(attri);
} else {
m_console.WriteLine("Main.cs: SetupFromConfig() - Invalid value for LoginServer attribute, terminating");
Environment.Exit(1);
}
// Sandbox User accounts
attri = "";
attri = configData.GetAttribute("UserAccount");
if (attri == "")
if ((attri == "")^(attri == "false"))
{
this.user_accounts = false;
configData.SetAttribute("UserAccounts", "false");
}
else
else if (attri == "true")
{
this.user_accounts = Convert.ToBoolean(attri);
} else {
m_console.WriteLine("Main.cs: SetupFromConfig() - Invalid value for UserAccount attribute, terminating");
Environment.Exit(1);
}
// Grid mode hack to use local asset server
attri = "";
attri = configData.GetAttribute("LocalAssets");
if (attri == "")
if ((attri == "")^(attri == "false"))
{
this.gridLocalAsset = false;
configData.SetAttribute("LocalAssets", "false");
}
else
else if (attri == "true")
{
this.gridLocalAsset = Convert.ToBoolean(attri);
} else {
m_console.WriteLine("Main.cs: SetupFromConfig() - Invalid value for LocalAssets attribute, terminating");
}
// Grid mode hack to use local asset server
attri = "";
attri = configData.GetAttribute("PhysicsEngine");
if (attri == "")
{
switch(attri) {
default:
m_console.WriteLine("Main.cs: SetupFromConfig() - Invalid value for PhysicsEngine attribute, terminating");
Environment.Exit(1);
break;
case "":
this.m_physicsEngine = "basicphysics";
configData.SetAttribute("PhysicsEngine", "basicphysics");
}
else
{
this.m_physicsEngine = attri;
if ((attri == "RealPhysX") || (attri == "OpenDynamicsEngine"))
{
OpenSim.world.Avatar.PhysicsEngineFlying = true;
}
else
{
OpenSim.world.Avatar.PhysicsEngineFlying = false;
break;
case "RealPhysX":
this.m_physicsEngine = "RealPhysX";
OpenSim.world.Avatar.PhysicsEngineFlying = true;
break;
case "OpenDynamicsEngine":
this.m_physicsEngine = "OpenDynamicsEngine";
OpenSim.world.Avatar.PhysicsEngineFlying = true;
break;
}
}
configData.Commit();
}
catch (Exception e)
{
Console.WriteLine(e.Message);
Console.WriteLine("\nSorry, a fatal error occurred while trying to initialise the configuration data");
Console.WriteLine("Can not continue starting up");
Environment.Exit(1);
}
}
private SimConfig LoadConfigDll(string dllName)
{
try {
Assembly pluginAssembly = Assembly.LoadFrom(dllName);
SimConfig config = null;
@ -450,6 +471,12 @@ namespace OpenSim
}
pluginAssembly = null;
return config;
} catch (Exception e) {
m_console.WriteLine(e.Message + "\nSorry, a fatal error occurred while trying to load the config DLL");
m_console.WriteLine("Can not continue starting up");
Environment.Exit(1);
return null;
}
}
private void OnReceivedData(IAsyncResult result)

View File

@ -46,31 +46,34 @@
<echo message="Deleting all builds from all configurations" />
<delete dir="${bin.dir}" failonerror="false" />
<delete dir="${obj.dir}" failonerror="false" />
<nant buildfile="OpenSim.Storage/LocalStorageSQLite/OpenSim.Storage.LocalStorageSQLite.dll.build" target="clean" />
<nant buildfile="OpenSim.Scripting/EmbeddedJVM/OpenSim.Scripting.EmbeddedJVM.dll.build" target="clean" />
<nant buildfile="OpenSim.Framework/OpenSim.Framework.dll.build" target="clean" />
<nant buildfile="OpenGrid.Framework.Data/OpenGrid.Framework.Data.dll.build" target="clean" />
<nant buildfile="OpenSim.Framework.Console/OpenSim.Framework.Console.dll.build" target="clean" />
<nant buildfile="OpenGrid.Framework.Data.MySQL/OpenGrid.Framework.Data.MySQL.dll.build" target="clean" />
<nant buildfile="XmlRpcCS/XMLRPC.dll.build" target="clean" />
<nant buildfile="OpenSim.Servers/OpenSim.Servers.dll.build" target="clean" />
<nant buildfile="OpenSim.Storage/LocalStorageDb4o/OpenSim.Storage.LocalStorageDb4o.dll.build" target="clean" />
<nant buildfile="OpenSim.Physics/BasicPhysicsPlugin/OpenSim.Physics.BasicPhysicsPlugin.dll.build" target="clean" />
<nant buildfile="OpenSim.RegionServer/OpenSim.RegionServer.dll.build" target="clean" />
<nant buildfile="OpenSim.GenericConfig/Xml/OpenSim.GenericConfig.Xml.dll.build" target="clean" />
<nant buildfile="OpenGridServices.UserServer/OpenGridServices.UserServer.exe.build" target="clean" />
<nant buildfile="OpenGridServices.GridServer/OpenGridServices.GridServer.exe.build" target="clean" />
<nant buildfile="OpenSim.GridInterfaces/Local/OpenSim.GridInterfaces.Local.dll.build" target="clean" />
<nant buildfile="OpenSim.Physics/PhysXPlugin/OpenSim.Physics.PhysXPlugin.dll.build" target="clean" />
<nant buildfile="OpenSim.Physics/OdePlugin/OpenSim.Physics.OdePlugin.dll.build" target="clean" />
<nant buildfile="OpenGrid.Config/GridConfigDb4o/OpenGrid.Config.GridConfigDb4o.dll.build" target="clean" />
<nant buildfile="OpenGridServices.AssetServer/OpenGridServices.AssetServer.exe.build" target="clean" />
<nant buildfile="OpenSim/OpenSim.exe.build" target="clean" />
<nant buildfile="OpenUser.Config/UserConfigDb4o/OpenUser.Config.UserConfigDb4o.dll.build" target="clean" />
<nant buildfile="OpenGrid.Config/GridConfigDb4o/OpenGrid.Config.GridConfigDb4o.dll.build" target="clean" />
<nant buildfile="OpenSim.Servers/OpenSim.Servers.dll.build" target="clean" />
<nant buildfile="OpenGrid.Framework.Data.SQLite/OpenGrid.Framework.Data.SQLite.dll.build" target="clean" />
<nant buildfile="OpenGridServices.AssetServer/OpenGridServices.AssetServer.exe.build" target="clean" />
<nant buildfile="OpenSim.GridInterfaces/Remote/OpenSim.GridInterfaces.Remote.dll.build" target="clean" />
<nant buildfile="OpenSim.Physics/Manager/OpenSim.Physics.Manager.dll.build" target="clean" />
<nant buildfile="OpenSim.Terrain.BasicTerrain/OpenSim.Terrain.BasicTerrain.dll.build" target="clean" />
<nant buildfile="OpenSim.GridInterfaces/Local/OpenSim.GridInterfaces.Local.dll.build" target="clean" />
<nant buildfile="OpenSim.Storage/LocalStorageBerkeleyDB/OpenSim.Storage.LocalStorageBerkeleyDB.dll.build" target="clean" />
<nant buildfile="OpenGridServices.GridServer/OpenGridServices.GridServer.exe.build" target="clean" />
<nant buildfile="OpenGridServices.UserServer/OpenGridServices.UserServer.exe.build" target="clean" />
<nant buildfile="OpenGrid.Framework.Data.MySQL/OpenGrid.Framework.Data.MySQL.dll.build" target="clean" />
<nant buildfile="OpenUser.Config/UserConfigDb4o/OpenUser.Config.UserConfigDb4o.dll.build" target="clean" />
<nant buildfile="OpenGrid.Framework.Data/OpenGrid.Framework.Data.dll.build" target="clean" />
<nant buildfile="OpenSim.Terrain.BasicTerrain/OpenSim.Terrain.BasicTerrain.dll.build" target="clean" />
<nant buildfile="OpenGrid.Framework.Data.MSSQL/OpenGrid.Framework.Data.MSSQL.dll.build" target="clean" />
<nant buildfile="OpenSim.Scripting/EmbeddedJVM/OpenSim.Scripting.EmbeddedJVM.dll.build" target="clean" />
<nant buildfile="OpenSim.Storage/LocalStorageSQLite/OpenSim.Storage.LocalStorageSQLite.dll.build" target="clean" />
<nant buildfile="OpenSim.Framework.Console/OpenSim.Framework.Console.dll.build" target="clean" />
<nant buildfile="OpenSim.GenericConfig/Xml/OpenSim.GenericConfig.Xml.dll.build" target="clean" />
<nant buildfile="OpenSim.Storage/LocalStorageDb4o/OpenSim.Storage.LocalStorageDb4o.dll.build" target="clean" />
<nant buildfile="OpenSim.Physics/Manager/OpenSim.Physics.Manager.dll.build" target="clean" />
<nant buildfile="OpenGrid.Framework.Data.DB4o/OpenGrid.Framework.Data.DB4o.dll.build" target="clean" />
<nant buildfile="OpenSim.Framework/OpenSim.Framework.dll.build" target="clean" />
<nant buildfile="OpenSim.Physics/PhysXPlugin/OpenSim.Physics.PhysXPlugin.dll.build" target="clean" />
<nant buildfile="XmlRpcCS/XMLRPC.dll.build" target="clean" />
<nant buildfile="OpenSim.Physics/BasicPhysicsPlugin/OpenSim.Physics.BasicPhysicsPlugin.dll.build" target="clean" />
<nant buildfile="OpenSim.Physics/OdePlugin/OpenSim.Physics.OdePlugin.dll.build" target="clean" />
</target>
<target name="build" depends="init" description="">
@ -85,6 +88,9 @@
<nant buildfile="OpenSim.GridInterfaces/Remote/OpenSim.GridInterfaces.Remote.dll.build" target="build" />
<nant buildfile="OpenGrid.Framework.Data/OpenGrid.Framework.Data.dll.build" target="build" />
<nant buildfile="OpenGrid.Framework.Data.MySQL/OpenGrid.Framework.Data.MySQL.dll.build" target="build" />
<nant buildfile="OpenGrid.Framework.Data.DB4o/OpenGrid.Framework.Data.DB4o.dll.build" target="build" />
<nant buildfile="OpenGrid.Framework.Data.MSSQL/OpenGrid.Framework.Data.MSSQL.dll.build" target="build" />
<nant buildfile="OpenGrid.Framework.Data.SQLite/OpenGrid.Framework.Data.SQLite.dll.build" target="build" />
<nant buildfile="OpenGridServices.GridServer/OpenGridServices.GridServer.exe.build" target="build" />
<nant buildfile="OpenGridServices.AssetServer/OpenGridServices.AssetServer.exe.build" target="build" />
<nant buildfile="OpenGridServices.UserServer/OpenGridServices.UserServer.exe.build" target="build" />
@ -109,31 +115,34 @@
<target name="doc" depends="build-release">
<echo message="Generating all documentation from all builds" />
<nant buildfile="OpenSim.Storage/LocalStorageSQLite/OpenSim.Storage.LocalStorageSQLite.dll.build" target="doc" />
<nant buildfile="OpenSim.Scripting/EmbeddedJVM/OpenSim.Scripting.EmbeddedJVM.dll.build" target="doc" />
<nant buildfile="OpenSim.Framework/OpenSim.Framework.dll.build" target="doc" />
<nant buildfile="OpenGrid.Framework.Data/OpenGrid.Framework.Data.dll.build" target="doc" />
<nant buildfile="OpenSim.Framework.Console/OpenSim.Framework.Console.dll.build" target="doc" />
<nant buildfile="OpenGrid.Framework.Data.MySQL/OpenGrid.Framework.Data.MySQL.dll.build" target="doc" />
<nant buildfile="XmlRpcCS/XMLRPC.dll.build" target="doc" />
<nant buildfile="OpenSim.Servers/OpenSim.Servers.dll.build" target="doc" />
<nant buildfile="OpenSim.Storage/LocalStorageDb4o/OpenSim.Storage.LocalStorageDb4o.dll.build" target="doc" />
<nant buildfile="OpenSim.Physics/BasicPhysicsPlugin/OpenSim.Physics.BasicPhysicsPlugin.dll.build" target="doc" />
<nant buildfile="OpenSim.RegionServer/OpenSim.RegionServer.dll.build" target="doc" />
<nant buildfile="OpenSim.GenericConfig/Xml/OpenSim.GenericConfig.Xml.dll.build" target="doc" />
<nant buildfile="OpenGridServices.UserServer/OpenGridServices.UserServer.exe.build" target="doc" />
<nant buildfile="OpenGridServices.GridServer/OpenGridServices.GridServer.exe.build" target="doc" />
<nant buildfile="OpenSim.GridInterfaces/Local/OpenSim.GridInterfaces.Local.dll.build" target="doc" />
<nant buildfile="OpenSim.Physics/PhysXPlugin/OpenSim.Physics.PhysXPlugin.dll.build" target="doc" />
<nant buildfile="OpenSim.Physics/OdePlugin/OpenSim.Physics.OdePlugin.dll.build" target="doc" />
<nant buildfile="OpenGrid.Config/GridConfigDb4o/OpenGrid.Config.GridConfigDb4o.dll.build" target="doc" />
<nant buildfile="OpenGridServices.AssetServer/OpenGridServices.AssetServer.exe.build" target="doc" />
<nant buildfile="OpenSim/OpenSim.exe.build" target="doc" />
<nant buildfile="OpenUser.Config/UserConfigDb4o/OpenUser.Config.UserConfigDb4o.dll.build" target="doc" />
<nant buildfile="OpenGrid.Config/GridConfigDb4o/OpenGrid.Config.GridConfigDb4o.dll.build" target="doc" />
<nant buildfile="OpenSim.Servers/OpenSim.Servers.dll.build" target="doc" />
<nant buildfile="OpenGrid.Framework.Data.SQLite/OpenGrid.Framework.Data.SQLite.dll.build" target="doc" />
<nant buildfile="OpenGridServices.AssetServer/OpenGridServices.AssetServer.exe.build" target="doc" />
<nant buildfile="OpenSim.GridInterfaces/Remote/OpenSim.GridInterfaces.Remote.dll.build" target="doc" />
<nant buildfile="OpenSim.Physics/Manager/OpenSim.Physics.Manager.dll.build" target="doc" />
<nant buildfile="OpenSim.Terrain.BasicTerrain/OpenSim.Terrain.BasicTerrain.dll.build" target="doc" />
<nant buildfile="OpenSim.GridInterfaces/Local/OpenSim.GridInterfaces.Local.dll.build" target="doc" />
<nant buildfile="OpenSim.Storage/LocalStorageBerkeleyDB/OpenSim.Storage.LocalStorageBerkeleyDB.dll.build" target="doc" />
<nant buildfile="OpenGridServices.GridServer/OpenGridServices.GridServer.exe.build" target="doc" />
<nant buildfile="OpenGridServices.UserServer/OpenGridServices.UserServer.exe.build" target="doc" />
<nant buildfile="OpenGrid.Framework.Data.MySQL/OpenGrid.Framework.Data.MySQL.dll.build" target="doc" />
<nant buildfile="OpenUser.Config/UserConfigDb4o/OpenUser.Config.UserConfigDb4o.dll.build" target="doc" />
<nant buildfile="OpenGrid.Framework.Data/OpenGrid.Framework.Data.dll.build" target="doc" />
<nant buildfile="OpenSim.Terrain.BasicTerrain/OpenSim.Terrain.BasicTerrain.dll.build" target="doc" />
<nant buildfile="OpenGrid.Framework.Data.MSSQL/OpenGrid.Framework.Data.MSSQL.dll.build" target="doc" />
<nant buildfile="OpenSim.Scripting/EmbeddedJVM/OpenSim.Scripting.EmbeddedJVM.dll.build" target="doc" />
<nant buildfile="OpenSim.Storage/LocalStorageSQLite/OpenSim.Storage.LocalStorageSQLite.dll.build" target="doc" />
<nant buildfile="OpenSim.Framework.Console/OpenSim.Framework.Console.dll.build" target="doc" />
<nant buildfile="OpenSim.GenericConfig/Xml/OpenSim.GenericConfig.Xml.dll.build" target="doc" />
<nant buildfile="OpenSim.Storage/LocalStorageDb4o/OpenSim.Storage.LocalStorageDb4o.dll.build" target="doc" />
<nant buildfile="OpenSim.Physics/Manager/OpenSim.Physics.Manager.dll.build" target="doc" />
<nant buildfile="OpenGrid.Framework.Data.DB4o/OpenGrid.Framework.Data.DB4o.dll.build" target="doc" />
<nant buildfile="OpenSim.Framework/OpenSim.Framework.dll.build" target="doc" />
<nant buildfile="OpenSim.Physics/PhysXPlugin/OpenSim.Physics.PhysXPlugin.dll.build" target="doc" />
<nant buildfile="XmlRpcCS/XMLRPC.dll.build" target="doc" />
<nant buildfile="OpenSim.Physics/BasicPhysicsPlugin/OpenSim.Physics.BasicPhysicsPlugin.dll.build" target="doc" />
<nant buildfile="OpenSim.Physics/OdePlugin/OpenSim.Physics.OdePlugin.dll.build" target="doc" />
</target>
</project>