tags:

views:

131

answers:

4

I'm coming at this from the Windows world... On Windows, we have Windows Installer packages (MSI files) that are processed by a system component (Windows Installer) to install applications (the idea being that this system component tracks references to libraries and implements transactional installation, theoretically avoiding botched installations)...

Could someone explain the architecture and process of how an application gets installed on OSX? Is there a corresponding component to Windows Installer? And if so, how would I go about using it for my applications?

+6  A: 

you drag the icon into your Applications folder.

It is really a folder with a name ending in .app . The OS treats that as a single unit. Inside of the "folder" is the application distribution and metadata to tell the OS how to run it. Normally, systemwide components are installed on first-run.

You sometimes find package (.pkg) bundles that work exactly the same was as a .msi.

Joe Koberg
A: 

OS X apps are usually "xcopy deployed" and are self contained in so called bundles.

Mehrdad Afshari
+10  A: 

This might be overkill, but check this out:

Software Delivery Guide: Introduction (Apple)

Discusses various software delivery procedures on the Mac and how it all works.

Justin Niessner
+6  A: 

Applications are normally packaged into "bundles" with the .app extension. These bundles contain the binary (usually Mach-O) and any other resources the application needs to run; these usually include:

  • Resources for the application - such items as icons/images, NIB files (used to define the user interface)
  • Property list files defining such parameters as application name, bundle format etc
  • Localized files and strings which can be loaded by OS X for different locales set by the user

These bundles are normally kept in the /Applications/ folder, although they can be moved around and placed anywhere on the filesystem (the bundle format makes moving these applications around easier).

The common method to install an application is to download an Apple Disk Image file (extension .dmg) which is mounted as a disk drive on the user's OS; the application is then actually installed in two main ways:

  • Through the Installer app; this uses an Installation Package (extension .pkg) which provides a "Wizard" installation procedure, and is used when the installation is configurable (where the user can choose which extra dependencies to install etc). The free Apple tool PackageMaker can be used to create these packages.
  • By simply dragging the application icon into the Applications folder; this is for applications that do not require custom installation settings; normally a window displaying the application's icon and an icon for the Applications folder is shown, and the user drags the application's icon onto the Applications folder icon (for an example, see here)
Perspx