[Opensim-users] Any way to recompile LSL scripts from the command line, or create an OAR from scripts in SVN?

Justin Clark-Casey jjustincc at googlemail.com
Sat Nov 27 01:06:03 UTC 2010


On 25/11/10 07:37, Edmund Edgar wrote:
> I've got a fairly big set of objects for my project (Sloodle),
> containing lots of LSL scripts. Some of these scripts are shared
> between lots of different objects. The LSL scripts are all checked
> into a Subversion repo, but we distribute an .oar file to our end
> users containing objects with the scripts in them. I'd like a way to
> automatically publish the scripts from Subversion into the .oar file,
> to save time and make sure that when I distribute an .oar or .iar, all
> the objects contain the version of the script that I've got in the
> repo.
>
> The process I have so far is:
> 1) Each LSL script has a comment in it saying where it lives in the repo.
> 2) I have an .oar file containing all the objects, which in turn
> contain LSL scripts.
> 3) I have a shell script that will untar the .oar file, copy over the
> latest versions of all the LSL scripts into it then tar it back up
> again.
> 4) Having run my shell script on the .oar file, I can make a release
> with all the right scripts as follows:
>    a) Load the .oar file into OpenSim
>    b) Rez each of the objects in the .oar file
>    c) Manually compile each of the scripts using the viewer so that
> their compiled code matches the uncompiled LSL code.
>    d) Save them back into the inventory of the object that originally
> contained them (we distributed lots of objects from inside one master
> object).
>    e) Save back out to a new .oar file, which I can distribute to our users.
>
> That's good as far as it goes, but 4b and 4c are still quite laborious
> manual tasks, and I'd like to automate them.
>
> Does anyone know of a way to automate steps 4b/4c? For example, if I
> could force OpenSim to recompile each of the scripts from the LSL
> source when it loads them, that would be a great help. (I'd hoped it
> would do this by default when I loaded an .oar, but it seems to be
> getting the compiled code from the .oar file somewhere.)

There isn't any compiled code in the OAR.  The compiled code will actually be in bin/ScriptEngines. under UUID 
directories that represent the different regions.  If you delete these directories then it should force recompilation of 
the scripts on OAR load.  Or you could be even more aggressive and target the dlls with the right asset uuids (I'm 
guessing this is the correspondence of that directory name with the script asset).

>
> If I could compile each script in the .oar file from the command line
> and saved the compiled code back to the .oar file, that would be even
> better.
>
> Alternatively, can anyone suggest an easier way of getting the LSL
> scripts from Subversion into an .oar or .iar file?
>


-- 
Justin Clark-Casey (justincc)
http://justincc.org
http://twitter.com/justincc



More information about the Opensim-users mailing list