diff options
author | gareth | 2007-04-02 10:14:36 +0000 |
---|---|---|
committer | gareth | 2007-04-02 10:14:36 +0000 |
commit | 489ab5a0d2a8d190e472f153de4e1d0e6b5cff13 (patch) | |
tree | 15f5a8a4175e284e738618f7049ab9438221812f /OpenUser.Config | |
parent | More renaming (diff) | |
download | opensim-SC-489ab5a0d2a8d190e472f153de4e1d0e6b5cff13.zip opensim-SC-489ab5a0d2a8d190e472f153de4e1d0e6b5cff13.tar.gz opensim-SC-489ab5a0d2a8d190e472f153de4e1d0e6b5cff13.tar.bz2 opensim-SC-489ab5a0d2a8d190e472f153de4e1d0e6b5cff13.tar.xz |
Added OpenUser.Config project
Diffstat (limited to 'OpenUser.Config')
3 files changed, 179 insertions, 39 deletions
diff --git a/OpenUser.Config/UserConfigDb4o/DbUserConfig.cs b/OpenUser.Config/UserConfigDb4o/DbUserConfig.cs index 1084467..f18e373 100644 --- a/OpenUser.Config/UserConfigDb4o/DbUserConfig.cs +++ b/OpenUser.Config/UserConfigDb4o/DbUserConfig.cs | |||
@@ -30,54 +30,42 @@ using OpenSim.Framework.Console; | |||
30 | using OpenSim.Framework.Interfaces; | 30 | using OpenSim.Framework.Interfaces; |
31 | using Db4objects.Db4o; | 31 | using Db4objects.Db4o; |
32 | 32 | ||
33 | namespace OpenGrid.Config.GridConfigDb4o | 33 | namespace OpenUser.Config.UserConfigDb4o |
34 | { | 34 | { |
35 | public class Db40ConfigPlugin: IGridConfig | 35 | public class Db4oConfigPlugin: IUserConfig |
36 | { | 36 | { |
37 | public GridConfig GetConfigObject() | 37 | public UserConfig GetConfigObject() |
38 | { | 38 | { |
39 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Loading Db40Config dll"); | 39 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Loading Db40Config dll"); |
40 | return ( new DbGridConfig()); | 40 | return ( new DbUserConfig()); |
41 | } | 41 | } |
42 | } | 42 | } |
43 | 43 | ||
44 | public class DbGridConfig : GridConfig | 44 | public class DbUserConfig : UserConfig |
45 | { | 45 | { |
46 | private IObjectContainer db; | 46 | private IObjectContainer db; |
47 | 47 | ||
48 | public void LoadDefaults() { | 48 | public void LoadDefaults() { |
49 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Config.cs:LoadDefaults() - Please press enter to retain default or enter new settings"); | 49 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Config.cs:LoadDefaults() - Please press enter to retain default or enter new settings"); |
50 | 50 | ||
51 | this.GridOwner = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("Grid owner [OGS development team]: ", "OGS development team"); | 51 | this.DefaultStartupMsg = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("Default startup message [Welcome to OGS]: ", "Welcome to OGS"); |
52 | 52 | ||
53 | this.DefaultAssetServer = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("Default asset server [no default]: "); | 53 | this.GridServerURL = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("Grid server URL: "); |
54 | this.AssetSendKey = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("Key to send to asset server: "); | 54 | this.GridSendKey = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("Key to send to grid server: "); |
55 | this.AssetRecvKey = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("Key to expect from asset server: "); | 55 | this.GridRecvKey = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("Key to expect from grid server: "); |
56 | |||
57 | this.DefaultUserServer = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("Default user server [no default]: "); | ||
58 | this.UserSendKey = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("Key to send to user server: "); | ||
59 | this.UserRecvKey = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("Key to expect from user server: "); | ||
60 | |||
61 | this.SimSendKey = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("Key to send to sims: "); | ||
62 | this.SimRecvKey = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("Key to expect from sims: "); | ||
63 | } | 56 | } |
64 | 57 | ||
65 | public override void InitConfig() { | 58 | public override void InitConfig() { |
66 | try { | 59 | try { |
67 | db = Db4oFactory.OpenFile("opengrid.yap"); | 60 | db = Db4oFactory.OpenFile("openuser.yap"); |
68 | IObjectSet result = db.Get(typeof(DbGridConfig)); | 61 | IObjectSet result = db.Get(typeof(DbUserConfig)); |
69 | if(result.Count==1) { | 62 | if(result.Count==1) { |
70 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Config.cs:InitConfig() - Found a GridConfig object in the local database, loading"); | 63 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Config.cs:InitConfig() - Found a UserConfig object in the local database, loading"); |
71 | foreach (DbGridConfig cfg in result) { | 64 | foreach (DbUserConfig cfg in result) { |
72 | this.GridOwner=cfg.GridOwner; | 65 | this.GridServerURL=cfg.GridServerURL; |
73 | this.DefaultAssetServer=cfg.DefaultAssetServer; | 66 | this.GridSendKey=cfg.GridSendKey; |
74 | this.AssetSendKey=cfg.AssetSendKey; | 67 | this.GridRecvKey=cfg.GridRecvKey; |
75 | this.AssetRecvKey=cfg.AssetRecvKey; | 68 | this.DefaultStartupMsg=cfg.DefaultStartupMsg; |
76 | this.DefaultUserServer=cfg.DefaultUserServer; | ||
77 | this.UserSendKey=cfg.UserSendKey; | ||
78 | this.UserRecvKey=cfg.UserRecvKey; | ||
79 | this.SimSendKey=cfg.SimSendKey; | ||
80 | this.SimRecvKey=cfg.SimRecvKey; | ||
81 | } | 69 | } |
82 | } else { | 70 | } else { |
83 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Config.cs:InitConfig() - Could not find object in database, loading precompiled defaults"); | 71 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Config.cs:InitConfig() - Could not find object in database, loading precompiled defaults"); |
@@ -91,16 +79,11 @@ namespace OpenGrid.Config.GridConfigDb4o | |||
91 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine(e.ToString()); | 79 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine(e.ToString()); |
92 | } | 80 | } |
93 | 81 | ||
94 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Grid settings loaded:"); | 82 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine("User settings loaded:"); |
95 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Grid owner: " + this.GridOwner); | 83 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Default startup message: " + this.DefaultStartupMsg); |
96 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Default asset server: " + this.DefaultAssetServer); | 84 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Grid server URL: " + this.GridServerURL); |
97 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Key to send to asset server: " + this.AssetSendKey); | 85 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Key to send to grid: " + this.GridSendKey); |
98 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Key to expect from asset server: " + this.AssetRecvKey); | 86 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Key to expect from sims: " + this.GridRecvKey); |
99 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Default user server: " + this.DefaultUserServer); | ||
100 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Key to send to user server: " + this.UserSendKey); | ||
101 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Key to expect from user server: " + this.UserRecvKey); | ||
102 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Key to send to sims: " + this.SimSendKey); | ||
103 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Key to expect from sims: " + this.SimRecvKey); | ||
104 | } | 87 | } |
105 | 88 | ||
106 | 89 | ||
diff --git a/OpenUser.Config/UserConfigDb4o/OpenUser.Config.UserConfigDb4o.csproj b/OpenUser.Config/UserConfigDb4o/OpenUser.Config.UserConfigDb4o.csproj new file mode 100644 index 0000000..f61b523 --- /dev/null +++ b/OpenUser.Config/UserConfigDb4o/OpenUser.Config.UserConfigDb4o.csproj | |||
@@ -0,0 +1,111 @@ | |||
1 | <Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
2 | <PropertyGroup> | ||
3 | <ProjectType>Local</ProjectType> | ||
4 | <ProductVersion>8.0.50727</ProductVersion> | ||
5 | <SchemaVersion>2.0</SchemaVersion> | ||
6 | <ProjectGuid>{193C1C99-0000-0000-0000-000000000000}</ProjectGuid> | ||
7 | <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | ||
8 | <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | ||
9 | <ApplicationIcon></ApplicationIcon> | ||
10 | <AssemblyKeyContainerName> | ||
11 | </AssemblyKeyContainerName> | ||
12 | <AssemblyName>OpenUser.Config.UserConfigDb4o</AssemblyName> | ||
13 | <DefaultClientScript>JScript</DefaultClientScript> | ||
14 | <DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout> | ||
15 | <DefaultTargetSchema>IE50</DefaultTargetSchema> | ||
16 | <DelaySign>false</DelaySign> | ||
17 | <OutputType>Library</OutputType> | ||
18 | <AppDesignerFolder></AppDesignerFolder> | ||
19 | <RootNamespace>OpenUser.Config.UserConfigDb4o</RootNamespace> | ||
20 | <StartupObject></StartupObject> | ||
21 | <FileUpgradeFlags> | ||
22 | </FileUpgradeFlags> | ||
23 | </PropertyGroup> | ||
24 | <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> | ||
25 | <AllowUnsafeBlocks>False</AllowUnsafeBlocks> | ||
26 | <BaseAddress>285212672</BaseAddress> | ||
27 | <CheckForOverflowUnderflow>False</CheckForOverflowUnderflow> | ||
28 | <ConfigurationOverrideFile> | ||
29 | </ConfigurationOverrideFile> | ||
30 | <DefineConstants>TRACE</DefineConstants> | ||
31 | <DocumentationFile></DocumentationFile> | ||
32 | <DebugSymbols>False</DebugSymbols> | ||
33 | <FileAlignment>4096</FileAlignment> | ||
34 | <Optimize>True</Optimize> | ||
35 | <OutputPath>../../bin/</OutputPath> | ||
36 | <RegisterForComInterop>False</RegisterForComInterop> | ||
37 | <RemoveIntegerChecks>False</RemoveIntegerChecks> | ||
38 | <TreatWarningsAsErrors>False</TreatWarningsAsErrors> | ||
39 | <WarningLevel>4</WarningLevel> | ||
40 | <NoWarn></NoWarn> | ||
41 | </PropertyGroup> | ||
42 | <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> | ||
43 | <AllowUnsafeBlocks>False</AllowUnsafeBlocks> | ||
44 | <BaseAddress>285212672</BaseAddress> | ||
45 | <CheckForOverflowUnderflow>False</CheckForOverflowUnderflow> | ||
46 | <ConfigurationOverrideFile> | ||
47 | </ConfigurationOverrideFile> | ||
48 | <DefineConstants>TRACE;DEBUG</DefineConstants> | ||
49 | <DocumentationFile></DocumentationFile> | ||
50 | <DebugSymbols>True</DebugSymbols> | ||
51 | <FileAlignment>4096</FileAlignment> | ||
52 | <Optimize>False</Optimize> | ||
53 | <OutputPath>../../bin/</OutputPath> | ||
54 | <RegisterForComInterop>False</RegisterForComInterop> | ||
55 | <RemoveIntegerChecks>False</RemoveIntegerChecks> | ||
56 | <TreatWarningsAsErrors>False</TreatWarningsAsErrors> | ||
57 | <WarningLevel>4</WarningLevel> | ||
58 | <NoWarn></NoWarn> | ||
59 | </PropertyGroup> | ||
60 | <ItemGroup> | ||
61 | <Reference Include="System" > | ||
62 | <HintPath>System.dll</HintPath> | ||
63 | <Private>False</Private> | ||
64 | </Reference> | ||
65 | <Reference Include="System.Data.dll" > | ||
66 | <HintPath>..\..\bin\System.Data.dll</HintPath> | ||
67 | <Private>False</Private> | ||
68 | </Reference> | ||
69 | <Reference Include="System.Xml" > | ||
70 | <HintPath>System.Xml.dll</HintPath> | ||
71 | <Private>False</Private> | ||
72 | </Reference> | ||
73 | <Reference Include="libsecondlife.dll" > | ||
74 | <HintPath>..\..\bin\libsecondlife.dll</HintPath> | ||
75 | <Private>False</Private> | ||
76 | </Reference> | ||
77 | <Reference Include="Db4objects.Db4o.dll" > | ||
78 | <HintPath>..\..\bin\Db4objects.Db4o.dll</HintPath> | ||
79 | <Private>False</Private> | ||
80 | </Reference> | ||
81 | </ItemGroup> | ||
82 | <ItemGroup> | ||
83 | <ProjectReference Include="../../OpenSim.Framework/OpenSim.Framework.csproj"> | ||
84 | <Name>OpenSim.Framework</Name> | ||
85 | <Project>{7404933D-0000-0000-0000-000000000000}</Project> | ||
86 | <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package> | ||
87 | <Private>False</Private> | ||
88 | </ProjectReference> | ||
89 | <ProjectReference Include="../../OpenSim.Framework.Console/OpenSim.Framework.Console.csproj"> | ||
90 | <Name>OpenSim.Framework.Console</Name> | ||
91 | <Project>{16759386-0000-0000-0000-000000000000}</Project> | ||
92 | <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package> | ||
93 | <Private>False</Private> | ||
94 | </ProjectReference> | ||
95 | </ItemGroup> | ||
96 | <ItemGroup> | ||
97 | <Compile Include="AssemblyInfo.cs"> | ||
98 | <SubType>Code</SubType> | ||
99 | </Compile> | ||
100 | <Compile Include="DbUserConfig.cs"> | ||
101 | <SubType>Code</SubType> | ||
102 | </Compile> | ||
103 | </ItemGroup> | ||
104 | <Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" /> | ||
105 | <PropertyGroup> | ||
106 | <PreBuildEvent> | ||
107 | </PreBuildEvent> | ||
108 | <PostBuildEvent> | ||
109 | </PostBuildEvent> | ||
110 | </PropertyGroup> | ||
111 | </Project> | ||
diff --git a/OpenUser.Config/UserConfigDb4o/OpenUser.Config.UserConfigDb4o.dll.build b/OpenUser.Config/UserConfigDb4o/OpenUser.Config.UserConfigDb4o.dll.build new file mode 100644 index 0000000..0abcfa1 --- /dev/null +++ b/OpenUser.Config/UserConfigDb4o/OpenUser.Config.UserConfigDb4o.dll.build | |||
@@ -0,0 +1,46 @@ | |||
1 | <?xml version="1.0" ?> | ||
2 | <project name="OpenUser.Config.UserConfigDb4o" default="build"> | ||
3 | <target name="build"> | ||
4 | <echo message="Build Directory is ${project::get-base-directory()}/${build.dir}" /> | ||
5 | <mkdir dir="${project::get-base-directory()}/${build.dir}" /> | ||
6 | <copy todir="${project::get-base-directory()}/${build.dir}"> | ||
7 | <fileset basedir="${project::get-base-directory()}"> | ||
8 | </fileset> | ||
9 | </copy> | ||
10 | <csc target="library" debug="${build.debug}" unsafe="False" define="TRACE" output="${project::get-base-directory()}/${build.dir}/${project::get-name()}.dll"> | ||
11 | <resources prefix="OpenUser.Config.UserConfigDb4o" dynamicprefix="true" > | ||
12 | </resources> | ||
13 | <sources failonempty="true"> | ||
14 | <include name="AssemblyInfo.cs" /> | ||
15 | <include name="DbUserConfig.cs" /> | ||
16 | </sources> | ||
17 | <references basedir="${project::get-base-directory()}"> | ||
18 | <lib> | ||
19 | <include name="${project::get-base-directory()}" /> | ||
20 | <include name="${project::get-base-directory()}/${build.dir}" /> | ||
21 | </lib> | ||
22 | <include name="System.dll" /> | ||
23 | <include name="System.Data.dll.dll" /> | ||
24 | <include name="System.Xml.dll" /> | ||
25 | <include name="../../bin/libsecondlife.dll" /> | ||
26 | <include name="../../bin/Db4objects.Db4o.dll" /> | ||
27 | <include name="../../bin/OpenSim.Framework.dll" /> | ||
28 | <include name="../../bin/OpenSim.Framework.Console.dll" /> | ||
29 | </references> | ||
30 | </csc> | ||
31 | <echo message="Copying from [${project::get-base-directory()}/${build.dir}/] to [${project::get-base-directory()}/../../bin/" /> | ||
32 | <mkdir dir="${project::get-base-directory()}/../../bin/"/> | ||
33 | <copy todir="${project::get-base-directory()}/../../bin/"> | ||
34 | <fileset basedir="${project::get-base-directory()}/${build.dir}/" > | ||
35 | <include name="*.dll"/> | ||
36 | <include name="*.exe"/> | ||
37 | </fileset> | ||
38 | </copy> | ||
39 | </target> | ||
40 | <target name="clean"> | ||
41 | <delete dir="${bin.dir}" failonerror="false" /> | ||
42 | <delete dir="${obj.dir}" failonerror="false" /> | ||
43 | </target> | ||
44 | <target name="doc" description="Creates documentation."> | ||
45 | </target> | ||
46 | </project> | ||