Commit Graph

32 Commits (741caee04017afdef55fdf08dcc651f44f1b4782)

Author SHA1 Message Date
Justin Clark-Casey (justincc) cf168194e5 If ScriptStopStrategy hasn't been set to co-op in [XEngine] config, then continue to generate C# that is functionality identical to historical generation
This is to eliminate disruption until co-op termination has been well-tested.
In non co-op mode, XEngine will continue to load DLLs of the existing Script class and the new XEngineScript class.
Moving to co-op mode still requires existing script DLL deletion to force recompilation, either manually or by setting DeleteScriptsOnStartup = true for one run.
This change also means that scripts which fail to initialize do not still show up as running scripts.
2013-01-23 02:36:43 +00:00
Justin Clark-Casey (justincc) c8afc8523b Implement non-wait co-operative termination of scripts for XEngine in addition to termination on wait.
This involves inserting opensim_reserved_CheckForCoopTermination() calls in lsl -> c# translation at any place where the script could be in a loop with no wait calls.
These places are for, while, do-while, label, user function call and manual event function call.
Call goes through to an XEngineScriptBase which extends ScriptBase.
IEngine is extended to supply necessary engine-specific parent class references and constructor parameters to Compiler.
Unfortunately, since XEngineScriptBase has to be passed WaitHandle in its constructor, older compiled scripts will fail to load with an error on the OpenSim console.
Such scripts will need to be recompiled, either by removing all *.dll files from the bin/ScriptEngines/<region-id> or by setting DeleteScriptsOnStartup = true in [XEngine] for one run.
Automatic recompilation may be implemented in a later commit.
This feature should not yet be used, default remains termination with Thread.Abort() which will work as normal once scripts are recompiled.
2013-01-17 23:39:09 +00:00
Justin Clark-Casey (justincc) b5bb559cc0 Register the UrlModule for script engine events OnScriptRemoved and OnObjectRemoved just once in the UrlModule itself, rather than repeatedly for every script.
Doing this in every script is unnecessary since the event trigger is parameterized by the item id.
All that would happen is 2000 scripts would trigger 1999 unnecessary calls, and a large number of initialized scripts may eventually trigger a StackOverflowException.
Registration moved to UrlModule so that the handler is registered for all script engine implementations.
This required moving the OnScriptRemoved and OnObjectRemoved events (only used by UrlModule in core) from IScriptEngine to IScriptModule to avoid circular references.
2012-01-14 00:23:11 +00:00
BlueWall 4f25b73b57 Add configurable path to script engine assemblies
Adding ability to place script engine assemblies outside
	the codebase directories.

	Uses new [XEngine] option: ScriptEnginesPath = "path_to_assemblies"

Signed-off-by: Melanie <melanie@t-data.com>
2010-09-26 02:30:46 +01:00
Melanie a24d9bff03 Revert "Remove an insterface member that was never used"
It was used. By the API, which is dynamically loaded. So it didn't complain
until it hit Bamboo

