After reading John Gruber's "How Should Mac Apps Be Distributed?", I wanted to mention that The Hit List already does by itself what John suggests Apple consider doing with all apps. That is, if you launch The Hit List from a folder that is not an Applications folder, it asks if it should move itself to /Applications.
Why it does this, though, is not for the reason that most people expect.
Zip files are great for distributing Mac software. It's an established format understood by all kinds of software, both Mac and otherwise. Some browsers will even decompress them automatically leaving one single application icon in your Downloads folder. Having seen a few people get confused by disk images and being inspired by Coda, I thought I'd give it a shot.
The switch to Zip went great except for one thing: we started getting a wide variety of mysterious crash reports. They all had something to do with the app not being able to load essential resources such as nib files. A nib file contains data to create user interface elements such as windows, buttons, and so forth. Users aren't going to get very far with a Cocoa app if it can't load its nib files.
It took me some time to connect the dots, but once I did, it was pretty damn obvious. People were moving The Hit List into the Applications folder while it is still running. Mac users think nothing of moving a file while it's being used. Mac OS X does some fancy things to allow this for the majority of cases so I wasn't expecting Cocoa to get tripped up by something that now seems trivial. But alas, it was trying to load files from the old location and freaking out when it couldn't find them.
At first I looked for ways of making Cocoa become aware of the application being moved. After looking at the bug so much it seemed like the best way to fix it. Unable to find a clean work-around, I went for the next best thing and made the application ask if it should move itself on its own terms lessening the chances of the ground getting cut from under its feet. I'm happy to report that although this is not a direct solution, it works well. When I first saw Delicious Library 2 do the very same thing I thought that it was being cute, perhaps even a bit too cute. Now, however, I'd like to think that me and Wil Shipley have fought the same battle.
One last thing. To help other Mac developers who are distributing their applications in a Zip file, I'm releasing into the public domain the code that handles all this app moving business. You can find it here.