Mac Newbee question to Mac paths

Ken Ray kray at sonsothunder.com
Mon Apr 28 18:18:26 EDT 2008


> A typical Mac path would look like this:
> /Applications/MyApp.app/Contents/MacOS/Mainstack
> 
> Shouldn't it be: Hard Disc/Applications/MyApp.app/Contents/MacOS/Mainstack

No, not if the Mac has only a single volume (i.e. hard drive). And when
there are multiple drives, the path is:

/Volumes/<driveName>/... /... /...  (etc.)

> Can you put your App on a Mac only in: /Applications/ or could you build any
> folder structure as on windows to put your app also into:
> /Applications/foo/foo/MyApp.app/Contents/MacOS/Mainstack?

You can put it anywhere you like, Macs don't care about where apps are
launched from (although putting it in Applications or Utilities
(/Applications/Utilities) is the norm.
 
> The documentation tells me about the defaultfolder:  "this is the folder
> containing that standalone. On OS X systems, the defaultFolder is set to the
> folder that contains the application bundle"
> 
> The first part would tell me that the defaultfolder is:
> /Applications/MyApp.app/Contents/MacOS/
> 
> The second part would tell me that the defaultfolder is: /Applications/
> 
> Or is the difference just, how it looks like physical (first part) and what
> the user sees of it (second part)?

No, it's actually a question of a "bug fix" that took place a while ago. You
see the "engine" in an application is embedded on a Mac inside the
application bundle, and the rule was to start with the defaultFolder
pointing to the location of the standalone. On Windows, this was where the
.exe file was, but on Mac it was embedded three layers down in the bundle.

However this was confusing and required parsing of the defaultFolder to
point to the proper place, so in later versions of Rev, the defaultFolder
pointed to the folder that contained the application bundle (i.e. what the
user sees as the "application").

Hope this helps,

Ken Ray
Sons of Thunder Software, Inc.
Email: kray at sonsothunder.com
Web Site: http://www.sonsothunder.com/





More information about the use-livecode mailing list