This reverts commit 33d5018e94.
2009-12-22 15:45:56 +00:00
Melanie 33d5018e94 Remove an insterface member that was never used 2009-12-22 15:35:39 +00:00
Melanie Thielker 5139160ce4 Correct an error where the config file name was always considered to be a
local file. This caused llHttpRequest and llSetInventoryPermsMask to fail
on regions that load their config from a web server
2009-06-06 16:39:28 +00:00
Jeff Ames 840de6c036 Minor: Change OpenSim to OpenSimulator in older copyright headers and LICENSE.txt. 2009-06-01 06:37:14 +00:00
Melanie Thielker 8902923b12 Introduce IXmlRpcRouter, an interface that allows registering XMLRPC
UUIDs with a central marshaller for grids, or publish the ULS for objects
elsewhere.
2009-04-10 21:08:33 +00:00
Melanie Thielker 0377ddb5de Add events to IScriptEngine to notify scripting modules of the removal
of objects from the scene, and of scripts from objects. This facilitates
the development of modules that can register prims with externall servers
for inbound email and XMLRPC. Currently implemented in XEngine only.
Also applying cmickeyb's compiler locking patch, since it seems risk-free.
2009-04-10 19:07:41 +00:00
Jeff Ames 818af9d482 Refactor log4net logger handling in script engine. (#3148) 2009-02-22 01:26:18 +00:00
Dr Scofield 9b66108081 This changeset is the step 1 of 2 in refactoring
OpenSim.Region.Environment into a "framework" part and a modules only
part. This first changeset refactors OpenSim.Region.Environment.Scenes,
OpenSim.Region.Environment.Interfaces, and OpenSim.Region.Interfaces
into OpenSim.Region.Framework.{Interfaces,Scenes} leaving only region
modules in OpenSim.Region.Environment.

The next step will be to move region modules up from
OpenSim.Region.Environment.Modules to OpenSim.Region.CoreModules and
then sort out which modules are really core modules and which should
move out to forge.

I've been very careful to NOT BREAK anything. i hope i've
succeeded. as this is the work of a whole week i hope i managed to
keep track with the applied patches of the last week --- could any of
you that did check in stuff have a look at whether it survived? thx!
2009-02-06 16:55:34 +00:00
idb 3fe966d6b3 An initial implementation of llMinEventDelay in XEngine.
Not implemented yet in DotNetEngine.
Fixes Mantis #2830
2008-12-21 19:04:06 +00:00
Melanie Thielker e93828fe00 Add some discovery code, laying groundwork for region-crossing scripts
No user functionality yet
2008-11-08 14:35:52 +00:00
Melanie Thielker 833f5e8bed Refactor IEventReceiver back into IScriptEngine 2008-11-08 02:24:34 +00:00
Melanie Thielker cffd73c59f Reintroduces the discovery mechanism to use llRequestSimulatorData("", 128)
Causes the dataserver event to return "OpenSim" when running on OpenSim.
Requires ThreatLevel to be "High" or above to function.
2008-10-03 06:15:23 +00:00
Melanie Thielker c21a8b9969 Full API convergence. Api is back in LSL_Api.cs and OSSL_Api.cs.
The binaries are still different, but that is only a small step away now.
The OSSLPrim has been removed. This commit will breal all scripts
using Prim.Scale(), etc, syntax. It was not secure and will have to
be brought back in another form.
2008-09-26 02:51:00 +00:00
Melanie Thielker c713dcbada Some script engine interface changes 2008-09-25 20:04:59 +00:00
Melanie Thielker a3fcaef890 CONVERGENCE!!!!!!
The entire LSL API is now in the single, shared file
OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api_Base.cs
This is for both engines. The OSSL function are still separate.
2008-09-25 06:04:47 +00:00
Melanie Thielker fb7a29a5ef Rename lots of stuff in DNE to reduce source code differences in the
LSL implementation files. Rename lots of stuff in XEngine for the same
reason. Move methods between interfaces. Just refactor stuff.
2008-09-24 13:18:06 +00:00
Melanie Thielker 218902bedc Decouple AsyncCommands from XEngine and the script instance. Make
all methods needed outside the API ststic. Async command processing
is now wholly internal to the API. This sets the stage for the next
convergence step.
2008-09-24 02:58:05 +00:00
Melanie Thielker dffa6567e8 Alter tests to match up with the results after tyre's patch 2008-09-23 12:17:21 +00:00
Justin Clarke Casey 7f3bfa277b * minor: method documentation 2008-09-16 16:37:16 +00:00
Melanie Thielker fdb24c46ac Provide a GetApi method on the IScriptEngine to get a named API reference
This allows cross-api method calls on the implementation and also allows
"Meta APIs" that only provide common functionality to other APIs
2008-09-13 14:40:42 +00:00
Teravus Ovares 7d89e12293 * This is the fabled LibOMV update with all of the libOMV types from JHurliman
* This is a HUGE OMG update and will definitely have unknown side effects.. so this is really only for the strong hearted at this point.  Regular people should let the dust settle.
* This has been tested to work with most basic functions. However..   make sure you back up 'everything' before using this.  It's that big!  
* Essentially we're back at square 1 in the testing phase..  so lets identify things that broke.
2008-09-06 07:52:41 +00:00
Melanie Thielker bf4d1fbb8d Refactor IScriptInstance / IScriptEngine to use a generic IScriptWorkItem,
which is a thin wrapper around a IWorkItemResult from the SmartThreadPool.
However, it is very easy to reimplement on top of basic threading and therefore
makes the IScriptInstance class independent of the specific threading
implementation.
2008-08-28 00:37:22 +00:00
Melanie Thielker 5525a3ecb4 Thank you, salahazar, for a patch that corrects the behavior of
llDetectedLink(). Also a small refactor to remove an interface member
from IScriptEngine.
2008-08-27 22:53:58 +00:00
Melanie Thielker 6e3367d68c Refactor XScriptInstance to IScriptInstance and move into Shared/. Now
engines that want to use the XEngine's instance handling and state
persistence can do so. IScriptInstance is optional, but it does
require the SmartThreadPool if it is used.
2008-08-27 22:38:36 +00:00
Charles Krinke 7580fa5c0a Mantis#1648. Thank you, Melanie for a patch that:
Fix a script Xengine deadlock/hang if llResetScript is used in changed()
2008-07-02 13:31:39 +00:00
Dr Scofield 5e63206018 From: kurt taylor (krtaylor)
Another new OSSL function for returning the name of the script engine
currently running, osGetScriptEngineName, added to both DotNet and XEngine
OSSL API.
2008-07-01 07:16:02 +00:00
Charles Krinke 9a0ef22ed9 Mantis#1616. Applied Melanie's patch. This may or may
not break trunk.
2008-06-28 16:08:12 +00:00
lbsa71 6b7930104b * Applied patch from Melanie, mantis issue #1581 - "Refactor LSL language, api and compiler out of XEngine"
"First stage in a major Script Engine refactor, that will result in the LSL implementaions ebing reconverged. Not there yet, but one major part is done."
Thank you, Melanie!
2008-06-24 21:09:49 +00:00