Hugin Compiling OSX
Important note: this section is written without hands-on experience of a Mac, based on the experience reported by John Riley. I'd be grateful if people with access to a Mac can verify and rectify it. After rectification, please remove the note.
- Download and install the XCode Tools version for the operating system on the machine that you will use for the building job.
- You may find Fink Commander helpful. Unfortunately it seems unsupported / unmaintained. The Fink FAQ may help. Can somebody please describe here how to install Fink and Fink Commander?
- You may find Porticus helpful with MacPorts
- Get and install Subversion
Compiling Hugin.app on OSX
OSX Users: Do you wish you could test those snazzy new Hugin features, provide feedback on its development, or contribute patches to make it a better tool? Here are the steps necessary to compile your very own Hugin.app direct from the latest sources:
- Get and install the build system CMake, version 2.4.7 or later, from CMake.
- If you don't have it already, install MacPorts, which provides the port command, from MacPorts, giving you compilable package access to thousands of pieces of open source software. If you already have macports (formerly darwinports) installed, update it:
% sudo port selfupdateMake sure you have synced the latest port files:
% sudo port -d sync
- Don't forget to add /opt/local/bin to your path (e.g. export PATH=/opt/local/bin:$PATH).
- Use port to install the necessary libraries and commands for Hugin:
% sudo port install boost tiff jpeg libpng wxWidgets26 subversion openexrWait as all of these things are downloaded and compiled, and placed into /opt/local. Go get a frappe, walk the dog, and total the first 1000 prime numbers in binary. Rinse, lather, repeat as necessary.
- Download and build libpano13 from SourceForge. Alternatively, use SVN to checkout a fresh copy of libpano13 (Instructions). Build and install it (configure might need to be used with "$ ./configure --with-jpeg=/opt/local/ --with-tiff=/opt/local/", by default it will go into /usr/local/lib).
- Check out the hugin sources from SVN, like:
% svn co https://hugin.svn.sourceforge.net/svnroot/hugin/hugin/trunk hugin
- Create another directory alongside the newly created hugin/ for the build files (a cool feature of CMake: it doesn't need to pollute your source directory with build files!):
% mkdir hugin_build; cd hugin_build
- Configure hugin using cmake from inside the build directory:
% cmake ../hugin
- Fix up a (hopefully temporary) issue with Macport's threaded Boost library not providing generic link names for libboost_thread:
% cd /opt/local/lib % sudo ln -s libboost_thread-mt.a libboost_thread.a % sudo ln -s libboost_thread-mt.dylib libboost_thread.dylib % cd -
- Compile hugin and friends:
% makeWatch the pretty colors go by. Give the dog another quick spin around the block; you're finished. Look for the new bundle src/hugin/Hugin.app. Copy it to /Applications, or your preferred location, and commence testing.
Note: This is a new build configuration and you may encounter problems. Report them on the Hugin mailing list.
Important Note on the produced Bundle
Since the produced Hugin.app bundle links dynamically to libraries outside of the bundle, it is not yet portable, i.e. cannot be copied or shared unless the other machine has the same collection of libraries available in the same places. This is to facilitate development and testing (re-compile external libraries and test without re-building). Building a fully portable universal binary version at the command line is planned.
Notes on wxWidgets
wxWidgets, the GUI toolkit currently employed by Hugin, is currently at version 2.8.4. You can try either this version or the older version 2.6.4. Switching to the latest version is easy:
% sudo port deactivate wxWidgets26; sudo port install wxWidgets
and recompile by typing cmake ../hugin; make in your build directory. Switching back is as easy as:
% sudo port deactivate wxWidgets; sudo port activate wxWidgets26
Jdsmith 23:47, 4 August 2007 (CEST)
Building Enblend (using Fink)
Some functionalities of the latest hugin require the latest enblend. Daniel M. German posted compiling instructions for OSX 10.4. Please report successes or errors when building enblend to the hugin-ptx mailing list.
It is rather straightforward. It assumes that you use fink unstable under 10.4 (it problably works also under 10.5):
1. install lcms
% fink install lcms
2. modify /sw/include/lcms.h this requires root privileges and can be either done from the command line with sudo and your favorite CLI text editor (I assume there is sudo on OSX) or
- in the Finder, use the "get info" dialogue for the file to change its privileges so that you can read/write it.
- use your favorite text editor like TextWrangler, SubEthaEdit or TextEdit to make the changes.
#if !defined(__INTEGRITY) #include <memory.h> #endif
#if !defined(__INTEGRITY) #include </usr/include/memory.h> #endif
- Important If you use TextEdit, be very sure that you are doing it as plain text
- after saving, set back the system privileges with the Finder
3. Using fink build enblend
% fink build enblend
This will build enblend 3.0. It will also make sure you satisfy all the dependencies for the latest version of enblend. Don't worry, it won't install it.
% fink install openexr openexr-devel
5. Download enblend from cvs,
% cvs -d:pserver:firstname.lastname@example.org:/cvsroot/enblend login % cvs -z3 -d:pserver:email@example.com:/cvsroot/enblend co -P enblend % cd enblend
6. Build and install enblend
% make -f Makefile.cvs % ./configure --prefix=/usr/local --with-apple-opengl-framework % make % make install