Building Luminance 2.0 on Mac OS X
A post without a picture, but with (at least for me) helpful information: How to build Luminance 2.0.0, the successor to qtpfsgui, on Mac OS X 10.6 Snow Leopard. This post is only useful for you if you know what a Terminal is.
Additionally, you need to have the Apple Developer Tools installed.
Please be aware that this is more of a "works for me" post so I'm not sure if I can help you if anything goes wrong.
It might be easier to install some of the dependencies via MacPorts, but because Luminance itself is currently not available there and for consistency throughout the howto, I chose to install everything from the original source.
What you need
- QT4 if you don't already have it; includes qmake
- the Luminance 2.0.0 source code
- the exiv2 source code
- the fftw3 source code
- the GSL source code
- the JPEG source code
- the libtiff source code
- the OpenEXR source code
- and the ilmbase source code.
Configuring
Unpack all downloaded source code to a folder, say ~/luminance
and cd
to that directory:
Heart-of-Snow:luminance dirko$ ls
exiv2-0.20 fftw-3.2.2 gsl-1.14 ilmbase-1.0.2 jpeg-8b
luminance-hdr_2.0.0 openexr-1.7.0 tiff-3.9.4
For exiv2, gsl, jpeg and libtiff, cd
into their directory and execute ./configure
, make
and make install
.
For OpenEXR and ilmbase, first delete the line
CXXFLAGS="$CXXFLAGS -Wno-long-double"
from the respective configure
files, then execute ./configure
, make
and make install
.
For fftw, use ./configure --enable-threads --enable-float
, make
and
make install
.
Compiling
Running qmake
now would create an XCode project. As we're currently so used to the Terminal, we will use qmake -spec macx-g++
instead. This creates a makefile, so the next step would be make
— if the code would only be GCC compatible. As it's not, we need to replace all #elifdef
prepocessor directives with the appropriate GCC code:
#elifdef Q_WS_WIN
from src/Threads/LoadHdrThread.cpp
line 103 should be
#elif defined(Q_WS_WIN)
Similar corrections need to be done for:
src/Threads/HdrInputLoader.cpp
line 112src/Threads/HdrInputLoader.cpp
line 142
This should also be easy to do with some find
and sed
magic, but this is left as an exercise to the reader (comments welcome).
A final make
should now create the luminance.app
for you which you can copy to wherever you want, e.g. your /Applications
folder.
Creating this howto by trial and error took me a whole afternoon — to save some time on the next install of Luminance on another Mac or to help you :) Now I'll check what's new in Luminance 2.0 and how much I can afford to donate to the author. Expect some tonemapped HDR images here soon.
Sources
This is basically just a compilation of things I found via Google. Here's a (probably incomplete) list of sources used: