AAOGlimpse Source code and Building
Note: This description dates back to version 0.87 of AAOGlimpse,
which was the last version with a user interface specific to OS
X. With the advent of the Qt-based version 1.0, the way the
program is built has changed significantly, and this page is in
need of a complete re-write. Eventually, it will get it.
With the release of AAOGlimpse vesion 0.82, the source code is now tidy enough that I feel not too embarrassed to make it available. It still needs tidying up a lot, and the commenting falls short of what I feel is OK in a number of the modules, but it will do. Also, so far I've not had time to really tidy up things to make it easy for others to build the system from scratch; sorry about that.
The source for version 0.86 is here. (This is an XCode 4 project)
The source for the older version 0.82, which was an XCode 3 project) is here.
I don't really imagine anyone will try to build AAOGlimpse from source just to get it running on their Mac OS X system. It's much easier to download the pre-built executable. However, if you want to see what the code looks like, here it is. If you want to see how some of this stuff is done, here it is. If you find the various bugs and missing features irritating, this is your chance to help. If you want to see it run on Linux or on Windows, please, go for it. (Although I suppose you really ought to read the boring bit about copyright at the end of this section...)
What I've put out at the moment is a tar file containing most of what you need to build AAOGlimpse for OS X using XCode. There are all the AAOGlimpse-specific source files, and an XCode project that uses them. What's I know is missing are the various external packages that it uses, with their header and library files. (And, I've not actually built this yet on any machine other than my own, so there may be things missing that I don't know about yet. If so, let me know.) The external packages used by AAOGlimpse are:
cfitsio This is Bill Pence's FITS library. Here.
wcslib This is Mark Calabretta's WCS library. See Mark's WCS page. (I have been using version 4.7)
libjpeg The JPEG access library from the Independent JPEG group. (I have been using version 6b, which seems to be a rather older version.)
FTGL Used to generate text in OpenGL from FreeType fonts. Here.
(I downloaded these some time back, and I think I've given the correct links, but in some cases the versions they have are later that the ones I've been using. I don't think this should be a problem, but I thought I ought to point out that I don't guarantee these are the actual links I used.)
So, to get AAOGlimpse built, you
need to get these libraries on your machine, build them (you
need a 64-bit version of the libraries), and then make sure
XCode can see them.
If you open the AAOGlimpse.xcodeproj file in the AAOGlimpse directory, look in the Groups and Files column at the left, and open up the Classes folder (the organisation of the source files here is pretty arbitrary and needs tidying) you'll see fitsio.h, wcslib.h, wcsconfig.h, libjpeg.h, libjpeg.a libwcs-4.7a and libcfitsio.a. If XCode can't find these, they'll show in red. If so, delete them, then locate the corresponding files in your versions of these systems in the finder and drag them into the XCode window.
In Other Sources (sorry about that) you'll find libftgl.a and the same applies to that. (There's also libfreetype.dylib, which is used by FTGL. This is part of XWindows, and I think is installed by default in all OS X systems now, so it should be OK.) However, I seem to have handled the question of finding the FTGL header files differently. Go to the 'Project' menu, select 'Edit project settings', select the 'Build' section up at the top, in under 'Search paths' there is an item called 'Header search paths'. Double-click on the value field to change it. In there I have had to put the FTGL directory and the freetype and X11 directories, and you will probably need to change the ftgl directory, which is specific to my layout.
After that, if you're really lucky, it might build. (AAOGlimpse was my first OS X project using XCode, and I'm sure it shows. So be tolerant of how it's set up.)
A few details about the interface between the system-dependent and system-independent layers of the program can be found in this page on interfaces.
Traditionally, all AAO code has been released under words to the effect of "Copyright AAO, commercial use requires permission", and I have to release AAOGLimpse with the same wording. Just what this means in practice has really never been tested, and I'm releasing the source in the hope that others will find it useful and may improve on it. But be aware that, technically, it isn't actually open source. If this is an issue for anyone, contact me - ks at aao.gov.au.
If you open the AAOGlimpse.xcodeproj file in the AAOGlimpse directory, look in the Groups and Files column at the left, and open up the Classes folder (the organisation of the source files here is pretty arbitrary and needs tidying) you'll see fitsio.h, wcslib.h, wcsconfig.h, libjpeg.h, libjpeg.a libwcs-4.7a and libcfitsio.a. If XCode can't find these, they'll show in red. If so, delete them, then locate the corresponding files in your versions of these systems in the finder and drag them into the XCode window.
In Other Sources (sorry about that) you'll find libftgl.a and the same applies to that. (There's also libfreetype.dylib, which is used by FTGL. This is part of XWindows, and I think is installed by default in all OS X systems now, so it should be OK.) However, I seem to have handled the question of finding the FTGL header files differently. Go to the 'Project' menu, select 'Edit project settings', select the 'Build' section up at the top, in under 'Search paths' there is an item called 'Header search paths'. Double-click on the value field to change it. In there I have had to put the FTGL directory and the freetype and X11 directories, and you will probably need to change the ftgl directory, which is specific to my layout.
After that, if you're really lucky, it might build. (AAOGlimpse was my first OS X project using XCode, and I'm sure it shows. So be tolerant of how it's set up.)
A few details about the interface between the system-dependent and system-independent layers of the program can be found in this page on interfaces.
Copyright issues
Traditionally, all AAO code has been released under words to the effect of "Copyright AAO, commercial use requires permission", and I have to release AAOGLimpse with the same wording. Just what this means in practice has really never been tested, and I'm releasing the source in the hope that others will find it useful and may improve on it. But be aware that, technically, it isn't actually open source. If this is an issue for anyone, contact me - ks at aao.gov.au.