A .dmg
is just a virtual disk ("disk image"), and on its own has nothing to do with installation.
When the disk image contains just an application (usually there will be some explanatory text asking you to drag it to your Applications folder), then all the code and support files are contained within that one file. The application is responsible for doing any setup on first launch and responsible for providing an uninstall mechanism if anything is installed later on. Many developers are using the Sparkle framework to find and install updates.
If the disk image contains a package (.pkg
or .mpkg
), that's an installer. Running it could install files anywhere on your system and run pre- and post-install scripts, and there's no built-in uninstall or upgrade mechanism (the system does keep a log of installed packages, though, so if you later run an installer package for a newer version of the software, it may behave differently than if it had been a first install). In this case, too, the developer is responsible for uninstall and responsivle for updates. Responsible developers will install to standard directories (/Applications
, /Library
and ~/Library
, /usr
, etc.)
For command line software that you'd typically install from source, I'd recommend a package manager like MacPorts (my preference) or Fink over using an installer package. Both of those package managers set up a self-contained directory (/opt
and /sw
, respectively) with all the support files and executable code for software they install (and most packages respect it), and add themselves to your $PATH
. A huge advantage of using a package manager is that it'll keep track of installed software and give you the ability to upgrade or uninstall it.
1For subversion specifically, it's installed with the Developer Tools, which you can get from your Mac OS X install disc. – jtbandes – 2009-08-26T17:12:58.430
Oh yes. Very good point. You should definitely install developer tools -- subversion, gcc, etc. Plus mac goodies like the file comparison tool, and, of course, the tools for mac code development (Xcode, InterfaceBuilder) – Doug Harris – 2009-08-26T17:32:59.887
I have subversion client without XCode installed in Leopard, is it only the server that XCode installs? – The Tentacle – 2009-08-26T17:34:25.687
@jtbandes - I noticed subversion was already installed by default, even though I don't remember installing Developer Tools. However, it was an older version, so was wanting to update it to latest. And I wasn't sure how the default was installed, and therefore wasn't sure the best way to install the update. – Matt – 2009-08-26T17:58:09.883