Changed so that a bin\ScriptEngines\ directory will be searched for scripting Engines.
Added the work in progress JVM scripting engine.0.1-prestable
parent
435d61661b
commit
ffd7a6b8c2
|
@ -7,7 +7,7 @@
|
||||||
<fileset basedir="${project::get-base-directory()}">
|
<fileset basedir="${project::get-base-directory()}">
|
||||||
</fileset>
|
</fileset>
|
||||||
</copy>
|
</copy>
|
||||||
<csc target="library" debug="${build.debug}" unsafe="False" define="TRACE" output="${project::get-base-directory()}/${build.dir}/${project::get-name()}.dll">
|
<csc target="library" debug="${build.debug}" unsafe="False" define="TRACE;DEBUG" output="${project::get-base-directory()}/${build.dir}/${project::get-name()}.dll">
|
||||||
<resources prefix="OpenGrid.Config.GridConfigDb4o" dynamicprefix="true" >
|
<resources prefix="OpenGrid.Config.GridConfigDb4o" dynamicprefix="true" >
|
||||||
</resources>
|
</resources>
|
||||||
<sources failonempty="true">
|
<sources failonempty="true">
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
<fileset basedir="${project::get-base-directory()}">
|
<fileset basedir="${project::get-base-directory()}">
|
||||||
</fileset>
|
</fileset>
|
||||||
</copy>
|
</copy>
|
||||||
<csc target="exe" debug="${build.debug}" unsafe="False" define="TRACE" output="${project::get-base-directory()}/${build.dir}/${project::get-name()}.exe">
|
<csc target="exe" debug="${build.debug}" unsafe="False" define="TRACE;DEBUG" output="${project::get-base-directory()}/${build.dir}/${project::get-name()}.exe">
|
||||||
<resources prefix="OpenGridServices.GridServer" dynamicprefix="true" >
|
<resources prefix="OpenGridServices.GridServer" dynamicprefix="true" >
|
||||||
</resources>
|
</resources>
|
||||||
<sources failonempty="true">
|
<sources failonempty="true">
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
<fileset basedir="${project::get-base-directory()}">
|
<fileset basedir="${project::get-base-directory()}">
|
||||||
</fileset>
|
</fileset>
|
||||||
</copy>
|
</copy>
|
||||||
<csc target="exe" debug="${build.debug}" unsafe="False" define="TRACE" output="${project::get-base-directory()}/${build.dir}/${project::get-name()}.exe">
|
<csc target="exe" debug="${build.debug}" unsafe="False" define="TRACE;DEBUG" output="${project::get-base-directory()}/${build.dir}/${project::get-name()}.exe">
|
||||||
<resources prefix="OpenGridServices.UserServer" dynamicprefix="true" >
|
<resources prefix="OpenGridServices.UserServer" dynamicprefix="true" >
|
||||||
</resources>
|
</resources>
|
||||||
<sources failonempty="true">
|
<sources failonempty="true">
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
<fileset basedir="${project::get-base-directory()}">
|
<fileset basedir="${project::get-base-directory()}">
|
||||||
</fileset>
|
</fileset>
|
||||||
</copy>
|
</copy>
|
||||||
<csc target="library" debug="${build.debug}" unsafe="False" define="TRACE" output="${project::get-base-directory()}/${build.dir}/${project::get-name()}.dll">
|
<csc target="library" debug="${build.debug}" unsafe="False" define="TRACE;DEBUG" output="${project::get-base-directory()}/${build.dir}/${project::get-name()}.dll">
|
||||||
<resources prefix="OpenSim.Framework.Console" dynamicprefix="true" >
|
<resources prefix="OpenSim.Framework.Console" dynamicprefix="true" >
|
||||||
</resources>
|
</resources>
|
||||||
<sources failonempty="true">
|
<sources failonempty="true">
|
||||||
|
|
|
@ -111,6 +111,12 @@
|
||||||
<Compile Include="ILocalStorage.cs">
|
<Compile Include="ILocalStorage.cs">
|
||||||
<SubType>Code</SubType>
|
<SubType>Code</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<Compile Include="IScriptAPI.cs">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="IScriptEngine.cs">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
<Compile Include="IUserConfig.cs">
|
<Compile Include="IUserConfig.cs">
|
||||||
<SubType>Code</SubType>
|
<SubType>Code</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
@ -129,6 +135,9 @@
|
||||||
<Compile Include="NeighbourInfo.cs">
|
<Compile Include="NeighbourInfo.cs">
|
||||||
<SubType>Code</SubType>
|
<SubType>Code</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<Compile Include="OSVector3.cs">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
<Compile Include="PrimData.cs">
|
<Compile Include="PrimData.cs">
|
||||||
<SubType>Code</SubType>
|
<SubType>Code</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
<fileset basedir="${project::get-base-directory()}">
|
<fileset basedir="${project::get-base-directory()}">
|
||||||
</fileset>
|
</fileset>
|
||||||
</copy>
|
</copy>
|
||||||
<csc target="library" debug="${build.debug}" unsafe="False" define="TRACE" output="${project::get-base-directory()}/${build.dir}/${project::get-name()}.dll">
|
<csc target="library" debug="${build.debug}" unsafe="False" define="TRACE;DEBUG" output="${project::get-base-directory()}/${build.dir}/${project::get-name()}.dll">
|
||||||
<resources prefix="OpenSim.Framework" dynamicprefix="true" >
|
<resources prefix="OpenSim.Framework" dynamicprefix="true" >
|
||||||
</resources>
|
</resources>
|
||||||
<sources failonempty="true">
|
<sources failonempty="true">
|
||||||
|
@ -22,12 +22,15 @@
|
||||||
<include name="IGridConfig.cs" />
|
<include name="IGridConfig.cs" />
|
||||||
<include name="IGridServer.cs" />
|
<include name="IGridServer.cs" />
|
||||||
<include name="ILocalStorage.cs" />
|
<include name="ILocalStorage.cs" />
|
||||||
|
<include name="IScriptAPI.cs" />
|
||||||
|
<include name="IScriptEngine.cs" />
|
||||||
<include name="IUserConfig.cs" />
|
<include name="IUserConfig.cs" />
|
||||||
<include name="IUserServer.cs" />
|
<include name="IUserServer.cs" />
|
||||||
<include name="LocalGridBase.cs" />
|
<include name="LocalGridBase.cs" />
|
||||||
<include name="Login.cs" />
|
<include name="Login.cs" />
|
||||||
<include name="LoginService.cs" />
|
<include name="LoginService.cs" />
|
||||||
<include name="NeighbourInfo.cs" />
|
<include name="NeighbourInfo.cs" />
|
||||||
|
<include name="OSVector3.cs" />
|
||||||
<include name="PrimData.cs" />
|
<include name="PrimData.cs" />
|
||||||
<include name="RemoteGridBase.cs" />
|
<include name="RemoteGridBase.cs" />
|
||||||
<include name="SimProfile.cs" />
|
<include name="SimProfile.cs" />
|
||||||
|
|
|
@ -185,8 +185,6 @@ namespace OpenSim.Framework.User
|
||||||
response.Value = responseData;
|
response.Value = responseData;
|
||||||
// TheUser.SendDataToSim(SimInfo);
|
// TheUser.SendDataToSim(SimInfo);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
catch (Exception E)
|
catch (Exception E)
|
||||||
{
|
{
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
<fileset basedir="${project::get-base-directory()}">
|
<fileset basedir="${project::get-base-directory()}">
|
||||||
</fileset>
|
</fileset>
|
||||||
</copy>
|
</copy>
|
||||||
<csc target="library" debug="${build.debug}" unsafe="False" define="TRACE" output="${project::get-base-directory()}/${build.dir}/${project::get-name()}.dll">
|
<csc target="library" debug="${build.debug}" unsafe="False" define="TRACE;DEBUG" output="${project::get-base-directory()}/${build.dir}/${project::get-name()}.dll">
|
||||||
<resources prefix="OpenSim.GenericConfig.Xml" dynamicprefix="true" >
|
<resources prefix="OpenSim.GenericConfig.Xml" dynamicprefix="true" >
|
||||||
</resources>
|
</resources>
|
||||||
<sources failonempty="true">
|
<sources failonempty="true">
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
<fileset basedir="${project::get-base-directory()}">
|
<fileset basedir="${project::get-base-directory()}">
|
||||||
</fileset>
|
</fileset>
|
||||||
</copy>
|
</copy>
|
||||||
<csc target="library" debug="${build.debug}" unsafe="False" define="TRACE" output="${project::get-base-directory()}/${build.dir}/${project::get-name()}.dll">
|
<csc target="library" debug="${build.debug}" unsafe="False" define="TRACE;DEBUG" output="${project::get-base-directory()}/${build.dir}/${project::get-name()}.dll">
|
||||||
<resources prefix="OpenSim.GridInterfaces.Local" dynamicprefix="true" >
|
<resources prefix="OpenSim.GridInterfaces.Local" dynamicprefix="true" >
|
||||||
</resources>
|
</resources>
|
||||||
<sources failonempty="true">
|
<sources failonempty="true">
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
<fileset basedir="${project::get-base-directory()}">
|
<fileset basedir="${project::get-base-directory()}">
|
||||||
</fileset>
|
</fileset>
|
||||||
</copy>
|
</copy>
|
||||||
<csc target="library" debug="${build.debug}" unsafe="False" define="TRACE" output="${project::get-base-directory()}/${build.dir}/${project::get-name()}.dll">
|
<csc target="library" debug="${build.debug}" unsafe="False" define="TRACE;DEBUG" output="${project::get-base-directory()}/${build.dir}/${project::get-name()}.dll">
|
||||||
<resources prefix="OpenSim.GridInterfaces.Remote" dynamicprefix="true" >
|
<resources prefix="OpenSim.GridInterfaces.Remote" dynamicprefix="true" >
|
||||||
</resources>
|
</resources>
|
||||||
<sources failonempty="true">
|
<sources failonempty="true">
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
<fileset basedir="${project::get-base-directory()}">
|
<fileset basedir="${project::get-base-directory()}">
|
||||||
</fileset>
|
</fileset>
|
||||||
</copy>
|
</copy>
|
||||||
<csc target="library" debug="${build.debug}" unsafe="False" define="TRACE" output="${project::get-base-directory()}/${build.dir}/${project::get-name()}.dll">
|
<csc target="library" debug="${build.debug}" unsafe="False" define="TRACE;DEBUG" output="${project::get-base-directory()}/${build.dir}/${project::get-name()}.dll">
|
||||||
<resources prefix="OpenSim.Physics.BasicPhysicsPlugin" dynamicprefix="true" >
|
<resources prefix="OpenSim.Physics.BasicPhysicsPlugin" dynamicprefix="true" >
|
||||||
</resources>
|
</resources>
|
||||||
<sources failonempty="true">
|
<sources failonempty="true">
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
<fileset basedir="${project::get-base-directory()}">
|
<fileset basedir="${project::get-base-directory()}">
|
||||||
</fileset>
|
</fileset>
|
||||||
</copy>
|
</copy>
|
||||||
<csc target="library" debug="${build.debug}" unsafe="False" define="TRACE" output="${project::get-base-directory()}/${build.dir}/${project::get-name()}.dll">
|
<csc target="library" debug="${build.debug}" unsafe="False" define="TRACE;DEBUG" output="${project::get-base-directory()}/${build.dir}/${project::get-name()}.dll">
|
||||||
<resources prefix="OpenSim.Physics.Manager" dynamicprefix="true" >
|
<resources prefix="OpenSim.Physics.Manager" dynamicprefix="true" >
|
||||||
</resources>
|
</resources>
|
||||||
<sources failonempty="true">
|
<sources failonempty="true">
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
<fileset basedir="${project::get-base-directory()}">
|
<fileset basedir="${project::get-base-directory()}">
|
||||||
</fileset>
|
</fileset>
|
||||||
</copy>
|
</copy>
|
||||||
<csc target="library" debug="${build.debug}" unsafe="False" define="TRACE" output="${project::get-base-directory()}/${build.dir}/${project::get-name()}.dll">
|
<csc target="library" debug="${build.debug}" unsafe="False" define="TRACE;DEBUG" output="${project::get-base-directory()}/${build.dir}/${project::get-name()}.dll">
|
||||||
<resources prefix="OpenSim.Physics.OdePlugin" dynamicprefix="true" >
|
<resources prefix="OpenSim.Physics.OdePlugin" dynamicprefix="true" >
|
||||||
</resources>
|
</resources>
|
||||||
<sources failonempty="true">
|
<sources failonempty="true">
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
<fileset basedir="${project::get-base-directory()}">
|
<fileset basedir="${project::get-base-directory()}">
|
||||||
</fileset>
|
</fileset>
|
||||||
</copy>
|
</copy>
|
||||||
<csc target="library" debug="${build.debug}" unsafe="False" define="TRACE" output="${project::get-base-directory()}/${build.dir}/${project::get-name()}.dll">
|
<csc target="library" debug="${build.debug}" unsafe="False" define="TRACE;DEBUG" output="${project::get-base-directory()}/${build.dir}/${project::get-name()}.dll">
|
||||||
<resources prefix="OpenSim.Physics.PhysXPlugin" dynamicprefix="true" >
|
<resources prefix="OpenSim.Physics.PhysXPlugin" dynamicprefix="true" >
|
||||||
</resources>
|
</resources>
|
||||||
<sources failonempty="true">
|
<sources failonempty="true">
|
||||||
|
|
|
@ -199,6 +199,9 @@
|
||||||
<Compile Include="world\WorldPacketHandlers.cs">
|
<Compile Include="world\WorldPacketHandlers.cs">
|
||||||
<SubType>Code</SubType>
|
<SubType>Code</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<Compile Include="world\WorldScripting.cs">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
<Compile Include="world\scripting\IScript.cs">
|
<Compile Include="world\scripting\IScript.cs">
|
||||||
<SubType>Code</SubType>
|
<SubType>Code</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
<fileset basedir="${project::get-base-directory()}">
|
<fileset basedir="${project::get-base-directory()}">
|
||||||
</fileset>
|
</fileset>
|
||||||
</copy>
|
</copy>
|
||||||
<csc target="library" debug="${build.debug}" unsafe="False" define="TRACE" output="${project::get-base-directory()}/${build.dir}/${project::get-name()}.dll">
|
<csc target="library" debug="${build.debug}" unsafe="False" define="TRACE;DEBUG" output="${project::get-base-directory()}/${build.dir}/${project::get-name()}.dll">
|
||||||
<resources prefix="OpenSim.RegionServer" dynamicprefix="true" >
|
<resources prefix="OpenSim.RegionServer" dynamicprefix="true" >
|
||||||
</resources>
|
</resources>
|
||||||
<sources failonempty="true">
|
<sources failonempty="true">
|
||||||
|
@ -38,6 +38,7 @@
|
||||||
<include name="world/SurfacePatch.cs" />
|
<include name="world/SurfacePatch.cs" />
|
||||||
<include name="world/World.cs" />
|
<include name="world/World.cs" />
|
||||||
<include name="world/WorldPacketHandlers.cs" />
|
<include name="world/WorldPacketHandlers.cs" />
|
||||||
|
<include name="world/WorldScripting.cs" />
|
||||||
<include name="world/scripting/IScript.cs" />
|
<include name="world/scripting/IScript.cs" />
|
||||||
<include name="world/scripting/IScriptContext.cs" />
|
<include name="world/scripting/IScriptContext.cs" />
|
||||||
<include name="world/scripting/IScriptEntity.cs" />
|
<include name="world/scripting/IScriptEntity.cs" />
|
||||||
|
|
|
@ -18,7 +18,7 @@ using OpenSim.Terrain;
|
||||||
|
|
||||||
namespace OpenSim.world
|
namespace OpenSim.world
|
||||||
{
|
{
|
||||||
public partial class World : ILocalStorageReceiver
|
public partial class World : ILocalStorageReceiver, IScriptAPI
|
||||||
{
|
{
|
||||||
public object LockPhysicsEngine = new object();
|
public object LockPhysicsEngine = new object();
|
||||||
public Dictionary<libsecondlife.LLUUID, Entity> Entities;
|
public Dictionary<libsecondlife.LLUUID, Entity> Entities;
|
||||||
|
@ -66,6 +66,7 @@ namespace OpenSim.world
|
||||||
// Scripts = new ScriptEngine(this);
|
// Scripts = new ScriptEngine(this);
|
||||||
Avatar.LoadAnims();
|
Avatar.LoadAnims();
|
||||||
this.SetDefaultScripts();
|
this.SetDefaultScripts();
|
||||||
|
this.LoadScriptEngines();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void AddScript(Entity entity, Script script)
|
public void AddScript(Entity entity, Script script)
|
||||||
|
@ -86,8 +87,28 @@ namespace OpenSim.world
|
||||||
//Console.WriteLine("searching for script to add: " + substring);
|
//Console.WriteLine("searching for script to add: " + substring);
|
||||||
|
|
||||||
ScriptFactory scriptFactory;
|
ScriptFactory scriptFactory;
|
||||||
|
Console.WriteLine("script string is " + substring);
|
||||||
if (this.m_scripts.TryGetValue(substring, out scriptFactory))
|
if(substring.StartsWith("<ScriptEngine:"))
|
||||||
|
{
|
||||||
|
string substring1 = "";
|
||||||
|
string script = "";
|
||||||
|
Console.WriteLine("searching for script engine");
|
||||||
|
substring1 = substring.Remove(0, 14);
|
||||||
|
int dev = substring1.IndexOf(',');
|
||||||
|
string sEngine = substring1.Substring(0, dev);
|
||||||
|
substring1 = substring1.Remove(0, dev+1);
|
||||||
|
int end = substring1.IndexOf('>');
|
||||||
|
string sName = substring1.Substring(0, end);
|
||||||
|
Console.WriteLine(" script info : " + sEngine + " , " + sName);
|
||||||
|
int startscript = substring.IndexOf('>');
|
||||||
|
script = substring.Remove(0, startscript + 1);
|
||||||
|
Console.WriteLine("script data is " + script);
|
||||||
|
if (this.scriptEngines.ContainsKey(sEngine))
|
||||||
|
{
|
||||||
|
this.scriptEngines[sEngine].LoadScript(script, sName, entity.localid);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (this.m_scripts.TryGetValue(substring, out scriptFactory))
|
||||||
{
|
{
|
||||||
//Console.WriteLine("added script");
|
//Console.WriteLine("added script");
|
||||||
this.AddScript(entity, scriptFactory());
|
this.AddScript(entity, scriptFactory());
|
||||||
|
@ -149,7 +170,10 @@ namespace OpenSim.world
|
||||||
{
|
{
|
||||||
scriptHandler.OnFrame();
|
scriptHandler.OnFrame();
|
||||||
}
|
}
|
||||||
|
foreach (IScriptEngine scripteng in this.scriptEngines.Values)
|
||||||
|
{
|
||||||
|
//scripteng.OnFrame();
|
||||||
|
}
|
||||||
//backup world data
|
//backup world data
|
||||||
this.storageCount++;
|
this.storageCount++;
|
||||||
if (storageCount > 1200) //set to how often you want to backup
|
if (storageCount > 1200) //set to how often you want to backup
|
||||||
|
@ -255,7 +279,9 @@ namespace OpenSim.world
|
||||||
float[] map = this.localStorage.LoadWorld();
|
float[] map = this.localStorage.LoadWorld();
|
||||||
if (map == null)
|
if (map == null)
|
||||||
{
|
{
|
||||||
|
Console.WriteLine("creating new terrain");
|
||||||
this.Terrain.hills();
|
this.Terrain.hills();
|
||||||
|
|
||||||
//this.localStorage.SaveMap(this.Terrain.map);
|
//this.localStorage.SaveMap(this.Terrain.map);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
@ -0,0 +1,18 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Text;
|
||||||
|
using OpenSim.Scripting.EmbeddedJVM.Types;
|
||||||
|
|
||||||
|
namespace OpenSim.Scripting.EmbeddedJVM
|
||||||
|
{
|
||||||
|
public class ClassInstance : Object
|
||||||
|
{
|
||||||
|
public int size;
|
||||||
|
public Dictionary<string, BaseType> Fields = new Dictionary<string, BaseType>();
|
||||||
|
|
||||||
|
public ClassInstance()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,476 @@
|
||||||
|
using System;
|
||||||
|
using System.IO;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Text;
|
||||||
|
using OpenSim.Scripting.EmbeddedJVM.Types;
|
||||||
|
|
||||||
|
namespace OpenSim.Scripting.EmbeddedJVM
|
||||||
|
{
|
||||||
|
public class ClassRecord
|
||||||
|
{
|
||||||
|
private ushort _majorVersion;
|
||||||
|
private ushort _minorVersion;
|
||||||
|
private ushort _constantPoolCount;
|
||||||
|
private ushort _accessFlags;
|
||||||
|
private ushort _thisClass;
|
||||||
|
private ushort _supperClass;
|
||||||
|
private ushort _interfaceCount;
|
||||||
|
private ushort _fieldCount;
|
||||||
|
private ushort _methodCount;
|
||||||
|
private ushort _attributeCount;
|
||||||
|
private string _name;
|
||||||
|
public Dictionary<string, BaseType> StaticFields = new Dictionary<string, BaseType>();
|
||||||
|
public PoolClass mClass;
|
||||||
|
|
||||||
|
public List<PoolItem> _constantsPool = new List<PoolItem>();
|
||||||
|
private List<MethodInfo> _methodsList = new List<MethodInfo>();
|
||||||
|
private List<FieldInfo> _fieldList = new List<FieldInfo>();
|
||||||
|
|
||||||
|
public ClassRecord()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public ClassInstance CreateNewInstance()
|
||||||
|
{
|
||||||
|
return new ClassInstance();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void LoadClassFromFile(string fileName)
|
||||||
|
{
|
||||||
|
Console.WriteLine("loading script " + fileName);
|
||||||
|
FileStream fs = File.OpenRead(fileName);
|
||||||
|
this.LoadClassFromBytes(ReadFully(fs));
|
||||||
|
fs.Close();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void LoadClassFromBytes(byte[] data)
|
||||||
|
{
|
||||||
|
int i = 0;
|
||||||
|
i += 4;
|
||||||
|
_minorVersion = (ushort)((data[i++] << 8) + data[i++] );
|
||||||
|
_majorVersion = (ushort)((data[i++] << 8) + data[i++] );
|
||||||
|
_constantPoolCount = (ushort)((data[i++] << 8) + data[i++] );
|
||||||
|
// Console.WriteLine("there should be " + _constantPoolCount + " items in the pool");
|
||||||
|
for (int count = 0; count < _constantPoolCount -1 ; count++)
|
||||||
|
{
|
||||||
|
//read in the constant pool
|
||||||
|
byte pooltype = data[i++];
|
||||||
|
//Console.WriteLine("#" +count +": new constant type = " +pooltype);
|
||||||
|
//Console.WriteLine("start position is: " + i);
|
||||||
|
switch (pooltype)
|
||||||
|
{
|
||||||
|
case 1: //Utf8
|
||||||
|
ushort uLength = (ushort)((data[i++] << 8) + data[i++] );
|
||||||
|
|
||||||
|
// Console.WriteLine("new utf8 type, length is " + uLength);
|
||||||
|
PoolUtf8 utf8 = new PoolUtf8();
|
||||||
|
utf8.readValue(data, ref i, uLength);
|
||||||
|
this._constantsPool.Add(utf8);
|
||||||
|
break;
|
||||||
|
case 3: //Int
|
||||||
|
break;
|
||||||
|
case 7: //Class
|
||||||
|
PoolClass pClass = new PoolClass(this);
|
||||||
|
pClass.readValue(data, ref i);
|
||||||
|
this._constantsPool.Add(pClass);
|
||||||
|
break;
|
||||||
|
case 10: //Method
|
||||||
|
PoolMethodRef pMeth = new PoolMethodRef(this);
|
||||||
|
pMeth.readValue(data, ref i);
|
||||||
|
this._constantsPool.Add(pMeth);
|
||||||
|
break;
|
||||||
|
case 12: //NamedType
|
||||||
|
PoolNamedType pNamed = new PoolNamedType(this);
|
||||||
|
pNamed.readValue(data, ref i);
|
||||||
|
this._constantsPool.Add(pNamed);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
_accessFlags = (ushort)((data[i++] << 8) + data[i++] );
|
||||||
|
_thisClass = (ushort)((data[i++] << 8) + data[i++] );
|
||||||
|
_supperClass = (ushort)((data[i++] << 8) + data[i++] );
|
||||||
|
|
||||||
|
if (this._constantsPool[this._thisClass - 1] is PoolClass)
|
||||||
|
{
|
||||||
|
this.mClass = ((PoolClass)this._constantsPool[this._thisClass - 1]);
|
||||||
|
}
|
||||||
|
|
||||||
|
_interfaceCount = (ushort)((data[i++] << 8) + data[i++]);
|
||||||
|
//should now read in the info for each interface
|
||||||
|
_fieldCount = (ushort)((data[i++] << 8) + data[i++]);
|
||||||
|
//should now read in the info for each field
|
||||||
|
_methodCount = (ushort)((data[i++] << 8) + data[i++]);
|
||||||
|
for (int count = 0; count < _methodCount; count++)
|
||||||
|
{
|
||||||
|
MethodInfo methInf = new MethodInfo(this);
|
||||||
|
methInf.ReadData(data, ref i);
|
||||||
|
this._methodsList.Add(methInf);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void AddMethodsToMemory(MethodMemory memory)
|
||||||
|
{
|
||||||
|
for (int count = 0; count < _methodCount; count++)
|
||||||
|
{
|
||||||
|
this._methodsList[count].AddMethodCode(memory);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool StartMethod(Thread thread, string methodName)
|
||||||
|
{
|
||||||
|
for (int count = 0; count < _methodCount; count++)
|
||||||
|
{
|
||||||
|
if (this._constantsPool[this._methodsList[count].NameIndex-1] is PoolUtf8)
|
||||||
|
{
|
||||||
|
if (((PoolUtf8)this._constantsPool[this._methodsList[count].NameIndex-1]).Value == methodName)
|
||||||
|
{
|
||||||
|
//Console.WriteLine("found method: " + ((PoolUtf8)this._constantsPool[this._methodsList[count].NameIndex - 1]).Value);
|
||||||
|
thread.SetPC(this._methodsList[count].CodePointer);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void PrintToConsole()
|
||||||
|
{
|
||||||
|
Console.WriteLine("Class File:");
|
||||||
|
Console.WriteLine("Major version: " + _majorVersion);
|
||||||
|
Console.WriteLine("Minor version: " + _minorVersion);
|
||||||
|
Console.WriteLine("Pool size: " + _constantPoolCount);
|
||||||
|
|
||||||
|
for (int i = 0; i < _constantsPool.Count; i++)
|
||||||
|
{
|
||||||
|
this._constantsPool[i].Print();
|
||||||
|
}
|
||||||
|
|
||||||
|
Console.WriteLine("Access flags: " + _accessFlags);
|
||||||
|
Console.WriteLine("This class: " + _thisClass );
|
||||||
|
Console.WriteLine("Super class: " + _supperClass);
|
||||||
|
|
||||||
|
for (int count = 0; count < _methodCount; count++)
|
||||||
|
{
|
||||||
|
Console.WriteLine();
|
||||||
|
this._methodsList[count].Print();
|
||||||
|
}
|
||||||
|
|
||||||
|
Console.WriteLine("class name is " + this.mClass.Name.Value);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static byte[] ReadFully(Stream stream)
|
||||||
|
{
|
||||||
|
byte[] buffer = new byte[1024];
|
||||||
|
using (MemoryStream ms = new MemoryStream())
|
||||||
|
{
|
||||||
|
while (true)
|
||||||
|
{
|
||||||
|
int read = stream.Read(buffer, 0, buffer.Length);
|
||||||
|
if (read <= 0)
|
||||||
|
return ms.ToArray();
|
||||||
|
ms.Write(buffer, 0, read);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#region nested classes
|
||||||
|
public class PoolItem
|
||||||
|
{
|
||||||
|
public virtual void Print()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public class PoolUtf8 : PoolItem
|
||||||
|
{
|
||||||
|
public string Value = "";
|
||||||
|
|
||||||
|
public void readValue(byte[] data,ref int pointer , int length)
|
||||||
|
{
|
||||||
|
for (int i = 0; i < length; i++)
|
||||||
|
{
|
||||||
|
int a =(int) data[pointer++];
|
||||||
|
if ((a & 0x80) == 0)
|
||||||
|
{
|
||||||
|
Value = Value + (char)a;
|
||||||
|
}
|
||||||
|
else if ((a & 0x20) == 0)
|
||||||
|
{
|
||||||
|
int b = (int) data[pointer++];
|
||||||
|
Value = Value + (char)(((a & 0x1f) << 6) + (b & 0x3f));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
int b = (int)data[pointer++];
|
||||||
|
int c = (int)data[pointer++];
|
||||||
|
Value = Value + (char)(((a & 0xf) << 12) + ((b & 0x3f) << 6) + (c & 0x3f));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void Print()
|
||||||
|
{
|
||||||
|
Console.WriteLine("Utf8 type: " + Value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private class PoolInt : PoolItem
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public class PoolClass : PoolItem
|
||||||
|
{
|
||||||
|
//public string name = "";
|
||||||
|
public ushort namePointer = 0;
|
||||||
|
private ClassRecord parent;
|
||||||
|
public PoolUtf8 Name;
|
||||||
|
|
||||||
|
public PoolClass(ClassRecord paren)
|
||||||
|
{
|
||||||
|
parent = paren;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void readValue(byte[] data, ref int pointer)
|
||||||
|
{
|
||||||
|
namePointer = (ushort)((data[pointer++] << 8) + data[pointer++] );
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void Print()
|
||||||
|
{
|
||||||
|
this.Name = ((PoolUtf8)this.parent._constantsPool[namePointer - 1]);
|
||||||
|
Console.Write("Class type: " + namePointer);
|
||||||
|
Console.WriteLine(" // " + ((PoolUtf8)this.parent._constantsPool[namePointer - 1]).Value);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public class PoolMethodRef : PoolItem
|
||||||
|
{
|
||||||
|
public ushort classPointer = 0;
|
||||||
|
public ushort nameTypePointer = 0;
|
||||||
|
public PoolNamedType mNameType;
|
||||||
|
public PoolClass mClass;
|
||||||
|
private ClassRecord parent;
|
||||||
|
|
||||||
|
public PoolMethodRef(ClassRecord paren)
|
||||||
|
{
|
||||||
|
parent = paren;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void readValue(byte[] data, ref int pointer)
|
||||||
|
{
|
||||||
|
classPointer = (ushort)((data[pointer++] << 8) + data[pointer++]);
|
||||||
|
nameTypePointer = (ushort)((data[pointer++] << 8) + data[pointer++]);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void Print()
|
||||||
|
{
|
||||||
|
this.mNameType = ((PoolNamedType)this.parent._constantsPool[nameTypePointer - 1]);
|
||||||
|
this.mClass = ((PoolClass)this.parent._constantsPool[classPointer - 1]);
|
||||||
|
Console.WriteLine("MethodRef type: " + classPointer + " , " + nameTypePointer);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public class PoolNamedType : PoolItem
|
||||||
|
{
|
||||||
|
public ushort namePointer = 0;
|
||||||
|
public ushort typePointer = 0;
|
||||||
|
private ClassRecord parent;
|
||||||
|
public PoolUtf8 Name;
|
||||||
|
public PoolUtf8 Type;
|
||||||
|
|
||||||
|
public PoolNamedType(ClassRecord paren)
|
||||||
|
{
|
||||||
|
parent = paren;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void readValue(byte[] data, ref int pointer)
|
||||||
|
{
|
||||||
|
namePointer = (ushort)((data[pointer++] << 8) + data[pointer++] );
|
||||||
|
typePointer = (ushort)((data[pointer++] << 8) + data[pointer++] );
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void Print()
|
||||||
|
{
|
||||||
|
Name = ((PoolUtf8)this.parent._constantsPool[namePointer-1]);
|
||||||
|
Type = ((PoolUtf8)this.parent._constantsPool[typePointer-1]);
|
||||||
|
Console.Write("Named type: " + namePointer + " , " + typePointer );
|
||||||
|
Console.WriteLine(" // "+ ((PoolUtf8)this.parent._constantsPool[namePointer-1]).Value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//***********************
|
||||||
|
public class MethodInfo
|
||||||
|
{
|
||||||
|
public ushort AccessFlags = 0;
|
||||||
|
public ushort NameIndex = 0;
|
||||||
|
public string Name = "";
|
||||||
|
public ushort DescriptorIndex = 0;
|
||||||
|
public ushort AttributeCount = 0;
|
||||||
|
public List<MethodAttribute> Attributes = new List<MethodAttribute>();
|
||||||
|
private ClassRecord parent;
|
||||||
|
public int CodePointer = 0;
|
||||||
|
|
||||||
|
public MethodInfo(ClassRecord paren)
|
||||||
|
{
|
||||||
|
parent = paren;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void AddMethodCode(MethodMemory memory)
|
||||||
|
{
|
||||||
|
Array.Copy(this.Attributes[0].Code, 0, memory.MethodBuffer, memory.NextMethodPC, this.Attributes[0].Code.Length);
|
||||||
|
memory.Methodcount++;
|
||||||
|
this.CodePointer = memory.NextMethodPC;
|
||||||
|
memory.NextMethodPC += this.Attributes[0].Code.Length;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void ReadData(byte[] data, ref int pointer)
|
||||||
|
{
|
||||||
|
AccessFlags = (ushort)((data[pointer++] << 8) + data[pointer++]);
|
||||||
|
NameIndex = (ushort)((data[pointer++] << 8) + data[pointer++]);
|
||||||
|
DescriptorIndex = (ushort)((data[pointer++] << 8) + data[pointer++]);
|
||||||
|
AttributeCount = (ushort)((data[pointer++] << 8) + data[pointer++]);
|
||||||
|
for(int i =0; i< AttributeCount; i++)
|
||||||
|
{
|
||||||
|
MethodAttribute attri = new MethodAttribute(this.parent);
|
||||||
|
attri.ReadData(data, ref pointer);
|
||||||
|
this.Attributes.Add(attri);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Print()
|
||||||
|
{
|
||||||
|
Console.WriteLine("Method Info Struct: ");
|
||||||
|
Console.WriteLine("AccessFlags: " + AccessFlags);
|
||||||
|
Console.WriteLine("NameIndex: " + NameIndex +" // "+ ((PoolUtf8)this.parent._constantsPool[NameIndex-1]).Value);
|
||||||
|
Console.WriteLine("DescriptorIndex: " + DescriptorIndex + " // "+ ((PoolUtf8)this.parent._constantsPool[DescriptorIndex-1]).Value);
|
||||||
|
Console.WriteLine("Attribute Count:" + AttributeCount);
|
||||||
|
for (int i = 0; i < AttributeCount; i++)
|
||||||
|
{
|
||||||
|
this.Attributes[i].Print();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public class MethodAttribute
|
||||||
|
{
|
||||||
|
public ushort NameIndex = 0;
|
||||||
|
public string Name = "";
|
||||||
|
public Int32 Length = 0;
|
||||||
|
//for now only support code attribute
|
||||||
|
public ushort MaxStack = 0;
|
||||||
|
public ushort MaxLocals = 0;
|
||||||
|
public Int32 CodeLength = 0;
|
||||||
|
public byte[] Code;
|
||||||
|
public ushort ExceptionTableLength = 0;
|
||||||
|
public ushort SubAttributeCount = 0;
|
||||||
|
public List<SubAttribute> SubAttributes = new List<SubAttribute>();
|
||||||
|
private ClassRecord parent;
|
||||||
|
|
||||||
|
public MethodAttribute(ClassRecord paren)
|
||||||
|
{
|
||||||
|
parent = paren;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void ReadData(byte[] data, ref int pointer)
|
||||||
|
{
|
||||||
|
NameIndex = (ushort)((data[pointer++] << 8) + data[pointer++]);
|
||||||
|
Length = (Int32)((data[pointer++] << 24) + (data[pointer++] << 16) + (data[pointer++] << 8) + data[pointer++]);
|
||||||
|
MaxStack = (ushort)((data[pointer++] << 8) + data[pointer++]);
|
||||||
|
MaxLocals = (ushort)((data[pointer++] << 8) + data[pointer++]);
|
||||||
|
CodeLength = (Int32)((data[pointer++] << 24) + (data[pointer++] << 16) + (data[pointer++] << 8) + data[pointer++]);
|
||||||
|
Code = new byte[CodeLength];
|
||||||
|
for (int i = 0; i < CodeLength; i++)
|
||||||
|
{
|
||||||
|
Code[i] = data[pointer++];
|
||||||
|
}
|
||||||
|
ExceptionTableLength = (ushort)((data[pointer++] << 8) + data[pointer++]);
|
||||||
|
SubAttributeCount = (ushort)((data[pointer++] << 8) + data[pointer++]);
|
||||||
|
for (int i = 0; i < SubAttributeCount; i++)
|
||||||
|
{
|
||||||
|
SubAttribute subAttri = new SubAttribute(this.parent);
|
||||||
|
subAttri.ReadData(data, ref pointer);
|
||||||
|
this.SubAttributes.Add(subAttri);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Print()
|
||||||
|
{
|
||||||
|
Console.WriteLine("Method Attribute: ");
|
||||||
|
Console.WriteLine("Name Index: " + NameIndex + " // "+ ((PoolUtf8)this.parent._constantsPool[NameIndex-1]).Value);
|
||||||
|
Console.WriteLine("Length: " + Length);
|
||||||
|
Console.WriteLine("MaxStack: " + MaxStack);
|
||||||
|
Console.WriteLine("MaxLocals: " + MaxLocals);
|
||||||
|
Console.WriteLine("CodeLength: " + CodeLength);
|
||||||
|
for (int i = 0; i < Code.Length; i++)
|
||||||
|
{
|
||||||
|
Console.WriteLine("OpCode #" + i + " is: " + Code[i]);
|
||||||
|
}
|
||||||
|
Console.WriteLine("SubAttributes: " + SubAttributeCount);
|
||||||
|
for (int i = 0; i < SubAttributeCount; i++)
|
||||||
|
{
|
||||||
|
this.SubAttributes[i].Print();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public class SubAttribute
|
||||||
|
{
|
||||||
|
public ushort NameIndex = 0;
|
||||||
|
public string Name = "";
|
||||||
|
public Int32 Length = 0;
|
||||||
|
public byte[] Data;
|
||||||
|
private ClassRecord parent;
|
||||||
|
|
||||||
|
public SubAttribute(ClassRecord paren)
|
||||||
|
{
|
||||||
|
parent = paren;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void ReadData(byte[] data, ref int pointer)
|
||||||
|
{
|
||||||
|
NameIndex = (ushort)((data[pointer++] << 8) + data[pointer++]);
|
||||||
|
Length = (Int32)((data[pointer++] << 24) + (data[pointer++] << 16) + (data[pointer++] << 8) + data[pointer++]);
|
||||||
|
Data = new byte[Length];
|
||||||
|
for (int i = 0; i < Length; i++)
|
||||||
|
{
|
||||||
|
Data[i] = data[pointer++];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Print()
|
||||||
|
{
|
||||||
|
Console.WriteLine("SubAttribute: NameIndex: " + NameIndex + " // " + ((PoolUtf8)this.parent._constantsPool[NameIndex - 1]).Value);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
private class InterfaceInfo
|
||||||
|
{
|
||||||
|
public void ReadData(byte[] data, ref int i)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
private class FieldInfo
|
||||||
|
{
|
||||||
|
public void ReadData(byte[] data, ref int i)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
private class AttributeInfo
|
||||||
|
{
|
||||||
|
public void ReadData(byte[] data, ref int i)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,16 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
|
namespace OpenSim.Scripting.EmbeddedJVM
|
||||||
|
{
|
||||||
|
public class Heap
|
||||||
|
{
|
||||||
|
public List<ClassInstance> ClassObjects = new List<ClassInstance>();
|
||||||
|
|
||||||
|
public Heap()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,105 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Text;
|
||||||
|
using OpenSim.Scripting.EmbeddedJVM.Types;
|
||||||
|
using OpenSim.Scripting.EmbeddedJVM.Types.PrimitiveTypes;
|
||||||
|
|
||||||
|
namespace OpenSim.Scripting.EmbeddedJVM
|
||||||
|
{
|
||||||
|
partial class Thread
|
||||||
|
{
|
||||||
|
private partial class Interpreter
|
||||||
|
{
|
||||||
|
private Thread _mThread;
|
||||||
|
|
||||||
|
public Interpreter(Thread parentThread)
|
||||||
|
{
|
||||||
|
_mThread = parentThread;
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool Excute()
|
||||||
|
{
|
||||||
|
bool run = true;
|
||||||
|
byte currentOpCode = GlobalMemory.MethodArea.MethodBuffer[this._mThread.PC++];
|
||||||
|
// Console.WriteLine("opCode is: " + currentOpCode);
|
||||||
|
bool handled = false;
|
||||||
|
|
||||||
|
handled = this.IsLogicOpCode(currentOpCode);
|
||||||
|
if (!handled)
|
||||||
|
{
|
||||||
|
handled = this.IsMethodOpCode(currentOpCode);
|
||||||
|
}
|
||||||
|
if (!handled)
|
||||||
|
{
|
||||||
|
if (currentOpCode == 172)
|
||||||
|
{
|
||||||
|
if (this._mThread.stack.StackFrames.Count > 1)
|
||||||
|
{
|
||||||
|
Console.WriteLine("returning int from function");
|
||||||
|
int retPC1 = this._mThread.currentFrame.ReturnPC;
|
||||||
|
BaseType bas1 = this._mThread.currentFrame.OpStack.Pop();
|
||||||
|
this._mThread.stack.StackFrames.Pop();
|
||||||
|
this._mThread.currentFrame = this._mThread.stack.StackFrames.Peek();
|
||||||
|
this._mThread.PC = retPC1;
|
||||||
|
if (bas1 is Int)
|
||||||
|
{
|
||||||
|
this._mThread.currentFrame.OpStack.Push((Int)bas1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Console.WriteLine("No parent function so ending program");
|
||||||
|
run = false;
|
||||||
|
}
|
||||||
|
handled = true;
|
||||||
|
}
|
||||||
|
if (currentOpCode == 174)
|
||||||
|
{
|
||||||
|
if (this._mThread.stack.StackFrames.Count > 1)
|
||||||
|
{
|
||||||
|
Console.WriteLine("returning float from function");
|
||||||
|
int retPC1 = this._mThread.currentFrame.ReturnPC;
|
||||||
|
BaseType bas1 = this._mThread.currentFrame.OpStack.Pop();
|
||||||
|
this._mThread.stack.StackFrames.Pop();
|
||||||
|
this._mThread.currentFrame = this._mThread.stack.StackFrames.Peek();
|
||||||
|
this._mThread.PC = retPC1;
|
||||||
|
if (bas1 is Float)
|
||||||
|
{
|
||||||
|
this._mThread.currentFrame.OpStack.Push((Float)bas1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Console.WriteLine("No parent function so ending program");
|
||||||
|
run = false;
|
||||||
|
}
|
||||||
|
handled = true;
|
||||||
|
}
|
||||||
|
if (currentOpCode == 177)
|
||||||
|
{
|
||||||
|
if (this._mThread.stack.StackFrames.Count > 1)
|
||||||
|
{
|
||||||
|
Console.WriteLine("returning from function");
|
||||||
|
int retPC = this._mThread.currentFrame.ReturnPC;
|
||||||
|
this._mThread.stack.StackFrames.Pop();
|
||||||
|
this._mThread.currentFrame = this._mThread.stack.StackFrames.Peek();
|
||||||
|
this._mThread.PC = retPC;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Console.WriteLine("No parent function so ending program");
|
||||||
|
run = false;
|
||||||
|
}
|
||||||
|
handled = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!handled)
|
||||||
|
{
|
||||||
|
Console.WriteLine("opcode " + currentOpCode + " not been handled ");
|
||||||
|
}
|
||||||
|
return run;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,376 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Text;
|
||||||
|
using OpenSim.Scripting.EmbeddedJVM.Types;
|
||||||
|
using OpenSim.Scripting.EmbeddedJVM.Types.PrimitiveTypes;
|
||||||
|
|
||||||
|
namespace OpenSim.Scripting.EmbeddedJVM
|
||||||
|
{
|
||||||
|
partial class Thread
|
||||||
|
{
|
||||||
|
private partial class Interpreter
|
||||||
|
{
|
||||||
|
private bool IsLogicOpCode(byte opcode)
|
||||||
|
{
|
||||||
|
bool result = false;
|
||||||
|
switch (opcode)
|
||||||
|
{
|
||||||
|
case 2:
|
||||||
|
Int m_int= new Int();
|
||||||
|
m_int.mValue = -1;
|
||||||
|
this._mThread.currentFrame.OpStack.Push(m_int);
|
||||||
|
result = true;
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
m_int= new Int();
|
||||||
|
m_int.mValue = 0;
|
||||||
|
this._mThread.currentFrame.OpStack.Push(m_int);
|
||||||
|
result = true;
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
m_int = new Int();
|
||||||
|
m_int.mValue = 1;
|
||||||
|
this._mThread.currentFrame.OpStack.Push(m_int);
|
||||||
|
result = true;
|
||||||
|
break;
|
||||||
|
case 5:
|
||||||
|
m_int = new Int();
|
||||||
|
m_int.mValue = 2;
|
||||||
|
this._mThread.currentFrame.OpStack.Push(m_int);
|
||||||
|
result = true;
|
||||||
|
break;
|
||||||
|
case 6:
|
||||||
|
m_int = new Int();
|
||||||
|
m_int.mValue = 3;
|
||||||
|
this._mThread.currentFrame.OpStack.Push(m_int);
|
||||||
|
break;
|
||||||
|
case 7:
|
||||||
|
m_int = new Int();
|
||||||
|
m_int.mValue = 4;
|
||||||
|
this._mThread.currentFrame.OpStack.Push(m_int);
|
||||||
|
result = true;
|
||||||
|
break;
|
||||||
|
case 8:
|
||||||
|
m_int = new Int();
|
||||||
|
m_int.mValue = 5;
|
||||||
|
this._mThread.currentFrame.OpStack.Push(m_int);
|
||||||
|
result = true;
|
||||||
|
break;
|
||||||
|
case 11:
|
||||||
|
Float m_float = new Float();
|
||||||
|
m_float.mValue = 0.0f;
|
||||||
|
this._mThread.currentFrame.OpStack.Push(m_float);
|
||||||
|
result = true;
|
||||||
|
break;
|
||||||
|
case 12:
|
||||||
|
m_float = new Float();
|
||||||
|
m_float.mValue = 1.0f;
|
||||||
|
this._mThread.currentFrame.OpStack.Push(m_float);
|
||||||
|
result = true;
|
||||||
|
break;
|
||||||
|
case 13:
|
||||||
|
m_float = new Float();
|
||||||
|
m_float.mValue = 2.0f;
|
||||||
|
this._mThread.currentFrame.OpStack.Push(m_float);
|
||||||
|
result = true;
|
||||||
|
break;
|
||||||
|
case 16:
|
||||||
|
int pushvalue = (int)GlobalMemory.MethodArea.MethodBuffer[this._mThread.PC];
|
||||||
|
Int pushInt = new Int();
|
||||||
|
pushInt.mValue = pushvalue;
|
||||||
|
this._mThread.currentFrame.OpStack.Push(pushInt);
|
||||||
|
this._mThread.PC++;
|
||||||
|
result = true;
|
||||||
|
break;
|
||||||
|
case 17:
|
||||||
|
short pushvalue2 = (short)((GlobalMemory.MethodArea.MethodBuffer[this._mThread.PC] << 8) + GlobalMemory.MethodArea.MethodBuffer[this._mThread.PC + 1]);
|
||||||
|
Int pushInt2 = new Int();
|
||||||
|
pushInt2.mValue = pushvalue2;
|
||||||
|
this._mThread.currentFrame.OpStack.Push(pushInt2);
|
||||||
|
this._mThread.PC += 2;
|
||||||
|
result = true;
|
||||||
|
break;
|
||||||
|
case 26:
|
||||||
|
if (this._mThread.currentFrame.LocalVariables[0] != null)
|
||||||
|
{
|
||||||
|
if (this._mThread.currentFrame.LocalVariables[0] is Int)
|
||||||
|
{
|
||||||
|
Int newInt = new Int();
|
||||||
|
newInt.mValue = ((Int)this._mThread.currentFrame.LocalVariables[0]).mValue;
|
||||||
|
this._mThread.currentFrame.OpStack.Push(newInt);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
result = true;
|
||||||
|
break;
|
||||||
|
case 27:
|
||||||
|
if (this._mThread.currentFrame.LocalVariables[1] != null)
|
||||||
|
{
|
||||||
|
if (this._mThread.currentFrame.LocalVariables[1] is Int)
|
||||||
|
{
|
||||||
|
Int newInt = new Int();
|
||||||
|
newInt.mValue = ((Int)this._mThread.currentFrame.LocalVariables[1]).mValue;
|
||||||
|
this._mThread.currentFrame.OpStack.Push(newInt);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
result = true;
|
||||||
|
break;
|
||||||
|
case 34:
|
||||||
|
if (this._mThread.currentFrame.LocalVariables[0] != null)
|
||||||
|
{
|
||||||
|
if (this._mThread.currentFrame.LocalVariables[0] is Float)
|
||||||
|
{
|
||||||
|
Float newfloat = new Float();
|
||||||
|
newfloat.mValue = ((Float)this._mThread.currentFrame.LocalVariables[0]).mValue;
|
||||||
|
this._mThread.currentFrame.OpStack.Push(newfloat);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
result = true;
|
||||||
|
break;
|
||||||
|
case 35:
|
||||||
|
if (this._mThread.currentFrame.LocalVariables[1] != null)
|
||||||
|
{
|
||||||
|
if (this._mThread.currentFrame.LocalVariables[1] is Float)
|
||||||
|
{
|
||||||
|
Float newfloat = new Float();
|
||||||
|
newfloat.mValue = ((Float)this._mThread.currentFrame.LocalVariables[1]).mValue;
|
||||||
|
this._mThread.currentFrame.OpStack.Push(newfloat);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
result = true;
|
||||||
|
break;
|
||||||
|
case 36:
|
||||||
|
if (this._mThread.currentFrame.LocalVariables[2] != null)
|
||||||
|
{
|
||||||
|
if (this._mThread.currentFrame.LocalVariables[2] is Float)
|
||||||
|
{
|
||||||
|
Float newfloat = new Float();
|
||||||
|
newfloat.mValue = ((Float)this._mThread.currentFrame.LocalVariables[2]).mValue;
|
||||||
|
this._mThread.currentFrame.OpStack.Push(newfloat);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
result = true;
|
||||||
|
break;
|
||||||
|
case 37:
|
||||||
|
if (this._mThread.currentFrame.LocalVariables[3] != null)
|
||||||
|
{
|
||||||
|
if (this._mThread.currentFrame.LocalVariables[3] is Float)
|
||||||
|
{
|
||||||
|
Float newfloat = new Float();
|
||||||
|
newfloat.mValue = ((Float)this._mThread.currentFrame.LocalVariables[3]).mValue;
|
||||||
|
this._mThread.currentFrame.OpStack.Push(newfloat);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
result = true;
|
||||||
|
break;
|
||||||
|
case 59:
|
||||||
|
BaseType baset = this._mThread.currentFrame.OpStack.Pop();
|
||||||
|
if (baset is Int)
|
||||||
|
{
|
||||||
|
this._mThread.currentFrame.LocalVariables[0] = (Int)baset;
|
||||||
|
}
|
||||||
|
result = true;
|
||||||
|
break;
|
||||||
|
case 60:
|
||||||
|
baset = this._mThread.currentFrame.OpStack.Pop();
|
||||||
|
if (baset is Int)
|
||||||
|
{
|
||||||
|
this._mThread.currentFrame.LocalVariables[1] = (Int)baset;
|
||||||
|
}
|
||||||
|
result = true;
|
||||||
|
break;
|
||||||
|
case 67:
|
||||||
|
baset = this._mThread.currentFrame.OpStack.Pop();
|
||||||
|
if (baset is Float)
|
||||||
|
{
|
||||||
|
this._mThread.currentFrame.LocalVariables[0] = (Float)baset;
|
||||||
|
}
|
||||||
|
result = true;
|
||||||
|
break;
|
||||||
|
case 68:
|
||||||
|
baset = this._mThread.currentFrame.OpStack.Pop();
|
||||||
|
if (baset is Float)
|
||||||
|
{
|
||||||
|
this._mThread.currentFrame.LocalVariables[1] = (Float)baset;
|
||||||
|
}
|
||||||
|
result = true;
|
||||||
|
break;
|
||||||
|
case 69:
|
||||||
|
baset = this._mThread.currentFrame.OpStack.Pop();
|
||||||
|
if (baset is Float)
|
||||||
|
{
|
||||||
|
this._mThread.currentFrame.LocalVariables[2] = (Float)baset;
|
||||||
|
}
|
||||||
|
result = true;
|
||||||
|
break;
|
||||||
|
case 70:
|
||||||
|
baset = this._mThread.currentFrame.OpStack.Pop();
|
||||||
|
if (baset is Float)
|
||||||
|
{
|
||||||
|
this._mThread.currentFrame.LocalVariables[3] = (Float)baset;
|
||||||
|
}
|
||||||
|
result = true;
|
||||||
|
break;
|
||||||
|
case 87:
|
||||||
|
this._mThread.currentFrame.OpStack.Pop();
|
||||||
|
result = true;
|
||||||
|
break;
|
||||||
|
case 98:
|
||||||
|
BaseType bf2 = this._mThread.currentFrame.OpStack.Pop();
|
||||||
|
BaseType bf1 = this._mThread.currentFrame.OpStack.Pop();
|
||||||
|
if (bf1 is Float && bf2 is Float)
|
||||||
|
{
|
||||||
|
Float nflt = new Float();
|
||||||
|
nflt.mValue = ((Float)bf1).mValue + ((Float)bf2).mValue;
|
||||||
|
this._mThread.currentFrame.OpStack.Push(nflt);
|
||||||
|
}
|
||||||
|
result = true;
|
||||||
|
break;
|
||||||
|
case 102:
|
||||||
|
BaseType bsf2 = this._mThread.currentFrame.OpStack.Pop();
|
||||||
|
BaseType bsf1 = this._mThread.currentFrame.OpStack.Pop();
|
||||||
|
if (bsf1 is Float && bsf2 is Float)
|
||||||
|
{
|
||||||
|
Float resf = new Float();
|
||||||
|
resf.mValue = ((Float)bsf1).mValue - ((Float)bsf2).mValue;
|
||||||
|
this._mThread.currentFrame.OpStack.Push(resf);
|
||||||
|
}
|
||||||
|
result = true;
|
||||||
|
break;
|
||||||
|
case 104: //check the order of the two values off the stack is correct
|
||||||
|
BaseType bs2 = this._mThread.currentFrame.OpStack.Pop();
|
||||||
|
BaseType bs1 = this._mThread.currentFrame.OpStack.Pop();
|
||||||
|
if (bs1 is Int && bs2 is Int)
|
||||||
|
{
|
||||||
|
Int nInt = new Int();
|
||||||
|
nInt.mValue = ((Int)bs1).mValue * ((Int)bs2).mValue;
|
||||||
|
this._mThread.currentFrame.OpStack.Push(nInt);
|
||||||
|
}
|
||||||
|
result = true;
|
||||||
|
break;
|
||||||
|
case 132:
|
||||||
|
if (this._mThread.currentFrame.LocalVariables[GlobalMemory.MethodArea.MethodBuffer[this._mThread.PC]] != null)
|
||||||
|
{
|
||||||
|
if (this._mThread.currentFrame.LocalVariables[GlobalMemory.MethodArea.MethodBuffer[this._mThread.PC]] is Int)
|
||||||
|
{
|
||||||
|
((Int)this._mThread.currentFrame.LocalVariables[GlobalMemory.MethodArea.MethodBuffer[this._mThread.PC]]).mValue += (sbyte) GlobalMemory.MethodArea.MethodBuffer[this._mThread.PC + 1];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this._mThread.PC += 2;
|
||||||
|
result = true;
|
||||||
|
break;
|
||||||
|
case 139:
|
||||||
|
BaseType conv1 = this._mThread.currentFrame.OpStack.Pop();
|
||||||
|
if (conv1 is Float)
|
||||||
|
{
|
||||||
|
Int newconv = new Int();
|
||||||
|
newconv.mValue = (int)((Float)conv1).mValue;
|
||||||
|
this._mThread.currentFrame.OpStack.Push(newconv);
|
||||||
|
}
|
||||||
|
result = true;
|
||||||
|
break;
|
||||||
|
case 149:
|
||||||
|
BaseType flcom2 = this._mThread.currentFrame.OpStack.Pop();
|
||||||
|
BaseType flcom1 = this._mThread.currentFrame.OpStack.Pop();
|
||||||
|
if (flcom1 is Float && flcom2 is Float)
|
||||||
|
{
|
||||||
|
Int compres = new Int();
|
||||||
|
if (((Float)flcom1).mValue > ((Float)flcom2).mValue)
|
||||||
|
{
|
||||||
|
compres.mValue = -1;
|
||||||
|
}
|
||||||
|
else if (((Float)flcom1).mValue < ((Float)flcom2).mValue)
|
||||||
|
{
|
||||||
|
compres.mValue = 1;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
compres.mValue = 0;
|
||||||
|
}
|
||||||
|
this._mThread.currentFrame.OpStack.Push(compres);
|
||||||
|
}
|
||||||
|
result = true;
|
||||||
|
break;
|
||||||
|
case 158:
|
||||||
|
short compareoffset1 = (short)((GlobalMemory.MethodArea.MethodBuffer[this._mThread.PC] << 8) + GlobalMemory.MethodArea.MethodBuffer[this._mThread.PC + 1]);
|
||||||
|
BaseType comp1 = this._mThread.currentFrame.OpStack.Pop();
|
||||||
|
if (comp1 is Int)
|
||||||
|
{
|
||||||
|
if (((Int)comp1).mValue <= 0)
|
||||||
|
{
|
||||||
|
this._mThread.PC += -1 + compareoffset1;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
this._mThread.PC += 2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
this._mThread.PC += 2;
|
||||||
|
}
|
||||||
|
result = true;
|
||||||
|
break;
|
||||||
|
case 162:
|
||||||
|
short compareoffset = (short)((GlobalMemory.MethodArea.MethodBuffer[this._mThread.PC] << 8) + GlobalMemory.MethodArea.MethodBuffer[this._mThread.PC + 1]);
|
||||||
|
BaseType bc2 = this._mThread.currentFrame.OpStack.Pop();
|
||||||
|
BaseType bc1 = this._mThread.currentFrame.OpStack.Pop();
|
||||||
|
if (bc1 is Int && bc2 is Int)
|
||||||
|
{
|
||||||
|
//Console.WriteLine("comparing " + ((Int)bc1).mValue + " and " + ((Int)bc2).mValue);
|
||||||
|
if (((Int)bc1).mValue >= ((Int)bc2).mValue)
|
||||||
|
{
|
||||||
|
// Console.WriteLine("branch compare true , offset is " +compareoffset);
|
||||||
|
// Console.WriteLine("current PC is " + this._mThread.PC);
|
||||||
|
this._mThread.PC += -1 + compareoffset;
|
||||||
|
//Console.WriteLine("new PC is " + this._mThread.PC);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
//Console.WriteLine("branch compare false");
|
||||||
|
this._mThread.PC += 2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
this._mThread.PC += 2;
|
||||||
|
}
|
||||||
|
result = true;
|
||||||
|
break;
|
||||||
|
case 164:
|
||||||
|
short compareloffset = (short)((GlobalMemory.MethodArea.MethodBuffer[this._mThread.PC] << 8) + GlobalMemory.MethodArea.MethodBuffer[this._mThread.PC + 1]);
|
||||||
|
BaseType bcl2 = this._mThread.currentFrame.OpStack.Pop();
|
||||||
|
BaseType bcl1 = this._mThread.currentFrame.OpStack.Pop();
|
||||||
|
if (bcl1 is Int && bcl2 is Int)
|
||||||
|
{
|
||||||
|
//Console.WriteLine("comparing " + ((Int)bcl1).mValue + " and " + ((Int)bcl2).mValue);
|
||||||
|
if (((Int)bcl1).mValue <= ((Int)bcl2).mValue)
|
||||||
|
{
|
||||||
|
// Console.WriteLine("branch compare true , offset is " + compareloffset);
|
||||||
|
// Console.WriteLine("current PC is " + this._mThread.PC);
|
||||||
|
this._mThread.PC += -1 + compareloffset;
|
||||||
|
// Console.WriteLine("new PC is " + this._mThread.PC);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
//Console.WriteLine("branch compare false");
|
||||||
|
this._mThread.PC += 2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
this._mThread.PC += 2;
|
||||||
|
}
|
||||||
|
result = true;
|
||||||
|
break;
|
||||||
|
case 167:
|
||||||
|
short offset = (short)((GlobalMemory.MethodArea.MethodBuffer[this._mThread.PC] << 8) + GlobalMemory.MethodArea.MethodBuffer[this._mThread.PC+1]);
|
||||||
|
this._mThread.PC += -1 + offset;
|
||||||
|
result = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,139 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Text;
|
||||||
|
using OpenSim.Scripting.EmbeddedJVM.Types;
|
||||||
|
using OpenSim.Scripting.EmbeddedJVM.Types.PrimitiveTypes;
|
||||||
|
using OpenSim.Framework.Interfaces;
|
||||||
|
using OpenSim.Framework;
|
||||||
|
|
||||||
|
namespace OpenSim.Scripting.EmbeddedJVM
|
||||||
|
{
|
||||||
|
partial class Thread
|
||||||
|
{
|
||||||
|
private partial class Interpreter
|
||||||
|
{
|
||||||
|
private bool IsMethodOpCode(byte opcode)
|
||||||
|
{
|
||||||
|
bool result = false;
|
||||||
|
switch (opcode)
|
||||||
|
{
|
||||||
|
case 184:
|
||||||
|
short refIndex = (short) ((GlobalMemory.MethodArea.MethodBuffer[this._mThread.PC] << 8) + GlobalMemory.MethodArea.MethodBuffer[this._mThread.PC+1]);
|
||||||
|
//Console.WriteLine("call to method : "+refIndex);
|
||||||
|
if (this._mThread.currentClass._constantsPool[refIndex - 1] is ClassRecord.PoolMethodRef)
|
||||||
|
{
|
||||||
|
// Console.WriteLine("which is " + ((ClassRecord.PoolMethodRef)this._mThread.currentClass._constantsPool[refIndex - 1]).mClass.Name.Value + "." + ((ClassRecord.PoolMethodRef)this._mThread.currentClass._constantsPool[refIndex - 1]).mNameType.Name.Value);
|
||||||
|
// Console.WriteLine("of type " + ((ClassRecord.PoolMethodRef)this._mThread.currentClass._constantsPool[refIndex - 1]).mNameType.Type.Value);
|
||||||
|
string typ = ((ClassRecord.PoolMethodRef)this._mThread.currentClass._constantsPool[refIndex - 1]).mNameType.Type.Value;
|
||||||
|
string typeparam = "";
|
||||||
|
string typereturn = "";
|
||||||
|
int firstbrak = 0;
|
||||||
|
int secondbrak = 0;
|
||||||
|
firstbrak = typ.LastIndexOf('(');
|
||||||
|
secondbrak = typ.LastIndexOf(')');
|
||||||
|
typeparam = typ.Substring(firstbrak + 1, secondbrak - firstbrak - 1);
|
||||||
|
typereturn = typ.Substring(secondbrak + 1, typ.Length - secondbrak - 1);
|
||||||
|
//Console.WriteLine("split is " + typeparam + " which is length " + typeparam.Length + " , " + typereturn);
|
||||||
|
if (((ClassRecord.PoolMethodRef)this._mThread.currentClass._constantsPool[refIndex - 1]).mClass.Name.Value == this._mThread.currentClass.mClass.Name.Value)
|
||||||
|
{
|
||||||
|
//calling a method in this class
|
||||||
|
if (typeparam.Length == 0)
|
||||||
|
{
|
||||||
|
this._mThread.JumpToStaticVoidMethod(((ClassRecord.PoolMethodRef)this._mThread.currentClass._constantsPool[refIndex - 1]).mNameType.Name.Value, (this._mThread.PC + 2));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
this._mThread.JumpToStaticParamMethod(((ClassRecord.PoolMethodRef)this._mThread.currentClass._constantsPool[refIndex - 1]).mNameType.Name.Value, typeparam, (this._mThread.PC + 2));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
//calling a method of a different class
|
||||||
|
|
||||||
|
//for now we will have a built in OpenSimAPI class, but this should be a java class that then calls native methods
|
||||||
|
if (((ClassRecord.PoolMethodRef)this._mThread.currentClass._constantsPool[refIndex - 1]).mClass.Name.Value == "OpenSimAPI")
|
||||||
|
{
|
||||||
|
switch (((ClassRecord.PoolMethodRef)this._mThread.currentClass._constantsPool[refIndex - 1]).mNameType.Name.Value)
|
||||||
|
{
|
||||||
|
case "GetEntityID":
|
||||||
|
Int entityID = new Int();
|
||||||
|
entityID.mValue =(int) this._mThread.EntityId;
|
||||||
|
this._mThread.currentFrame.OpStack.Push(entityID);
|
||||||
|
this._mThread.PC += 2;
|
||||||
|
break;
|
||||||
|
case "GetRandomAvatarID":
|
||||||
|
entityID = new Int();
|
||||||
|
entityID.mValue = (int)Thread.OpenSimScriptAPI.GetRandomAvatarID();
|
||||||
|
this._mThread.currentFrame.OpStack.Push(entityID);
|
||||||
|
this._mThread.PC += 2;
|
||||||
|
break;
|
||||||
|
case "GetEntityPositionX":
|
||||||
|
BaseType bs1 = this._mThread.currentFrame.OpStack.Pop();
|
||||||
|
if (bs1 is Int)
|
||||||
|
{
|
||||||
|
Console.WriteLine("get entity pos for " + ((Int)bs1).mValue);
|
||||||
|
//should get the position of the entity from the IScriptAPI
|
||||||
|
OSVector3 vec3 = Thread.OpenSimScriptAPI.GetEntityPosition((uint)((Int)bs1).mValue);
|
||||||
|
Float pos = new Float();
|
||||||
|
pos.mValue = vec3.X;
|
||||||
|
this._mThread.currentFrame.OpStack.Push(pos);
|
||||||
|
}
|
||||||
|
this._mThread.PC += 2;
|
||||||
|
break;
|
||||||
|
case "GetEntityPositionY":
|
||||||
|
bs1 = this._mThread.currentFrame.OpStack.Pop();
|
||||||
|
if (bs1 is Int)
|
||||||
|
{
|
||||||
|
//should get the position of the entity from the IScriptAPI
|
||||||
|
OSVector3 vec3 = Thread.OpenSimScriptAPI.GetEntityPosition((uint)((Int)bs1).mValue);
|
||||||
|
Float pos = new Float();
|
||||||
|
pos.mValue = vec3.Y;
|
||||||
|
this._mThread.currentFrame.OpStack.Push(pos);
|
||||||
|
}
|
||||||
|
this._mThread.PC += 2;
|
||||||
|
break;
|
||||||
|
case "GetEntityPositionZ":
|
||||||
|
bs1 = this._mThread.currentFrame.OpStack.Pop();
|
||||||
|
if (bs1 is Int)
|
||||||
|
{
|
||||||
|
//should get the position of the entity from the IScriptAPI
|
||||||
|
OSVector3 vec3 = Thread.OpenSimScriptAPI.GetEntityPosition((uint)((Int)bs1).mValue);
|
||||||
|
Float pos = new Float();
|
||||||
|
pos.mValue = vec3.Z;
|
||||||
|
this._mThread.currentFrame.OpStack.Push(pos);
|
||||||
|
}
|
||||||
|
this._mThread.PC += 2;
|
||||||
|
break;
|
||||||
|
case "SetEntityPosition":
|
||||||
|
//pop the three float values and the entity id
|
||||||
|
BaseType ft3 = this._mThread.currentFrame.OpStack.Pop();
|
||||||
|
BaseType ft2 = this._mThread.currentFrame.OpStack.Pop();
|
||||||
|
BaseType ft1 = this._mThread.currentFrame.OpStack.Pop();
|
||||||
|
BaseType in1 = this._mThread.currentFrame.OpStack.Pop();
|
||||||
|
if (ft1 is Float && ft2 is Float && ft3 is Float)
|
||||||
|
{
|
||||||
|
if(in1 is Int)
|
||||||
|
{
|
||||||
|
//Console.WriteLine("set: " + ((Int)in1).mValue + " , " + ((Float)ft1).mValue + " , " + ((Float)ft2).mValue + " , " + ((Float)ft3).mValue);
|
||||||
|
Thread.OpenSimScriptAPI.SetEntityPosition((uint)((Int) in1).mValue, ((Float)ft1).mValue, ((Float)ft2).mValue, ((Float)ft3).mValue);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this._mThread.PC += 2;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
this._mThread.PC += 2;
|
||||||
|
}
|
||||||
|
result = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,13 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
|
namespace OpenSim.Scripting.EmbeddedJVM
|
||||||
|
{
|
||||||
|
partial class Thread
|
||||||
|
{
|
||||||
|
private partial class Interpreter
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,18 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
|
namespace OpenSim.Scripting.EmbeddedJVM
|
||||||
|
{
|
||||||
|
public class MainMemory
|
||||||
|
{
|
||||||
|
public Heap HeapArea;
|
||||||
|
public MethodMemory MethodArea;
|
||||||
|
|
||||||
|
public MainMemory()
|
||||||
|
{
|
||||||
|
MethodArea = new MethodMemory();
|
||||||
|
HeapArea = new Heap();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,19 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
|
namespace OpenSim.Scripting.EmbeddedJVM
|
||||||
|
{
|
||||||
|
public class MethodMemory
|
||||||
|
{
|
||||||
|
public byte[] MethodBuffer;
|
||||||
|
public List<ClassRecord> Classes = new List<ClassRecord>();
|
||||||
|
public int NextMethodPC = 0;
|
||||||
|
public int Methodcount = 0;
|
||||||
|
|
||||||
|
public MethodMemory()
|
||||||
|
{
|
||||||
|
MethodBuffer = new byte[20000];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,153 @@
|
||||||
|
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<PropertyGroup>
|
||||||
|
<ProjectType>Local</ProjectType>
|
||||||
|
<ProductVersion>8.0.50727</ProductVersion>
|
||||||
|
<SchemaVersion>2.0</SchemaVersion>
|
||||||
|
<ProjectGuid>{97A82740-0000-0000-0000-000000000000}</ProjectGuid>
|
||||||
|
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||||
|
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||||
|
<ApplicationIcon></ApplicationIcon>
|
||||||
|
<AssemblyKeyContainerName>
|
||||||
|
</AssemblyKeyContainerName>
|
||||||
|
<AssemblyName>OpenSim.Scripting.EmbeddedJVM</AssemblyName>
|
||||||
|
<DefaultClientScript>JScript</DefaultClientScript>
|
||||||
|
<DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>
|
||||||
|
<DefaultTargetSchema>IE50</DefaultTargetSchema>
|
||||||
|
<DelaySign>false</DelaySign>
|
||||||
|
<OutputType>Library</OutputType>
|
||||||
|
<AppDesignerFolder></AppDesignerFolder>
|
||||||
|
<RootNamespace>OpenSim.Scripting.EmbeddedJVM</RootNamespace>
|
||||||
|
<StartupObject></StartupObject>
|
||||||
|
<FileUpgradeFlags>
|
||||||
|
</FileUpgradeFlags>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||||
|
<AllowUnsafeBlocks>False</AllowUnsafeBlocks>
|
||||||
|
<BaseAddress>285212672</BaseAddress>
|
||||||
|
<CheckForOverflowUnderflow>False</CheckForOverflowUnderflow>
|
||||||
|
<ConfigurationOverrideFile>
|
||||||
|
</ConfigurationOverrideFile>
|
||||||
|
<DefineConstants>TRACE;DEBUG</DefineConstants>
|
||||||
|
<DocumentationFile></DocumentationFile>
|
||||||
|
<DebugSymbols>True</DebugSymbols>
|
||||||
|
<FileAlignment>4096</FileAlignment>
|
||||||
|
<Optimize>False</Optimize>
|
||||||
|
<OutputPath>..\bin\ScriptEngines\</OutputPath>
|
||||||
|
<RegisterForComInterop>False</RegisterForComInterop>
|
||||||
|
<RemoveIntegerChecks>False</RemoveIntegerChecks>
|
||||||
|
<TreatWarningsAsErrors>False</TreatWarningsAsErrors>
|
||||||
|
<WarningLevel>4</WarningLevel>
|
||||||
|
<NoWarn></NoWarn>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||||
|
<AllowUnsafeBlocks>False</AllowUnsafeBlocks>
|
||||||
|
<BaseAddress>285212672</BaseAddress>
|
||||||
|
<CheckForOverflowUnderflow>False</CheckForOverflowUnderflow>
|
||||||
|
<ConfigurationOverrideFile>
|
||||||
|
</ConfigurationOverrideFile>
|
||||||
|
<DefineConstants>TRACE</DefineConstants>
|
||||||
|
<DocumentationFile></DocumentationFile>
|
||||||
|
<DebugSymbols>False</DebugSymbols>
|
||||||
|
<FileAlignment>4096</FileAlignment>
|
||||||
|
<Optimize>True</Optimize>
|
||||||
|
<OutputPath>..\bin\ScriptEngines\</OutputPath>
|
||||||
|
<RegisterForComInterop>False</RegisterForComInterop>
|
||||||
|
<RemoveIntegerChecks>False</RemoveIntegerChecks>
|
||||||
|
<TreatWarningsAsErrors>False</TreatWarningsAsErrors>
|
||||||
|
<WarningLevel>4</WarningLevel>
|
||||||
|
<NoWarn></NoWarn>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Reference Include="System" >
|
||||||
|
<HintPath>System.dll</HintPath>
|
||||||
|
<Private>False</Private>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.Xml" >
|
||||||
|
<HintPath>System.Xml.dll</HintPath>
|
||||||
|
<Private>False</Private>
|
||||||
|
</Reference>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\OpenSim.Framework\OpenSim.Framework.csproj">
|
||||||
|
<Name>OpenSim.Framework</Name>
|
||||||
|
<Project>{8ACA2445-0000-0000-0000-000000000000}</Project>
|
||||||
|
<Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
|
||||||
|
<Private>False</Private>
|
||||||
|
</ProjectReference>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Compile Include="ClassInstance.cs">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="ClassRecord.cs">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Heap.cs">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Interpreter.cs">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="InterpreterLogic.cs">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="InterpreterMethods.cs">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="InterpreterReturn.cs">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="MainMemory.cs">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="MethodMemory.cs">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Object.cs">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="OpenSimJVM.cs">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Stack.cs">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="StackFrame.cs">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Thread.cs">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Properties\AssemblyInfo.cs">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Types\ArrayReference.cs">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Types\BaseType.cs">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Types\ObjectReference.cs">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Types\PrimitiveTypes\Byte.cs">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Types\PrimitiveTypes\Char.cs">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Types\PrimitiveTypes\Float.cs">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Types\PrimitiveTypes\Int.cs">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
|
</ItemGroup>
|
||||||
|
<Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" />
|
||||||
|
<PropertyGroup>
|
||||||
|
<PreBuildEvent>
|
||||||
|
</PreBuildEvent>
|
||||||
|
<PostBuildEvent>
|
||||||
|
</PostBuildEvent>
|
||||||
|
</PropertyGroup>
|
||||||
|
</Project>
|
|
@ -0,0 +1,12 @@
|
||||||
|
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<PropertyGroup>
|
||||||
|
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||||
|
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||||
|
<ReferencePath>C:\New Folder\second-life-viewer\opensim-dailys2\opensim02-04\bin\</ReferencePath>
|
||||||
|
<LastOpenVersion>8.0.50727</LastOpenVersion>
|
||||||
|
<ProjectView>ProjectFiles</ProjectView>
|
||||||
|
<ProjectTrust>0</ProjectTrust>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition = " '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' " />
|
||||||
|
<PropertyGroup Condition = " '$(Configuration)|$(Platform)' == 'Release|AnyCPU' " />
|
||||||
|
</Project>
|
|
@ -0,0 +1,62 @@
|
||||||
|
<?xml version="1.0" ?>
|
||||||
|
<project name="OpenSim.Scripting.EmbeddedJVM" default="build">
|
||||||
|
<target name="build">
|
||||||
|
<echo message="Build Directory is ${project::get-base-directory()}/${build.dir}" />
|
||||||
|
<mkdir dir="${project::get-base-directory()}/${build.dir}" />
|
||||||
|
<copy todir="${project::get-base-directory()}/${build.dir}">
|
||||||
|
<fileset basedir="${project::get-base-directory()}">
|
||||||
|
</fileset>
|
||||||
|
</copy>
|
||||||
|
<csc target="library" debug="${build.debug}" unsafe="False" define="TRACE;DEBUG" output="${project::get-base-directory()}/${build.dir}/${project::get-name()}.dll">
|
||||||
|
<resources prefix="OpenSim.Scripting.EmbeddedJVM" dynamicprefix="true" >
|
||||||
|
</resources>
|
||||||
|
<sources failonempty="true">
|
||||||
|
<include name="ClassInstance.cs" />
|
||||||
|
<include name="ClassRecord.cs" />
|
||||||
|
<include name="Heap.cs" />
|
||||||
|
<include name="Interpreter.cs" />
|
||||||
|
<include name="InterpreterLogic.cs" />
|
||||||
|
<include name="InterpreterMethods.cs" />
|
||||||
|
<include name="InterpreterReturn.cs" />
|
||||||
|
<include name="MainMemory.cs" />
|
||||||
|
<include name="MethodMemory.cs" />
|
||||||
|
<include name="Object.cs" />
|
||||||
|
<include name="OpenSimJVM.cs" />
|
||||||
|
<include name="Stack.cs" />
|
||||||
|
<include name="StackFrame.cs" />
|
||||||
|
<include name="Thread.cs" />
|
||||||
|
<include name="Properties/AssemblyInfo.cs" />
|
||||||
|
<include name="Types/ArrayReference.cs" />
|
||||||
|
<include name="Types/BaseType.cs" />
|
||||||
|
<include name="Types/ObjectReference.cs" />
|
||||||
|
<include name="Types/PrimitiveTypes/Byte.cs" />
|
||||||
|
<include name="Types/PrimitiveTypes/Char.cs" />
|
||||||
|
<include name="Types/PrimitiveTypes/Float.cs" />
|
||||||
|
<include name="Types/PrimitiveTypes/Int.cs" />
|
||||||
|
</sources>
|
||||||
|
<references basedir="${project::get-base-directory()}">
|
||||||
|
<lib>
|
||||||
|
<include name="${project::get-base-directory()}" />
|
||||||
|
<include name="${project::get-base-directory()}/${build.dir}" />
|
||||||
|
</lib>
|
||||||
|
<include name="System.dll" />
|
||||||
|
<include name="System.Xml.dll" />
|
||||||
|
<include name="../bin/OpenSim.Framework.dll" />
|
||||||
|
</references>
|
||||||
|
</csc>
|
||||||
|
<echo message="Copying from [${project::get-base-directory()}/${build.dir}/] to [${project::get-base-directory()}/../bin/ScriptEngines/" />
|
||||||
|
<mkdir dir="${project::get-base-directory()}/../bin/ScriptEngines/"/>
|
||||||
|
<copy todir="${project::get-base-directory()}/../bin/ScriptEngines/">
|
||||||
|
<fileset basedir="${project::get-base-directory()}/${build.dir}/" >
|
||||||
|
<include name="*.dll"/>
|
||||||
|
<include name="*.exe"/>
|
||||||
|
</fileset>
|
||||||
|
</copy>
|
||||||
|
</target>
|
||||||
|
<target name="clean">
|
||||||
|
<delete dir="${bin.dir}" failonerror="false" />
|
||||||
|
<delete dir="${obj.dir}" failonerror="false" />
|
||||||
|
</target>
|
||||||
|
<target name="doc" description="Creates documentation.">
|
||||||
|
</target>
|
||||||
|
</project>
|
|
@ -0,0 +1,133 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Text;
|
||||||
|
using System.IO;
|
||||||
|
using System.Threading;
|
||||||
|
using OpenSim.Framework;
|
||||||
|
using OpenSim.Framework.Interfaces;
|
||||||
|
using OpenSim.Framework.Utilities;
|
||||||
|
|
||||||
|
namespace OpenSim.Scripting.EmbeddedJVM
|
||||||
|
{
|
||||||
|
public class OpenSimJVM : IScriptEngine
|
||||||
|
{
|
||||||
|
private List<Thread> _threads = new List<Thread>();
|
||||||
|
private BlockingQueue<CompileInfo> CompileScripts = new BlockingQueue<CompileInfo>();
|
||||||
|
private MainMemory _mainMemory;
|
||||||
|
private System.Threading.Thread compileThread;
|
||||||
|
|
||||||
|
public OpenSimJVM()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool Init(IScriptAPI api)
|
||||||
|
{
|
||||||
|
Console.WriteLine("Creating OpenSim JVM scripting engine");
|
||||||
|
_mainMemory = new MainMemory();
|
||||||
|
Thread.GlobalMemory = this._mainMemory;
|
||||||
|
Thread.OpenSimScriptAPI = api;
|
||||||
|
compileThread = new System.Threading.Thread(new ThreadStart(CompileScript));
|
||||||
|
compileThread.IsBackground = true;
|
||||||
|
compileThread.Start();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public string GetName()
|
||||||
|
{
|
||||||
|
return "OpenSimJVM";
|
||||||
|
}
|
||||||
|
|
||||||
|
public void LoadScript(string script, string scriptName, uint entityID)
|
||||||
|
{
|
||||||
|
Console.WriteLine("OpenSimJVM - loading new script: " + scriptName);
|
||||||
|
CompileInfo comp = new CompileInfo();
|
||||||
|
comp.entityId = entityID;
|
||||||
|
comp.script = script;
|
||||||
|
comp.scriptName = scriptName;
|
||||||
|
this.CompileScripts.Enqueue(comp);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void CompileScript()
|
||||||
|
{
|
||||||
|
while (true)
|
||||||
|
{
|
||||||
|
CompileInfo comp = this.CompileScripts.Dequeue();
|
||||||
|
string script = comp.script;
|
||||||
|
string scriptName = comp.scriptName;
|
||||||
|
uint entityID = comp.entityId;
|
||||||
|
try
|
||||||
|
{
|
||||||
|
//need to compile the script into a java class file
|
||||||
|
|
||||||
|
//first save it to a java source file
|
||||||
|
TextWriter tw = new StreamWriter(scriptName + ".java");
|
||||||
|
tw.WriteLine(script);
|
||||||
|
tw.Close();
|
||||||
|
|
||||||
|
//now compile
|
||||||
|
System.Diagnostics.ProcessStartInfo psi = new System.Diagnostics.ProcessStartInfo(@"C:\Program Files\Java\jdk1.6.0_01\bin\javac.exe", "*.java");
|
||||||
|
psi.RedirectStandardOutput = true;
|
||||||
|
psi.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden;
|
||||||
|
psi.UseShellExecute = false;
|
||||||
|
System.Diagnostics.Process javacomp;
|
||||||
|
javacomp = System.Diagnostics.Process.Start(psi);
|
||||||
|
javacomp.WaitForExit();
|
||||||
|
|
||||||
|
|
||||||
|
//now load in class file
|
||||||
|
ClassRecord class1 = new ClassRecord();
|
||||||
|
class1.LoadClassFromFile(scriptName + ".class");
|
||||||
|
class1.PrintToConsole();
|
||||||
|
//Console.WriteLine();
|
||||||
|
this._mainMemory.MethodArea.Classes.Add(class1);
|
||||||
|
class1.AddMethodsToMemory(this._mainMemory.MethodArea);
|
||||||
|
|
||||||
|
Thread newThread = new Thread();
|
||||||
|
this._threads.Add(newThread);
|
||||||
|
newThread.EntityId = entityID;
|
||||||
|
newThread.currentClass = class1;
|
||||||
|
|
||||||
|
//now delete the created files
|
||||||
|
System.IO.File.Delete(scriptName + ".java");
|
||||||
|
System.IO.File.Delete(scriptName + ".class");
|
||||||
|
this.OnFrame();
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
Console.WriteLine("exception");
|
||||||
|
Console.WriteLine(e.StackTrace);
|
||||||
|
Console.WriteLine(e.Message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void OnFrame()
|
||||||
|
{
|
||||||
|
for (int i = 0; i < this._threads.Count; i++)
|
||||||
|
{
|
||||||
|
if (!this._threads[i].running)
|
||||||
|
{
|
||||||
|
this._threads[i].StartMethod("OnFrame");
|
||||||
|
bool run = true;
|
||||||
|
while (run)
|
||||||
|
{
|
||||||
|
run = this._threads[i].Excute();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private class CompileInfo
|
||||||
|
{
|
||||||
|
public string script;
|
||||||
|
public string scriptName;
|
||||||
|
public uint entityId;
|
||||||
|
|
||||||
|
public CompileInfo()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,33 @@
|
||||||
|
using System.Reflection;
|
||||||
|
using System.Runtime.CompilerServices;
|
||||||
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
|
// General Information about an assembly is controlled through the following
|
||||||
|
// set of attributes. Change these attribute values to modify the information
|
||||||
|
// associated with an assembly.
|
||||||
|
[assembly: AssemblyTitle("OpenSim.Scripting.EmbeddedJVM")]
|
||||||
|
[assembly: AssemblyDescription("")]
|
||||||
|
[assembly: AssemblyConfiguration("")]
|
||||||
|
[assembly: AssemblyCompany("")]
|
||||||
|
[assembly: AssemblyProduct("OpenSim.Scripting.EmbeddedJVM")]
|
||||||
|
[assembly: AssemblyCopyright("Copyright © 2007")]
|
||||||
|
[assembly: AssemblyTrademark("")]
|
||||||
|
[assembly: AssemblyCulture("")]
|
||||||
|
|
||||||
|
// Setting ComVisible to false makes the types in this assembly not visible
|
||||||
|
// to COM components. If you need to access a type in this assembly from
|
||||||
|
// COM, set the ComVisible attribute to true on that type.
|
||||||
|
[assembly: ComVisible(false)]
|
||||||
|
|
||||||
|
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||||
|
[assembly: Guid("087c0917-5a6a-4b47-a4dd-0928dd85bd4b")]
|
||||||
|
|
||||||
|
// Version information for an assembly consists of the following four values:
|
||||||
|
//
|
||||||
|
// Major Version
|
||||||
|
// Minor Version
|
||||||
|
// Build Number
|
||||||
|
// Revision
|
||||||
|
//
|
||||||
|
[assembly: AssemblyVersion("1.0.0.0")]
|
||||||
|
[assembly: AssemblyFileVersion("1.0.0.0")]
|
|
@ -0,0 +1,15 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
|
namespace OpenSim.Scripting.EmbeddedJVM
|
||||||
|
{
|
||||||
|
public class Stack
|
||||||
|
{
|
||||||
|
public Stack<StackFrame> StackFrames = new Stack<StackFrame>();
|
||||||
|
|
||||||
|
public Stack()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,22 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Text;
|
||||||
|
using OpenSim.Scripting.EmbeddedJVM.Types;
|
||||||
|
|
||||||
|
namespace OpenSim.Scripting.EmbeddedJVM
|
||||||
|
{
|
||||||
|
public class StackFrame
|
||||||
|
{
|
||||||
|
public BaseType[] LocalVariables;
|
||||||
|
public Stack<BaseType> OpStack = new Stack<BaseType>();
|
||||||
|
|
||||||
|
public int ReturnPC = 0;
|
||||||
|
public ClassRecord CallingClass = null;
|
||||||
|
|
||||||
|
public StackFrame()
|
||||||
|
{
|
||||||
|
LocalVariables = new BaseType[20];
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,88 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Text;
|
||||||
|
using OpenSim.Scripting.EmbeddedJVM.Types;
|
||||||
|
using OpenSim.Scripting.EmbeddedJVM.Types.PrimitiveTypes;
|
||||||
|
using OpenSim.Framework;
|
||||||
|
using OpenSim.Framework.Interfaces;
|
||||||
|
|
||||||
|
namespace OpenSim.Scripting.EmbeddedJVM
|
||||||
|
{
|
||||||
|
public partial class Thread
|
||||||
|
{
|
||||||
|
public static MainMemory GlobalMemory;
|
||||||
|
public static IScriptAPI OpenSimScriptAPI;
|
||||||
|
private int PC = 0;
|
||||||
|
private Stack stack;
|
||||||
|
private Interpreter mInterpreter;
|
||||||
|
public ClassRecord currentClass;
|
||||||
|
public ClassInstance currentInstance;
|
||||||
|
private StackFrame currentFrame;
|
||||||
|
public int excutionCounter = 0;
|
||||||
|
public bool running = false;
|
||||||
|
public uint EntityId = 0;
|
||||||
|
|
||||||
|
public Thread()
|
||||||
|
{
|
||||||
|
this.mInterpreter = new Interpreter(this);
|
||||||
|
this.stack = new Stack();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void SetPC(int methodpointer)
|
||||||
|
{
|
||||||
|
//Console.WriteLine("Thread PC has been set to " + methodpointer);
|
||||||
|
PC = methodpointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void StartMethod(ClassRecord rec, string methName)
|
||||||
|
{
|
||||||
|
currentFrame = new StackFrame();
|
||||||
|
this.stack.StackFrames.Push(currentFrame);
|
||||||
|
this.currentClass = rec;
|
||||||
|
currentClass.StartMethod(this, methName);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void StartMethod( string methName)
|
||||||
|
{
|
||||||
|
currentFrame = new StackFrame();
|
||||||
|
this.stack.StackFrames.Push(currentFrame);
|
||||||
|
currentClass.StartMethod(this, methName);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void JumpToStaticVoidMethod(string methName, int returnPC)
|
||||||
|
{
|
||||||
|
currentFrame = new StackFrame();
|
||||||
|
currentFrame.ReturnPC = returnPC;
|
||||||
|
this.stack.StackFrames.Push(currentFrame);
|
||||||
|
currentClass.StartMethod(this, methName);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void JumpToStaticParamMethod(string methName, string param, int returnPC)
|
||||||
|
{
|
||||||
|
if (param == "I")
|
||||||
|
{
|
||||||
|
BaseType bs1 = currentFrame.OpStack.Pop();
|
||||||
|
currentFrame = new StackFrame();
|
||||||
|
currentFrame.ReturnPC = returnPC;
|
||||||
|
this.stack.StackFrames.Push(currentFrame);
|
||||||
|
currentFrame.LocalVariables[0] = ((Int)bs1);
|
||||||
|
currentClass.StartMethod(this, methName);
|
||||||
|
}
|
||||||
|
if (param == "F")
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void JumpToClassStaticVoidMethod(string className, string methName, int returnPC)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool Excute()
|
||||||
|
{
|
||||||
|
excutionCounter++;
|
||||||
|
return this.mInterpreter.Excute();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,10 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
|
namespace OpenSim.Scripting.EmbeddedJVM.Types
|
||||||
|
{
|
||||||
|
public class ArrayReference :BaseType
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,10 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
|
namespace OpenSim.Scripting.EmbeddedJVM.Types
|
||||||
|
{
|
||||||
|
public class BaseType : Object
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,16 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
|
namespace OpenSim.Scripting.EmbeddedJVM.Types
|
||||||
|
{
|
||||||
|
public class ObjectReference : BaseType
|
||||||
|
{
|
||||||
|
public ushort Reference;
|
||||||
|
|
||||||
|
public ObjectReference()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,10 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
|
namespace OpenSim.Scripting.EmbeddedJVM.Types.PrimitiveTypes
|
||||||
|
{
|
||||||
|
public class Byte : BaseType
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,10 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
|
namespace OpenSim.Scripting.EmbeddedJVM.Types.PrimitiveTypes
|
||||||
|
{
|
||||||
|
public class Char : BaseType
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,16 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
|
namespace OpenSim.Scripting.EmbeddedJVM.Types.PrimitiveTypes
|
||||||
|
{
|
||||||
|
public class Float : BaseType
|
||||||
|
{
|
||||||
|
public float mValue = 0;
|
||||||
|
|
||||||
|
public Float()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,16 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
|
namespace OpenSim.Scripting.EmbeddedJVM.Types.PrimitiveTypes
|
||||||
|
{
|
||||||
|
public class Int : BaseType
|
||||||
|
{
|
||||||
|
public int mValue = 0;
|
||||||
|
|
||||||
|
public Int()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -74,8 +74,8 @@
|
||||||
<HintPath>..\bin\Kds.Serialization.dll</HintPath>
|
<HintPath>..\bin\Kds.Serialization.dll</HintPath>
|
||||||
<Private>False</Private>
|
<Private>False</Private>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="libDB_dotNET43.dll" >
|
<Reference Include="libdb_dotNET43.dll" >
|
||||||
<HintPath>..\bin\libDB_dotNET43.dll</HintPath>
|
<HintPath>..\bin\libdb_dotNET43.dll</HintPath>
|
||||||
<Private>False</Private>
|
<Private>False</Private>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="libsecondlife.dll" >
|
<Reference Include="libsecondlife.dll" >
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
<fileset basedir="${project::get-base-directory()}">
|
<fileset basedir="${project::get-base-directory()}">
|
||||||
</fileset>
|
</fileset>
|
||||||
</copy>
|
</copy>
|
||||||
<csc target="library" debug="${build.debug}" unsafe="False" define="TRACE" output="${project::get-base-directory()}/${build.dir}/${project::get-name()}.dll">
|
<csc target="library" debug="${build.debug}" unsafe="False" define="TRACE;DEBUG" output="${project::get-base-directory()}/${build.dir}/${project::get-name()}.dll">
|
||||||
<resources prefix="OpenSim.Storage.LocalStorageBerkeleyDB" dynamicprefix="true" >
|
<resources prefix="OpenSim.Storage.LocalStorageBerkeleyDB" dynamicprefix="true" >
|
||||||
</resources>
|
</resources>
|
||||||
<sources failonempty="true">
|
<sources failonempty="true">
|
||||||
|
|
|
@ -12,4 +12,5 @@ obj\Debug\ResolveAssemblyReference.cache
|
||||||
obj\Debug\OpenSim.Storage.LocalStorageBerkeleyDB.dll
|
obj\Debug\OpenSim.Storage.LocalStorageBerkeleyDB.dll
|
||||||
obj\Debug\OpenSim.Storage.LocalStorageBerkeleyDB.pdb
|
obj\Debug\OpenSim.Storage.LocalStorageBerkeleyDB.pdb
|
||||||
..\bin\OpenSim.Storage.LocalStorageBerkeleyDB.dll
|
..\bin\OpenSim.Storage.LocalStorageBerkeleyDB.dll
|
||||||
..\bin\OpenSim.Storage.LocalStorageBerkeleyDB.pdb
|
obj\Release\ResolveAssemblyReference.cache
|
||||||
|
obj\Release\OpenSim.Storage.LocalStorageBerkeleyDB.dll
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
<fileset basedir="${project::get-base-directory()}">
|
<fileset basedir="${project::get-base-directory()}">
|
||||||
</fileset>
|
</fileset>
|
||||||
</copy>
|
</copy>
|
||||||
<csc target="library" debug="${build.debug}" unsafe="False" define="TRACE" output="${project::get-base-directory()}/${build.dir}/${project::get-name()}.dll">
|
<csc target="library" debug="${build.debug}" unsafe="False" define="TRACE;DEBUG" output="${project::get-base-directory()}/${build.dir}/${project::get-name()}.dll">
|
||||||
<resources prefix="OpenSim.Storage.LocalStorageSQLite" dynamicprefix="true" >
|
<resources prefix="OpenSim.Storage.LocalStorageSQLite" dynamicprefix="true" >
|
||||||
</resources>
|
</resources>
|
||||||
<sources failonempty="true">
|
<sources failonempty="true">
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
<fileset basedir="${project::get-base-directory()}">
|
<fileset basedir="${project::get-base-directory()}">
|
||||||
</fileset>
|
</fileset>
|
||||||
</copy>
|
</copy>
|
||||||
<csc target="library" debug="${build.debug}" unsafe="False" define="TRACE" output="${project::get-base-directory()}/${build.dir}/${project::get-name()}.dll">
|
<csc target="library" debug="${build.debug}" unsafe="False" define="TRACE;DEBUG" output="${project::get-base-directory()}/${build.dir}/${project::get-name()}.dll">
|
||||||
<resources prefix="OpenSim.Storage.LocalStorageDb4o" dynamicprefix="true" >
|
<resources prefix="OpenSim.Storage.LocalStorageDb4o" dynamicprefix="true" >
|
||||||
</resources>
|
</resources>
|
||||||
<sources failonempty="true">
|
<sources failonempty="true">
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
<fileset basedir="${project::get-base-directory()}">
|
<fileset basedir="${project::get-base-directory()}">
|
||||||
</fileset>
|
</fileset>
|
||||||
</copy>
|
</copy>
|
||||||
<csc target="library" debug="${build.debug}" unsafe="False" define="TRACE" output="${project::get-base-directory()}/${build.dir}/${project::get-name()}.dll">
|
<csc target="library" debug="${build.debug}" unsafe="False" define="TRACE;DEBUG" output="${project::get-base-directory()}/${build.dir}/${project::get-name()}.dll">
|
||||||
<resources prefix="OpenSim.Terrain.BasicTerrain" dynamicprefix="true" >
|
<resources prefix="OpenSim.Terrain.BasicTerrain" dynamicprefix="true" >
|
||||||
</resources>
|
</resources>
|
||||||
<sources failonempty="true">
|
<sources failonempty="true">
|
||||||
|
|
|
@ -33,9 +33,12 @@ namespace OpenSim.Terrain
|
||||||
{
|
{
|
||||||
float[] heights = new float[w * h];
|
float[] heights = new float[w * h];
|
||||||
int i;
|
int i;
|
||||||
for(i=0;i<w*h;i++) {
|
|
||||||
|
for (i = 0; i < w * h; i++)
|
||||||
|
{
|
||||||
heights[i] = (float)heightmap.map[i / w, i % w];
|
heights[i] = (float)heightmap.map[i / w, i % w];
|
||||||
}
|
}
|
||||||
|
|
||||||
return heights;
|
return heights;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -6,6 +6,12 @@
|
||||||
<property name="obj.dir" value="obj" />
|
<property name="obj.dir" value="obj" />
|
||||||
<property name="doc.dir" value="doc" />
|
<property name="doc.dir" value="doc" />
|
||||||
<property name="project.main.dir" value="${project::get-base-directory()}" />
|
<property name="project.main.dir" value="${project::get-base-directory()}" />
|
||||||
|
|
||||||
|
<target name="Debug" description="">
|
||||||
|
<property name="project.config" value="Debug" />
|
||||||
|
<property name="build.debug" value="true" />
|
||||||
|
</target>
|
||||||
|
|
||||||
<property name="project.config" value="Release" />
|
<property name="project.config" value="Release" />
|
||||||
|
|
||||||
<target name="Release" description="">
|
<target name="Release" description="">
|
||||||
|
@ -13,12 +19,6 @@
|
||||||
<property name="build.debug" value="false" />
|
<property name="build.debug" value="false" />
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
|
|
||||||
<target name="Debug" description="">
|
|
||||||
<property name="project.config" value="Debug" />
|
|
||||||
<property name="build.debug" value="true" />
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<target name="net-1.1" description="Sets framework to .NET 1.1">
|
<target name="net-1.1" description="Sets framework to .NET 1.1">
|
||||||
<property name="nant.settings.currentframework" value="net-1.1" />
|
<property name="nant.settings.currentframework" value="net-1.1" />
|
||||||
</target>
|
</target>
|
||||||
|
@ -46,26 +46,27 @@
|
||||||
<echo message="Deleting all builds from all configurations" />
|
<echo message="Deleting all builds from all configurations" />
|
||||||
<delete dir="${bin.dir}" failonerror="false" />
|
<delete dir="${bin.dir}" failonerror="false" />
|
||||||
<delete dir="${obj.dir}" failonerror="false" />
|
<delete dir="${obj.dir}" failonerror="false" />
|
||||||
<nant buildfile="OpenSim.Storage.LocalStorageSQLite/OpenSim.Storage.LocalStorageSQLite.dll.build" target="clean" />
|
|
||||||
<nant buildfile="OpenSim.Framework/OpenSim.Framework.dll.build" target="clean" />
|
|
||||||
<nant buildfile="OpenSim.Framework.Console/OpenSim.Framework.Console.dll.build" target="clean" />
|
|
||||||
<nant buildfile="OpenSim.Physics/OdePlugin/OpenSim.Physics.OdePlugin.dll.build" target="clean" />
|
|
||||||
<nant buildfile="Servers/OpenSim.Servers.dll.build" target="clean" />
|
|
||||||
<nant buildfile="OpenSim.Physics/Manager/OpenSim.Physics.Manager.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="OpenGrid.Config/GridConfigDb4o/OpenGrid.Config.GridConfigDb4o.dll.build" target="clean" />
|
|
||||||
<nant buildfile="OpenSim/OpenSim.exe.build" target="clean" />
|
|
||||||
<nant buildfile="OpenSim.Storage/LocalStorageDb4o/OpenSim.Storage.LocalStorageDb4o.dll.build" target="clean" />
|
|
||||||
<nant buildfile="OpenUser.Config/UserConfigDb4o/OpenUser.Config.UserConfigDb4o.dll.build" target="clean" />
|
|
||||||
<nant buildfile="OpenSim.GridInterfaces/Remote/OpenSim.GridInterfaces.Remote.dll.build" target="clean" />
|
|
||||||
<nant buildfile="OpenSim.Terrain.BasicTerrain/OpenSim.Terrain.BasicTerrain.dll.build" target="clean" />
|
<nant buildfile="OpenSim.Terrain.BasicTerrain/OpenSim.Terrain.BasicTerrain.dll.build" target="clean" />
|
||||||
|
<nant buildfile="OpenSim.RegionServer/OpenSim.RegionServer.dll.build" target="clean" />
|
||||||
|
<nant buildfile="OpenSim.Physics/OdePlugin/OpenSim.Physics.OdePlugin.dll.build" target="clean" />
|
||||||
|
<nant buildfile="OpenSim.Framework.Console/OpenSim.Framework.Console.dll.build" target="clean" />
|
||||||
<nant buildfile="OpenSim.Storage.LocalStorageBerkeleyDB/OpenSim.Storage.LocalStorageBerkeleyDB.dll.build" target="clean" />
|
<nant buildfile="OpenSim.Storage.LocalStorageBerkeleyDB/OpenSim.Storage.LocalStorageBerkeleyDB.dll.build" target="clean" />
|
||||||
|
<nant buildfile="OpenSim/OpenSim.exe.build" target="clean" />
|
||||||
|
<nant buildfile="OpenSim.GenericConfig/Xml/OpenSim.GenericConfig.Xml.dll.build" target="clean" />
|
||||||
|
<nant buildfile="OpenSim.Physics/Manager/OpenSim.Physics.Manager.dll.build" target="clean" />
|
||||||
|
<nant buildfile="OpenSim.Scripting.EmbeddedJVM/OpenSim.Scripting.EmbeddedJVM.dll.build" target="clean" />
|
||||||
|
<nant buildfile="OpenGridServices.UserServer/OpenGridServices.UserServer.exe.build" target="clean" />
|
||||||
|
<nant buildfile="OpenSim.Physics/BasicPhysicsPlugin/OpenSim.Physics.BasicPhysicsPlugin.dll.build" target="clean" />
|
||||||
|
<nant buildfile="OpenGrid.Config/GridConfigDb4o/OpenGrid.Config.GridConfigDb4o.dll.build" target="clean" />
|
||||||
|
<nant buildfile="OpenSim.Physics/PhysXPlugin/OpenSim.Physics.PhysXPlugin.dll.build" target="clean" />
|
||||||
|
<nant buildfile="OpenSim.GridInterfaces/Remote/OpenSim.GridInterfaces.Remote.dll.build" target="clean" />
|
||||||
|
<nant buildfile="OpenSim.Framework/OpenSim.Framework.dll.build" target="clean" />
|
||||||
|
<nant buildfile="Servers/OpenSim.Servers.dll.build" target="clean" />
|
||||||
|
<nant buildfile="OpenSim.Storage/LocalStorageDb4o/OpenSim.Storage.LocalStorageDb4o.dll.build" target="clean" />
|
||||||
|
<nant buildfile="OpenSim.Storage.LocalStorageSQLite/OpenSim.Storage.LocalStorageSQLite.dll.build" target="clean" />
|
||||||
|
<nant buildfile="OpenUser.Config/UserConfigDb4o/OpenUser.Config.UserConfigDb4o.dll.build" target="clean" />
|
||||||
|
<nant buildfile="OpenSim.GridInterfaces/Local/OpenSim.GridInterfaces.Local.dll.build" target="clean" />
|
||||||
|
<nant buildfile="OpenGridServices.GridServer/OpenGridServices.GridServer.exe.build" target="clean" />
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
<target name="build" depends="init" description="">
|
<target name="build" depends="init" description="">
|
||||||
|
@ -83,6 +84,7 @@
|
||||||
<nant buildfile="OpenSim.Physics/PhysXPlugin/OpenSim.Physics.PhysXPlugin.dll.build" target="build" />
|
<nant buildfile="OpenSim.Physics/PhysXPlugin/OpenSim.Physics.PhysXPlugin.dll.build" target="build" />
|
||||||
<nant buildfile="OpenSim.Physics/OdePlugin/OpenSim.Physics.OdePlugin.dll.build" target="build" />
|
<nant buildfile="OpenSim.Physics/OdePlugin/OpenSim.Physics.OdePlugin.dll.build" target="build" />
|
||||||
<nant buildfile="OpenSim.GenericConfig/Xml/OpenSim.GenericConfig.Xml.dll.build" target="build" />
|
<nant buildfile="OpenSim.GenericConfig/Xml/OpenSim.GenericConfig.Xml.dll.build" target="build" />
|
||||||
|
<nant buildfile="OpenSim.Scripting.EmbeddedJVM/OpenSim.Scripting.EmbeddedJVM.dll.build" target="build" />
|
||||||
<nant buildfile="OpenSim.Terrain.BasicTerrain/OpenSim.Terrain.BasicTerrain.dll.build" target="build" />
|
<nant buildfile="OpenSim.Terrain.BasicTerrain/OpenSim.Terrain.BasicTerrain.dll.build" target="build" />
|
||||||
<nant buildfile="OpenSim.RegionServer/OpenSim.RegionServer.dll.build" target="build" />
|
<nant buildfile="OpenSim.RegionServer/OpenSim.RegionServer.dll.build" target="build" />
|
||||||
<nant buildfile="OpenSim/OpenSim.exe.build" target="build" />
|
<nant buildfile="OpenSim/OpenSim.exe.build" target="build" />
|
||||||
|
@ -99,26 +101,27 @@
|
||||||
|
|
||||||
<target name="doc" depends="build-release">
|
<target name="doc" depends="build-release">
|
||||||
<echo message="Generating all documentation from all builds" />
|
<echo message="Generating all documentation from all builds" />
|
||||||
<nant buildfile="OpenSim.Storage.LocalStorageSQLite/OpenSim.Storage.LocalStorageSQLite.dll.build" target="doc" />
|
|
||||||
<nant buildfile="OpenSim.Framework/OpenSim.Framework.dll.build" target="doc" />
|
|
||||||
<nant buildfile="OpenSim.Framework.Console/OpenSim.Framework.Console.dll.build" target="doc" />
|
|
||||||
<nant buildfile="OpenSim.Physics/OdePlugin/OpenSim.Physics.OdePlugin.dll.build" target="doc" />
|
|
||||||
<nant buildfile="Servers/OpenSim.Servers.dll.build" target="doc" />
|
|
||||||
<nant buildfile="OpenSim.Physics/Manager/OpenSim.Physics.Manager.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="OpenGrid.Config/GridConfigDb4o/OpenGrid.Config.GridConfigDb4o.dll.build" target="doc" />
|
|
||||||
<nant buildfile="OpenSim/OpenSim.exe.build" target="doc" />
|
|
||||||
<nant buildfile="OpenSim.Storage/LocalStorageDb4o/OpenSim.Storage.LocalStorageDb4o.dll.build" target="doc" />
|
|
||||||
<nant buildfile="OpenUser.Config/UserConfigDb4o/OpenUser.Config.UserConfigDb4o.dll.build" target="doc" />
|
|
||||||
<nant buildfile="OpenSim.GridInterfaces/Remote/OpenSim.GridInterfaces.Remote.dll.build" target="doc" />
|
|
||||||
<nant buildfile="OpenSim.Terrain.BasicTerrain/OpenSim.Terrain.BasicTerrain.dll.build" target="doc" />
|
<nant buildfile="OpenSim.Terrain.BasicTerrain/OpenSim.Terrain.BasicTerrain.dll.build" target="doc" />
|
||||||
|
<nant buildfile="OpenSim.RegionServer/OpenSim.RegionServer.dll.build" target="doc" />
|
||||||
|
<nant buildfile="OpenSim.Physics/OdePlugin/OpenSim.Physics.OdePlugin.dll.build" target="doc" />
|
||||||
|
<nant buildfile="OpenSim.Framework.Console/OpenSim.Framework.Console.dll.build" target="doc" />
|
||||||
<nant buildfile="OpenSim.Storage.LocalStorageBerkeleyDB/OpenSim.Storage.LocalStorageBerkeleyDB.dll.build" target="doc" />
|
<nant buildfile="OpenSim.Storage.LocalStorageBerkeleyDB/OpenSim.Storage.LocalStorageBerkeleyDB.dll.build" target="doc" />
|
||||||
|
<nant buildfile="OpenSim/OpenSim.exe.build" target="doc" />
|
||||||
|
<nant buildfile="OpenSim.GenericConfig/Xml/OpenSim.GenericConfig.Xml.dll.build" target="doc" />
|
||||||
|
<nant buildfile="OpenSim.Physics/Manager/OpenSim.Physics.Manager.dll.build" target="doc" />
|
||||||
|
<nant buildfile="OpenSim.Scripting.EmbeddedJVM/OpenSim.Scripting.EmbeddedJVM.dll.build" target="doc" />
|
||||||
|
<nant buildfile="OpenGridServices.UserServer/OpenGridServices.UserServer.exe.build" target="doc" />
|
||||||
|
<nant buildfile="OpenSim.Physics/BasicPhysicsPlugin/OpenSim.Physics.BasicPhysicsPlugin.dll.build" target="doc" />
|
||||||
|
<nant buildfile="OpenGrid.Config/GridConfigDb4o/OpenGrid.Config.GridConfigDb4o.dll.build" target="doc" />
|
||||||
|
<nant buildfile="OpenSim.Physics/PhysXPlugin/OpenSim.Physics.PhysXPlugin.dll.build" target="doc" />
|
||||||
|
<nant buildfile="OpenSim.GridInterfaces/Remote/OpenSim.GridInterfaces.Remote.dll.build" target="doc" />
|
||||||
|
<nant buildfile="OpenSim.Framework/OpenSim.Framework.dll.build" target="doc" />
|
||||||
|
<nant buildfile="Servers/OpenSim.Servers.dll.build" target="doc" />
|
||||||
|
<nant buildfile="OpenSim.Storage/LocalStorageDb4o/OpenSim.Storage.LocalStorageDb4o.dll.build" target="doc" />
|
||||||
|
<nant buildfile="OpenSim.Storage.LocalStorageSQLite/OpenSim.Storage.LocalStorageSQLite.dll.build" target="doc" />
|
||||||
|
<nant buildfile="OpenUser.Config/UserConfigDb4o/OpenUser.Config.UserConfigDb4o.dll.build" target="doc" />
|
||||||
|
<nant buildfile="OpenSim.GridInterfaces/Local/OpenSim.GridInterfaces.Local.dll.build" target="doc" />
|
||||||
|
<nant buildfile="OpenGridServices.GridServer/OpenGridServices.GridServer.exe.build" target="doc" />
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
|
|
40
OpenSim.sln
40
OpenSim.sln
|
@ -1,34 +1,36 @@
|
||||||
Microsoft Visual Studio Solution File, Format Version 9.00
|
Microsoft Visual Studio Solution File, Format Version 9.00
|
||||||
# Visual Studio 2005
|
# Visual C# Express 2005
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.Terrain.BasicTerrain", "OpenSim.Terrain.BasicTerrain\OpenSim.Terrain.BasicTerrain.csproj", "{2270B8FE-0000-0000-0000-000000000000}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.Terrain.BasicTerrain", "OpenSim.Terrain.BasicTerrain\OpenSim.Terrain.BasicTerrain.csproj", "{2270B8FE-0000-0000-0000-000000000000}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.Storage.LocalStorageBerkeleyDB", "OpenSim.Storage.LocalStorageBerkeleyDB\OpenSim.Storage.LocalStorageBerkeleyDB.csproj", "{EE9E5D96-0000-0000-0000-000000000000}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.RegionServer", "OpenSim.RegionServer\OpenSim.RegionServer.csproj", "{632E1BFD-0000-0000-0000-000000000000}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.Physics.OdePlugin", "OpenSim.Physics\OdePlugin\OpenSim.Physics.OdePlugin.csproj", "{63A05FE9-0000-0000-0000-000000000000}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.Physics.OdePlugin", "OpenSim.Physics\OdePlugin\OpenSim.Physics.OdePlugin.csproj", "{63A05FE9-0000-0000-0000-000000000000}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.Framework.Console", "OpenSim.Framework.Console\OpenSim.Framework.Console.csproj", "{A7CD0630-0000-0000-0000-000000000000}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.Framework.Console", "OpenSim.Framework.Console\OpenSim.Framework.Console.csproj", "{A7CD0630-0000-0000-0000-000000000000}"
|
||||||
EndProject
|
EndProject
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.Storage.LocalStorageBerkeleyDB", "OpenSim.Storage.LocalStorageBerkeleyDB\OpenSim.Storage.LocalStorageBerkeleyDB.csproj", "{EE9E5D96-0000-0000-0000-000000000000}"
|
||||||
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim", "OpenSim\OpenSim.csproj", "{438A9556-0000-0000-0000-000000000000}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim", "OpenSim\OpenSim.csproj", "{438A9556-0000-0000-0000-000000000000}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.GenericConfig.Xml", "OpenSim.GenericConfig\Xml\OpenSim.GenericConfig.Xml.csproj", "{E88EF749-0000-0000-0000-000000000000}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.GenericConfig.Xml", "OpenSim.GenericConfig\Xml\OpenSim.GenericConfig.Xml.csproj", "{E88EF749-0000-0000-0000-000000000000}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.Physics.Manager", "OpenSim.Physics\Manager\OpenSim.Physics.Manager.csproj", "{8BE16150-0000-0000-0000-000000000000}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.Physics.Manager", "OpenSim.Physics\Manager\OpenSim.Physics.Manager.csproj", "{8BE16150-0000-0000-0000-000000000000}"
|
||||||
EndProject
|
EndProject
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.Scripting.EmbeddedJVM", "OpenSim.Scripting.EmbeddedJVM\OpenSim.Scripting.EmbeddedJVM.csproj", "{97A82740-0000-0000-0000-000000000000}"
|
||||||
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenGridServices.UserServer", "OpenGridServices.UserServer\OpenGridServices.UserServer.csproj", "{66591469-0000-0000-0000-000000000000}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenGridServices.UserServer", "OpenGridServices.UserServer\OpenGridServices.UserServer.csproj", "{66591469-0000-0000-0000-000000000000}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.Physics.BasicPhysicsPlugin", "OpenSim.Physics\BasicPhysicsPlugin\OpenSim.Physics.BasicPhysicsPlugin.csproj", "{4F874463-0000-0000-0000-000000000000}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.Physics.BasicPhysicsPlugin", "OpenSim.Physics\BasicPhysicsPlugin\OpenSim.Physics.BasicPhysicsPlugin.csproj", "{4F874463-0000-0000-0000-000000000000}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenGrid.Config.GridConfigDb4o", "OpenGrid.Config\GridConfigDb4o\OpenGrid.Config.GridConfigDb4o.csproj", "{B0027747-0000-0000-0000-000000000000}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenGrid.Config.GridConfigDb4o", "OpenGrid.Config\GridConfigDb4o\OpenGrid.Config.GridConfigDb4o.csproj", "{B0027747-0000-0000-0000-000000000000}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.Servers", "Servers\OpenSim.Servers.csproj", "{8BB20F0A-0000-0000-0000-000000000000}"
|
|
||||||
EndProject
|
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.Physics.PhysXPlugin", "OpenSim.Physics\PhysXPlugin\OpenSim.Physics.PhysXPlugin.csproj", "{988F0AC4-0000-0000-0000-000000000000}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.Physics.PhysXPlugin", "OpenSim.Physics\PhysXPlugin\OpenSim.Physics.PhysXPlugin.csproj", "{988F0AC4-0000-0000-0000-000000000000}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.GridInterfaces.Remote", "OpenSim.GridInterfaces\Remote\OpenSim.GridInterfaces.Remote.csproj", "{B55C0B5D-0000-0000-0000-000000000000}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.GridInterfaces.Remote", "OpenSim.GridInterfaces\Remote\OpenSim.GridInterfaces.Remote.csproj", "{B55C0B5D-0000-0000-0000-000000000000}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.Framework", "OpenSim.Framework\OpenSim.Framework.csproj", "{8ACA2445-0000-0000-0000-000000000000}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.Framework", "OpenSim.Framework\OpenSim.Framework.csproj", "{8ACA2445-0000-0000-0000-000000000000}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.RegionServer", "OpenSim.RegionServer\OpenSim.RegionServer.csproj", "{632E1BFD-0000-0000-0000-000000000000}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.Servers", "Servers\OpenSim.Servers.csproj", "{8BB20F0A-0000-0000-0000-000000000000}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.Storage.LocalStorageDb4o", "OpenSim.Storage\LocalStorageDb4o\OpenSim.Storage.LocalStorageDb4o.csproj", "{E1B79ECF-0000-0000-0000-000000000000}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.Storage.LocalStorageDb4o", "OpenSim.Storage\LocalStorageDb4o\OpenSim.Storage.LocalStorageDb4o.csproj", "{E1B79ECF-0000-0000-0000-000000000000}"
|
||||||
EndProject
|
EndProject
|
||||||
|
@ -50,10 +52,10 @@ Global
|
||||||
{2270B8FE-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{2270B8FE-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{2270B8FE-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{2270B8FE-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{2270B8FE-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
|
{2270B8FE-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
{EE9E5D96-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
{632E1BFD-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{EE9E5D96-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{632E1BFD-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{EE9E5D96-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{632E1BFD-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{EE9E5D96-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
|
{632E1BFD-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
{63A05FE9-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
{63A05FE9-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{63A05FE9-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{63A05FE9-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{63A05FE9-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{63A05FE9-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
@ -62,6 +64,10 @@ Global
|
||||||
{A7CD0630-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{A7CD0630-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{A7CD0630-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{A7CD0630-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{A7CD0630-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
|
{A7CD0630-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{EE9E5D96-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{EE9E5D96-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{EE9E5D96-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{EE9E5D96-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
{438A9556-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
{438A9556-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{438A9556-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{438A9556-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{438A9556-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{438A9556-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
@ -74,6 +80,10 @@ Global
|
||||||
{8BE16150-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{8BE16150-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{8BE16150-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{8BE16150-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{8BE16150-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
|
{8BE16150-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{97A82740-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{97A82740-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{97A82740-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{97A82740-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
{66591469-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
{66591469-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{66591469-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{66591469-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{66591469-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{66591469-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
@ -86,10 +96,6 @@ Global
|
||||||
{B0027747-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{B0027747-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{B0027747-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{B0027747-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{B0027747-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
|
{B0027747-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
{8BB20F0A-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{8BB20F0A-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{8BB20F0A-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
|
||||||
{8BB20F0A-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
|
|
||||||
{988F0AC4-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
{988F0AC4-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{988F0AC4-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{988F0AC4-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{988F0AC4-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{988F0AC4-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
@ -102,10 +108,10 @@ Global
|
||||||
{8ACA2445-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{8ACA2445-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{8ACA2445-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{8ACA2445-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{8ACA2445-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
|
{8ACA2445-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
{632E1BFD-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
{8BB20F0A-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{632E1BFD-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{8BB20F0A-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{632E1BFD-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{8BB20F0A-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{632E1BFD-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
|
{8BB20F0A-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
{E1B79ECF-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
{E1B79ECF-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{E1B79ECF-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{E1B79ECF-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{E1B79ECF-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{E1B79ECF-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
<fileset basedir="${project::get-base-directory()}">
|
<fileset basedir="${project::get-base-directory()}">
|
||||||
</fileset>
|
</fileset>
|
||||||
</copy>
|
</copy>
|
||||||
<csc target="exe" debug="${build.debug}" unsafe="False" define="TRACE" output="${project::get-base-directory()}/${build.dir}/${project::get-name()}.exe">
|
<csc target="exe" debug="${build.debug}" unsafe="False" define="TRACE;DEBUG" output="${project::get-base-directory()}/${build.dir}/${project::get-name()}.exe">
|
||||||
<resources prefix="OpenSim" dynamicprefix="true" >
|
<resources prefix="OpenSim" dynamicprefix="true" >
|
||||||
</resources>
|
</resources>
|
||||||
<sources failonempty="true">
|
<sources failonempty="true">
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
<fileset basedir="${project::get-base-directory()}">
|
<fileset basedir="${project::get-base-directory()}">
|
||||||
</fileset>
|
</fileset>
|
||||||
</copy>
|
</copy>
|
||||||
<csc target="library" debug="${build.debug}" unsafe="False" define="TRACE" output="${project::get-base-directory()}/${build.dir}/${project::get-name()}.dll">
|
<csc target="library" debug="${build.debug}" unsafe="False" define="TRACE;DEBUG" output="${project::get-base-directory()}/${build.dir}/${project::get-name()}.dll">
|
||||||
<resources prefix="OpenUser.Config.UserConfigDb4o" dynamicprefix="true" >
|
<resources prefix="OpenUser.Config.UserConfigDb4o" dynamicprefix="true" >
|
||||||
</resources>
|
</resources>
|
||||||
<sources failonempty="true">
|
<sources failonempty="true">
|
||||||
|
|
|
@ -6,6 +6,12 @@
|
||||||
<property name="obj.dir" value="obj" />
|
<property name="obj.dir" value="obj" />
|
||||||
<property name="doc.dir" value="doc" />
|
<property name="doc.dir" value="doc" />
|
||||||
<property name="project.main.dir" value="${project::get-base-directory()}" />
|
<property name="project.main.dir" value="${project::get-base-directory()}" />
|
||||||
|
|
||||||
|
<target name="Debug" description="">
|
||||||
|
<property name="project.config" value="Debug" />
|
||||||
|
<property name="build.debug" value="true" />
|
||||||
|
</target>
|
||||||
|
|
||||||
<property name="project.config" value="Release" />
|
<property name="project.config" value="Release" />
|
||||||
|
|
||||||
<target name="Release" description="">
|
<target name="Release" description="">
|
||||||
|
@ -13,12 +19,6 @@
|
||||||
<property name="build.debug" value="false" />
|
<property name="build.debug" value="false" />
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
|
|
||||||
<target name="Debug" description="">
|
|
||||||
<property name="project.config" value="Debug" />
|
|
||||||
<property name="build.debug" value="true" />
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<target name="net-1.1" description="Sets framework to .NET 1.1">
|
<target name="net-1.1" description="Sets framework to .NET 1.1">
|
||||||
<property name="nant.settings.currentframework" value="net-1.1" />
|
<property name="nant.settings.currentframework" value="net-1.1" />
|
||||||
</target>
|
</target>
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
<fileset basedir="${project::get-base-directory()}">
|
<fileset basedir="${project::get-base-directory()}">
|
||||||
</fileset>
|
</fileset>
|
||||||
</copy>
|
</copy>
|
||||||
<csc target="exe" debug="${build.debug}" keyfile="Prebuild.snk" unsafe="False" define="TRACE" output="${project::get-base-directory()}/${build.dir}/${project::get-name()}.exe" win32icon="App.ico">
|
<csc target="exe" debug="${build.debug}" keyfile="Prebuild.snk" unsafe="False" define="DEBUG;TRACE" output="${project::get-base-directory()}/${build.dir}/${project::get-name()}.exe" win32icon="App.ico">
|
||||||
<resources prefix="Prebuild" dynamicprefix="true" >
|
<resources prefix="Prebuild" dynamicprefix="true" >
|
||||||
<include name="App.ico" />
|
<include name="App.ico" />
|
||||||
<include name="data/prebuild-1.7.xsd" />
|
<include name="data/prebuild-1.7.xsd" />
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
<fileset basedir="${project::get-base-directory()}">
|
<fileset basedir="${project::get-base-directory()}">
|
||||||
</fileset>
|
</fileset>
|
||||||
</copy>
|
</copy>
|
||||||
<csc target="library" debug="${build.debug}" unsafe="False" define="TRACE" output="${project::get-base-directory()}/${build.dir}/${project::get-name()}.dll">
|
<csc target="library" debug="${build.debug}" unsafe="False" define="TRACE;DEBUG" output="${project::get-base-directory()}/${build.dir}/${project::get-name()}.dll">
|
||||||
<resources prefix="OpenSim.Servers" dynamicprefix="true" >
|
<resources prefix="OpenSim.Servers" dynamicprefix="true" >
|
||||||
</resources>
|
</resources>
|
||||||
<sources failonempty="true">
|
<sources failonempty="true">
|
||||||
|
|
24
prebuild.xml
24
prebuild.xml
|
@ -365,6 +365,30 @@
|
||||||
</Files>
|
</Files>
|
||||||
</Project>
|
</Project>
|
||||||
|
|
||||||
|
<!-- Basic embedded JVM -->
|
||||||
|
<Project name="OpenSim.Scripting.EmbeddedJVM" path="OpenSim.Scripting.EmbeddedJVM" type="Library">
|
||||||
|
<Configuration name="Debug">
|
||||||
|
<Options>
|
||||||
|
<OutputPath>../bin/ScriptEngines/</OutputPath>
|
||||||
|
</Options>
|
||||||
|
</Configuration>
|
||||||
|
<Configuration name="Release">
|
||||||
|
<Options>
|
||||||
|
<OutputPath>../bin/ScriptEngines/</OutputPath>
|
||||||
|
</Options>
|
||||||
|
</Configuration>
|
||||||
|
|
||||||
|
<ReferencePath>../bin/</ReferencePath>
|
||||||
|
<Reference name="System"/>
|
||||||
|
<Reference name="System.Xml"/>
|
||||||
|
<Reference name="OpenSim.Framework"/>
|
||||||
|
|
||||||
|
<Files>
|
||||||
|
<Match pattern="*.cs" recurse="true"/>
|
||||||
|
</Files>
|
||||||
|
</Project>
|
||||||
|
|
||||||
|
|
||||||
<!-- Terrain engine -->
|
<!-- Terrain engine -->
|
||||||
<Project name="OpenSim.Terrain.BasicTerrain" path="OpenSim.Terrain.BasicTerrain" type="Library">
|
<Project name="OpenSim.Terrain.BasicTerrain" path="OpenSim.Terrain.BasicTerrain" type="Library">
|
||||||
<Configuration name="Debug">
|
<Configuration name="Debug">
|
||||||
|
|
Loading…
Reference in New Issue