-
Notifications
You must be signed in to change notification settings - Fork 2
Added Configuration
There is a new section in OpenSim.ini.example for LibLSLCC related settings called [LibLSLCC]:
[LibLSLCC]
;; Disable or enable LibLSLCC extended compiler warnings.
;; This is set to true by default, but you can set it to false if you think
;; LibLSLCC's extended warnings are too pedantic.
;;
;; In the future I will probably implement warning codes that can be disabled
;; selectively from this configuration file.
;;
; EnableCompilerWarnings = true
;; Allows you to turn automatic class generation for CSharp
;; scripts on and off when uploading CSharp directly to the LibLSLCC compiler.
;; This setting only meaningful if you have CSharp scripting enabled and are
;; using LibLSLCC as your compiler.
;;
;; This is for advanced users who know how to completely define
;; the script class that derives from OpenSim's runtime base class
;; for script instances.
;;
;; Its primary purpose is debuging LibLSLCC's code generation
;; via client uploaded scripts compiled in server side mode from LSLCCEditor.
;;
;; It defaults to 'true' which is the normal behavior for CSharp uploads
;; while using the old compiler.
;;
; CreateClassWrapperForCSharpScripts = true
;; Same idea as CreateClassWrapperForCSharpScripts
;; Except this applies to when Visual Basic scripts are uploaded
;; from the client.
;;
; CreateClassWrapperForVBScripts = true
Under [XEngine] in OpenSim.ini.example you will find these new settings:
;; The assembly to load the compiler implementation from
;; Default is OpenSim.Region.ScriptEngine.Shared.CodeTools.dll
;;
; CompilerAssembly = "OpenSim.Region.ScriptEngine.Shared.CodeTools.dll"
CompilerAssembly = "OpenSim.Region.ScriptEngine.Shared.LibLSLCCCompiler.dll"
;; The name of the class that implements the compiler
;; Default is OpenSim.Region.ScriptEngine.Shared.CodeTools.Compiler
;;
; CompilerClass = "OpenSim.Region.ScriptEngine.Shared.CodeTools.Compiler"
CompilerClass = "OpenSim.Region.ScriptEngine.Shared.LibLSLCCCompiler.Compiler"
Additionally, When LibLSLCC is enabled two new AllowedCompilers language settings ('csraw' and 'vbraw') are available under the [XEngine] section:
;# {AllowedCompilers} {Enabled:true} {Languages to allow (comma separated)?} {} lsl
;;
;; Languages accepted by 'OpenSim.Region.ScriptEngine.Shared.CodeTools.Compiler': (lsl,vb,cs)
;;
;; Languages accepted by 'OpenSim.Region.ScriptEngine.Shared.LibLSLCCCompiler.Compiler': (lsl,vb,cs,csraw,vbraw)
;;
;; The LibLSLCC compiler additionally accepts csraw and vbraw when active.
;; The code headers for them are: //c#-raw and //vb-raw
;;
;; These two new accepted language settings allow the LibLSLCC compiler to accept raw C# and VB code.
;; LibLSLCCCompiler will not generate a wrapper class for these code types, you must implement the entire script
;; class yourself when uploading 'csraw' or 'vbraw' scripts.
;;
;; example:
;;
;; AllowedCompilers=lsl,cs,vb
;;
;; *warning*, non lsl languages have access to static methods such as
;; System.IO.File. Enable at your own risk.
; AllowedCompilers = "lsl"
LSLCCEditor can produce scripts compatible with the 'csraw' upload mode, it is mostly for code generation debuging purposes.
'csraw' functions just like the [LibLSLCC].CreateClassWrapperForCSharpScripts setting, except it works on a per script basis.
You add the '//c#-raw' script header comment to your script and the compiler will recognize that you do not want a class wrapper generated for the CSharp you just uploaded.
'vb-raw' is basically the same idea as 'csraw' except its for VB scripts.