Brass SSE Developer Guide - Running and Deploying
"Run in Brass" and "Deploy
to Brass" sound the same - what's the difference?
On the SSEdit toolbar is a
icon, with a corresponding entry in the Build menu called "Run
In Brass". But in the File menu there is an option called "Deploy
to Brass". There are two very important differences between
these functions.
When you're creating your plugin and want to test
it, you should use the "Run In Brass" ( )
option. This sends your plugin (plus any default panel layout you
create) to Brass in debug mode. Brass immediately unloads the existing
version of your plugin, loads the new version and displays the Virtual
Machine debug window.
But when you choose "Deploy to Brass",
SSEdit sends your plugin plus all its resources to Brass without
running it. This has the same effect as if you had opened the Pack
Creator, created a pack, then switched to Brass and installed the
pack.
So in other words, whenever you add resources to
your plugin (using the Pack Creator), use "Deploy to Brass"
to tell SSEdit to copy them into the right locations automatically.
Whenever you make a change to the plugin code and you want to test
it, use "Run in Brass".
This becomes important when you use getselfname()
in your plugin code. getselfname() returns the current filename
of the plugin. Every plugin that Brass runs automatically gets its
own folder in the Brass\SSE folder; the folder is given the same
name as the plugin. For example, if your plugin is called "mystuff.sse",
Brass will automatically create a Brass\SSE\mystuff folder. Your
plugin should use this folder to store all of its resources (images,
data files etc). This ensures that plugins don't overwrite each
other's data.
When you're ready to distribute your plugin using
the Pack Creator, your resources are added to the pack. When someone
else downloads and installs your plugin pack the resources are automatically
unpacked into the Brass\SSE\mystuff folder on their computer.
When you use the "Deploy to Brass" option
you are emulating this install process. SSEdit will clear your plugin's
files from your Brass\SSE folder, then copy over all the resources
"fresh". You can then switch to Brass and test your plugin.
In other words, "Deploy to Brass" is the next best thing
to actually creating a plugin pack, copying it to another computer
and then testing it.
You can read more about plugin packs, getselfname()
and the Pack Creator on this page.
|