|
StackRunner is a simple "player" application that will
"play" your LiveCode, Revolution, or MetaCard stacks and doesn't present any user-interface
elements so it runs "cleaner".
StackRunner is completely free and can be distributed with your stacks, whether they be personal, commercial, or otherwise.
FILE FORMAT NOTE: If you want StackRunner to work with Revolution or MetaCard stacks that were created in Revolution
2.6.x or earlier, you will need to download the version of StackRunner that works with those stacks (StackRunner 1.3) due to a
file format change that took place when Revolution 2.7 was released. (StackRunner 1.3 also is the only version that works with
Mac OS 9, if you need that operating system supported.)
Even though you can use StackRunner 2.0 to open stacks
built in older versions of Revolution, any changes to those stacks may cause them to be saved in the newer file format.
It is therefore recommended that you choose the version of StackRunner that best suits the engine version that your
stacks were developed in. For this reason, both versions are available for download below.
You can download StackRunner 2.0 (for stacks built with any version of LiveCode or Revolution 2.7.x or later) here:
You can download StackRunner 1.3 (for stacks built with Revolution 2.6.x or earlier, or any version of MetaCard) here:
|
|
Installing StackRunner |
|
After clicking on one of the links above and decompressing the file that you have downloaded, you will see
the following, based on the platform you downloaded:
StackRunner (Mac OS 9 - all versions) |
An application called "StackRunner" |
StackRunner (Mac OS X - all versions) |
An application called "StackRunner.app" (the .app may not be visible) |
StackRunner (Windows - all versions) |
A folder called "StackRunner18Win Folder" (or equivalent) with the application
"StackRunner.exe", and a few DLL files and a folder called "Externals" |
StackRunner (Linux - Version 1.3) |
An application called "StackRunner" |
StackRunner is dependent on certain files for it to operate properly. With all versions except the Windows version, the
extra files are either built into the executable, or are bundled invisibly with them so that you only have one icon to
manipulate.
The Windows version, however, MUST be kept with the DLLs and Externals folder that it came with, and will not work properly
(or at all) if the executable is taken out of the folder. If you want to make just the icon for the StackRunner application
available, please create a shortcut to the executable and place it wherever you want it.
|
|
Using StackRunner |
|
StackRunner supports LiveCode, Revolution, and MetaCard stacks. There are two different ways
to have SR open your stack:
- You can double-click on SR, and it will try to open your stack automatically
(see below), or will present a file picker dialog to select your stack;
- You can drag and drop a stack onto StackRunner, and it will open it.
Note: As of the current version of SR, you may be able to double-click on a stack file to launch SR
on the Mac, but if you have LiveCode or Revolution already on the Mac, you will likely get
unpredictable results. Since file associations need to be set in the Registry on Windows, double-clicking
a stack file in Windows will not launch SR. The same goes for Linux, where there isn't even a Registry.
External/Library/Database Support
StackRunner 2.0 comes preconfigured with all of the LiveCode externals, libraries, and database drivers available in LiveCode Desktop
(or Revolution Studio), so you don't have to provide any of these yourself. For your reference, these are:
Externals
|
Libraries
|
Database Drivers
|
revBrowser
revDB
revFont
revSpeech
revVideoGrabber
revXML
revZip
|
Animation
Browser
Database
Data Grid
Font Support
Geometry
Internet
Printing
Revolution Zip
Speech
Table
Video Grabber
XML
XMLRPC
|
MySQL
ODBC
PostgreSQL
SQLite
Valentina
|
Revolution Enterprise Features
StackRunner 2.0 does not include features that were found only in the Enterprise version of Revolution
(such as the SSL & Encryption library and the Oracle Database driver); if you are a
valid Revolution Enterprise customer, you will need to add these features on your own (if you're not
sure how, contact us and we'll help you).
|
|
Customizing StackRunner |
|
Renaming StackRunner
SR is very customizable to suit your deployment. You can even rename the StackRunner executable to some other name
and it will look like your own creation. To do this, you will need to do the following (I'll use the example of
changing the name of SR to "FlashCards"):
Opening Stacks With StackRunner
SR will open your stack when SR is double-clicked in one of three ways:
- You can name your stack file main.rev and put it in the same directory as SR (all platforms) or
inside the OS X application bundle. If SR finds a file by that name when it launches, it will
automatically open it.
- If you want to put your stack in some other place, or you want it named something other than "main.rev",
you can create a configuration file called config.srn and put it in the same
directory as SR (all platforms) or inside the OS X application bundle.
It must contains one or more of the following property assignment lines (can be
in any order):
open=pathToStack
where pathToStack is a full or relative path to the stack to open, or a
URL to where the stack is located. If using a URL, it must be a full URL, starting
with 'http://' (ex. http://www.sonsothunder.com/mystack.rev).
Note: If you are on OS X and you
wish to open a stack that is inside the application bundle, see
Working With the Application Bundle below for instructions on how to do this.
dialogText=textToDisplay where
textToDisplay is the prompt in the answer file dialog.
quitAction=action where action determines what to do when the
the last stack closes. It can be set to quit, which will cause StackRunner
to quit when the last stack closes, or to ask which will leave StackRunner
open and bring up the "Please select a stack:" dialog.
Note: If a stack is automatically opened (either through having a main.rev
stack or by having a valid stack in the open property), StackRunner will
by default automatically quit when the last stack is closed if no quitAction
has been defined. If no stack is automatically opened, StackRunner will by
default bring up the "Please select a stack:" dialog (with your custom dialogText
if applicable).
suppressErrors=trueFalse where
trueFalse is either true or false (the default if not supplied). If true,
any errors encountered during startup will be suppressed and not reported to the user.
Example:
open=/users/kenray/desktop/test.rev
dialogText=Please locate 'test.rev':
quitAction=quit
suppressErrors=false
If a stack cannot be found at the path you've provided in the open property,
an answer file dialog will come up with the prompt specified in the
dialogText property.
- You can do nothing, and SR will present an answer file dialog that says "Please select a stack to open:"
|
|
Working With the Application Bundle (OS X Only) |
|
Looking For 'main.rev' and 'config.srn'
|
|
|
When StackRunner starts up, the defaultFolder is the folder where
the StackRunner application resides (indicated by "[SR Folder]" below).
StackRunner will check for config.srn at the following locations and in the order specified:
- [SR Folder]/StackRunner.app/Contents/Resources/config.srn
- [SR Folder]/config.srn
StackRunner will check for main.rev at the following locations
and in the order specified (assuming that a config.srn file was not found, or one was found
but did not contain an open=pathToStack property assignment line):
- [SR Folder]/StackRunner.app/Contents/Frameworks/main.rev
- [SR Folder]/StackRunner.app/Contents/Plugins/main.rev
- [SR Folder]/StackRunner.app/Contents/main.rev
- [SR Folder]/main.rev
|
Referring To Items in the Bundle
It is important to keep in mind that the application bundle is just a specially-named folder, so you will need
to make sure you include the name of the application bundle folder in your code. That is, suppose you
have a main.rev in the SR Folder so it
automatically opens, but you have put a secondary stack inside the bundle in the Resources folder. Remember that
the defaultDirectory points to the folder that the StackRunner application resides in, so in this case:
WRONG
open stack "Contents/Resources/SecondaryStack.rev"
RIGHT
open stack "StackRunner.app/Contents/Resources/SecondaryStack.rev"
If for some reason you don't know the name of the application bundle, you can add this function to your code
and call it to get the name:
function SRBundleFolder
set the itemDel to "/"
put item 1 to -4 of the fileName of stack "StackRunner" into tBundleFolder
set the itemDel to ","
return tBundleFolder
end SRBundleFolder
(Note that this works because regardless of whether your rename the StackRunner application bundle or even the StackRunner
engine file, the actual stack that is inside the standalone engine file is named "StackRunner".)
Opening a Custom Stack in the Bundle on Startup
|
|
|
Suppose you are creating an OS X application called MyApp, and you have renamed StackRunner to "MyApp" and
gone through the steps listed above under Renaming StackRunner.
To deploy this as a single-icon, self-contained application, you would like to be able to reference your
main stack to load, which is called "MyApp.rev", and you want to put it into the Contents folder of the bundle.
Because it's not called "main.rev", you need to include a config.srn. And since you want to
deploy a single icon, you need to put the config.srn in the bundle as well.
Based on the preceding sections, here's what you'd do:
- Open the "MyApp.app" bundle, go to the Contents folder, and copy your MyApp.rev stack into it.
- Using a text editor, create a file called "config.srn", and put the following "open=" property
assignment line into it (at a minimum):
open=MyApp.app/Contents/MyApp.rev
- Save the "config.srn" file, and move it into the Resources folder inside the bundle.
The application bundle should now look like the image to the left.
|
|
|
Final Notes |
|
Version History
Release |
Date |
Built w/Rev |
Changes and Additions |
2.0 |
2/14/2010 |
4.0.0 |
Updated to use Rev 4.0.0 engine, and includes the Data Grid library.
|
1.9 |
10/8/2008 |
3.0.0 |
Updated to use Rev 3.0.0 engine.
Download: OS X (Universal),
OS X (PPC),
OS X (Intel x86),
Windows,
Linux
|
1.8.1 |
7/26/2008 |
2.9.0 |
Updated to provide support for deploying single-icon applications on OS X by
using the application bundle.
Download: OS X (Universal),
OS X (PPC),
OS X (Intel x86),
Windows,
Linux
|
1.8 |
5/17/2008 |
2.9.0 |
Updated to use Rev 2.9.0 engine, including externals for revBrowser and revFont.
Download: OS X (Universal),
OS X (PPC),
OS X (Intel x86),
Windows,
Linux
|
1.7 |
6/2/2007 |
2.8.1 |
Updated to use Rev 2.8.1 engine, including externals for revBrowser and revFont.
Download: OS X (Universal),
OS X (PPC),
OS X (Intel x86),
Windows
|
1.6 |
2/28/2007 |
2.8.0 |
Updated to use Rev 2.8.0 engine.
Download: OS X (Universal),
OS X (PPC),
OS X (Intel x86),
Windows
|
1.5 |
8/27/2006 |
2.7.2 |
Updated to use new Rev engine; couldn't use 2.7.3 because of AppleEvent bug
that scrambles incoming AppleEvents so they can't be trapped. Also provided new Universal Binary,
PowerPC and Intel x86 builds.
Download: OS X (Universal),
OS X (PPC),
OS X (Intel x86),
Windows
|
1.4 |
3/8/2006 |
2.7.0 |
Created new version of SR due to file format change and release of Revolution 2.7.
Download: OS X,
Windows |
1.3 |
1/16/2006 |
2.6.1 |
Added ability to open stacks from the web by providing a url in the
open property of the 'config.srn' file. |
1.2 |
1/1/2006 |
2.6.1 |
Fixed bug where dragging-and-dropping a file onto SR, or double-clicking
on a file that was associated with SR would not respect the 'config.srn' file. |
1.1 |
12/24/2005 |
2.6.1 |
Fixed bug where the configuration settings for dialogText were not
being respected if you launched with no 'main.rev' but had an alternate dialogText.
|
Simplified method of detecting when StackRunner was the last open stack after another
stack had closed to be able to implement the quitAction. |
Added Linux version of StackRunner. |
Added custom properties to make StackRunner RIP compliant. |
1.0.3 |
10/22/2005 |
2.6.1 |
Fixed bug where the 'closeStack' message wasn't being sent to the last stack that
closed. |
1.0.2 |
9/8/2005 |
2.6.1 |
Added quitAction property to config file and added default
behavior when the last stack is closed.
|
1.0.1 |
9/6/2005 |
2.6.1 |
Fixed bug where config file wouldn't open a defined stack properly. |
1.0 |
9/6/2005 |
2.6.1 |
Initial Release |
Portions ©2000-2010 Runtime Revolution Limited, All Rights Reserved Worldwide.
|