Stacks inside OSX Package
Tereza Snyder
tereza at califex.com
Sat Jul 12 18:18:44 EDT 2008
On Jul 12, 2008, at 3:30 PM, Sivakatirswami wrote:
> I know that many know this already, but because newbies may not...
>
> I just did my first standalone where I added a data stack (where
> data is saved) right inside the standalone package on OSX.
Here's a technique that I use that takes it to the next level:
When you build your standalone on MacOS X, the 'executable' is inside
'MacOS' inside 'Contents'. As you put it:
> MyStandAlone.app
> /Contents
> /MacOS
> MyStandAlone # this is the *real* standalone inside the package
Instead of putting 'MyDataStack.rev' next to 'MyStandalone' in
'MacOS', create a new folder in 'Contents' called whatever you want,
or use 'Resources' like other apps do and put MyDataStack.rev in it.
Like so:
MyStandAlone.app
/Contents
/MacOS
MyStandAlone # this is the *real* standalone inside the package
/Resources
MyDataStack.rev
Go one step farther and make subdirectories in 'Resources' to hold
stuff your application needs:
MyStandAlone.app
/Contents
/MacOS
MyStandAlone # this is the *real* standalone inside the package
/Resources
MyDataStack.rev
/Images
/Texts
/Sounds
Now here's the good part. Create another folder in 'Contents' and call
it 'Win32' and put your Windows standalone in it:
MyStandAlone.app
/Contents
/MacOS
MyStandAlone # this is the *real* standalone inside the package
/Resources
MyDataStack.rev
/Images
/Texts
/Sounds
/Win32
MyStandalone.exe # another *real* standalone inside the package
If you still make standalones for Classic, you can do that too:
MyStandAlone.app
/Contents
/MacOS
MyStandAlone # this is the *real* standalone inside the package
/Resources
MyDataStack.rev
/Images
/Texts
/Sounds
/Win32
MyStandalone.exe # another *real* standalone inside the package
/Classic
MyStandAlone # yet another *real* standalone inside the package
What does this do for you?
- Lets you distribute a single package for all platforms that has
only *one* copy of MyDataStack and all those images, texts, and sounds.
- Lets you drag that package to your multi-platform network.
Everything goes with it.
- Lets you standardize your paths relative to MyDataStack. Set the
default directory to 'Resources' and you're done. Never worry about
whether you have to dodge around 'Contents' again on one platform and
not on the other(s).
- Lets you put stuff that's specific to the OS (like externals) next
to the executables in the proper folders for the executables; and put
stuff, like MyDataStack, that pertain strictly to your application in
a single, separate place. Conceptual purity at last!
- While you're developing, you can keep MyDataStack.rev next to /
Images, /Texts, and /Sounds in your development folder and use the
same path logic in both Development and Standalone.
But, you say, what about Windows? You can't double-click an app in
Windows! Create, or have your installer create, a shortcut outside
the .app folder to the executable. Put that shortcut in the start menu
with all the other shortcuts to applications. Or on the desktop. Or
wherever.
It works!
t
--
Tereza Snyder
Califex Software, Inc.
More information about the use-livecode
mailing list