Distributing a Screenweaver application requires assembling several files:
-d NO_SWHX_PLUGINswitch on compiling your back-end)
Optionally, additional extenstions to the Neko VM will have to be part of your distribution in case your back-end files (*.n) depend on them. For example, if you use methods from the systools extension that gets installed automatically on installing Screenweaver, you’ll have to include
systools.ndll with your distribution.
The boot-loader can be parameterized to search for project assets in places other than the directory the boot-loader is placed in itself:
The boot-loader recognizes two command-line arguments:
Both folder and index can be relative or absolute. If no root folder is specified, the root folder is the folder the boot-loader is launched from. The boot-loader’s index file refers to the “.n” file that the boot-loader should load on launch. If no index file is specified, the boot-loader will attempt to load “app.n”.
OSX bundles can not be launched with command-line arguments, therefore the boot-loader reads its “swroot” and “swindex” values from its “info.plist” configuration file that is located in the “swhx.app/Contents” folder. (For those new to OSX: *.app files are a special kind of folder on OSX. You can open them by right-clicking the *.app file and selection ‘Show contents’ from the pop-up menu)
The swroot argument is set to “SW_BUNDLE_PARENT” by default. This setting will make the boot-loader look for all required assets in the same folder as the boot-loader is in. This is convinient for quickly testing you project with the boot-loader during development.
On distributing your application, it is nicer to have all project files contained inside the boot-loader bundle. You could, for example, copy all such files to “swhx.app/Contents/Resources”. The “swroot” argument in “swhx.app/Contents/info.plist” should then be set to “Contents/Resources”. Unlike the Windows “-swroot” switch, the OSX “swroot” value should always specify a path relative to the folder that the boot-loader is in.
NOTE: The Neko Virtual machine (libneko.dyllib) should always be placed in “swhx.app/Contents/MacOS”, along side the main boot-loader binary (”swhx”) regardless of the value of “swroot”
By default, “swindex” is set to “app.n”. Any other relative (to “swroot”) or absolute path can be specified.
Follow this link to download a sample distribution that uses the OSX boot-loader configured as outlined.