Tereza: Marvelous! but,  one doubt:

You wrote; - "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)."

But, if the Win32.exe is inside a folder but the Mac.exe standalone is not, won't the path reference to Resources differ?

You would have to do:

Mac standalone invokes:

set the defaultfolder to "Resources"
topLevel "MyDataStack.rev"

Win32 would need to do:

set the defaultfolder to "../Resources"
topLevel "MyDataStack.rev"

N'est ce pas?

skts







Pierre Sahores wrote:
So clearly elegant ! Thanks so much, Tereza :-)
--
Pierre Sahores
mobile : 06 03 95 77 70
www.sahores-conseil.com


Le 13 juil. 08 à 00:18, Tereza Snyder a écrit :


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.


_______________________________________________
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution



_______________________________________________
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution



_______________________________________________
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to