13

I've just started using a Mac for iOS development, coming from two decades of Windows use, and I'm astonished and confounded to find that there's no installation process for Mac programs....you just download them, open the DMG, copy the file over, and presto.

This confuses me to no end.

Can someone explain on a technical level what the difference is? How could it conceivably not be necessary to perform an installation process?

And if such a thing is possible, why don't all OSes work that way?

2
  • It's worth noting that just dragging the *.app folder into your local disk can trigger file actions. Also, that nnn.app is a folder, not a file. How mac apps work is fairly involved.
    – Fake Name
    Commented Apr 20, 2014 at 8:09
  • I'd just like to point out that Windows installers do some things besides just copying files and setting shortcuts. One is create a restore point so that the system can be restored to its original state if something goes wrong. Another to update the registry with an uninstall process. Since Windows apps aren't bundled like OS X apps are, the latter process is definitely necessary. Commented Apr 21, 2014 at 12:52

3 Answers 3

15

Us Mac users ask the same question the other way: Why do you need an (un)installer for everything in Windows?

The majority of Mac programs are complete bundles - all their resources are in the Application's folder (right click on App icon -> Show Package Contents). So they will run from anywhere, there's a system variable that tells the code where it is. Often, an application can be run directly from the downloaded DMG and even from a remote server. Bit of a performance hit but it will work. User settings are in the user's library, there are also system routines to handle the mechanics.

Macs have no central registry that requires setup (or maintenance) so nothing needs to go there either.

If you are developing Mac applications you should try very hard to not need an installer - only if you are installing shared libraries or shell-level services. In general, it's possible to do without.

Since you are heading towards iOS programming I would suggest just not worrying about it. iOS rules will tell you where to save what, and it is NOT negotiable. Preferences go here, user data goes there. You will use the supplied APIs. Comply. Obey.

3
  • No app can think different? Commented Apr 21, 2014 at 11:41
  • The flip side is that if an app that is bundled (.app) does add files to the system (such as in /Library, others places), register services, preference panes, etc., a simple "delete the .app" doesn't clean it up, and truly, nothing cleans it up, though there are other apps that do (or at least claim so) clean artifacts from non-present apps.
    – Hugo
    Commented Apr 24, 2014 at 23:49
  • Can you explain how this makes any sense? A lot of applications need to be recognized as handlers for certain files. That's impossible to do with just a file extraction process; the app needs to register itself somewhere, perhaps the equivalent of a Windows registry. How can an app not need an installer.
    – user541686
    Commented Dec 13, 2015 at 2:38
5

Actually, there are a lot of things on OS X that need to be "installed".

Normally, the apps that are "installed" are packages that include certain instructions. To put it simple, the package runs a script and tells the system to create/move files in different parts of the OS. This is necessary for software like the Adobe CS suite or Microsoft Office.

The other kind of apps, are kinda "standalone apps", in which you only need just one executable file. This file, when opened, then creates its dependencies, preferences files and such.

3

In many cases, a Windows installer don't really do anything other then extracting the compressed files, and writing them to the destination.

And then it creates a few shortcuts, and it might register itself to open files with specific extensions.

There is nothing magic about installing software in windows, and for much Windows software, you can in fact take the installed software directory and copy it directly to an other computer and run it there without doing a (re)install.

So it is mostly a difference between userinterfaces(Who is responsible for copying the files) not a difference between what really happens.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .