aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenGridServices/OpenGridServices.AssetServer
diff options
context:
space:
mode:
authorMW2007-05-26 13:40:19 +0000
committerMW2007-05-26 13:40:19 +0000
commit3436961bb5c01d659d09be134368f4f69460cef9 (patch)
tree3753ba4d7818df2a6bce0bbe863ff033cdfd568a /OpenGridServices/OpenGridServices.AssetServer
downloadopensim-SC_OLD-3436961bb5c01d659d09be134368f4f69460cef9.zip
opensim-SC_OLD-3436961bb5c01d659d09be134368f4f69460cef9.tar.gz
opensim-SC_OLD-3436961bb5c01d659d09be134368f4f69460cef9.tar.bz2
opensim-SC_OLD-3436961bb5c01d659d09be134368f4f69460cef9.tar.xz
Start of rewrite 5279!
Diffstat (limited to 'OpenGridServices/OpenGridServices.AssetServer')
-rw-r--r--OpenGridServices/OpenGridServices.AssetServer/AssetHttpServer.cs92
-rw-r--r--OpenGridServices/OpenGridServices.AssetServer/Main.cs337
-rw-r--r--OpenGridServices/OpenGridServices.AssetServer/OpenGridServices.AssetServer.csproj125
-rw-r--r--OpenGridServices/OpenGridServices.AssetServer/OpenGridServices.AssetServer.csproj.user12
-rw-r--r--OpenGridServices/OpenGridServices.AssetServer/OpenGridServices.AssetServer.exe.build50
-rw-r--r--OpenGridServices/OpenGridServices.AssetServer/OpenGridServices.GridServer.csproj126
-rw-r--r--OpenGridServices/OpenGridServices.AssetServer/OpenGridServices.GridServer.exe.build49
-rw-r--r--OpenGridServices/OpenGridServices.AssetServer/Properties/AssemblyInfo.cs33
8 files changed, 824 insertions, 0 deletions
diff --git a/OpenGridServices/OpenGridServices.AssetServer/AssetHttpServer.cs b/OpenGridServices/OpenGridServices.AssetServer/AssetHttpServer.cs
new file mode 100644
index 0000000..8439e92
--- /dev/null
+++ b/OpenGridServices/OpenGridServices.AssetServer/AssetHttpServer.cs
@@ -0,0 +1,92 @@
1using System;
2using System.Collections.Generic;
3using System.Net;
4using System.Text;
5using System.Text.RegularExpressions;
6using System.Threading;
7//using OpenSim.CAPS;
8using Nwc.XmlRpc;
9using System.Collections;
10using OpenSim.Framework.Console;
11using OpenSim.Servers;
12
13namespace OpenGridServices.AssetServer
14{
15 public class AssetHttpServer :BaseHttpServer
16 {
17 public AssetHttpServer(int port)
18 : base(port)
19 {
20 }
21
22 public override void HandleRequest(Object stateinfo)
23 {
24 try
25 {
26 HttpListenerContext context = (HttpListenerContext)stateinfo;
27
28 HttpListenerRequest request = context.Request;
29 HttpListenerResponse response = context.Response;
30
31 response.KeepAlive = false;
32 response.SendChunked = false;
33
34 System.IO.Stream body = request.InputStream;
35 System.Text.Encoding encoding = System.Text.Encoding.UTF8;
36 System.IO.StreamReader reader = new System.IO.StreamReader(body, encoding);
37
38 string requestBody = reader.ReadToEnd();
39 body.Close();
40 reader.Close();
41
42 //Console.WriteLine(request.HttpMethod + " " + request.RawUrl + " Http/" + request.ProtocolVersion.ToString() + " content type: " + request.ContentType);
43 //Console.WriteLine(requestBody);
44
45 string responseString = "";
46 switch (request.ContentType)
47 {
48 case "text/xml":
49 // must be XML-RPC, so pass to the XML-RPC parser
50
51 responseString = ParseXMLRPC(requestBody);
52 responseString = Regex.Replace(responseString, "utf-16", "utf-8");
53
54 response.AddHeader("Content-type", "text/xml");
55 break;
56
57 case "application/xml":
58 // probably LLSD we hope, otherwise it should be ignored by the parser
59 responseString = ParseLLSDXML(requestBody);
60 response.AddHeader("Content-type", "application/xml");
61 break;
62
63 case "application/x-www-form-urlencoded":
64 // a form data POST so send to the REST parser
65 responseString = ParseREST(requestBody, request.RawUrl, request.HttpMethod);
66 response.AddHeader("Content-type", "text/plain");
67 break;
68
69 case null:
70 // must be REST or invalid crap, so pass to the REST parser
71 responseString = ParseREST(requestBody, request.RawUrl, request.HttpMethod);
72 response.AddHeader("Content-type", "text/plain");
73 break;
74
75 }
76
77 Encoding Windows1252Encoding = Encoding.GetEncoding(1252);
78 byte[] buffer = Windows1252Encoding.GetBytes(responseString);
79 System.IO.Stream output = response.OutputStream;
80 response.SendChunked = false;
81 response.ContentLength64 = buffer.Length;
82 output.Write(buffer, 0, buffer.Length);
83 output.Close();
84 }
85 catch (Exception e)
86 {
87 Console.WriteLine(e.ToString());
88 }
89 }
90
91 }
92}
diff --git a/OpenGridServices/OpenGridServices.AssetServer/Main.cs b/OpenGridServices/OpenGridServices.AssetServer/Main.cs
new file mode 100644
index 0000000..adbf18b
--- /dev/null
+++ b/OpenGridServices/OpenGridServices.AssetServer/Main.cs
@@ -0,0 +1,337 @@
1/*
2Copyright (c) OpenSim project, http://osgrid.org/
3
4
5* All rights reserved.
6*
7* Redistribution and use in source and binary forms, with or without
8* modification, are permitted provided that the following conditions are met:
9* * Redistributions of source code must retain the above copyright
10* notice, this list of conditions and the following disclaimer.
11* * Redistributions in binary form must reproduce the above copyright
12* notice, this list of conditions and the following disclaimer in the
13* documentation and/or other materials provided with the distribution.
14* * Neither the name of the <organization> nor the
15* names of its contributors may be used to endorse or promote products
16* derived from this software without specific prior written permission.
17*
18* THIS SOFTWARE IS PROVIDED BY <copyright holder> ``AS IS'' AND ANY
19* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21* DISCLAIMED. IN NO EVENT SHALL <copyright holder> BE LIABLE FOR ANY
22* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
24* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
25* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
27* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28*/
29
30using System;
31using System.IO;
32using System.Text;
33using System.Timers;
34using System.Net;
35using System.Reflection;
36using System.Threading;
37using libsecondlife;
38using OpenSim.Framework;
39using OpenSim.Framework.Sims;
40using OpenSim.Framework.Console;
41using OpenSim.Framework.Types;
42using OpenSim.Framework.Interfaces;
43using OpenSim.Framework.Utilities;
44using OpenSim.Servers;
45using Db4objects.Db4o;
46using Db4objects.Db4o.Query;
47
48namespace OpenGridServices.AssetServer
49{
50 /// <summary>
51 /// </summary>
52 public class OpenAsset_Main : BaseServer, conscmd_callback
53 {
54 private IObjectContainer db;
55
56 public static OpenAsset_Main assetserver;
57
58 private ConsoleBase m_console;
59
60 [STAThread]
61 public static void Main(string[] args)
62 {
63 Console.WriteLine("Starting...\n");
64
65 assetserver = new OpenAsset_Main();
66 assetserver.Startup();
67
68 assetserver.Work();
69 }
70
71 private void Work()
72 {
73 m_console.WriteLine(OpenSim.Framework.Console.LogPriority.HIGH, "\nEnter help for a list of commands\n");
74
75 while (true)
76 {
77 m_console.MainConsolePrompt();
78 }
79 }
80
81 private OpenAsset_Main()
82 {
83 m_console = new ConsoleBase("opengrid-AssetServer-console.log", "OpenGrid", this, false);
84 MainConsole.Instance = m_console;
85 }
86
87 public void Startup()
88 {
89 m_console.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "Main.cs:Startup() - Setting up asset DB");
90 setupDB();
91
92 m_console.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "Main.cs:Startup() - Starting HTTP process");
93 AssetHttpServer httpServer = new AssetHttpServer(8003);
94
95
96 httpServer.AddRestHandler("GET", "/assets/", this.assetGetMethod);
97 httpServer.AddRestHandler("POST", "/assets/", this.assetPostMethod);
98
99 httpServer.Start();
100
101 }
102
103 public string assetPostMethod(string requestBody, string path, string param)
104 {
105 AssetBase asset = new AssetBase();
106 asset.Name = "";
107 asset.FullID = new LLUUID(param);
108 Encoding Windows1252Encoding = Encoding.GetEncoding(1252);
109 byte[] buffer = Windows1252Encoding.GetBytes(requestBody);
110 asset.Data = buffer;
111 AssetStorage store = new AssetStorage();
112 store.Data = asset.Data;
113 store.Name = asset.Name;
114 store.UUID = asset.FullID;
115 db.Set(store);
116 db.Commit();
117 return "";
118 }
119
120 public string assetGetMethod(string request, string path, string param)
121 {
122 Console.WriteLine("got a request " +param);
123 byte[] assetdata = getAssetData(new LLUUID(param), false);
124 if (assetdata != null)
125 {
126 Encoding Windows1252Encoding = Encoding.GetEncoding(1252);
127 string ret = Windows1252Encoding.GetString(assetdata);
128 //string ret = System.Text.Encoding.Unicode.GetString(assetdata);
129
130 return ret;
131
132 }
133 else
134 {
135 return "";
136 }
137
138 }
139
140 public byte[] getAssetData(LLUUID assetID, bool isTexture)
141 {
142 bool found = false;
143 AssetStorage foundAsset = null;
144
145 IObjectSet result = db.Get(new AssetStorage(assetID));
146 if (result.Count > 0)
147 {
148 foundAsset = (AssetStorage)result.Next();
149 found = true;
150 }
151
152 if (found)
153 {
154 return foundAsset.Data;
155 }
156 else
157 {
158 return null;
159 }
160 }
161
162 public void setupDB()
163 {
164 bool yapfile = System.IO.File.Exists("assets.yap");
165 try
166 {
167 db = Db4oFactory.OpenFile("assets.yap");
168 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "Main.cs:setupDB() - creation");
169 }
170 catch (Exception e)
171 {
172 db.Close();
173 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM, "Main.cs:setupDB() - Exception occured");
174 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM, e.ToString());
175 }
176 if (!yapfile)
177 {
178 this.LoadDB();
179 }
180 }
181
182 public void LoadDB()
183 {
184 try
185 {
186
187 Console.WriteLine("setting up Asset database");
188
189 AssetBase Image = new AssetBase();
190 Image.FullID = new LLUUID("00000000-0000-0000-9999-000000000001");
191 Image.Name = "Bricks";
192 this.LoadAsset(Image, true, "bricks.jp2");
193 AssetStorage store = new AssetStorage();
194 store.Data = Image.Data;
195 store.Name = Image.Name;
196 store.UUID = Image.FullID;
197 db.Set(store);
198 db.Commit();
199
200 Image = new AssetBase();
201 Image.FullID = new LLUUID("00000000-0000-0000-9999-000000000002");
202 Image.Name = "Plywood";
203 this.LoadAsset(Image, true, "plywood.jp2");
204 store = new AssetStorage();
205 store.Data = Image.Data;
206 store.Name = Image.Name;
207 store.UUID = Image.FullID;
208 db.Set(store);
209 db.Commit();
210
211 Image = new AssetBase();
212 Image.FullID = new LLUUID("00000000-0000-0000-9999-000000000003");
213 Image.Name = "Rocks";
214 this.LoadAsset(Image, true, "rocks.jp2");
215 store = new AssetStorage();
216 store.Data = Image.Data;
217 store.Name = Image.Name;
218 store.UUID = Image.FullID;
219 db.Set(store);
220 db.Commit();
221
222 Image = new AssetBase();
223 Image.FullID = new LLUUID("00000000-0000-0000-9999-000000000004");
224 Image.Name = "Granite";
225 this.LoadAsset(Image, true, "granite.jp2");
226 store = new AssetStorage();
227 store.Data = Image.Data;
228 store.Name = Image.Name;
229 store.UUID = Image.FullID;
230 db.Set(store);
231 db.Commit();
232
233 Image = new AssetBase();
234 Image.FullID = new LLUUID("00000000-0000-0000-9999-000000000005");
235 Image.Name = "Hardwood";
236 this.LoadAsset(Image, true, "hardwood.jp2");
237 store = new AssetStorage();
238 store.Data = Image.Data;
239 store.Name = Image.Name;
240 store.UUID = Image.FullID;
241 db.Set(store);
242 db.Commit();
243
244 Image = new AssetBase();
245 Image.FullID = new LLUUID("00000000-0000-0000-5005-000000000005");
246 Image.Name = "Prim Base Texture";
247 this.LoadAsset(Image, true, "plywood.jp2");
248 store = new AssetStorage();
249 store.Data = Image.Data;
250 store.Name = Image.Name;
251 store.UUID = Image.FullID;
252 db.Set(store);
253 db.Commit();
254
255 Image = new AssetBase();
256 Image.FullID = new LLUUID("66c41e39-38f9-f75a-024e-585989bfab73");
257 Image.Name = "Shape";
258 this.LoadAsset(Image, false, "base_shape.dat");
259 store = new AssetStorage();
260 store.Data = Image.Data;
261 store.Name = Image.Name;
262 store.UUID = Image.FullID;
263 db.Set(store);
264 db.Commit();
265 }
266 catch (Exception e)
267 {
268 Console.WriteLine(e.Message);
269 }
270 }
271
272 private void LoadAsset(AssetBase info, bool image, string filename)
273 {
274
275
276 string dataPath = Path.Combine(System.AppDomain.CurrentDomain.BaseDirectory, "assets"); //+ folder;
277 string fileName = Path.Combine(dataPath, filename);
278 FileInfo fInfo = new FileInfo(fileName);
279 long numBytes = fInfo.Length;
280 FileStream fStream = new FileStream(fileName, FileMode.Open, FileAccess.Read);
281 byte[] idata = new byte[numBytes];
282 BinaryReader br = new BinaryReader(fStream);
283 idata = br.ReadBytes((int)numBytes);
284 br.Close();
285 fStream.Close();
286 info.Data = idata;
287 //info.loaded=true;
288 }
289
290 /*private GridConfig LoadConfigDll(string dllName)
291 {
292 Assembly pluginAssembly = Assembly.LoadFrom(dllName);
293 GridConfig config = null;
294
295 foreach (Type pluginType in pluginAssembly.GetTypes())
296 {
297 if (pluginType.IsPublic)
298 {
299 if (!pluginType.IsAbstract)
300 {
301 Type typeInterface = pluginType.GetInterface("IGridConfig", true);
302
303 if (typeInterface != null)
304 {
305 IGridConfig plug = (IGridConfig)Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString()));
306 config = plug.GetConfigObject();
307 break;
308 }
309
310 typeInterface = null;
311 }
312 }
313 }
314 pluginAssembly = null;
315 return config;
316 }*/
317
318 public void RunCmd(string cmd, string[] cmdparams)
319 {
320 switch (cmd)
321 {
322 case "help":
323 m_console.WriteLine(OpenSim.Framework.Console.LogPriority.HIGH, "shutdown - shutdown this asset server (USE CAUTION!)");
324 break;
325
326 case "shutdown":
327 m_console.Close();
328 Environment.Exit(0);
329 break;
330 }
331 }
332
333 public void Show(string ShowWhat)
334 {
335 }
336 }
337}
diff --git a/OpenGridServices/OpenGridServices.AssetServer/OpenGridServices.AssetServer.csproj b/OpenGridServices/OpenGridServices.AssetServer/OpenGridServices.AssetServer.csproj
new file mode 100644
index 0000000..cee7b77
--- /dev/null
+++ b/OpenGridServices/OpenGridServices.AssetServer/OpenGridServices.AssetServer.csproj
@@ -0,0 +1,125 @@
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>{0021261B-0000-0000-0000-000000000000}</ProjectGuid>
7 <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
8 <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
9 <ApplicationIcon>
10 </ApplicationIcon>
11 <AssemblyKeyContainerName>
12 </AssemblyKeyContainerName>
13 <AssemblyName>OpenGridServices.AssetServer</AssemblyName>
14 <DefaultClientScript>JScript</DefaultClientScript>
15 <DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>
16 <DefaultTargetSchema>IE50</DefaultTargetSchema>
17 <DelaySign>false</DelaySign>
18 <OutputType>Exe</OutputType>
19 <AppDesignerFolder>
20 </AppDesignerFolder>
21 <RootNamespace>OpenGridServices.AssetServer</RootNamespace>
22 <StartupObject>
23 </StartupObject>
24 <FileUpgradeFlags>
25 </FileUpgradeFlags>
26 </PropertyGroup>
27 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
28 <AllowUnsafeBlocks>False</AllowUnsafeBlocks>
29 <BaseAddress>285212672</BaseAddress>
30 <CheckForOverflowUnderflow>False</CheckForOverflowUnderflow>
31 <ConfigurationOverrideFile>
32 </ConfigurationOverrideFile>
33 <DefineConstants>TRACE;DEBUG</DefineConstants>
34 <DocumentationFile>
35 </DocumentationFile>
36 <DebugSymbols>True</DebugSymbols>
37 <FileAlignment>4096</FileAlignment>
38 <Optimize>False</Optimize>
39 <OutputPath>..\..\bin\</OutputPath>
40 <RegisterForComInterop>False</RegisterForComInterop>
41 <RemoveIntegerChecks>False</RemoveIntegerChecks>
42 <TreatWarningsAsErrors>False</TreatWarningsAsErrors>
43 <WarningLevel>4</WarningLevel>
44 <NoWarn>
45 </NoWarn>
46 </PropertyGroup>
47 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
48 <AllowUnsafeBlocks>False</AllowUnsafeBlocks>
49 <BaseAddress>285212672</BaseAddress>
50 <CheckForOverflowUnderflow>False</CheckForOverflowUnderflow>
51 <ConfigurationOverrideFile>
52 </ConfigurationOverrideFile>
53 <DefineConstants>TRACE</DefineConstants>
54 <DocumentationFile>
55 </DocumentationFile>
56 <DebugSymbols>False</DebugSymbols>
57 <FileAlignment>4096</FileAlignment>
58 <Optimize>True</Optimize>
59 <OutputPath>..\..\bin\</OutputPath>
60 <RegisterForComInterop>False</RegisterForComInterop>
61 <RemoveIntegerChecks>False</RemoveIntegerChecks>
62 <TreatWarningsAsErrors>False</TreatWarningsAsErrors>
63 <WarningLevel>4</WarningLevel>
64 <NoWarn>
65 </NoWarn>
66 </PropertyGroup>
67 <ItemGroup>
68 <Reference Include="System">
69 <HintPath>System.dll</HintPath>
70 <Private>False</Private>
71 </Reference>
72 <Reference Include="System.Data">
73 <HintPath>System.Data.dll</HintPath>
74 <Private>False</Private>
75 </Reference>
76 <Reference Include="System.Xml">
77 <HintPath>System.Xml.dll</HintPath>
78 <Private>False</Private>
79 </Reference>
80 <Reference Include="OpenSim.Framework">
81 <HintPath>OpenSim.Framework.dll</HintPath>
82 <Private>False</Private>
83 </Reference>
84 <Reference Include="OpenSim.Framework.Console">
85 <HintPath>OpenSim.Framework.Console.dll</HintPath>
86 <Private>False</Private>
87 </Reference>
88 <Reference Include="OpenSim.Servers">
89 <HintPath>OpenSim.Servers.dll</HintPath>
90 <Private>False</Private>
91 </Reference>
92 <Reference Include="libsecondlife.dll">
93 <HintPath>..\..\bin\libsecondlife.dll</HintPath>
94 <Private>False</Private>
95 </Reference>
96 <Reference Include="Db4objects.Db4o.dll">
97 <HintPath>..\..\bin\Db4objects.Db4o.dll</HintPath>
98 <Private>False</Private>
99 </Reference>
100 <Reference Include="XMLRPC">
101 <HintPath>XMLRPC.dll</HintPath>
102 <Private>False</Private>
103 </Reference>
104 </ItemGroup>
105 <ItemGroup>
106 </ItemGroup>
107 <ItemGroup>
108 <Compile Include="AssetHttpServer.cs">
109 <SubType>Code</SubType>
110 </Compile>
111 <Compile Include="Main.cs">
112 <SubType>Code</SubType>
113 </Compile>
114 <Compile Include="Properties\AssemblyInfo.cs">
115 <SubType>Code</SubType>
116 </Compile>
117 </ItemGroup>
118 <Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" />
119 <PropertyGroup>
120 <PreBuildEvent>
121 </PreBuildEvent>
122 <PostBuildEvent>
123 </PostBuildEvent>
124 </PropertyGroup>
125</Project> \ No newline at end of file
diff --git a/OpenGridServices/OpenGridServices.AssetServer/OpenGridServices.AssetServer.csproj.user b/OpenGridServices/OpenGridServices.AssetServer/OpenGridServices.AssetServer.csproj.user
new file mode 100644
index 0000000..d47d65d
--- /dev/null
+++ b/OpenGridServices/OpenGridServices.AssetServer/OpenGridServices.AssetServer.csproj.user
@@ -0,0 +1,12 @@
1<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
2 <PropertyGroup>
3 <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
4 <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
5 <ReferencePath>C:\New Folder\second-life-viewer\opensim-dailys2\opensim15-07\bin\</ReferencePath>
6 <LastOpenVersion>8.0.50727</LastOpenVersion>
7 <ProjectView>ProjectFiles</ProjectView>
8 <ProjectTrust>0</ProjectTrust>
9 </PropertyGroup>
10 <PropertyGroup Condition = " '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' " />
11 <PropertyGroup Condition = " '$(Configuration)|$(Platform)' == 'Release|AnyCPU' " />
12</Project>
diff --git a/OpenGridServices/OpenGridServices.AssetServer/OpenGridServices.AssetServer.exe.build b/OpenGridServices/OpenGridServices.AssetServer/OpenGridServices.AssetServer.exe.build
new file mode 100644
index 0000000..e889a4d
--- /dev/null
+++ b/OpenGridServices/OpenGridServices.AssetServer/OpenGridServices.AssetServer.exe.build
@@ -0,0 +1,50 @@
1<?xml version="1.0" ?>
2<project name="OpenGridServices.AssetServer" 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="exe" debug="${build.debug}" unsafe="False" define="TRACE;DEBUG" output="${project::get-base-directory()}/${build.dir}/${project::get-name()}.exe">
11 <resources prefix="OpenGridServices.AssetServer" dynamicprefix="true" >
12 </resources>
13 <sources failonempty="true">
14 <include name="AssetHttpServer.cs" />
15 <include name="Main.cs" />
16 <include name="Properties/AssemblyInfo.cs" />
17 </sources>
18 <references basedir="${project::get-base-directory()}">
19 <lib>
20 <include name="${project::get-base-directory()}" />
21 <include name="${project::get-base-directory()}/${build.dir}" />
22 </lib>
23 <include name="System.dll" />
24 <include name="System.Data.dll" />
25 <include name="System.Xml.dll" />
26 <include name="../../bin/OpenSim.Framework.dll" />
27 <include name="../../bin/OpenSim.Framework.Console.dll" />
28 <include name="../../bin/OpenSim.GridInterfaces.Local.dll" />
29 <include name="../../bin/OpenSim.Servers.dll" />
30 <include name="../../bin/libsecondlife.dll" />
31 <include name="../../bin/Db4objects.Db4o.dll" />
32 <include name="../../bin/XMLRPC.dll" />
33 </references>
34 </csc>
35 <echo message="Copying from [${project::get-base-directory()}/${build.dir}/] to [${project::get-base-directory()}/../../bin/" />
36 <mkdir dir="${project::get-base-directory()}/../../bin/"/>
37 <copy todir="${project::get-base-directory()}/../../bin/">
38 <fileset basedir="${project::get-base-directory()}/${build.dir}/" >
39 <include name="*.dll"/>
40 <include name="*.exe"/>
41 </fileset>
42 </copy>
43 </target>
44 <target name="clean">
45 <delete dir="${bin.dir}" failonerror="false" />
46 <delete dir="${obj.dir}" failonerror="false" />
47 </target>
48 <target name="doc" description="Creates documentation.">
49 </target>
50</project>
diff --git a/OpenGridServices/OpenGridServices.AssetServer/OpenGridServices.GridServer.csproj b/OpenGridServices/OpenGridServices.AssetServer/OpenGridServices.GridServer.csproj
new file mode 100644
index 0000000..9b8cc87
--- /dev/null
+++ b/OpenGridServices/OpenGridServices.AssetServer/OpenGridServices.GridServer.csproj
@@ -0,0 +1,126 @@
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>{21BFC8E2-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>OpenGridServices.GridServer</AssemblyName>
13 <DefaultClientScript>JScript</DefaultClientScript>
14 <DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>
15 <DefaultTargetSchema>IE50</DefaultTargetSchema>
16 <DelaySign>false</DelaySign>
17 <OutputType>Exe</OutputType>
18 <AppDesignerFolder></AppDesignerFolder>
19 <RootNamespace>OpenGridServices.GridServer</RootNamespace>
20 <StartupObject></StartupObject>
21 <FileUpgradeFlags>
22 </FileUpgradeFlags>
23 </PropertyGroup>
24 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
25 <AllowUnsafeBlocks>False</AllowUnsafeBlocks>
26 <BaseAddress>285212672</BaseAddress>
27 <CheckForOverflowUnderflow>False</CheckForOverflowUnderflow>
28 <ConfigurationOverrideFile>
29 </ConfigurationOverrideFile>
30 <DefineConstants>TRACE;DEBUG</DefineConstants>
31 <DocumentationFile></DocumentationFile>
32 <DebugSymbols>True</DebugSymbols>
33 <FileAlignment>4096</FileAlignment>
34 <Optimize>False</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)' == 'Release|AnyCPU' ">
43 <AllowUnsafeBlocks>False</AllowUnsafeBlocks>
44 <BaseAddress>285212672</BaseAddress>
45 <CheckForOverflowUnderflow>False</CheckForOverflowUnderflow>
46 <ConfigurationOverrideFile>
47 </ConfigurationOverrideFile>
48 <DefineConstants>TRACE</DefineConstants>
49 <DocumentationFile></DocumentationFile>
50 <DebugSymbols>False</DebugSymbols>
51 <FileAlignment>4096</FileAlignment>
52 <Optimize>True</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" >
66 <HintPath>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>{8ACA2445-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>{A7CD0630-0000-0000-0000-000000000000}</Project>
92 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
93 <Private>False</Private>
94 </ProjectReference>
95 <ProjectReference Include="..\OpenSim.Servers\OpenSim.Servers.csproj">
96 <Name>OpenSim.Servers</Name>
97 <Project>{8BB20F0A-0000-0000-0000-000000000000}</Project>
98 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
99 <Private>False</Private>
100 </ProjectReference>
101 <ProjectReference Include="..\XmlRpcCS\XMLRPC.csproj">
102 <Name>XMLRPC</Name>
103 <Project>{8E81D43C-0000-0000-0000-000000000000}</Project>
104 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
105 <Private>False</Private>
106 </ProjectReference>
107 </ItemGroup>
108 <ItemGroup>
109 <Compile Include="Main.cs">
110 <SubType>Code</SubType>
111 </Compile>
112 <Compile Include="SimProfiles.cs">
113 <SubType>Code</SubType>
114 </Compile>
115 <Compile Include="Properties\AssemblyInfo.cs">
116 <SubType>Code</SubType>
117 </Compile>
118 </ItemGroup>
119 <Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" />
120 <PropertyGroup>
121 <PreBuildEvent>
122 </PreBuildEvent>
123 <PostBuildEvent>
124 </PostBuildEvent>
125 </PropertyGroup>
126</Project>
diff --git a/OpenGridServices/OpenGridServices.AssetServer/OpenGridServices.GridServer.exe.build b/OpenGridServices/OpenGridServices.AssetServer/OpenGridServices.GridServer.exe.build
new file mode 100644
index 0000000..6bef534
--- /dev/null
+++ b/OpenGridServices/OpenGridServices.AssetServer/OpenGridServices.GridServer.exe.build
@@ -0,0 +1,49 @@
1<?xml version="1.0" ?>
2<project name="OpenGridServices.GridServer" 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="exe" debug="${build.debug}" unsafe="False" define="TRACE" output="${project::get-base-directory()}/${build.dir}/${project::get-name()}.exe">
11 <resources prefix="OpenGridServices.GridServer" dynamicprefix="true" >
12 </resources>
13 <sources failonempty="true">
14 <include name="Main.cs" />
15 <include name="SimProfiles.cs" />
16 <include name="Properties/AssemblyInfo.cs" />
17 </sources>
18 <references basedir="${project::get-base-directory()}">
19 <lib>
20 <include name="${project::get-base-directory()}" />
21 <include name="${project::get-base-directory()}/${build.dir}" />
22 </lib>
23 <include name="System.dll" />
24 <include name="System.Data.dll" />
25 <include name="System.Xml.dll" />
26 <include name="../bin/OpenSim.Framework.dll" />
27 <include name="../bin/OpenSim.Framework.Console.dll" />
28 <include name="../bin/OpenSim.Servers.dll" />
29 <include name="../bin/libsecondlife.dll" />
30 <include name="../bin/Db4objects.Db4o.dll" />
31 <include name="../bin/XMLRPC.dll" />
32 </references>
33 </csc>
34 <echo message="Copying from [${project::get-base-directory()}/${build.dir}/] to [${project::get-base-directory()}/../bin/" />
35 <mkdir dir="${project::get-base-directory()}/../bin/"/>
36 <copy todir="${project::get-base-directory()}/../bin/">
37 <fileset basedir="${project::get-base-directory()}/${build.dir}/" >
38 <include name="*.dll"/>
39 <include name="*.exe"/>
40 </fileset>
41 </copy>
42 </target>
43 <target name="clean">
44 <delete dir="${bin.dir}" failonerror="false" />
45 <delete dir="${obj.dir}" failonerror="false" />
46 </target>
47 <target name="doc" description="Creates documentation.">
48 </target>
49</project>
diff --git a/OpenGridServices/OpenGridServices.AssetServer/Properties/AssemblyInfo.cs b/OpenGridServices/OpenGridServices.AssetServer/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..7014284
--- /dev/null
+++ b/OpenGridServices/OpenGridServices.AssetServer/Properties/AssemblyInfo.cs
@@ -0,0 +1,33 @@
1using System.Reflection;
2using System.Runtime.CompilerServices;
3using System.Runtime.InteropServices;
4
5// General Information about an assembly is controlled through the following
6// set of attributes. Change these attribute values to modify the information
7// associated with an assembly.
8[assembly: AssemblyTitle("OGS-AssetServer")]
9[assembly: AssemblyDescription("")]
10[assembly: AssemblyConfiguration("")]
11[assembly: AssemblyCompany("")]
12[assembly: AssemblyProduct("OGS-AssetServer")]
13[assembly: AssemblyCopyright("Copyright © 2007")]
14[assembly: AssemblyTrademark("")]
15[assembly: AssemblyCulture("")]
16
17// Setting ComVisible to false makes the types in this assembly not visible
18// to COM components. If you need to access a type in this assembly from
19// COM, set the ComVisible attribute to true on that type.
20[assembly: ComVisible(false)]
21
22// The following GUID is for the ID of the typelib if this project is exposed to COM
23[assembly: Guid("b541b244-3d1d-4625-9003-bc2a3a6a39a4")]
24
25// Version information for an assembly consists of the following four values:
26//
27// Major Version
28// Minor Version
29// Build Number
30// Revision
31//
32[assembly: AssemblyVersion("1.0.0.0")]
33[assembly: AssemblyFileVersion("1.0.0.0")]