Can one hide a referenced folder?

Devin Asay devin_asay at
Thu Mar 19 16:31:36 EDT 2009

On Mar 19, 2009, at 1:06 PM, Stgoldberg at wrote:

> I'd appreciate it if anyone has a solution to the following: When  
> images,
> sounds, and movies are referenced from Revolution and placed in a  
> folder separate
> from the standalone, is there a way to hide the referenced folder so  
> that the
> only thing the viewer sees is the standalone itself? Thanks.
> Stephen Goldberg
> stgoldberg at

Hi Steve,

Here's an OS X solution. If you set the defaultFolder to the folder  
containing the stack, when you create a standalone all references to  
relative file paths will be inside the .app bundle.

on openStack
   # set the default folder to the folder containing the stack
   get the effective filename of me
   set the itemdel to slash
   set the defaultFolder to item 1 to -2 of it
end openStack

# media files should now all be referenced in your scripts and  
property inspectors as relative file paths; e.g., images/myimage.png;  

Once your standalone is built, you need to make sure the media files  
are copied into the .app bundle:

Right click on the Rev-created standalone and choose "Show Package  
In the Finder window that opens, navigate to folder Contents/MacOS.
Copy your media folders and files into the MacOS folder and close the  
Finder window.

Presto! One neat .app file with no bothersome extra folders to move  

There isn't a similar trick for Windows that I know of, but most  
Windows installers put the standalone into C:\Programs and make a  
shortcut in the Start menu, effectively shielding the average user  
from seeing the media folders.



Devin Asay
Humanities Technology and Research Support Center
Brigham Young University

More information about the Use-livecode mailing list