There’s L. Ross Raszewski’s BundleMonkey (I have no personal experience using it, though).
Just for fun, I tried out the Nullsoft Scriptable Install System which he recommends, and I was able to cobble something together (for Windows) in a short amount of time:
- Download and install NSIS from http://nsis.sourceforge.net/Download (I went with the current version 3.0a1)
- Download and unzip the interpreter you want to distribute (e.g., Windows Frotz, .zip version).
- Put the unzipped interpreter, your game file and (optionally) an icon in a directory.
- Put the installer script (see code below or just take the attached .txt file and rename it to .nsi) into that directory, too.
- Of course, modify the script to substitute the right filenames for your project.
- Compile the installer script with the NSIS compiler (right-click the .nsi file in Windows Explorer and choose “Compile NSIS Script” from the context menu).
That’s it. The compiler should have produced a single .exe file, which, when the end-user executes it, will silently unpack its contents into the user’s temp directory and start the interpreter with the game file already loaded up. (edited post to add: Despite the name, the “install system” will not actually install anything on the user’s computer in this case. After the user quits the interpreter, the unpacked files will automatically be cleared from the temp directory.)
I made a “Curses.exe” as an example, using Graham Nelson’s classic Curses, Windows Frotz and the favicon from this very forum. Cf. the attached file - unfortunately the forum doesn’t allow attachments with an .exe extension, so I zipped it. The forum also doesn’t like the .nsi extension of the attached script, so I changed that to .txt before uploading.
Here’s the script which I adapted from one I found on the NSIS wiki:
[code]; NULLsoft Scriptable Install System
; use this to bundle an interpreter and an IF game
;
; based on:
; “make a REBOL Script executable”
; provided by www.digicamsoft.com
; downloaded from http://nsis.sourceforge.net/How_to_turn_a_REBOL_script_into_EXE
;
; crudely adapted for IF purposes by StJohnLimbo
; Name of the installer (don’t really care here because of silent below)
Name “Curses”
; Don’t want a window, just unpack files and execute
SilentInstall silent
; Set a name for the resulting executable
OutFile “Curses.exe”
; Set an icon (optional)
Icon “IF.ico”
; The stuff to install
Section “”
; Set output path to a temporary directory.
InitPluginsDir
SetOutPath $PLUGINSDIR
; put the required files here
File /r WindowsFrotz ; add the interpreter directory and its contents recursively
File “curses.z5” ; IF game file
; Execute and wait for the session to end
ExecWait ‘"$PLUGINSDIR\WindowsFrotz\Frotz.exe" “$PLUGINSDIR\curses.z5”’
; Set working directory to something else
; If it’s not set, $PLUGINSDIR will not be deleted
SetOutPath $TEMP
SectionEnd[/code]
Curses.zip (948 KB)
curses-test.txt (1.11 KB)