Lua Executables

Storyboard includes a few stand-alone Lua executables packaged for the convenience of customers who are working with Storyboard in environments where it is possible to use shell programs to interact with the environment, most notably Windows, Linux, Mac and QNX environments.

sblua

This is the standard Lua command line interpreter lua that has been linked against the Storyboard Lua shared library libsblua.so. All enhanced Storyboard functionality that is not associated with an Storyboard application can be accessed using this interpreter. This can be specifically useful for creating test and simulation scripts that generate Storyboard IO calls using the gre.send_event API.

sbluac

This is the standard Lua command line compiler luac that has been linked against the shared library libsblua.so. This utility can be used to pre-compile Lua script source files into platform independent byte code for faster load times. This utility is invoked automatically during a Storyboard Export if the Generate precompiled Lua selection is made in the export configuration.

The bytecode is platform independent and can be used the in the same way as non-bytecode Lua files by the Storyboard Engine at runtime. Note that currently, our Storyboard engine only looks for .lua extensions, so if you would like to use bytecode files, make sure to give them a .lua extension. Please be careful not to overwrite your Lua script files, because they cannot be retrieved from the bytecode files.

To see the usage parameters just type 'sbluac' on the command line with no other arguments.

usage: sbluac [options] [filenames].
Available options are:
		  -        process stdin
		  -l       list
		  -o name  output to file 'name' (default is "luac.out")
		  -p       parse only
		  -s       strip debug information
		  -v       show version information
		  --       stop handling options
						

A basic compilation to produce a bytecode file with the name luac.out, containing debugging information, would look like this:

sbluac input.lua
						

To name the output bytecode file something other than luac.out, use this:

						
sbluac -o output.luac input.lua
						

To strip out debugging information, use this:

sbluac -s -o output.luac input.lua						
						
Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments

0 comments

Please sign in to leave a comment.