Upgrading to OS X Lion- a developer's tale
protip: Read to the end before you start; there are a few gotchas that might make you postpone the upgrade!
Step 1: Download and run the Mac OS 10.7 Lion installer
Head to the Mac App Store and download the installer. Remember that the installation is good for 5 Macs once you've paid.
The installer will leave you in stasis for half an hour or so while it runs the system updates.
Step 2: Download the new XCode, too
The OS upgrade will completely replace /usr/bin (don't worry, /usr/local/bin seems unscathed) so you now have no gcc or anything else useful. So... Head to the developer site? Nay! That is the old way of doing things.
Now, just like the OS, we use the Mac App Store to download our developer tools goodness. Luckily, this one's free still.
Step 3: Rebuild those python packages
Lion upgrades our default python install to 2.7, which means the "site packages" (locally installed python libs) are all gone. In fact, in completely overwrites 2.6 as well, so if you want to stick with 2.6 you could just dig around in your time machine image for the site packages folder under /System/Frameworks/Python.framework etc and rescue the precious dynamically linkable binaries, and then configure the /usr/bin/python link to point to python2.6 at the same location. Hopefully the libraries will have been sensible and put their executables in /usr/local/bin safely out of harms way.
Alternatively, if it's about time you had a spring clean and upgraded your libraries and platform, just download and recompile all your dependancies. Obviously this only works after step 2, if your libraries include C extensions.
Of course, if you use macports or some other custom python, you may need to double check other locations to see if your libraries survived.
Step 4: Check for PPC binaries
There is no support for PPC applications in Lion, so you'll need to source alternatives, or rebuild people's apps from source.
I found that a bibtex app I use (implemented in Java) was flagged as PPC because of a rogue launcher/wrapper. I just rewrapped the jar directly using Jar Bundler (which was buried somewhere on my system, located with the help of spotlight) and presto it woke up good as new, even picking up the old preferences.
protip: Getting the icon right with Jar Builder is easy; build with the standard one then "get info" the new app and the old one side by side. Highlight the old one's icon (top left, it should gain a blue halo) and cmd+C, then highlight the new and cmd+V. Simples!
Step 5: Get used to the freakery
Mission Control replaces spaces and expose - which I've just got down to a fine art! - and I'm yet to decide whether this is an improvement. They've enforced linear desktops, i.e. there's no "space above/below" anymore, although the reason for this is great- full screen apps that create their own space. You have to use the cocoa API for this though; chrome's full screen mode just covers the existing space, while terminal (and I believe mail and iphoto) swoosh right and make a spacehole.
The thing I liked about spaces was that it was fully keyboard happy - I could see where I was going without changing hand position, and with 2 sqrt(N) arrow key hits too - It looks like that's gone, and we now require either multitouch gestures, mouse clicks or both to get a good look at where we're going, or get there quickly. Of course you can still jump blindly left and right using the keyboard, and that may be good enough. Also, the four finger expose swipe on the current space is gone, although it does still exist (default activation seems to be a keyboard shortcut,) so I'll have to see if I can get that working too. You activate Mission Control with a 3 finger swipe.
Additionally, Multitouch Scrolling is the wrong way round! They've brought OS X in line with the iOS convention where your fingers directly manipulate the page, rather than the mouse convention where you're manipulate a pointer or use a scroll wheel. This is as good a convention as any, but it reverses what my brain currently knows! Freakery.
Worth it? I've not decided yet.
While it is indisputable that Apple systems kept up to date run faster, I'm not certain if I like the new face of OS X. Mission Control is a whole new window management system (just after I've got used to 2 1/2 years of the old window management system, coming from Windows) and I'm not sure how I'm going to adjust.
In any case the few gotchas I found (gcc gone and my python libraries with it!) were by no means insurmountable. Enjoy the other 247 new features! :)
EDIT/UPDATE: I have discovered that:
- There is a preference pane for pretty much all the gestures, including the backwards scrolling:
- There is another new convention (long overdue, although a bug I used as a feature occationally) which is that apps close when you close their last window! I noticed this when taking the above screenshot, as I usually use the fact that preview lingers to be able to take multiple shots, saving and closing the windows as I go.
- Finally, that there is an (as usual excellent) Ars Technica review of the OS, which you should be reading instead of my half-baked nonsense about the new usability features!