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:

StackRunner 2.0 (Mac OS X - Universal Binary) Uploaded: 2/15/2010 Download StackRunner 2.0 - OS X UB (4.6 MB)
StackRunner 2.0 (Mac OS X - PowerPC Only) Uploaded: 2/15/2010 Download StackRunner 2.0 - OS X PPC (2.6 MB)
StackRunner 2.0 (Mac OS X - Intel x86 Only) Uploaded: 2/15/2010 Download StackRunner 2.0 - OS X x86 (2.3 MB)
StackRunner 2.0 (Windows) Uploaded: 2/15/2010 Download StackRunner 2.0 - Windows (2.5 MB)
StackRunner 2.0 (Linux) Uploaded: 2/15/2010 Download StackRunner 2.0 - Linux (2.8 MB)


You can download StackRunner 1.3 (for stacks built with Revolution 2.6.x or earlier, or any version of MetaCard) here:

StackRunner 1.3 (Mac OS 9) Uploaded: 1/1/2006 Download StackRunner 1.3 - OS 9 (1.0 MB)
StackRunner 1.3 (Mac OS X) Uploaded: 1/1/2006 Download StackRunner 1.3 - OS X (1.3 MB)
StackRunner 1.3 (Windows) Uploaded: 1/1/2006 Download StackRunner 1.3 - Windows (1.5 MB)
StackRunner 1.3 (Linux) Uploaded: 1/1/2006 Download StackRunner 1.3 - Linux (1.1 MB)


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.

StackRunner supports LiveCode, Revolution, and MetaCard stacks. There are two different ways to have SR open your stack:

  1. 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;

  2. 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).

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"):

  • For MacOS 9: Change the name of "StackRunner" to "FlashCards"

  • For MacOS X: Change the name of "StackRunner.app" to "FlashCards.app" (note that that ".app" may not be showing depending on your settings). Doing this will only change the name of the program in the Finder; as soon as the user executes the program, the process name (i.e. the name that appears in the Application menu, in process-watching apps like Activity Monitor, or during program switching with command-tab) will still say "StackRunner". This is because it gets this information from file(s) that are inside the application bundle.

    If you want to change the process name, refer to this tip and look in the section entitled "Carbon Application (Mach-O)".

  • For Windows: Change the name of "StackRunner.exe" to "FlashCards.exe".

  • For Linux: Change the name of "StackRunner" to "FlashCards".

Opening Stacks With StackRunner

SR will open your stack when SR is double-clicked in one of three ways:

  1. 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.

  2. 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.

  3. You can do nothing, and SR will present an answer file dialog that says "Please select a stack to open:"

Looking For 'main.rev' and 'config.srn'

image 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:

  1. [SR Folder]/StackRunner.app/Contents/Resources/config.srn
  2. [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):
  1. [SR Folder]/StackRunner.app/Contents/Frameworks/main.rev
  2. [SR Folder]/StackRunner.app/Contents/Plugins/main.rev
  3. [SR Folder]/StackRunner.app/Contents/main.rev
  4. [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

image
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:

  1. Open the "MyApp.app" bundle, go to the Contents folder, and copy your MyApp.rev stack into it.
  2. 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
  3. 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.

If you have any suggestions for upgrades to StackRunner, please send them to: stackrunner @ sonsothunder.com

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.