Can one hide a referenced folder?

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


On Mar 19, 2009, at 1:06 PM, Stgoldberg at aol.com 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 aol.com

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;  
sounds/mysound.wav.

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  
Contents".
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  
around.

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.

HTH

Devin

Devin Asay
Humanities Technology and Research Support Center
Brigham Young University




More information about the use-livecode mailing list