Alchymy Lab Notes - Compiling Stellarium in OS X
Stellarium is an excellent open source application used for astronomy. It is not directly developed for the iMac and OS X, but uses cross platform components which allow it to be compiled on other operating systems. Here we cover how to compile under OS X on an Intel iMac. Original source of these notes is the Stellarium website, but we have modified them specifically for our iMac.
You need a machine with Mac OS X 10.4 (latest version 10.4.11) or later [ Lab machine is OS X Lion 10.7.4 ]
Install the latest version of Apple's Developer Tools: http://developer.apple.com/technology/xcode.html [ Lab machine is Xcode 4.2.1 ]
Third party tools required:
I nstall the latest version of cmake: http://www.cmake.org/cmake/resources/software.html [ Lab machine has version 2.8.8 - cmake-2.8.8-Darwin64-universal.dmg]
Install the latest version of Qt libraries: http://qt.nokia.com/downloads/downloads#qt-lib [ Lab machine has version - qt-mac1-opensource-4.8.2.dmg]
The main pkg file in the dmg will guide you through the steps to getting Qt 4.8 Opensource Edition installed on your machine.
After a successful install, you can find most new things in /Developer. Specifically things will be located in the following places:
• Qt Designer, Qt Linguist: /Developer/Applications/Qt
• Qt Documentation: /Developer/Documentation/Qt
• Qt Examples: /Developer/Examples/Qt
• Qt Plugins: /Developer/Applications/Qt/Plugins
• Qt Frameworks: /Library/Frameworks
• Qt Libraries: /usr/lib
• qmake, moc, uic, etc.: /Developer/Tools/Qt (symlink to /usr/bin)
• Uninstall script: /Developer/Tools/uninstall-qt.py
Qmake, moc etc are searched for in the cmake process.
Install macports: http://www.macports.org/install.php [ Lab machine has version 2.1.1 - Macports-2.1.1-10.7-Lion.pkg]
Install bazaar making use of macports:
$ sudo port install bzr [ failed to build ]
Or install from download - [ Lab machine has version 2.5.0 - Bazaar-2.5.0-OSX-10.6-3.dmg]
For Mac OS X there are two different versions of Qt - we have used the Cocoa version (??)) - exclusively for Intel architecture and Mac OS X 10.5 and later. We do not want to create universal binaries on our machine.
Compiling dependencies to build an universal binary - not required here, only testing Intel version !
Building stellarium itself:
Create a build directory with your favorite shell (the following directory is just an example, you can pick any name and path you want)
$ mkdir ~/Development
$ cd ~/Development
And in that directory checkout the sources with the bzr command
$ bzr branch lp:stellarium stellarium
$ make install
$ make macosx_bundle