[MPlayer-dev-eng] [PATCH] Mac OS X Application Bundle Support

Chris Roccati roccati at pobox.com
Thu Nov 11 21:24:59 CET 2004


On 11 Nov 2004, at 04:15, Diego Biurrun wrote:
> And why not simply set reasonable values for DATADIR, CONFDIR and
> LIBDIR with configure parameters?

Because you can't: I tend to make easy things more complex than they 
need to be, but not THAT MUCH.
An appwrapper is a directory that contains everything an application 
needs to run, application included.
It looks like This:

MPlayer.app/
   Content/
     Info.plist
     MacOS/
       MPlayer
     Resources/
       icons.icns
       <other stuff>

The actual executable file is MPlayer.app/Content/MacOS/MPlayer.
The Info.plist is an XML file describing the application, its version, 
and various other stuff, like the filetypes the application is able to 
handle.
The Resources directory contains all the files needed by the 
application, as icons, the nationalized strings, and the stiff like the 
things that often go under /usr/local/share/appname under unix.

 From the user interface point of view, the appwrapper looks like a 
solid file, which the user is free to move and rename. So, if an 
hardcoded path was set in the executable, say 
"/Applications/MPlayer.app/Content/Resources/codecs.conf" the files 
would not be found anymore if the user moved or renamed the appwrapper. 
This is, ofcourse unacceptable. Hacking around the get_path() function 
does not seem acceptable either, because:

a) the same method, for cygwin, is labelled as "hack"
b) the user, under macosx HAS an home directory where the per-user 
configuration could be stored.




More information about the MPlayer-dev-eng mailing list