Thursday, September 16, 2010

A word about OSX bundles

Hello,

One of the new concepts you will need to understand to work with applications inside OSX is how they can be organized. Inside Microsoft Windows we are used to have a host aplication executable and several other modules spreaded out into system known folders. Further, if we consider also .NET framework, we need to also consider the GAC.

In other hand, most of OSX applications are organized as bundles. A more detailed description of these structures (actually folders) is available here:

"Under NEXTSTEP, Mac OS X and GNUstep, a bundle is a directory (or file) that allows related resources such as software code to be grouped together. They were introduced into the Macintosh world as packages in Mac OS 9 and are similar in concept to the Application Directories used in RISC OS, on the ROX Desktop, as integrative technology into Ubuntu and Debian Linux with SpatialBundle, and on Super OS (RUNZ bundles)." - Wikipedia

Basically the concept is pretty simple, the bundle is the host and all its modules, resources, control files, etc. should be placed inside it. You can have as many sub-folders you want and organize your files as you wish. This self contained environment is firstly very good to keep your application isolated and avoid unwanted modifications from third party applications. Of course OSX also support shared components like frameworks placed into other folders.

If you get a typical OSX application, go to it using your Finder, right click and select "Show Package Contents" you will be able to see all its components (don't mess with them so your application may stop to work). So you may think bundles are folders with special behavior.

This is why most of OSX applications can be uninstalled by just deleting the main application bundle. It will carry all components to the Trash.

Ok, I don't want to go deeper than this but keep in mind that you will need to use bundle modules to organize your applications inside OSX.

Cheers!!!

2 comments:

  1. Will there be any more postings on this blog?

    ReplyDelete
  2. Hello Ralph,

    Absolutely. We are just waiting for the official AutoCAD Mac launch and FCS because most of things we want to post here are still protected under the NDA so we can't barely mention them.

    Stay tuned.

    ReplyDelete