https://wiki.panotools.org/api.php?action=feedcontributions&user=Onomou&feedformat=atomPanoTools.org Wiki - User contributions [en]2024-03-19T04:49:30ZUser contributionsMediaWiki 1.35.3https://wiki.panotools.org/index.php?title=User:Onomou&diff=13712User:Onomou2011-08-22T18:11:33Z<p>Onomou: /* 2011 GSoC Project Documentation */</p>
<hr />
<div>Hi, this is my page. I have a [[/Sandbox]].<br />
<br />
<br />
== '''2011 GSoC Proposal''' ==<br />
<br />
'''Short Description'''<br />
Currently, control points between pairs of photographs must be added by users manually or "guessed" using a sifting algorithm. This project aims at a sort of hybrid for straight lines. The user draws straight lines on a pair of images, and the computer then automatically adds and refines control points along the given path. Such a method will allow quick and simple alignment of photographs with straight lines in them.<br />
<br />
'''About Me'''<br />
<br />
My name is Steven Williams and I am in my fourth year studying undergraduate mathematics at Walla Walla University. I have taken classes in data structures using C++. I have been an amateur photographer for about six years and own a Canon Powershot A620 and Canon Digital Rebel XTi. The only special equipment I have is a Manfrotto ball head tripod, but I shoot mostly handheld. Some of my photographs, including panoramas I have made using Hugin, can be found on Flickr[http://www.flickr.com/photos/onomou/] and Panoramio[http://www.panoramio.com/user/619377]. I also use Hugin to align images for exposure blending using qtpfsgui or enblend/enfuse.<br />
<br />
'''Coding Skills'''<br />
<br />
I have been writing in C++ for three years. I became interested in programming in high school, and wrote a Mastermind clone in TI-Basic on my TI-89. I have a little experience with C# and recently Processing. My current primary computer is a homebuilt quad-core desktop running Windows 7 with Ubuntu in a virtual machine.<br />
<br />
Recently I wrote a program to visualise and interact with 2D IFS fractals as part of a senior seminar project. It is on Git here [https://github.com/onomou/ifsFractalGen].<br />
<br />
I have patched [https://bugs.launchpad.net/bugs/749669 Bug #749669], which addresses crashing when trying to load an image as a .pto project.<br />
<br />
'''Proposal'''<br />
<br />
My only previous interaction with the Hugin project is as a user. I have been using Hugin for several years to stitch panoramas. (UPDATE: see [https://bugs.launchpad.net/bugs/749669] for a patch I did for the program)<br />
<br />
For this project I would like to take up the Straight Line UI proposal from here [http://wiki.panotools.org/Straight_Line_UI_proposal]. This is also a blueprint [https://blueprints.launchpad.net/hugin/+spec/straight-line-ui] on Launchpad. I have had some experience from my IFS program working with user input and object manipulation and am excited to develop a new tool for Hugin that will enable users to match their photographs quickly and easily.<br />
<br />
I propose a system that will take a line drawn by the user in the quick preview window, and using a corner detection algorithm "snap" it to the nearest edge detected for more precise straight line input. Once this is done for the same line in matching images, the program will scan points along this line and automatically match control points in each image.<br />
<br />
I plan on spending at least 40 hours per week on this project. University graduation happens around June 10, so I may not be able to spend as much time during the two or three days around that weekend. Here is a (very) tentative schedule:<br />
<br />
'''May 24-June 3''' Finalize inputs/outputs for new straight line tool, get<br />
<br />
'''June 6-17''' Write line input methods for user interaction and rough algorithm for guessing/sifting control points on the given lines.<br />
<br />
'''June 20-July 1''' Implement edge detection for given lines, test on lots of images<br />
<br />
'''July 4-8''' Clean up and test for mid-term evaluation<br />
<br />
'''July 18-29''' Refine control point guessing procedure<br />
<br />
'''August 1-12''' Extra week for bugs/slow progress/etc.<br />
<br />
'''August 15-19''' Finalize/improve documentation<br />
<br />
<br />
<br />
<br />
== '''2011 GSoC Project Documentation''' ==<br />
The bulk of this project is wrapped up in a new class, the Control Line, that one can use in a manner similar to the Control Point class. It is a cascade of containers with associated functions for each level. The containers are as follows, from smallest to largest, with a short description and reference to where one would use it.<br />
<br />
<br />
<br />
'''StraightLine'''<br />
<br />
Description: Contains attributes of a straight line, modeled as a circle (straight lines distort approximately circular with a non-perfect lens).<br />
<br />
Where to use it: Within an individual image. Call addPoint() to place three points along the straight line path. Attributes are accessed as center, radius, thetaStart, thetaEnd for a curved line and straightStart, straightEnd for a straight line.<br />
<br />
<br />
<br />
'''ImageLinesCollection'''<br />
<br />
Description: Holds all straight lines in an image.<br />
<br />
Where to use it: Within an individual image. Use for selecting a line (or point on a line) from all lines in the image.<br />
<br />
<br />
<br />
'''ImageLinesPair'''<br />
<br />
Description: Holds the set of all lines corresponding to an image pair. This manages adding and deleting a line so it ends up in both images.<br />
Where to use it: This class should be accessed by code handling the current image pair. For example, line list selection, deletion, and extracting points along the line would use this class.<br />
<br />
<br />
<br />
'''LineCollection'''<br />
<br />
Description: This holds everything related to straight lines for a panorama. It contains a vector of 'ImageLinesPair', with very few associated functions.<br />
<br />
Where to use it: Use OnImagePairChange(leftImageNr,rightImageNr) to get a new '''ImageLinesPair''' whenever the image pair changes in the Control Points tab.</div>Onomouhttps://wiki.panotools.org/index.php?title=User:Onomou&diff=13709User:Onomou2011-08-22T05:41:27Z<p>Onomou: Adding documentation of project</p>
<hr />
<div>Hi, this is my page. I have a [[/Sandbox]].<br />
<br />
<br />
== '''2011 GSoC Proposal''' ==<br />
<br />
'''Short Description'''<br />
Currently, control points between pairs of photographs must be added by users manually or "guessed" using a sifting algorithm. This project aims at a sort of hybrid for straight lines. The user draws straight lines on a pair of images, and the computer then automatically adds and refines control points along the given path. Such a method will allow quick and simple alignment of photographs with straight lines in them.<br />
<br />
'''About Me'''<br />
<br />
My name is Steven Williams and I am in my fourth year studying undergraduate mathematics at Walla Walla University. I have taken classes in data structures using C++. I have been an amateur photographer for about six years and own a Canon Powershot A620 and Canon Digital Rebel XTi. The only special equipment I have is a Manfrotto ball head tripod, but I shoot mostly handheld. Some of my photographs, including panoramas I have made using Hugin, can be found on Flickr[http://www.flickr.com/photos/onomou/] and Panoramio[http://www.panoramio.com/user/619377]. I also use Hugin to align images for exposure blending using qtpfsgui or enblend/enfuse.<br />
<br />
'''Coding Skills'''<br />
<br />
I have been writing in C++ for three years. I became interested in programming in high school, and wrote a Mastermind clone in TI-Basic on my TI-89. I have a little experience with C# and recently Processing. My current primary computer is a homebuilt quad-core desktop running Windows 7 with Ubuntu in a virtual machine.<br />
<br />
Recently I wrote a program to visualise and interact with 2D IFS fractals as part of a senior seminar project. It is on Git here [https://github.com/onomou/ifsFractalGen].<br />
<br />
I have patched [https://bugs.launchpad.net/bugs/749669 Bug #749669], which addresses crashing when trying to load an image as a .pto project.<br />
<br />
'''Proposal'''<br />
<br />
My only previous interaction with the Hugin project is as a user. I have been using Hugin for several years to stitch panoramas. (UPDATE: see [https://bugs.launchpad.net/bugs/749669] for a patch I did for the program)<br />
<br />
For this project I would like to take up the Straight Line UI proposal from here [http://wiki.panotools.org/Straight_Line_UI_proposal]. This is also a blueprint [https://blueprints.launchpad.net/hugin/+spec/straight-line-ui] on Launchpad. I have had some experience from my IFS program working with user input and object manipulation and am excited to develop a new tool for Hugin that will enable users to match their photographs quickly and easily.<br />
<br />
I propose a system that will take a line drawn by the user in the quick preview window, and using a corner detection algorithm "snap" it to the nearest edge detected for more precise straight line input. Once this is done for the same line in matching images, the program will scan points along this line and automatically match control points in each image.<br />
<br />
I plan on spending at least 40 hours per week on this project. University graduation happens around June 10, so I may not be able to spend as much time during the two or three days around that weekend. Here is a (very) tentative schedule:<br />
<br />
'''May 24-June 3''' Finalize inputs/outputs for new straight line tool, get<br />
<br />
'''June 6-17''' Write line input methods for user interaction and rough algorithm for guessing/sifting control points on the given lines.<br />
<br />
'''June 20-July 1''' Implement edge detection for given lines, test on lots of images<br />
<br />
'''July 4-8''' Clean up and test for mid-term evaluation<br />
<br />
'''July 18-29''' Refine control point guessing procedure<br />
<br />
'''August 1-12''' Extra week for bugs/slow progress/etc.<br />
<br />
'''August 15-19''' Finalize/improve documentation<br />
<br />
<br />
<br />
<br />
== '''2011 GSoC Project Documentation''' ==<br />
The bulk of this project is wrapped up in a new class, the Control Line, that one can use in a manner similar to the Control Point class. It is a cascade of containers with associated functions for each level. The containers are as follows, from smallest to largest, with a short description, function list, and reference to where one would use it.<br />
<br />
'''StraightLine'''<br />
Description: <br />
Functions:<br />
Where to use it:<br />
<br />
'''ImageLinesCollection'''<br />
Description: <br />
Functions:<br />
Where to use it:<br />
<br />
'''ImageLinesPair'''<br />
Description: <br />
Functions: ImageLinesPair(int,int)<br />
ImageLinesPair(int,int,ImageLinesCollection,ImageLinesCollection) - for loading an existing ImageLinesCollection pair (from a previous session, etc.)<br />
bool selectByIndex(int)<br />
bool deleteByIndex(int)<br />
int indexOfSelected(void)<br />
bool isWhichPair(int,int,ImageLinesPair*)<br />
Where to use it: This class should be accessed by code handling the current image pair. For example, line list selection, deletion, and extracting points along the line would use this class.<br />
<br />
'''LineCollection'''<br />
Description: This holds everything related to straight lines for a panorama. It contains a vector of '''ImageLinesPair''', with very few associated functions.<br />
Functions: OnImagePairChange(int,int)<br />
Where to use it: Use OnImagePairChange(leftImageNr,rightImageNr) to get a new '''ImageLinesPair''' whenever the image pair changes in the Control Points tab.</div>Onomouhttps://wiki.panotools.org/index.php?title=Hugin_SDK_(MSVC_2010)&diff=13658Hugin SDK (MSVC 2010)2011-07-17T03:44:58Z<p>Onomou: /* STLport (64-bit Enblend Only) */ Clarify compiler error for those new to the SDK</p>
<hr />
<div>Hugin depends on different components like libraries and tools, which are not available on a common Windows system. All these components can be combined to a Hugin Software Development Kit (SDK). This article will eventually give step-by-step instructions to build such SDK for Hugin using Microsoft Visual C++ 2010 (MSVC 2010) Express Edition and precompiled dependencies. <br />
<br />
'''Note: Work in Progress''': The SDK, Hugin and enblend have all been built successfully with MSVC 2010 Express, on Windows 7 x64 Professional, as of July 6, 2010. However, the instructions below are probably not complete, and may be specific to Windows 7. This article has been copied wholesale from [[Hugin SDK (MSVC 2008)]], and has been updated as the steps were successfully completed. <br />
<br />
This article will construct native 32-bit and 64-bit versions. When appropriate, steps that only apply to the 32-bit or 64-bit versions will be noted as (32-bit) or (64-bit), and you can safely ignore them if you are not targeting that particular version. In order to compile a 64-bit version of the Hugin SDK, one does not need a 64-bit computer. However, if they wish to test or debug the binaries, or for some projects (such as OpenEXR) which execute compiled binaries as part of their build step, this will not necessarily be possible on Win32.<br />
<br />
First of all an overview is given over the contents of the SDK and the tools that are necessary to build the SDK.<br />
<br />
The build steps for each component are written like a walk-through and annotated on the end of each section.<br />
<br />
Maybe some of the described tools and packages, especially those fetched from Mercurial (Hg) repository, will change over time and/or become obsolete. Hence it is likely that some steps will become invalid or won't work any more.<br />
<br />
The SDK is structured so that each component resides in its own subdirectory. This approach is different to other platforms like Linux, where some common directories are available to store include files, libraries and applications. The files of a component are spread over all these directories. Both approaches to structure the files in a file system have its assets and drawbacks.<br />
<br />
The base directory of the SDK is denoted as <tt><SDKHOME></tt> in this article. Replace <tt><SDKHOME></tt> by directory name where you store the SDK on your system. In the examples <tt><SDKHOME></tt> is replaced by the directory name <tt>D:\usr\src\SDK</tt>.<br />
<br />
== Prerequisites ==<br />
<br />
To build the SDK some tools are required that are listed in the table below. Download the tools and install them. The destination directory of each tool is arbitrary. If you are uncertain, choose the default given in the setup dialog of each tool.<br />
<br />
{| class="wikitable" width="100%"<br />
|- valign="top"<br />
! style="padding:5px; text-align:left" width="30%" | Tool<br />
! style="padding:5px; text-align:left" | Description<br />
|- valign="top"<br />
| style="padding:5px; text-align:left" | Microsoft Visual C++ 2010 Express Edition<br />
| style="padding:5px; text-align:left" | Compiler, Debugger and IDE<br/>Visit [http://www.microsoft.com/express/vc/ Download page] <br>If compiling for 64-bit, you will need to download the SDK, listed next. <br />
|- valign="top"<br />
| style="padding:5px; text-align:left" | (x64 Only) Microsoft Windows SDK for Windows 7 and .NET Framework 4<br />
| style="padding:5px; text-align:left" | x64 Compiler, Libraries, and Headers<br/>Visit [http://go.microsoft.com/fwlink/?LinkID=191420]<br> When installing, make sure to include the Visual C++ compilers for x64 (under Developer Tools) and the Header Files and x64 libraries (under Windows Headers and Libraries). Optionally consider installing all of the SDK, as it makes compiling generally easier.<br />
|- valign="top"<br />
| style="padding:5px; text-align:left" | CMake 2.8.1 (2010-04-05)<br />
| style="padding:5px; text-align:left" | Generator of solution and project files for MSVC 2010<br/>Visit [http://www.cmake.org/cmake/resources/software.html#latest Download page] or download [http://www.cmake.org/files/v2.8/cmake-2.8.1-win32-x86.exe <tt>cmake-2.8.1-win32-x86.exe</tt>]<br> Leave default 'Don't add Cmake to system path' <br> Follow the note on the download page to replace CMakeVS10FindMake.cmake <br />
|- valign="top"<br />
| style="padding:5px; text-align:left" | (skip) TortoiseSVN 1.6.1.16129 (2009-02-13)<br />
| style="padding:5px; text-align:left" | (skip) Tool to handle source codes in Subversion repositories<br/>Visit [http://tortoisesvn.net/downloads Download page] or download<br/> [http://downloads.sourceforge.net/tortoisesvn/TortoiseSVN-1.6.1.16129-win32-svn-1.6.1.msi <tt>TortoiseSVN-1.6.1.16129-win32-svn-1.6.1.msi (32-bit)</tt>] or<br/> [http://downloads.sourceforge.net/tortoisesvn/TortoiseSVN-1.6.1.16129-x64-svn-1.6.1.msi <tt>TortoiseSVN-1.6.1.16129-x64-svn-1.6.1.msi (64-bit)</tt>]<br />
|- valign="top"<br />
| style="padding:5px; text-align:left" | TortoiseHg 1.0.4 (2010-06-11)<br />
| style="padding:5px; text-align:left" | Tool to handle source codes in Mercurial repositories<br/>Visit [http://tortoisehg.bitbucket.org/ Download page]<br/> Choose x64 if appropriate for you. <br />
|- valign="top"<br />
| style="padding:5px; text-align:left" | 7-Zip 4.65 (2009-02-03)<br />
| style="padding:5px; text-align:left" | Tool to decompress the source packages<br/>Visit [http://www.7-zip.org/download.html Download page] or download [http://downloads.sourceforge.net/sevenzip/7z465.exe <tt>7z465.exe (32-bit)</tt>] or [http://downloads.sourceforge.net/sevenzip/7z465-x64.msi <tt>7z465-x64.msi (64-bit)</tt>]<br />
|- valign="top"<br />
| style="padding:5px; text-align:left" | (skip - not required for Enblend 4.0) Java SE Development Kit 6 Update 20<br />
| style="padding:5px; text-align:left" | (skip) Java Development Kit (JDK)<br/>Visit [http://java.sun.com/javase/downloads/index.jsp Download page]<br />
|}<br />
<br />
== Contents of the Hugin SDK ==<br />
<br />
=== Precompiled Version (32-bit only) ===<br />
<br />
This is what we are working towards: For those who want to avoid to build the whole SDK from scratch, the last available precompiled SDK is for MSVC 2008, for an older version of Hugin.<br />
<br />
{| class="wikitable" width="100%"<br />
|- valign="top"<br />
! style="padding:5px; text-align:left" | Precompiled Hugin SDK (Win32)<br />
|- valign="top"<br />
| style="padding:5px; text-align:left" | [http://hugin.panotools.org/sdk/MSVC/Hugin-SDK-20090509-win32.exe <tt>Hugin-SDK-20090509-win32.exe </tt>] (76 MiB, 2009-05-09)<br />
|}<br />
<br />
=== Building from Source ===<br />
The contents of the Hugin SDK is shown in the following table. Download the packages, except the packages fetched from Hg/Subversion repository.<br />
<br />
{| class="wikitable" width="100%"<br />
|- valign="top"<br />
! style="padding:5px; text-align:left" width="30%" | Directory<br />
! style="padding:5px; text-align:left" | Description (Website)<br/>Download package (Date of the package)<br />
|- valign="top"<br />
| style="padding:5px; text-align:left" | <tt>autopano-sift-C</tt><br />
| style="padding:5px; text-align:left" | Autopano-SIFT-C (http://hugin.sourceforge.net/)<br/>Mercurial repository<br/><br />
<tt>http://hugin.hg.sourceforge.net:8000/hgroot/hugin/autopano-sift-C</tt> from [[Hugin_Compiling_Ubuntu]](Note January 2010 / May 2010: Currently the autopano-sift-C SVN trunk, as well as Hg default tip, is unstable, use the 2.5.1 release tarball instead) <br />
|- valign="top"<br />
| style="padding:5px; text-align:left" | <tt>boost_1_43_0</tt><br />
| style="padding:5px; text-align:left" | Boost C++ libraries 1.43.0<br />
(http://www.boost.org/)<br/>[http://sourceforge.net/projects/boost/files/boost/1.43.0/boost_1_43_0.7z/download<br />
<tt>boost_1_43_0.7z</tt>]<br />
(2010-05-06)<br/>(skip) [http://sourceforge.net/projects/boost/files/boost-jam/3.1.18/boost-jam-3.1.18-1-ntx86.zip/download<br />
<tt>boost-jam-3.1.18-1-ntx86.zip</tt>] (2010-03-22)<br />
|- valign="top"<br />
| style="padding:5px; text-align:left" | <tt>Deploy</tt><br/><tt>OpenEXR</tt><br />
| style="padding:5px; text-align:left" | OpenEXR library 1.6.1 and IlmBase libraries 1.0.1 (http://www.openexr.com/)<br/>[http://download.savannah.nongnu.org/releases/openexr/ilmbase-1.0.1.tar.gz <tt>ilmbase-1.0.1.tar.gz</tt>] (2007-10-22)<br/>[http://download.savannah.nongnu.org/releases/openexr/openexr-1.6.1.tar.gz <tt>openexr-1.6.1.tar.gz</tt>] (2007-10-22)<br />
|- valign="top"<br />
| style="padding:5px; text-align:left" | <tt>enblend-enfuse-4.0</tt> <br />
| style="padding:5px; text-align:left" | Enblend 4.0 and Enfuse 4.0 (http://enblend.sourceforge.net/)<br/><br />
{| class="wikitable"<br />
|- valign="top"<br />
! style="padding:5px; text-align:left" | 32-Bit<br />
! style="padding:5px; text-align:left" | 64-Bit<br />
|- valign="top"<br />
| style="padding:5px; text-align:left" | [http://downloads.sourceforge.net/enblend/enblend-enfuse-4.0.zip <tt>enblend-enfuse-4.0.zip</tt>] (2010-05-??)<br />
| style="padding:5px; text-align:left" | [http://downloads.sourceforge.net/enblend/enblend-enfuse-4.0.tar.gz <tt>enblend-enfuse-4.0.tar.gz</tt>] (2010-05-??)<br />
|}<br />
|- valign="top"<br />
| style="padding:5px; text-align:left" | <tt>exiftool</tt><br />
| style="padding:5px; text-align:left" | ExifTool 8.23 (http://www.sno.phy.queensu.ca/~phil/exiftool)<br/>[http://www.sno.phy.queensu.ca/~phil/exiftool/exiftool-8.23.zip <tt>exiftool-8.23.zip</tt>] (2010-06-20)<br />
|- valign="top"<br />
| style="padding:5px; text-align:left" | <tt>exiv2-0.20.0</tt><br />
| style="padding:5px; text-align:left" | Exiv2 C++ library 0.20 (http://www.exiv2.org/)<br/>[http://www.exiv2.org/exiv2-0.20.tar.gz <tt>exiv2-0.20.tar.gz</tt>] (2010-05-30)<br />
|- valign="top"<br />
| style="padding:5px; text-align:left" | <tt>expat-2.0.1</tt><br />
| style="padding:5px; text-align:left" | Expat XML Parser library 2.0.1 (http://sourceforge.net/projects/expat/)<br/>[http://downloads.sourceforge.net/expat/expat-2.0.1.tar.gz <tt>expat-2.0.1.tar.gz</tt>] (2007-06-05)<br />
|- valign="top"<br />
| style="padding:5px; text-align:left" | <tt>gettext</tt><br />
| style="padding:5px; text-align:left" | GNU gettext 0.13.1 and iconv library 1.9.1 (http://www.gnu.org/)<br/><br />
{| class="wikitable"<br />
|- valign="top"<br />
! style="padding:5px; text-align:left" | 32-Bit<br />
! style="padding:5px; text-align:left" | (skip - need binaries only) 64-Bit<br />
|- valign="top"<br />
| style="padding:5px; text-align:left" | <ul><li>[http://ftp.gnu.org/gnu/gettext/gettext-runtime-0.13.1.bin.woe32.zip <tt>gettext-runtime-0.13.1.bin.woe32.zip</tt>] (2004-01-20)</li><li>[http://ftp.gnu.org/gnu/gettext/gettext-tools-0.13.1.bin.woe32.zip <tt>gettext-tools-0.13.1.bin.woe32.zip</tt>] (2004-01-20)</li><li>[http://ftp.gnu.org/gnu/libiconv/libiconv-1.9.1.bin.woe32.zip <tt>libiconv-1.9.1.bin.woe32.zip</tt>] (2004-01-20)</li></ul><br />
| style="padding:5px; text-align:left" | (skip - use 32bit binaries) <ul><li> [http://ftp.gnu.org/gnu/libiconv/libiconv-1.9.1.tar.gz libiconv-1.9.1.tar.gz] (2003-05-27)</li><li>[http://ftp.gnu.org/gnu/gettext/gettext-0.13.1.tar.gz gettext-0.13.1.tar.gz] (2003-12-17)</li></ul><br />
|}<br />
|- valign="top"<br />
| style="padding:5px; text-align:left" | <tt>glew</tt><br />
| style="padding:5px; text-align:left" | OpenGL Extension Wrangler Library (GLEW) 1.5.1 (http://glew.sourceforge.net/)<br/>[http://downloads.sourceforge.net/glew/glew-1.5.1-src.zip <tt>glew-1.5.1-src.zip</tt>] (2008-11-03)<br />
|- valign="top"<br />
| style="padding:5px; text-align:left" | <tt>libpano\pano13</tt><br />
| style="padding:5px; text-align:left" | Panorama Tools and pano13 library (http://panotools.sourceforge.net/)<br/>Mercurial repository<br/><tt>http://panotools.hg.sourceforge.net:8000/hgroot/panotools/libpano</tt><br />
|- valign="top"<br />
| style="padding:5px; text-align:left" | <tt>(autopano-sift-c only) libxml2-2.7.3</tt><br />
| style="padding:5px; text-align:left" | XML C parser and toolkit (http://www.xmlsoft.org/)<br/>[ftp://xmlsoft.org/libxml2/libxml2-sources-2.7.3.tar.gz <tt>libxml2-sources-2.7.3.tar.gz</tt>] (2009-01-18)<br />
|- valign="top"<br />
| style="padding:5px; text-align:left" | <tt>UnxUtils</tt><br />
| style="padding:5px; text-align:left" | (inutile si cygwin est installé) Utilitaires GNU portés sur plateforme Windows 32 bits (http://sourceforge.net/projects/unxutils/)<br/>[http://downloads.sourceforge.net/unxutils/UnxUtils.zip <tt>UnxUtils.zip</tt>] (2007-03-01)<br />
|- valign="top"<br />
| style="padding:5px; text-align:left" | <tt>wxWidgets-2.8.11</tt><br />
| style="padding:5px; text-align:left" | wxWidgets cross-platform GUI C++ framework 2.8.11 (http://www.wxwidgets.org/)<br/>[http://downloads.sourceforge.net/wxwindows/wxMSW-2.8.11.zip <tt>wxMSW-2.8.11.zip</tt>] (2009-03-17)<br />
<br />
|- valign="top"<br />
| style="padding:5px; text-align:left" | <tt>freeglut_2.6.0</tt><br />
| style="padding:5px; text-align:left" | Freeglut (http://freeglut.sourceforge.net/index.php)<br/> [http://prdownloads.sourceforge.net/freeglut/freeglut-2.6.0.tar.gz?download <tt>freeglut-2.6.0.tar.gz</tt>]<br />
|- valign="top"<br />
| style="padding:5px; text-align:left" | <tt>make_3.81</tt><br />
| style="padding:5px; text-align:left" | GNU make 3.81 (http://www.gnu.org/software/make/) <br/>[http://ftp.gnu.org/pub/gnu/make/make-3.81.tar.gz <tt>make-3.81.tar.gz</tt>] <br/> This package replaces UnxUtils inside hugin.<br />
|- valign="top"<br />
| style="padding:5px; text-align:left" | <tt>Templatized C++ Command Line Parser 1.2.0</tt><br />
| style="padding:5px; text-align:left" | tclap (http://tclap.sourceforge.net/)<br/> [http://sourceforge.net/projects/tclap/files/tclap-1.2.0.tar.gz/download <tt>tclap-1.2.0.tar.gz</tt>]<br />
<br />
|- valign="top"<br />
! colspan="2" | Additional files only necessary for building a 64-bit SDK<br />
|- valign="top"<br />
! style="padding:5px; text-align:left" width="30%" | Directory<br />
! style="padding:5px; text-align:left" | Description (Website)<br/>Download package (Date of the package)<br />
|- valign="top"<br />
| style="padding:5px; text-align:left" | <tt>(64-bit Enblend only) libxmi-1.2-1</tt> <br />
| style="padding:5px; text-align:left" | GNU libxmi 2-D rasterization library (Win32 port) (http://gnuwin32.sourceforge.net)<br/> [http://downloads.sourceforge.net/gnuwin32/libxmi-1.2-1-src.zip <tt>libxmi-1.2-1-src.zip</tt>] (2004-04-16)<br/><br />
|- valign="top"<br />
| style="padding:5px; text-align:left" | <tt>(64-bit Enblend only) STLport-5.2.1</tt> <br />
| style="padding:5px; text-align:left" | STLport Standard Library (http://stlport.sourceforge.net/)<br/> [http://downloads.sourceforge.net/stlport/STLport-5.2.1.tar.gz <tt>STLport-5.2.1.tar.gz</tt>] (2008-12-10)<br/><br />
|- valign="top"<br />
| style="padding:5px; text-align:left" | <tt>(64-bit Enblend only) lcms-1.18</tt> <br />
| style="padding:5px; text-align:left" | LittleCms Color management library (http://www.littlecms.com)<br/> [http://sourceforge.net/projects/lcms/files/lcms/1.18/lcms-1.18a.zip/download <tt>lcms-1.18a.zip</tt>] (2009-04-19)<br/><br />
2.0 has been released, but will require code updates to enblend.<br />
<br />
|- valign="top"<br />
! colspan="2" | Additional files only necessary for building Hugin Setup (NSIS Installer)<br />
|- valign="top"<br />
! style="padding:5px; text-align:left" width="30%" | Directory<br />
! style="padding:5px; text-align:left" | Description (Website)<br/>Download package (Date of the package)<br />
|- valign="top"<br />
| style="padding:5px; text-align:left" | <tt>NSIS</tt> <br />
| style="padding:5px; text-align:left" | Nullsoft Scriptable Install System (http://nsis.sourceforge.net/)<br/> [http://prdownloads.sourceforge.net/nsis/nsis-2.46-setup.exe?download <tt>nsis-2.46-setup.exe</tt>] (2009-12-06)<br/><br />
|}<br />
<br />
In the following subsections each component is discussed in detail. The order of the subsections seems random, but I describe the precompiled packages first, followed by the big packages, where some of the small packages depend on.<br />
<br />
The decompress step of each component contains seemingly inconsistent namings of destination directories. These were chosen mostly to satisfy Cmake. To check the right locations, each result section of every component's description contains a summary of the expected files. <br />
<br />
freeglut and gnu make were added after the 2009 SDK was constructed. <br />
<br />
<br />
==== Diff Files ====<br />
In order to make compilation simple, a series of patch files are included below that contain all the necessary changes, not only to compile the SDK, but to optionally compile an x64 version of the SDK. When directed, you will need to apply the patch file specified. If you are compiling for x64, there may be additional patches you need to apply.<br />
<br />
The download link for the patches is [https://bugs.launchpad.net/hugin/+bug/679695/+attachment/1741338/+files/hugin_patches.zip https://bugs.launchpad.net/hugin/+bug/679695/+attachment/1741338/+files/hugin_patches.zip]<br />
<br />
In order to apply a patch, you will first have needed to follow directions for the [[#UnxUtils|UnxUtils]] step. You cannot apply any patches before that step. <br />
<br />
'''Alternative:''' If you already have the Cygwin environment installed, you can install the 'patch' module and perform the patch commands at a cygwin prompt. Otherwise, UnxUtils is much simpler. However, cygwin patch seems to set the permissions of changed files so they can't be modified by normal users, so after patching do this:<br/><br />
Right-click the folder, Properties, Security tab, Advanced, Change Permissions, check Replace all child object perms...., click OK, OK, OK.<br />
<br />
To apply a patch, follow these directions:<br />
<ol><br />
<li>Start a Command Prompt by choosing Start -> Run and typing in "cmd.exe"</li><br />
<li>On the Command Prompt, change directory to <tt><SDKHOME></tt><br/><br />
'''Example'''<br />
<pre><br />
C:\Program Files\Microsoft\Windows SDK\v7.1>d:<br />
<br />
D:>cd \usr\src\SDK<br />
<br />
D:\usr\src\SDK><br />
</pre></li><br />
<li>On the command prompt, enter the following commands without any line breaks and press the Return/Enter key, substituting <SDKHOME> where appropriate:<br/><br />
<pre><br />
set PATH=%PATH%;<SDKHOME>\UnxUtils\usr\local\wbin<br />
</pre><br />
</li><br />
<li>On the command prompt, enter the following commands without any line breaks and press the Return/Enter key, substituting <PATCHFILE> with the name of the patch file to apply:<br/><br />
<pre><br />
patch -p 0 -i <PATCHFILE><br />
</pre><br />
'''NOTE:''' On Vista and later systems, the filename "patch.exe" is a protected file name which will always result in a UAC prompt if the file does not include a manifest (which UnxUtils version does not). This can be worked around by copying the file <tt><SDKHOME>\UnxUtils\usr\local\wbin\patch.exe</tt> to another file not containing the name, such as <tt><SDKHOME>\UnxUtils\usr\local\wbin\apply_diff.exe</tt>. Then substitute the command <tt>'patch'</tt> in the above command with <tt>'apply_diff'</tt><br />
</li><br />
</ol><br />
<br />
'''Result'''<br />
<br />
If everything worked, you should see a list of filenames that were patched. <br />
'''Example'''<br />
<pre><br />
D:\usr\src\SDK>patch -p 0 -i libiconv-1.9.1.diff<br />
patching file 'libiconv-1.9.1/srclib/error.c'<br />
<br />
D:\usr\src\SDK><br />
</pre><br />
<br />
If there was an error, you may wish to consult the [[Hugin SDK (MSVC 2008) Patches]] page for instructions on what changes were contained in the patch.<br />
<br />
=== UnxUtils ===<br />
<br />
<ol><br />
<li>Create the directory <tt><SDKHOME>\UnxUtils</tt></li><br />
<li>Decompress the file <tt>UnxUtils.zip</tt> to created directory <tt><SDKHOME>\UnxUtils</tt></li><br />
</ol><br />
<br />
'''Result'''<br />
<br />
The applications reside in<br />
<tt><SDKHOME>\UnxUtils\bin</tt> and<br />
<tt><SDKHOME>\UnxUtils\usr\local\wbin</tt><br />
<br />
=== ExifTool ===<br />
<br />
<ol><br />
<li>Create the directory <tt><SDKHOME>\exiftool</tt></li><br />
<li>Decompress the file <tt>exiftool-8.23.zip</tt> to <tt><SDKHOME>\exiftool</tt></li><br />
<li>Rename the file <tt>exiftool(-k).exe</tt> to <tt>exiftool.exe</tt></li><br />
</ol><br />
<br />
'''Result'''<br />
<br />
The application resides in<br />
<tt><SDKHOME>\exiftool</tt><br />
<br />
=== GetText ===<br />
Binary only, 32-bit binaries work for a 64-bit build.<br />
<ol><br />
<li>Create the directory <tt><SDKHOME>\gettext</tt></li><br />
<li>Decompress the following files to created directory <tt><SDKHOME>\gettext</tt><br />
<ul><br />
<li><tt>gettext-runtime-0.13.1.bin.woe32.zip</tt></li><br />
<li><tt>gettext-tools-0.13.1.bin.woe32.zip</tt></li><br />
<li><tt>libiconv-1.9.1.bin.woe32.zip</tt></li><br />
</ul><br />
</li><br />
</ol><br />
'''Result'''<br />
<br />
The applications reside in<br />
<tt><SDKHOME>\gettext\bin</tt><br />
<br />
The include files reside in<br />
<tt><SDKHOME>\gettext\include</tt><br />
<br />
The libraries (unused) reside in<br />
<tt><SDKHOME>\gettext\lib</tt><br />
=== STLport (64-bit Enblend Only) ===<br />
<ol><br />
<li>Decompress the file <tt>STLport-5.2.1.tar.gz</tt> to directory <tt><SDKHOME></tt></li><br />
<li>Open a Windows SDK prompt by choosing Start -> Programs -> Microsoft Windows SDK v7.1 -> Windows SDK v7.1 Cmd Prompt</li><br />
<li>On the command prompt, enter the following command without any line breaks and press the Return/Enter key:<br/><br />
<pre><br />
setenv /Release /x64 /xp<br />
</pre><br />
It should now refresh and say<br />
<pre><br />
Setting SDK environment relative to <path where you installed the SDK><br />
Targeting Windows XP x64 RELEASE<br />
</pre></li><br />
<li>On the command prompt, change directory to <SDKHOME>\STLport-5.2.1<br/><br />
'''Example'''<br />
<pre><br />
C:\Program Files\Microsoft\Windows SDK\v6.1>d:<br />
<br />
D:>cd \usr\src\SDK\STLport-5.2.1<br />
<br />
D:\usr\src\SDK\STLport-5.2.1><br />
</pre></li><br />
<li>On the command prompt, enter the following commands without any line breaks and press the Return/Enter key:<br/><br />
<pre>configure msvc9 --with-static-rtl<br />
cd build/lib<br />
nmake clean install</pre><br />
</li><br />
<li>Compilation will fail, complaining about <br />
<pre>stlport\stl/_cstdlib.h(158) : error C2084: function '__int64<br />
abs(__int64)' already has a body </pre><br />
This indicates that the compiler didn't like the declaration on line 158 of <SDKHOME>\STLport-5.2.1\stlport\stl\_cstdlib.h - comment that line out, and compile again. It should succeed.</li><br />
<li>Close the Windows SDK command prompt window</li><br />
</ol><br />
<br />
'''Result'''<br />
<br />
The includes reside in <tt><SDKHOME>\STLport-5.2.1\stlport</tt><br/><br />
The libraries reside in <tt><SDKHOME>\STLport-5.2.1\lib</tt><br />
<br />
=== lcms-1.18 (64-bit Enblend Only) ===<br />
<ol><br />
<li>Decompress the file <tt>lcms-1.18a.tar.gz</tt> to directory <tt><SDKHOME></tt></li><br />
<li>Apply the <tt>lcms-1.18.diff</tt> patch</li><br />
<li>Open the file <tt><SDKHOME>\lcms-1.18\Projects\VC2008\lcms.sln</tt>. Allow conversion.</li><br />
<li>Select project lcms, right-click Properties</li><br />
<li>Select "Release" in the Solution Configuration pull-down menu. Select "x64" in the Solution Platform pull-down menu</li><br />
<li>Select project lcms in Solution Explorer, and then choose Build > Project Only > Build Only lcms</li><br />
<li> changes to output file and intermediate directory for x64 </li><br />
<li>Close Visual Studio C++ 2010 Express </li><br />
</ol><br />
<br />
'''Result'''<br />
<br />
The library resides in <tt><SDKHOME>\lcms-1.18\Lib\MS-x64</tt><br />
<br />
{| class="wikitable" width="100%"<br />
|-<br />
! style="padding:5px; text-align:left" | Note<br />
|-<br />
| style="padding:5px; text-align:left" | During build process temporary object files are stored in following directories<br />
<ul><br />
<li><tt><SDKHOME>\lcms-1.18\Projects\VC2008\LibDebug</tt></li><br />
<li><tt><SDKHOME>\lcms-1.18\Projects\VC2008\LibRelease</tt></li><br />
</ul><br />
Both directories may be deleted to save disk space.<br />
|}<br />
<br />
=== libxmi-1.2.1 (64-bit Enblend Only) ===<br />
<ol><br />
<li>Open the file <tt>libxmi-1.2-1.src.zip</tt> in 7-Zip</li><br />
<li>Open the "src" folder by double-clicking</li><br />
<li>Open the "libxmi" folder by double-clicking</li><br />
<li>Open the "1.2" folder by double-clicking</li><br />
<li>Extract "libxmi-1.2" to the directory <tt><SDKHOME></tt></li><br />
<li>Apply the <tt>libxmi-1.2.diff</tt> patch</li><br />
<li>Open <tt>libxmi.vcproj</tt>. Allow conversion.</li><br />
<li>Set default Output/Intermediate options for x64</li><br />
<li>Build libxmi, x64 Debug and Release</li><br />
</ol><br />
<br />
'''Result'''<br />
<br />
The libxmi-1.2 sources now reside in <tt><SDKHOME>\libxmi-1.2</tt><br />
The libxmi-1.2 libs now reside in <tt><SDKHOME>\libxmi-1.2\x64\Debug</tt> or <tt>Release</tt><br />
<br />
=== wxWidgets ===<br />
<ol><br />
<li>Decompress the file <tt>wxMSW-2.8.11.zip</tt> to directory <tt><SDKHOME></tt></li><br />
<li>Rename the directory <tt><SDKHOME>\wxMSW-2.8.11</tt> to <tt><SDKHOME>\wxWidgets-2.8.11</tt></li><br />
<li>Apply the <tt>wxWidgets-2.8.11.diff</tt> patch [[Hugin SDK (MSVC 2008) Patches#wxWidgets]]</li><br />
<li><br />
{| class="wikitable" width="100%"<br />
|- valign="top"<br />
! style="padding:5px; text-align:left" width="50%" | 32-Bit Directions<br />
! style="padding:5px; text-align:left" | 64-Bit Directions<br />
|- valign="top"<br />
| style="padding:5px; text-align:left" | To open a Visual Studio command prompt choose Start > Programs > Microsoft Visual Studio 2010 Express Edition > Visual Studio Command Prompt (2010)<br />
| style="padding:5px; text-align:left" | <ol><br />
<li>Open a Windows SDK prompt by choosing Start -> Programs -> Microsoft Windows SDK v1.1 -> Windows SDK 7.1 Command Prompt</li><br />
<li>On the command prompt, enter the following command without any line breaks and press the Return/Enter key:<br/><br />
<pre><br />
setenv /Release /x64 /xp<br />
</pre><br />
It should now refresh and say<br />
<pre><br />
Setting SDK environment relative to <path where you installed the SDK><br />
Targeting Windows XP x64 Release<br />
</pre></li><br />
</ol><br />
|}</li><br />
<br />
<li>On command prompt change directory to <tt><SDKHOME>\wxWidgets-2.8.11\build\msw</tt><br/><br />
'''Example'''<br />
<pre><br />
C:\Program Files\Microsoft Visual Studio 10.0\VC>d:<br />
<br />
D:\>cd \usr\src\SDK\wxWidgets-2.8.11\build\msw<br />
<br />
D:\usr\src\SDK\wxWidgets-2.8.11\build\msw><br />
</pre><br />
</li><br />
<li>Enter each of the following two commands without any line break and press the Return key<br/><br />
<br />
32-Bit Directions<br />
<pre><br />
nmake -f makefile.vc BUILD=debug UNICODE=1 SHARED=0 USE_OPENGL=1 RUNTIME_LIBS=static<br />
nmake -f makefile.vc BUILD=release UNICODE=1 SHARED=0 USE_OPENGL=1 RUNTIME_LIBS=static<br />
</pre><br />
<br />
64-Bit Directions<br />
<pre><br />
nmake -f makefile.vc BUILD=debug TARGET_CPU=AMD64 UNICODE=1 SHARED=0 USE_OPENGL=1 RUNTIME_LIBS=static<br />
nmake -f makefile.vc BUILD=release TARGET_CPU=AMD64 UNICODE=1 SHARED=0 USE_OPENGL=1 RUNTIME_LIBS=static<br />
</pre><br />
</li><br />
<li>Close the Windows SDK command prompt window</li><br />
<br />
</ol><br />
<br />
'''Result'''<br />
<br />
The include files reside in<br />
<tt><SDKHOME>\wxWidgets-2.8.11\include</tt> and its subdirectories<br />
<br />
Hugin also depends on following files<br />
<ul><br />
<li><tt><SDKHOME>\wxWidgets-2.8.11\src\jpg\*.h</tt></li><br />
<li><tt><SDKHOME>\wxWidgets-2.8.11\src\jpg\jconfig.vc</tt></li><br />
<li><tt><SDKHOME>\wxWidgets-2.8.11\src\png\*.h</tt></li><br />
<li><tt><SDKHOME>\wxWidgets-2.8.11\src\tiff\*.h</tt></li><br />
<li><tt><SDKHOME>\wxWidgets-2.8.11\src\zlib\*.h</tt></li><br />
</ul><br />
<br />
The libraries reside in<br />
<tt><SDKHOME>\wxWidgets-2.8.11\lib\vc_lib</tt> and/or<br />
<tt><SDKHOME>wxWidgets-2.8.11\lib\vc_amd64_lib</tt><br />
<br />
{| class="wikitable"<br />
|-<br />
! style="padding:5px; text-align:left" | Note<br />
|-<br />
| style="padding:5px; text-align:left" | During build process temporary object files are stored in following directories<br />
{| class="wikitable" width="100%"<br />
|- valign="top"<br />
! style="padding:5px; text-align:left" | 32-Bit <br />
! style="padding:5px; text-align:left" | 64-Bit<br />
|- valign="top"<br />
| style="padding:5px; text-align:left" | <ul><br />
<li><tt><SDKHOME>\wxWidgets-2.8.11\build\msw\vc_mswu</tt></li><br />
<li><tt><SDKHOME>\wxWidgets-2.8.11\build\msw\vc_mswud</tt></li><br />
</ul><br />
| style="padding:5px; text-align:left" | <br />
<ul><br />
<li><tt><SDKHOME>\wxWidgets-2.8.11\build\msw\vc_mswu_amd64</tt></li><br />
<li><tt><SDKHOME>\wxWidgets-2.8.11\build\msw\vc_mswud_amd64</tt></li><br />
</ul><br />
|}<br />
Both directories may be deleted to save disk space.<br />
|}<br />
<br />
=== Boost ===<br />
<br />
<ol><br />
<li>Decompress the file <tt>boost_1_43_0.7z</tt> to directory <tt><SDKHOME></tt></li><br />
<li>(skip) Decompress the file <tt>boost-jam-3.1.17-1-ntx86.zip</tt> to an arbitrary directory and copy the application <tt>bjam.exe</tt> to <tt><SDKHOME>\boost_1_39_0</tt></li><br />
<li>Open a Visual Studio command prompt, like you did with wxWidgets</li><br />
<li>On command prompt change directory to <tt><SDKHOME>\boost_1_43_0</tt><br/><br />
'''Example'''<br />
<pre><br />
C:\Dokuments and Settings\Guido>d:<br />
<br />
D:\>cd \usr\src\SDK\boost_1_43_0<br />
<br />
D:\usr\src\SDK\boost_1_43_0><br />
</pre><br />
</li><br />
<li>Enter the command 'bootstrap' to build bjam.exe</li><br />
<li>Enter the following command without line breaks and press Return key<br/><br />
{| class="wikitable" <br />
|- valign="top"<br />
! style="padding:5px; text-align:left" | 32-Bit Directions<br />
! style="padding:5px; text-align:left" | 64-Bit Directions<br />
|- valign="top"<br />
| style="padding:5px; text-align:left" | <pre><br />
bjam --with-date_time --with-thread --with-system --with-signals --with-regex --with-iostreams --with-filesystem --with-serialization toolset=msvc variant=debug variant=release link=static threading=multi runtime-link=static stage<br />
</pre><br />
After <tt>bjam.exe</tt> finishes a statement like the following should be printed in the command prompt window<br />
<pre><br />
...updated 56 targets...<br />
<br />
d:\usr\src\SDK\boost_1_43_0><br />
</pre><br />
| style="padding:5px; text-align:left" | <pre><br />
bjam --with-date_time --with-thread --with-system --with-signals --with-regex --with-iostreams --with-filesystem --with-serialization toolset=msvc variant=debug variant=release link=static threading=multi runtime-link=static address-model=64 stage<br />
</pre><br />
After <tt>bjam.exe</tt> finishes a statement like the following should be printed in the command prompt window<br />
<pre><br />
...updated 44 targets...<br />
</pre><br />
|}</li><br />
<li>To build both 32-bit and 64-bit directions, rename boost_1_43_0\stage\lib directory to lib_win32 after building 32-bit, and to lib_x64 after building the 64-bit targets</li><br />
<li>Close the Windows command prompt window</li><br />
</ol><br />
<br />
'''Result'''<br />
<br />
The include files reside in<br />
<tt><SDKHOME>\boost_1_43_0</tt> and its subdirectory <tt>boost</tt><br />
<br />
The libraries reside in<br />
<tt><SDKHOME>\boost_1_43_0\stage\lib</tt> (or lib_win32 and lib_x64)<br />
<br />
{| class="wikitable" width="100%"<br />
|-<br />
! style="padding:5px; text-align:left" | Notes<br />
|-<br />
|<ul><br />
<li>During build process temporary files are generated in <tt><SDKHOME>\boost_1_43_0\bin.v2</tt>. This directory may be deleted to save disk space.<br />
</li><br />
<li>Hugin needs only a subset of the Boost libraries, thus only these required libraries have to be built.<br/><br />
If you want to build all Boost libraries enter following command on the Windows command prompt instead of the command described above and press Return key.<br />
<pre><br />
bjam -–build-type=complete toolset=msvc stage<br />
</pre><br />
There are about 7GB disc space needed during build of all libraries (3.5GB for libraries and the same amount for the temporary files).<br />
</li><br />
<li>The Boost include files are typically included by a statement like<br/><br />
<tt>#include "boost/whatever.hpp"</tt><br/><br />
Therefore the base directory of the Boost include files is <tt><SDKHOME>\boost_1_43_0</tt><br />
</li><br />
<li>Only the following libraries are needed to build a release version of Hugin:<br />
<ul><br />
<li><tt>libboost_date_time-vc100-mt-s.lib</tt></li><br />
<li><tt>libboost_thread-vc100-mt-s.lib</tt></li><br />
</ul><br />
The files with "<tt>gd</tt>" in the filename, e.g. <tt>libboost_thread-vc100-mt-sgd-1_43.lib</tt>, are the debug libraries.<br />
The library files without "<tt>-1_43</tt>" suffix are automatically generated copies of the libraries with version suffix. They are used by CMake to detect the library directory.<br />
</li><br />
</ul><br />
|}<br />
<br />
=== OpenEXR ===<br />
<br />
OpenEXR depends on following SDK component:<br />
<ul><br />
<li>wxWidgets</li><br />
</ul><br />
Prepare this component before OpenEXR.<br />
<br />
<ol><br />
<li>Create the directory <tt><SDKHOME>\OpenEXR</tt></li><br />
<li>Decompress the file <tt>ilmbase-1.0.1.tar.gz</tt> to created directory <tt><SDKHOME>\OpenEXR</tt><br/><br />
<li>Decompress the file <tt>openexr-1.6.1.tar.gz</tt> to the same directory <tt><SDKHOME>\OpenEXR</tt><br/><br />
After decompress there should only exist the two directories <tt>ilmbase-1.0.1</tt> and <tt>openexr-1.6.1</tt> in <tt><SDKHOME>\OpenEXR</tt></li><br />
<li>Apply the <tt>OpenEXR.diff</tt> patch [[Hugin SDK (MSVC 2008) Patches#OpenEXR]]</li><br />
<li>Open solution file <tt><SDKHOME>\OpenEXR\ilmbase-1.0.1\vc\vc8\IlmBase\IlmBase.sln</tt></li><br />
<li>Allow conversion to proceed. TODO is Batch Build better?</li><br />
<li>Select Debug in Solutions Configuration pull-down menu, and then choose Build > Build Solution</li><br />
<li>Select Release in Solutions Configuration pull-down menu, and then choose Build > Build Solution</li><br />
<li> TODO is 64-bit needed? Change General .. Platform Toolset to Win 7.1 SDK for all x64 projects. </li><br />
<li> ? For 64-bit, find the lines "HALF_EXPORT_CONST half::uif half::_toFloat[1 << 16] =" and "HALF_EXPORT_CONST unsigned short half::_eLut[1 << 9] =" in half.cpp and append "{};" to the end of each of them.<br />
<li>Open solution file <tt><SDKHOME>\OpenEXR\openexr-1.6.1\vc\vc8\OpenEXR\OpenEXR.sln</tt></li><br />
<li>TODO update reference for wxWidgets-2.8.11 (from wxWidgets-2.8.10 to wxWidgets-2.8.11)</li><br />
<li>Choose Build > Batch Build</li><br />
<li>Select Build for Project IlmImf with Solution Config <br/><br />
{| class="wikitable" <br />
|- valign="top"<br />
! style="padding:5px; text-align:left" | 32-Bit<br />
! style="padding:5px; text-align:left" | 64-Bit<br />
|- valign="top"<br />
| style="padding:5px; text-align:left" | Solution Config: "Debug" with Platform: "Win32"<br/><br />
Solution Config: "Release" with Platform: "Win32"<br />
| style="padding:5px; text-align:left" | Solution Config: "Debug" with Platform: "x64"<br/><br />
Solution Config: "Release" with Platform: "x64"<br />
|}</li><br />
<li>Click Build</li><br />
<li>Close Visual C++ 2010 Express</li><br />
</ol><br />
<br />
'''Result'''<br />
<br />
The include files reside in<br />
<tt><SDKHOME>\Deploy\include</tt><br />
<br />
The libraries reside in<br />
<tt><SDKHOME>\Deploy\lib\Debug</tt> and<br />
<tt><SDKHOME>\Deploy\lib\Release</tt> for win32,<br />
<tt><SDKHOME>\Deploy\lib\x64\Debug</tt> and<br />
<tt><SDKHOME>\Deploy\lib\x64\Release</tt> for x64.<br />
<br />
=== Enblend and Enfuse ===<br />
{| class="wikitable" <br />
|- valign="top"<br />
! style="padding:5px; text-align:left" | 32-Bit Directions<br />
! style="padding:5px; text-align:left" | 64-Bit Directions<br />
|- valign="top"<br />
| style="padding:5px; text-align:left" | <ol><br />
<li>Decompress the file <tt>enblend-enfuse-4.0.zip</tt> to directory <tt><SDKHOME></tt></li><br />
</ol><br />
| style="padding:5px; text-align:left" | Enblend & Enfuse depend on the following SDK components:<br />
<ul><br />
<li>wxWidgets</li><br />
<li>OpenEXR</li><br />
<li>lcms</li><br />
<li>STLport</li><br />
<li>boost</li><br />
<li>libxmi</li><br />
</ul><br />
Prepare these components before Enblend & Enfuse.<br />
<br />
<ol><br />
<li>Decompress the file <tt>enblend-enfuse-4.0.tar.gz</tt> to directory <tt><SDKHOME></tt><br/><br />
After decompression, you should now have a folder <tt><SDKHOME>\enblend-enfuse-4.0</tt></li><br />
<li>Alternate: get enblend from the Hg repository. Needed 7 July 2010 to get CMakeLists.txt</li><br />
<li>Run Cmake, use <tt><SDKHOME>\enblend-enfuse-4.0</tt> as the source, and <tt><SDKHOME>\enblend-build-x64</tt> as the build destination, and MSVC 2010 x64 as the compiler.</li><br />
<li>All the dependencies will be NOT FOUND or find the win32 versions - change to x64 versions.</li><br />
<li>Open the file <tt><SDKHOME>\enblend-build-x64\enblend.sln</tt></li><br />
<li>If one checked ENABLE_GPU in CMake, one must add FREEGLUT_STATIC to the preprocessor definitions of the enblend and enfuse projects.</li><br />
<li>Select Release in Solutions Configuration pull-down menu, choose x64 in the Solutions Platform pull-down menu, and then choose Build > Build Solution</li><br />
<li>Close Visual C++ 2010 Express </li><br />
</ol><br />
|}<br />
'''Result'''<br />
<br />
The applications reside in <tt><SDKHOME>\enblend-enfuse-4.0</tt> for 32-bit, <br/><br />
or <tt><SDKHOME>\enblend-build-x64</tt> for 64-bit.<br />
<br />
=== Expat ===<br />
<br />
<ol><br />
<li>Decompress the file <tt>expat-2.0.1.tar.gz</tt> to directory <tt><SDKHOME></tt></li><br />
<li>Apply the <tt>expat-2.0.1.diff</tt> patch [[Hugin SDK (MSVC 2008) Patches#expat]]</li><br />
<li>Open the file <tt><SDKHOME>\expat-2.0.1\Source\expat.sln</tt></li><br />
<li>Allow conversion to proceed.</li><br />
<li>Right-click expat_static, and choose Properties</li><br />
<li>Under Configuration Properties, General, change Output Dir to <tt>.\..\$(Platform)\bin\$(Configuration)\</tt></li><br />
<li>Change Intermediate Dir to <tt>.\..\$(Platform)\tmp\$(Configuration)_static\</tt></li><br />
<li>Change Target Name to libexpatMT</li><br />
<li>Configuration Properties, Librarian, Output File, change Output File to <tt>inherit from parent or project defaults</tt></li><br />
<li>Configuration Properties, C++, Output Files, change ASM List Location, Object File Name, and Program DB File Name to <tt>inherit from parent or project defaults</tt></li><br />
<br />
<li>Choose Build > Batch Build</li><br />
<li>Select Build for Project expat_static with <br/><br />
{| class="wikitable" <br />
|- valign="top"<br />
! style="padding:5px; text-align:left" | 32-Bit<br />
! style="padding:5px; text-align:left" | 64-Bit<br />
|- valign="top"<br />
| style="padding:5px; text-align:left" | Solution Config: "Debug" with Platform: "Win32"<br/><br />
Solution Config: "Release" with Platform: "Win32"<br />
| style="padding:5px; text-align:left" | Solution Config: "Debug" with Platform: "x64"<br/><br />
Solution Config: "Release" with Platform: "x64"<br />
|}</li><br />
<li>Click Build</li><br />
<li>Close Visual C++ 2010 Express</li><br />
</ol><br />
<br />
'''Result'''<br />
<br />
The include files reside in<br />
<tt><SDKHOME>\expat-2.0.1\lib</tt><br />
<br />
The libraries reside in<br />
<tt><SDKHOME>\expat-2.0.1\win32\bin\Debug</tt> and<br />
<tt><SDKHOME>\expat-2.0.1\win32\bin\Release</tt> <br/><br />
<tt><SDKHOME>\expat-2.0.1\x64\bin\Debug</tt> and<br />
<tt><SDKHOME>\expat-2.0.1\x64\bin\Release</tt><br />
<br />
=== Exiv2 ===<br />
<br />
Exiv2 depends on following SDK components:<br />
<ul><br />
<li>wxWidgets</li><br />
<li>GetText</li><br />
<li>Expat</li><br />
</ul><br />
Prepare these components before Exiv2.<br />
<br />
<ol><br />
<li>Decompress the file <tt>exiv2-0.20.tar.gz</tt> to directory <tt><SDKHOME></tt></li><br />
<li>Apply the <tt>exiv2-0.20.diff</tt> patch [[Hugin SDK (MSVC 2008) Patches#exiv2]]</li><br />
<li>(64-bit Only)Apply the <tt>exiv2-0.20.x64.diff</tt> patch</li><br />
<li>Open solution file <tt><SDKHOME>\exiv2-0.20\msvc\exiv2.sln</tt></li><br />
<li>In the Solution Explorer, select "exiv2lib"</li><br />
<li>Right-click exiv2lib, and choose Properties, select All Configurations, and All Platforms</li><br />
<li>Under Configuration Properties, General, change Output Dir and Intermediate Dir to <tt>inherit from parent or project defaults</tt></li><br />
<li>Change Target Name to exiv2</li><br />
<li>Configuration Properties, C++, General, change Treat Warnings as Errors to No</li><br />
<li>Configuration Properties, Librarian, Output File, change Output File to <tt>inherit from parent or project defaults</tt></li><br />
<br />
<li>Right-click exiv2lib, and choose Properties, select All Configurations, and All Platforms</li><br />
<li>Under Configuration Properties, General, change Output Dir and Intermediate Dir to <tt>inherit from parent or project defaults</tt></li><br />
<li>TODO update reference for wxWidgets-2.8.11 (from wxWidgets-2.8.10 to wxWidgets-2.8.11)</li><br />
<li>Choose Build > Batch Build</li><br />
<li>Select Build for Project exiv2lib with <br/><br />
{| class="wikitable" <br />
|- valign="top"<br />
! style="padding:5px; text-align:left" | 32-Bit<br />
! style="padding:5px; text-align:left" | 64-Bit<br />
|- valign="top"<br />
| style="padding:5px; text-align:left" | Solution Config: "Debug" with Platform: "Win32"<br/><br />
Solution Config: "Release" with Platform: "Win32"<br />
| style="padding:5px; text-align:left" | Solution Config: "Debug" with Platform: "x64"<br/><br />
Solution Config: "Release" with Platform: "x64"<br />
|}</li><br />
<li>Click Build</li><br />
<li>Close Visual C++ 2010 Express</li><br />
<li>Create the directory <tt><SDKHOME>\exiv2-0.20\msvc\lib</tt></li><br />
<li>Copy the following files to this directory and rename them as specified in Destination column.<br />
<br />
{| class="wikitable"<br />
|- valign="top"<br />
! style="padding:5px; text-align:left" | Source<br />
! style="padding:5px; text-align:left" | Destination<br />
|-<br />
| style="padding:5px; text-align:left" | <tt><SDKHOME>\exiv2-0.20\msvc\bin\Debug\exiv2.lib</tt><br />
| style="padding:5px; text-align:left" | <tt><SDKHOME>\exiv2-0.20\msvc\lib\''exiv2d''.lib</tt><br />
|-<br />
| style="padding:5px; text-align:left" | <tt><SDKHOME>\exiv2-0.20\msvc\bin\Release\exiv2.lib</tt><br />
| style="padding:5px; text-align:left" | <tt><SDKHOME>\exiv2-0.20\msvc\lib\exiv2.lib</tt><br />
|-<br />
| style="padding:5px; text-align:left" | <tt><SDKHOME>\expat-2.0.1\win32\bin\Debug\libexpatMT.lib</tt><br />
| style="padding:5px; text-align:left" | <tt><SDKHOME>\exiv2-0.20\msvc\lib\''libexpatd''.lib</tt><br />
|-<br />
| style="padding:5px; text-align:left" | <tt><SDKHOME>\expat-2.0.1\win32\bin\Release\libexpatMT.lib</tt><br />
| style="padding:5px; text-align:left" | <tt><SDKHOME>\exiv2-0.20\msvc\lib\''libexpat''.lib</tt><br />
|}<br />
</li><br />
<li> Similar for msvc\lib\x64\ </li><br />
</ol><br />
<br />
'''Comment'''<br />
<br />
When using exiv2 0.19 (which works better with bigger files), copy and rename also the following files:<br />
<br />
{| class="wikitable"<br />
|- valign="top"<br />
! style="padding:5px; text-align:left" | Source<br />
! style="padding:5px; text-align:left" | Destination<br />
|-<br />
| style="padding:5px; text-align:left" | <tt><SDKHOME>\exiv2-0.19\msvc\xmpsdk\Debug\xmpsdk.lib</tt><br />
| style="padding:5px; text-align:left" | <tt><SDKHOME>\exiv2-0.19\msvc\lib\''xmpsdkd''.lib</tt><br />
|-<br />
| style="padding:5px; text-align:left" | <tt><SDKHOME>\exiv2-0.19\msvc\xmpsdk\Release\xmpsdk.lib</tt><br />
| style="padding:5px; text-align:left" | <tt><SDKHOME>\exiv2-0.19\msvc\lib\xmpsdk.lib</tt><br />
|}<br />
<br />
Similar for msvc\lib\x64\ <br/><br />
<br />
'''Result'''<br />
<br />
The include files reside in<br />
<tt><SDKHOME>\exiv2-0.20\msvc\include</tt><br />
<br />
The libraries reside in<br />
<tt><SDKHOME>\exiv2-0.20\msvc\lib</tt> and <tt>lib\x64</tt><br />
<br />
=== GLEW ===<br />
<br />
<ol><br />
<li>Decompress the file <tt>glew-1.5.1-src.zip</tt> to directory <tt><SDKHOME></tt></li><br />
<li>Apply the <tt>glew.diff</tt> patch [[Hugin SDK (MSVC 2008) Patches#glew]]</li><br />
<li>Open the file <tt><SDKHOME>\glew\build\vc6\glew.sln</tt></li><br />
<li>Let the conversion wizard run.</li><br />
<li>(64-bit) For the glew_static project, right-click Properties, for each x64 configuration, change:<br />
<ol><br />
<li>Configuration Properties, General, Intermediate Dir, change <tt> .\static/debug\ </tt> to <tt> .\static\$(Platform)\debug\ </tt></li><br />
<li>Configuration Properties, Librarian, Output File, change <tt>../../lib/glew32sd.lib</tt> to <tt>../../lib/glew64sd.lib</tt> and change Target Machine to X64</li><br />
<li>Configuration Properties, C++, Output Files, change ASM List Location, Object File Name, and Program DB File Name to <tt>inherit from parent or project defaults</tt></li><br />
</ol><br />
<li>Choose Build > Batch Build</li><br />
<li>Select Build for Project glew_static with Solution Config <br/><br />
{| class="wikitable" <br />
|- valign="top"<br />
! style="padding:5px; text-align:left" | 32-Bit<br />
! style="padding:5px; text-align:left" | 64-Bit<br />
|- valign="top"<br />
| style="padding:5px; text-align:left" | Solution Config: "Debug" with Platform: "Win32"<br/><br />
Solution Config: "Release" with Platform: "Win32"<br />
| style="padding:5px; text-align:left" | Solution Config: "Debug" with Platform: "x64"<br/><br />
Solution Config: "Release" with Platform: "x64"<br />
|}</li><br />
<li>Click Build</li><br />
<li>Close Visual C++ 2010 Express </li><br />
</ol><br />
<br />
'''Result'''<br />
<br />
The include files reside in<br />
<tt><SDKHOME>\glew\include</tt><br />
<br />
The libraries reside in<br />
<tt><SDKHOME>\glew\lib</tt><br />
<br />
{| class="wikitable" width="100%"<br />
|-<br />
! style="padding:5px; text-align:left" | Note<br />
|-<br />
| style="padding:5px; text-align:left" | The GLEW include files are typically included by a statement like<br/><tt>#include "GL/glew.h"</tt><br/>Therefore the base directory of the GLEW include files is <tt><SDKHOME>\glew\include</tt><br />
|}<br />
<br />
=== Panorama Tools ===<br />
<br />
Panorama Tools depends on following SDK component:<br />
<ul><br />
<li>wxWidgets</li><br />
</ul><br />
Prepare this component before Panoroma Tools.<br />
<br />
<ol><br />
<li>Set two windows environment variables:<br />
<ul><br />
<li>Set variable <tt>WXWIDGETS_HOME</tt> to wxWidgets base folder <tt><SDKHOME>\wxWidgets-2.8.11</tt></li><br />
<li>Alternative: fix the LocalDefs.vsprops file next to the .sln file to point to wxWidgets base folder <tt><SDKHOME>\wxWidgets-2.8.11</tt>. This can be changed inside MSVC: View .. Property Manager, pano13 LocalDefs .. Common Properties .. User Macros </li><br />
</ul><br />
For changed environment variables to take effect you may have to logout and login.<br />
</li><br />
<li>Create the directory <tt><SDKHOME>\libpano\pano13</tt></li><br />
<li>In explorer right-click on created directory <tt><SDKHOME>\libpano\pano13</tt></li>, and then choose SVN Checkout from the shortcut menu. The Checkout dialog appears.</li><br />
<li>In "URL of repository" field enter following address:<br />
<pre><br />
https://panotools.svn.sourceforge.net/svnroot/panotools/trunk/libpano<br />
</pre><br />
</li><br />
<li>Click OK</li><br />
<li>After checkout has finished click OK</li><br />
<li>Open solution file <tt><SDKHOME>\libpano\pano13\libpano.sln</tt>, let the upgrade wizard run.</li><br />
<li>Select all projects, then right-click and choose Properties, select All Configurations, and All Platforms</li><br />
<li>Under Configuration Properties, General, change Platform Toolset from v100 to Windows7.1SDK</li><br />
<li>Under Configuration Properties, General, change Output Dir and Intermediate Dir to <tt>$(Configuration)\$(Platform)\</tt> (Note: already done in 2.9.17)</li><br />
<li>Temporary 2.9.17 fixes: optimize.c, change brackets to quotes, "filter.h" and "adjust.h". Release build, linker, wxWidgets\lib\vc_amd64_lib instead of vc_lib64. Get tools/*.rc from svn. (Sept 7, 2010)</li><br />
<li>Select your platform in the Solution Platform pull-down menu</li><br />
<li>Select "Debug CMD" in Solution Configuration pull-down menu</li><br />
<li>Select project pano13 in Solution Explorer, and then choose Build > Project Only > Build Only pano13</li><br />
<li>Select "Release CMD" in Solution Configuration pull-down menu, and then choose Build > Build Solution (Note: multi-core machines, right click and build each project individually, skipping PTAInterpolate. Avoids log-file write conflict.</li><br />
<li>Close Visual C++ 2010 Express </li><br />
</ol><br />
<br />
'''Result'''<br />
<br />
The applications reside in<br />
<tt><SDKHOME>\libpano\pano13\tools\Release CMD\Win32</tt> or <tt>x64</tt><br />
<br />
The include files reside in<br />
<tt><SDKHOME>\libpano\pano13</tt><br />
<br />
The libraries reside in<br />
<tt><SDKHOME>\libpano\pano13\Debug CMD\Win32</tt> or <tt>x64</tt> and <br />
<tt><SDKHOME>\libpano\pano13\Release CMD\Win32</tt> or <tt>x64</tt><br />
<br />
{| class="wikitable" width="100%"<br />
|- valign="top"<br />
! style="padding:5px; text-align:left" | Note<br />
|- valign="top"<br />
| style="padding:5px; text-align:left" | The applications have to be built in release version only. Therefore only pano13 library has to be built in Debug configuration.<br />
|}<br />
<br />
=== libxml2 ===<br />
<br />
Note: required by autopano-sift-c only, not by enblend or hugin. Untested and unchanged from MSVC 2008 version because autopano-sift-c untested.<br />
<ol><br />
<li>Decompress the file <tt>libxml2-sources-2.7.3.tar.gz</tt> to directory <tt><SDKHOME></tt></li><br />
<li><br />
{| class="wikitable" <br />
|- valign="top"<br />
! style="padding:5px; text-align:left" | 32-Bit Directions<br />
! style="padding:5px; text-align:left" | 64-Bit Directions<br />
|- valign="top"<br />
| style="padding:5px; text-align:left" | <ol><li>To open a Visual Studio command prompt choose Start > Programs > Microsoft Visual C++ 2008 Express Edition > Visual Studio Tools > Visual Studio 2008 Command Prompt</li></ol><br />
| style="padding: 5px; text-align:left" | <ol><br />
<li>Open a Windows SDK prompt by choosing Start -> Programs -> Microsoft Windows SDK v6.1 -> CMD Shell</li><br />
<li>On the command prompt, enter the following command without any line breaks and press the Return/Enter key:<br/><br />
<pre><br />
setenv /Release /x64 /xp<br />
</pre><br />
It should now refresh and say<br />
<pre><br />
Setting SDK environment relative to <path where you installed the SDK><br />
Targeting Windows XP x64 RELEASE<br />
</pre></li><br />
</ol><br />
|}<br />
</li><br />
<br />
<li>On command prompt change directory to <tt><SDKHOME>\libxml2-2.7.3\win32</tt><br/><br />
'''Example'''<br />
<pre><br />
Setting environment for using Microsoft Visual Studio 2008 x86 tools.<br />
<br />
C:\Program Files\Microsoft Visual Studio 9.0\VC>d:<br />
<br />
D:\>cd \usr\src\SDK\libxml2-2.7.3\win32 <br />
<br />
D:\usr\src\SDK\libxml2-2.7.3\win32><br />
</pre><br />
<br />
<li>Enter each of the following two commands without any line break and press the Return key.<br />
<pre><br />
cscript configure.js ftp=no http=no iconv=no cruntime=/MT<br />
nmake -f makefile.msvc libxmla<br />
</pre><br />
</li><br />
</ol><br />
<br />
'''Result'''<br />
<br />
The include files reside in<br />
<tt><SDKHOME>\libxml2-2.7.3\include</tt><br />
<br />
The libraries reside in<br />
<tt><SDKHOME>\libxml2-2.7.3\win32\bin.msvc</tt><br />
<br />
{| class="wikitable" width="100%"<br />
|-<br />
! style="padding:5px; text-align:left" | Notes<br />
|-<br />
| style="padding:5px; text-align:left" | <ul><br />
<li>During build process temporary object files are generated in directory<br />
<tt><SDKHOME>\libxml2-2.7.3\win32\int.a.msvc</tt>.<br />
This directories may be deleted to save disc space.</li><br />
<li>Hugin does not depend on libxml2 library, but autopano-sift-C. Therefore it is included in this SDK.</li><br />
</ul><br />
|}<br />
<br />
=== autopano-sift-C ===<br />
<br />
Note: Untested and unchanged from MSVC 2008 version because of patent restrictions for U.S.-based author ([[User:Helser|Aron Helser]]).<br/><br />
Autopano-SIFT-C depends on following SDK components:<br />
<ul><br />
<li>libxml2</li><br />
<li>Panorama Tool's pano13 library</li><br />
<li>wxWidgets</li><br />
</ul><br />
Prepare these components before Autopano-SIFT-C.<br />
<br />
<ol><br />
<li>Create the directory <tt><SDKHOME>\autopano-sift-C-trunk</tt></li><br />
<li>In explorer right-click on created directory <tt><SDKHOME>\autopano-sift-C-trunk</tt>, and then choose SVN Checkout from the shortcut menu. The Checkout dialog appears.</li><br />
<li>In "URL of repository" field enter following address:<br />
<pre><br />
https://hugin.svn.sourceforge.net/svnroot/hugin/autopano-sift-C/trunk<br />
</pre><br />
</li><br />
<li>Click OK</li><br />
<li>After checkout has finished click OK</li><br />
<li>Start CMake (cmake-gui). The CMake dialog appears.</li><br />
<li>In "Where is the source code" field enter<br />
<pre><br />
<SDKHOME>\autopano-sift-C-trunk<br />
</pre><br />
Alternatively click Browse Source to point to this directory</li><br />
<li>In "Where to build the binaries" field enter<br />
<pre><br />
<SDKHOME>\autopano-sift-C<br />
</pre><br />
</li><br />
<li>Click Configure<br/><br />
If a dialog appears, which asks to create the build directoy, click Yes.<br/><br />
A dialog appears, where you can specify the generator for the project.</li><br />
<li><br />
{| class="wikitable" <br />
|- valign="top"<br />
! style="padding:5px; text-align:left" | 32-Bit Directions<br />
! style="padding:5px; text-align:left" | 64-Bit Directions<br />
|- valign="top"<br />
| style="padding:5px; text-align:left" | Select "Visual Studio 9 2008" and select option "Use default native compilers"<br />
| style="padding:5px; text-align:left" | Select "Visual Studio 9 2008 Win64" and select option "Use default native compilers"<br />
|}</li><br />
<li>Click Finish<br/><br />
In the Name and Value list the entries are shown with red background.</li><br />
<li>Click Configure</li><br />
<li>Click Generate</li><br />
<li>Close CMake</li><br />
<li>Open solution file <tt><SDKHOME>\autopano-sift-C\autopano-sift-C.sln</tt></li><br />
<li>Select Release in Solution Configuration pull-down menu, and then choose Build > Build Solution</li><br />
<li>Select project INSTALL in Solution Explorer, and then choose Build > Project Only > Build Only INSTALL</li><br />
<li>Close Visual C++ 2008 Express Edition</li><br />
<li><br />
Copy the directories <tt>bin</tt> and <tt>shared</tt> from <tt><SDKHOME>\autopano-sift-C\INSTALL\FILES</tt> to <tt><SDKHOME>\autopano-sift-C</tt></li><br />
</ol><br />
<br />
'''Result'''<br />
<br />
The applications reside in<br />
<tt><SDKHOME>\autopano-sift-C\bin</tt><br />
<br />
The manual pages reside in<br />
<tt><SDKHOME>\autopano-sift-C\shared</tt><br />
<br />
{| class="wikitable" width="100%"<br />
|- valign="top"<br />
! style="padding:5px; text-align:left" | Note<br />
|- valign="top"<br />
| style="padding:5px; text-align:left" | To save disk space you may delete all files and directories in <tt><SDKHOME>\autopano-sift-C</tt>, except the subdirectories <tt>bin</tt> and <tt>shared</tt>.<br />
|}<br />
<br />
=== Freeglut ===<br />
<ol><br />
<li>Decompress the file <tt>freeglut-2.6.0.tar.gz</tt> to directory <tt><SDKHOME></tt></li><br />
<li>Open the file <tt><SDKHOME>\freeglut-2.6.0\VisualStudio2008Static\freeglut.sln</tt></li><br />
<li>Select "Debug" in the Solution Configuration pull-down menu. </li><br />
<li>Select project freeglut in Solution Explorer, and then choose Build > Project Only > Build Only freeglut</li><br />
<li>Select "Release" in the Solution Configuration pull-down menu. </li><br />
<li>Select project freeglut in Solution Explorer, and then choose Build > Project Only > Build Only freeglut</li><br />
<li>Close Visual Studio C++ 2010 Express </li><br />
</ol><br />
<br />
'''Result'''<br />
<br />
The library resides in <tt><SDKHOME>\freeglut-2.6.0\VisualStudio2008Static\Debug</tt> and <tt><SDKHOME>\freeglut-2.6.0\VisualStudio2008Static\Release</tt><br />
<br />
=== GNU Make ===<br />
<ol><br />
<li>Decompress the file <tt>make-3.81.tar.gz</tt> to directory <tt><SDKHOME></tt></li><br />
<li>Open the file <tt><SDKHOME>\make-3.81\make_msvc_net2003.sln</tt> (Confirm conversion.)</li> <br />
<li>Select "Release" in the Solution Configuration pull-down menu. </li><br />
<li>Select project make_msvc.net2003 Solution Explorer, and then choose Build > Project</li><br />
<li>Close Visual Studio C++ 2010 Express </li><br />
<li>Rename the file <tt><SDKHOME>\make-3.81\Release\make_msvc.net2003.exe</tt> to <tt><SDKHOME>\make-3.81\Release\make.exe</tt><br />
</ol><br />
<br />
'''Result'''<br />
<br />
The executable make.exe resides in <tt><SDKHOME>\make-3.81\Release\</tt><br />
<br />
(All other files in this directory can be deleted to save space.)<br />
<br />
--Created: [[User:Helser|Aron Helser]] 16:20, 29 June 2010 (UTC)<br />
<br />
=== Templatized C++ Command Line Parser Library (tclap) ===<br />
<br />
<ol><br />
<li>Decompress the file <tt>tclap-1.2.0.tar.gz</tt> to directory <tt><SDKHOME>\tclap-1.2.0</tt></li><br />
</ol><br />
<br />
'''Result'''<br />
<br />
The include files reside in<br />
<tt><SDKHOME>\tclap-1.2.0\include\tclap</tt><br />
<br />
=== Nullsoft Scriptable Install System (NSIS) ===<br />
Note: Only needed to build Hugin Setup installer<br />
<ol><br />
<li>Run the NSIS installer, <tt>nsis-2.46-setup.exe</tt>, installing to the default location.</li><br />
</ol><br />
<br />
'''Result'''<br />
<br />
NSIS should be installed to <tt><DRIVE>\Program Files\NSIS</tt><br />
<br />
[[Category:Software:Hugin]]<br />
[[Category:Software:Hugin:Compiling]]<br />
[[Category:Software:Platform:Windows]]</div>Onomouhttps://wiki.panotools.org/index.php?title=Hugin_SDK_(MSVC_2008)_Patches&diff=13657Hugin SDK (MSVC 2008) Patches2011-07-16T23:32:17Z<p>Onomou: Add Compiling category</p>
<hr />
<div>'''The current SVN version of hugin depends not only on this SDK but also on glut, see [http://groups.google.com/group/hugin-ptx/msg/5bfc12ee00c5ac3c?hl=en this message] for directions how to add glut to your installation of the SDK.'''<br />
<br />
This is the list of changes from source distributions that need to be made to get the [[Hugin SDK (MSVC 2008)|Hugin SDK compiled using Microsoft Visual Studio 2008 Express Edition]], which is a precondition to compiling Hugin on Windows.<br />
<br />
The changes listed here apply to both 32-bit and 64-bit versions of the Hugin SDK. In addition, all of the diff files supplied performed an additional step of converting the projects to have two platforms supported (Win32 and x64), although this is not a necessary step if you're only compiling on Win32.<br />
<br />
Changes that were specific to x64 are not documented explicitly in here, because they would essentially be the same as the diff files supplied, as they were purely source changes.<br />
<br />
The most recent version of the files can be obtained at [https://bugs.launchpad.net/hugin/+bug/679695/+attachment/1741338/+files/hugin_patches.zip]<br />
== wxWidgets ==<br />
<ol><br />
<li>Open the file <tt><SDKHOME>\wxWidgets-2.8.10\include\wx\msw\setup.h</tt></li><br />
<li>Search for following line<br />
<pre><br />
#define wxUSE_GLCANVAS 0<br />
</pre><br />
and replace it by<br />
<pre><br />
#define wxUSE_GLCANVAS 1<br />
</pre><br />
</li><br />
<li>Save the file</li><br />
<li>Open the file <tt><SDKHOME>\wxWidgets-2.8.10\src\jpeg\jpeglib.h</tt></li><br />
<li>Search for following line<br />
<pre><br />
#include "../src/jpeg/jconfig.h"<br />
</pre><br />
and replace it by<br />
<pre><br />
#include "jconfig.h"<br />
</pre><br />
</li><br />
<li>Save the file</li><br />
<li>Open the file <tt><SDKHOME>\wxWidgets-2.8.10\src\tiff\tiffconf.h</tt></li><br />
<li>Search for following line<br />
<pre><br />
#ifndef COMPRESSION_SUPPORT<br />
</pre><br />
and extend it to<br />
<pre><br />
#define TIF_PLATFORM_CONSOLE 1<br />
#ifndef COMPRESSION_SUPPORT<br />
#define ZIP_SUPPORT<br />
</pre><br />
</li><br />
<li>Save the file</li><br />
</ol><br />
<br />
== OpenEXR ==<br />
<ol><br />
<li>Open solution file <tt><SDKHOME>\OpenEXR\ilmbase-1.0.1\vc\vc8\IlmBase\IlmBase.sln</tt><br/><br />
The Visual Studio Conversion Wizard dialog appears. Click Next, select option No, click Next and Finish. Unselect the option "Show the conversion log when the wizard is closed" and click Close</li><br />
<li>Due to the fact that the Visual Studio solutions of OpenEXR are configured to build dynamic libraries, some modifications are necessary to build the required static libraries:<br/><br />
<br />
For each project in Solution Explorer open the Property Pages dialog by choosing Project > Properties. Process the following steps for Debug and Release configuration. Some of the properties are not avaliable in every project, thus continue with next step. <br />
<br />
<ul><br />
<li>Choose Configuration Properties > General. For Configuration Type property choose Static Library (.lib) if Dynamic Library (.dll) was selected.<br />
</li><br />
<li>Choose Configuration Properties > C/C++ > Preprocessor. In the Preprocessor Definitions entry remove defines <tt>OPENEXR_DLL</tt>, <tt>_USRDLL</tt> and <tt>*_EXPORTS</tt> (all with suffix <tt>_EXPORTS</tt>).<br />
</li><br />
<li>Choose Configuration Properties > C/C++ > Code Generation. For Runtime Library property choose Multithreaded-Debug (/MTd) in Debug configuration and Multithreaded (/MT) in Release configuration.<br />
</li><br />
<li>Choose Configuration Properties > C/C++ > Code Generation. For Enable Enhanced Instruction Set property choose Not Set.<br />
</li><br />
<li>Choose Configuration Properties > Build Events > Post-Build Event. In Command Line entry remove the <tt>createDLL</tt> command, but keep the <tt>install*.cmd</tt> command. For example in createDLL project only the statement "<tt>..\..\..\installCreateDLL.cmd $(IntDir)</tt>" should remain, in Half project only "<tt>..\..\..\installHalf.cmd $(IntDir)</tt>" etc.<br />
</li><br />
</ul><br />
</li><br />
<li>Close Property Pages dialog</li><br />
<li>(64-bit) Add x64 Configuration</li><br />
<li>Open solution file <tt><SDKHOME>\OpenEXR\openexr-1.6.1\vc\vc8\OpenEXR\OpenEXR.sln</tt><br/><br />
The Visual Studio Conversion Wizard dialog appears. Click Next, select option No, click Next and Finish. Unselect the option "Show the conversion log when the wizard is closed" and click Close</li><br />
<li>For project IlmImf do the same configuration property changes as in IlmBase solution described above</li><br />
<li>Right-click IlmImf in Solution Explorer, and then choose Properties from shortcut menu</li><br />
<li>In the Property Pages dialog do the following for Debug and Release configuration:<br/><br />
Choose Configuration Properties > C/C++ > General. In Additional Include Directory entry enter following additional include directory:<br />
<pre><br />
..\..\..\..\..\..\wxWidgets-2.8.10\src\zlib<br />
</pre><br />
</li><br />
<li>(64-bit) Add x64 Configuration</li><br />
</ol><br />
<br />
<br />
== Enblend/Enfuse/libxmi ==<br />
<ol><br />
<li>Open the file <tt><SDKHOME>\enblend-enfuse-3.2\enblend_msvc2008.sln</tt></li><br />
<li>Add x64 Configuration</li><br />
<li>Choose "File" > "New Project"</li><br />
<li>For the path, give it <tt><SDKHOME>\libxmi</tt> and the name of libxmi</li><br />
<li>In the Solution Explorer, select the new libxmi project</li><br />
<li>Choose "Project" > "Add Existing Item"</li><br />
<li>Navigate to <tt><SDKHOME>\libxmi</tt> and select all the .c and .h files</li><br />
<li>Click OK</li><br />
<li>Open <tt><SDKHOME>\libxmi\sys-defines.h</tt></li><br />
<li>Change the line<br />
<pre><br />
#include <config.h><br />
</pre><br />
to read<br />
<pre><br />
#include "config.h"<br />
</pre></li><br />
<li>Close the file</li><br />
<li>Open <tt><SDKHOME>\libxmi\config.h</tt></li><br />
<li>Change the line<br />
<pre><br />
#define HAVE_VALUES_H 1<br />
</pre><br />
to read<br />
<pre><br />
/* #undef HAVE_VALUES_H */<br />
#define HAVE_STRERROR 1<br />
</pre></li><br />
<li>Save and Close the file</li><br />
</ol><br />
<br />
{| class="wikitable" width="100%"<br />
|-<br />
! style="padding:5px; text-align:left" | Note<br />
|-<br />
| style="padding:5px; text-align:left" | Pure ASM isn't supported when compiling x64, so an SSE4/SSE4.1 intrinsics replacement is used instead, which x64 machines will support.<br />
|}<br />
<br />
== expat ==<br />
<ol><br />
<li>Open the file <tt><SDKHOME>\expat-2.0.1\Source\expat.dsw</tt><br/><br />
A Visual C++ Project conversion dialog appears. Click "Yes To All".</li><br />
<li>(64-bit) Add x64 Configuration</li><br />
</ol><br />
<br />
== exiv2 ==<br />
<ol><br />
<li>Open solution file <tt><SDKHOME>\exiv2-0.18.1\msvc\exiv2.sln</tt><br/><br />
The Visual Studio Conversion Wizard dialog appears. Click Next, select option No, click Next and Finish. Unselect the option "Show the conversion log when the wizard is closed" and click Close</li><br />
<li>Right-click exiv2lib in Solution Explorer, and then choose Properties from the shortcut menu</li><br />
<br />
<li>In the Property Pages dialog do the following for the Debug and Release Configuration, selecting All Platforms</li><br />
<ul><br />
<li>Choose Configuration Properties > C/C++ > General. In Additional Include Directories entry replace<br />
<pre><br />
../../../zlib-1.2.3<br />
</pre><br />
by<br />
<pre><br />
../../../wxWidgets-2.8.10/src/zlib<br />
</pre><br />
</li><br />
<li>(64-bit) Add x64 Configuration</li><br />
</ul><br />
</li><br />
<li>Close Property Pages dialog</li><br />
</ol><br />
<br />
== glew ==<br />
<ol><br />
<li>Open the file <tt><SDKHOME>\glew\build\vc6\glew.dsw</tt><br/><br />
A Visual C++ Project conversion dialog appears. Click "Yes To All".</li><br />
<li>(64-bit) Add x64 Configuration</li><br />
</ol><br />
<br />
== Panorama Tools ==<br />
<ol><br />
<li>Open solution file <tt><SDKHOME>\libpano\pano13\libpano.sln</tt><br/><br />
The Visual Studio Conversion Wizard dialog appears. Click Next, select option No, click Next and Finish. Unselect the option "Show the conversion log when the wizard is closed." and click Close</li><br />
</ol><br />
<br />
[[Category:Software:Hugin]]<br />
[[Category:Software:Hugin:Compiling]]</div>Onomouhttps://wiki.panotools.org/index.php?title=Hugin_SDK_(MSVC_2010)&diff=13656Hugin SDK (MSVC 2010)2011-07-16T23:32:05Z<p>Onomou: Add Compiling category</p>
<hr />
<div>Hugin depends on different components like libraries and tools, which are not available on a common Windows system. All these components can be combined to a Hugin Software Development Kit (SDK). This article will eventually give step-by-step instructions to build such SDK for Hugin using Microsoft Visual C++ 2010 (MSVC 2010) Express Edition and precompiled dependencies. <br />
<br />
'''Note: Work in Progress''': The SDK, Hugin and enblend have all been built successfully with MSVC 2010 Express, on Windows 7 x64 Professional, as of July 6, 2010. However, the instructions below are probably not complete, and may be specific to Windows 7. This article has been copied wholesale from [[Hugin SDK (MSVC 2008)]], and has been updated as the steps were successfully completed. <br />
<br />
This article will construct native 32-bit and 64-bit versions. When appropriate, steps that only apply to the 32-bit or 64-bit versions will be noted as (32-bit) or (64-bit), and you can safely ignore them if you are not targeting that particular version. In order to compile a 64-bit version of the Hugin SDK, one does not need a 64-bit computer. However, if they wish to test or debug the binaries, or for some projects (such as OpenEXR) which execute compiled binaries as part of their build step, this will not necessarily be possible on Win32.<br />
<br />
First of all an overview is given over the contents of the SDK and the tools that are necessary to build the SDK.<br />
<br />
The build steps for each component are written like a walk-through and annotated on the end of each section.<br />
<br />
Maybe some of the described tools and packages, especially those fetched from Mercurial (Hg) repository, will change over time and/or become obsolete. Hence it is likely that some steps will become invalid or won't work any more.<br />
<br />
The SDK is structured so that each component resides in its own subdirectory. This approach is different to other platforms like Linux, where some common directories are available to store include files, libraries and applications. The files of a component are spread over all these directories. Both approaches to structure the files in a file system have its assets and drawbacks.<br />
<br />
The base directory of the SDK is denoted as <tt><SDKHOME></tt> in this article. Replace <tt><SDKHOME></tt> by directory name where you store the SDK on your system. In the examples <tt><SDKHOME></tt> is replaced by the directory name <tt>D:\usr\src\SDK</tt>.<br />
<br />
== Prerequisites ==<br />
<br />
To build the SDK some tools are required that are listed in the table below. Download the tools and install them. The destination directory of each tool is arbitrary. If you are uncertain, choose the default given in the setup dialog of each tool.<br />
<br />
{| class="wikitable" width="100%"<br />
|- valign="top"<br />
! style="padding:5px; text-align:left" width="30%" | Tool<br />
! style="padding:5px; text-align:left" | Description<br />
|- valign="top"<br />
| style="padding:5px; text-align:left" | Microsoft Visual C++ 2010 Express Edition<br />
| style="padding:5px; text-align:left" | Compiler, Debugger and IDE<br/>Visit [http://www.microsoft.com/express/vc/ Download page] <br>If compiling for 64-bit, you will need to download the SDK, listed next. <br />
|- valign="top"<br />
| style="padding:5px; text-align:left" | (x64 Only) Microsoft Windows SDK for Windows 7 and .NET Framework 4<br />
| style="padding:5px; text-align:left" | x64 Compiler, Libraries, and Headers<br/>Visit [http://go.microsoft.com/fwlink/?LinkID=191420]<br> When installing, make sure to include the Visual C++ compilers for x64 (under Developer Tools) and the Header Files and x64 libraries (under Windows Headers and Libraries). Optionally consider installing all of the SDK, as it makes compiling generally easier.<br />
|- valign="top"<br />
| style="padding:5px; text-align:left" | CMake 2.8.1 (2010-04-05)<br />
| style="padding:5px; text-align:left" | Generator of solution and project files for MSVC 2010<br/>Visit [http://www.cmake.org/cmake/resources/software.html#latest Download page] or download [http://www.cmake.org/files/v2.8/cmake-2.8.1-win32-x86.exe <tt>cmake-2.8.1-win32-x86.exe</tt>]<br> Leave default 'Don't add Cmake to system path' <br> Follow the note on the download page to replace CMakeVS10FindMake.cmake <br />
|- valign="top"<br />
| style="padding:5px; text-align:left" | (skip) TortoiseSVN 1.6.1.16129 (2009-02-13)<br />
| style="padding:5px; text-align:left" | (skip) Tool to handle source codes in Subversion repositories<br/>Visit [http://tortoisesvn.net/downloads Download page] or download<br/> [http://downloads.sourceforge.net/tortoisesvn/TortoiseSVN-1.6.1.16129-win32-svn-1.6.1.msi <tt>TortoiseSVN-1.6.1.16129-win32-svn-1.6.1.msi (32-bit)</tt>] or<br/> [http://downloads.sourceforge.net/tortoisesvn/TortoiseSVN-1.6.1.16129-x64-svn-1.6.1.msi <tt>TortoiseSVN-1.6.1.16129-x64-svn-1.6.1.msi (64-bit)</tt>]<br />
|- valign="top"<br />
| style="padding:5px; text-align:left" | TortoiseHg 1.0.4 (2010-06-11)<br />
| style="padding:5px; text-align:left" | Tool to handle source codes in Mercurial repositories<br/>Visit [http://tortoisehg.bitbucket.org/ Download page]<br/> Choose x64 if appropriate for you. <br />
|- valign="top"<br />
| style="padding:5px; text-align:left" | 7-Zip 4.65 (2009-02-03)<br />
| style="padding:5px; text-align:left" | Tool to decompress the source packages<br/>Visit [http://www.7-zip.org/download.html Download page] or download [http://downloads.sourceforge.net/sevenzip/7z465.exe <tt>7z465.exe (32-bit)</tt>] or [http://downloads.sourceforge.net/sevenzip/7z465-x64.msi <tt>7z465-x64.msi (64-bit)</tt>]<br />
|- valign="top"<br />
| style="padding:5px; text-align:left" | (skip - not required for Enblend 4.0) Java SE Development Kit 6 Update 20<br />
| style="padding:5px; text-align:left" | (skip) Java Development Kit (JDK)<br/>Visit [http://java.sun.com/javase/downloads/index.jsp Download page]<br />
|}<br />
<br />
== Contents of the Hugin SDK ==<br />
<br />
=== Precompiled Version (32-bit only) ===<br />
<br />
This is what we are working towards: For those who want to avoid to build the whole SDK from scratch, the last available precompiled SDK is for MSVC 2008, for an older version of Hugin.<br />
<br />
{| class="wikitable" width="100%"<br />
|- valign="top"<br />
! style="padding:5px; text-align:left" | Precompiled Hugin SDK (Win32)<br />
|- valign="top"<br />
| style="padding:5px; text-align:left" | [http://hugin.panotools.org/sdk/MSVC/Hugin-SDK-20090509-win32.exe <tt>Hugin-SDK-20090509-win32.exe </tt>] (76 MiB, 2009-05-09)<br />
|}<br />
<br />
=== Building from Source ===<br />
The contents of the Hugin SDK is shown in the following table. Download the packages, except the packages fetched from Hg/Subversion repository.<br />
<br />
{| class="wikitable" width="100%"<br />
|- valign="top"<br />
! style="padding:5px; text-align:left" width="30%" | Directory<br />
! style="padding:5px; text-align:left" | Description (Website)<br/>Download package (Date of the package)<br />
|- valign="top"<br />
| style="padding:5px; text-align:left" | <tt>autopano-sift-C</tt><br />
| style="padding:5px; text-align:left" | Autopano-SIFT-C (http://hugin.sourceforge.net/)<br/>Mercurial repository<br/><br />
<tt>http://hugin.hg.sourceforge.net:8000/hgroot/hugin/autopano-sift-C</tt> from [[Hugin_Compiling_Ubuntu]](Note January 2010 / May 2010: Currently the autopano-sift-C SVN trunk, as well as Hg default tip, is unstable, use the 2.5.1 release tarball instead) <br />
|- valign="top"<br />
| style="padding:5px; text-align:left" | <tt>boost_1_43_0</tt><br />
| style="padding:5px; text-align:left" | Boost C++ libraries 1.43.0<br />
(http://www.boost.org/)<br/>[http://sourceforge.net/projects/boost/files/boost/1.43.0/boost_1_43_0.7z/download<br />
<tt>boost_1_43_0.7z</tt>]<br />
(2010-05-06)<br/>(skip) [http://sourceforge.net/projects/boost/files/boost-jam/3.1.18/boost-jam-3.1.18-1-ntx86.zip/download<br />
<tt>boost-jam-3.1.18-1-ntx86.zip</tt>] (2010-03-22)<br />
|- valign="top"<br />
| style="padding:5px; text-align:left" | <tt>Deploy</tt><br/><tt>OpenEXR</tt><br />
| style="padding:5px; text-align:left" | OpenEXR library 1.6.1 and IlmBase libraries 1.0.1 (http://www.openexr.com/)<br/>[http://download.savannah.nongnu.org/releases/openexr/ilmbase-1.0.1.tar.gz <tt>ilmbase-1.0.1.tar.gz</tt>] (2007-10-22)<br/>[http://download.savannah.nongnu.org/releases/openexr/openexr-1.6.1.tar.gz <tt>openexr-1.6.1.tar.gz</tt>] (2007-10-22)<br />
|- valign="top"<br />
| style="padding:5px; text-align:left" | <tt>enblend-enfuse-4.0</tt> <br />
| style="padding:5px; text-align:left" | Enblend 4.0 and Enfuse 4.0 (http://enblend.sourceforge.net/)<br/><br />
{| class="wikitable"<br />
|- valign="top"<br />
! style="padding:5px; text-align:left" | 32-Bit<br />
! style="padding:5px; text-align:left" | 64-Bit<br />
|- valign="top"<br />
| style="padding:5px; text-align:left" | [http://downloads.sourceforge.net/enblend/enblend-enfuse-4.0.zip <tt>enblend-enfuse-4.0.zip</tt>] (2010-05-??)<br />
| style="padding:5px; text-align:left" | [http://downloads.sourceforge.net/enblend/enblend-enfuse-4.0.tar.gz <tt>enblend-enfuse-4.0.tar.gz</tt>] (2010-05-??)<br />
|}<br />
|- valign="top"<br />
| style="padding:5px; text-align:left" | <tt>exiftool</tt><br />
| style="padding:5px; text-align:left" | ExifTool 8.23 (http://www.sno.phy.queensu.ca/~phil/exiftool)<br/>[http://www.sno.phy.queensu.ca/~phil/exiftool/exiftool-8.23.zip <tt>exiftool-8.23.zip</tt>] (2010-06-20)<br />
|- valign="top"<br />
| style="padding:5px; text-align:left" | <tt>exiv2-0.20.0</tt><br />
| style="padding:5px; text-align:left" | Exiv2 C++ library 0.20 (http://www.exiv2.org/)<br/>[http://www.exiv2.org/exiv2-0.20.tar.gz <tt>exiv2-0.20.tar.gz</tt>] (2010-05-30)<br />
|- valign="top"<br />
| style="padding:5px; text-align:left" | <tt>expat-2.0.1</tt><br />
| style="padding:5px; text-align:left" | Expat XML Parser library 2.0.1 (http://sourceforge.net/projects/expat/)<br/>[http://downloads.sourceforge.net/expat/expat-2.0.1.tar.gz <tt>expat-2.0.1.tar.gz</tt>] (2007-06-05)<br />
|- valign="top"<br />
| style="padding:5px; text-align:left" | <tt>gettext</tt><br />
| style="padding:5px; text-align:left" | GNU gettext 0.13.1 and iconv library 1.9.1 (http://www.gnu.org/)<br/><br />
{| class="wikitable"<br />
|- valign="top"<br />
! style="padding:5px; text-align:left" | 32-Bit<br />
! style="padding:5px; text-align:left" | (skip - need binaries only) 64-Bit<br />
|- valign="top"<br />
| style="padding:5px; text-align:left" | <ul><li>[http://ftp.gnu.org/gnu/gettext/gettext-runtime-0.13.1.bin.woe32.zip <tt>gettext-runtime-0.13.1.bin.woe32.zip</tt>] (2004-01-20)</li><li>[http://ftp.gnu.org/gnu/gettext/gettext-tools-0.13.1.bin.woe32.zip <tt>gettext-tools-0.13.1.bin.woe32.zip</tt>] (2004-01-20)</li><li>[http://ftp.gnu.org/gnu/libiconv/libiconv-1.9.1.bin.woe32.zip <tt>libiconv-1.9.1.bin.woe32.zip</tt>] (2004-01-20)</li></ul><br />
| style="padding:5px; text-align:left" | (skip - use 32bit binaries) <ul><li> [http://ftp.gnu.org/gnu/libiconv/libiconv-1.9.1.tar.gz libiconv-1.9.1.tar.gz] (2003-05-27)</li><li>[http://ftp.gnu.org/gnu/gettext/gettext-0.13.1.tar.gz gettext-0.13.1.tar.gz] (2003-12-17)</li></ul><br />
|}<br />
|- valign="top"<br />
| style="padding:5px; text-align:left" | <tt>glew</tt><br />
| style="padding:5px; text-align:left" | OpenGL Extension Wrangler Library (GLEW) 1.5.1 (http://glew.sourceforge.net/)<br/>[http://downloads.sourceforge.net/glew/glew-1.5.1-src.zip <tt>glew-1.5.1-src.zip</tt>] (2008-11-03)<br />
|- valign="top"<br />
| style="padding:5px; text-align:left" | <tt>libpano\pano13</tt><br />
| style="padding:5px; text-align:left" | Panorama Tools and pano13 library (http://panotools.sourceforge.net/)<br/>Mercurial repository<br/><tt>http://panotools.hg.sourceforge.net:8000/hgroot/panotools/libpano</tt><br />
|- valign="top"<br />
| style="padding:5px; text-align:left" | <tt>(autopano-sift-c only) libxml2-2.7.3</tt><br />
| style="padding:5px; text-align:left" | XML C parser and toolkit (http://www.xmlsoft.org/)<br/>[ftp://xmlsoft.org/libxml2/libxml2-sources-2.7.3.tar.gz <tt>libxml2-sources-2.7.3.tar.gz</tt>] (2009-01-18)<br />
|- valign="top"<br />
| style="padding:5px; text-align:left" | <tt>UnxUtils</tt><br />
| style="padding:5px; text-align:left" | (inutile si cygwin est installé) Utilitaires GNU portés sur plateforme Windows 32 bits (http://sourceforge.net/projects/unxutils/)<br/>[http://downloads.sourceforge.net/unxutils/UnxUtils.zip <tt>UnxUtils.zip</tt>] (2007-03-01)<br />
|- valign="top"<br />
| style="padding:5px; text-align:left" | <tt>wxWidgets-2.8.11</tt><br />
| style="padding:5px; text-align:left" | wxWidgets cross-platform GUI C++ framework 2.8.11 (http://www.wxwidgets.org/)<br/>[http://downloads.sourceforge.net/wxwindows/wxMSW-2.8.11.zip <tt>wxMSW-2.8.11.zip</tt>] (2009-03-17)<br />
<br />
|- valign="top"<br />
| style="padding:5px; text-align:left" | <tt>freeglut_2.6.0</tt><br />
| style="padding:5px; text-align:left" | Freeglut (http://freeglut.sourceforge.net/index.php)<br/> [http://prdownloads.sourceforge.net/freeglut/freeglut-2.6.0.tar.gz?download <tt>freeglut-2.6.0.tar.gz</tt>]<br />
|- valign="top"<br />
| style="padding:5px; text-align:left" | <tt>make_3.81</tt><br />
| style="padding:5px; text-align:left" | GNU make 3.81 (http://www.gnu.org/software/make/) <br/>[http://ftp.gnu.org/pub/gnu/make/make-3.81.tar.gz <tt>make-3.81.tar.gz</tt>] <br/> This package replaces UnxUtils inside hugin.<br />
|- valign="top"<br />
| style="padding:5px; text-align:left" | <tt>Templatized C++ Command Line Parser 1.2.0</tt><br />
| style="padding:5px; text-align:left" | tclap (http://tclap.sourceforge.net/)<br/> [http://sourceforge.net/projects/tclap/files/tclap-1.2.0.tar.gz/download <tt>tclap-1.2.0.tar.gz</tt>]<br />
<br />
|- valign="top"<br />
! colspan="2" | Additional files only necessary for building a 64-bit SDK<br />
|- valign="top"<br />
! style="padding:5px; text-align:left" width="30%" | Directory<br />
! style="padding:5px; text-align:left" | Description (Website)<br/>Download package (Date of the package)<br />
|- valign="top"<br />
| style="padding:5px; text-align:left" | <tt>(64-bit Enblend only) libxmi-1.2-1</tt> <br />
| style="padding:5px; text-align:left" | GNU libxmi 2-D rasterization library (Win32 port) (http://gnuwin32.sourceforge.net)<br/> [http://downloads.sourceforge.net/gnuwin32/libxmi-1.2-1-src.zip <tt>libxmi-1.2-1-src.zip</tt>] (2004-04-16)<br/><br />
|- valign="top"<br />
| style="padding:5px; text-align:left" | <tt>(64-bit Enblend only) STLport-5.2.1</tt> <br />
| style="padding:5px; text-align:left" | STLport Standard Library (http://stlport.sourceforge.net/)<br/> [http://downloads.sourceforge.net/stlport/STLport-5.2.1.tar.gz <tt>STLport-5.2.1.tar.gz</tt>] (2008-12-10)<br/><br />
|- valign="top"<br />
| style="padding:5px; text-align:left" | <tt>(64-bit Enblend only) lcms-1.18</tt> <br />
| style="padding:5px; text-align:left" | LittleCms Color management library (http://www.littlecms.com)<br/> [http://sourceforge.net/projects/lcms/files/lcms/1.18/lcms-1.18a.zip/download <tt>lcms-1.18a.zip</tt>] (2009-04-19)<br/><br />
2.0 has been released, but will require code updates to enblend.<br />
<br />
|- valign="top"<br />
! colspan="2" | Additional files only necessary for building Hugin Setup (NSIS Installer)<br />
|- valign="top"<br />
! style="padding:5px; text-align:left" width="30%" | Directory<br />
! style="padding:5px; text-align:left" | Description (Website)<br/>Download package (Date of the package)<br />
|- valign="top"<br />
| style="padding:5px; text-align:left" | <tt>NSIS</tt> <br />
| style="padding:5px; text-align:left" | Nullsoft Scriptable Install System (http://nsis.sourceforge.net/)<br/> [http://prdownloads.sourceforge.net/nsis/nsis-2.46-setup.exe?download <tt>nsis-2.46-setup.exe</tt>] (2009-12-06)<br/><br />
|}<br />
<br />
In the following subsections each component is discussed in detail. The order of the subsections seems random, but I describe the precompiled packages first, followed by the big packages, where some of the small packages depend on.<br />
<br />
The decompress step of each component contains seemingly inconsistent namings of destination directories. These were chosen mostly to satisfy Cmake. To check the right locations, each result section of every component's description contains a summary of the expected files. <br />
<br />
freeglut and gnu make were added after the 2009 SDK was constructed. <br />
<br />
<br />
==== Diff Files ====<br />
In order to make compilation simple, a series of patch files are included below that contain all the necessary changes, not only to compile the SDK, but to optionally compile an x64 version of the SDK. When directed, you will need to apply the patch file specified. If you are compiling for x64, there may be additional patches you need to apply.<br />
<br />
The download link for the patches is [https://bugs.launchpad.net/hugin/+bug/679695/+attachment/1741338/+files/hugin_patches.zip https://bugs.launchpad.net/hugin/+bug/679695/+attachment/1741338/+files/hugin_patches.zip]<br />
<br />
In order to apply a patch, you will first have needed to follow directions for the [[#UnxUtils|UnxUtils]] step. You cannot apply any patches before that step. <br />
<br />
'''Alternative:''' If you already have the Cygwin environment installed, you can install the 'patch' module and perform the patch commands at a cygwin prompt. Otherwise, UnxUtils is much simpler. However, cygwin patch seems to set the permissions of changed files so they can't be modified by normal users, so after patching do this:<br/><br />
Right-click the folder, Properties, Security tab, Advanced, Change Permissions, check Replace all child object perms...., click OK, OK, OK.<br />
<br />
To apply a patch, follow these directions:<br />
<ol><br />
<li>Start a Command Prompt by choosing Start -> Run and typing in "cmd.exe"</li><br />
<li>On the Command Prompt, change directory to <tt><SDKHOME></tt><br/><br />
'''Example'''<br />
<pre><br />
C:\Program Files\Microsoft\Windows SDK\v7.1>d:<br />
<br />
D:>cd \usr\src\SDK<br />
<br />
D:\usr\src\SDK><br />
</pre></li><br />
<li>On the command prompt, enter the following commands without any line breaks and press the Return/Enter key, substituting <SDKHOME> where appropriate:<br/><br />
<pre><br />
set PATH=%PATH%;<SDKHOME>\UnxUtils\usr\local\wbin<br />
</pre><br />
</li><br />
<li>On the command prompt, enter the following commands without any line breaks and press the Return/Enter key, substituting <PATCHFILE> with the name of the patch file to apply:<br/><br />
<pre><br />
patch -p 0 -i <PATCHFILE><br />
</pre><br />
'''NOTE:''' On Vista and later systems, the filename "patch.exe" is a protected file name which will always result in a UAC prompt if the file does not include a manifest (which UnxUtils version does not). This can be worked around by copying the file <tt><SDKHOME>\UnxUtils\usr\local\wbin\patch.exe</tt> to another file not containing the name, such as <tt><SDKHOME>\UnxUtils\usr\local\wbin\apply_diff.exe</tt>. Then substitute the command <tt>'patch'</tt> in the above command with <tt>'apply_diff'</tt><br />
</li><br />
</ol><br />
<br />
'''Result'''<br />
<br />
If everything worked, you should see a list of filenames that were patched. <br />
'''Example'''<br />
<pre><br />
D:\usr\src\SDK>patch -p 0 -i libiconv-1.9.1.diff<br />
patching file 'libiconv-1.9.1/srclib/error.c'<br />
<br />
D:\usr\src\SDK><br />
</pre><br />
<br />
If there was an error, you may wish to consult the [[Hugin SDK (MSVC 2008) Patches]] page for instructions on what changes were contained in the patch.<br />
<br />
=== UnxUtils ===<br />
<br />
<ol><br />
<li>Create the directory <tt><SDKHOME>\UnxUtils</tt></li><br />
<li>Decompress the file <tt>UnxUtils.zip</tt> to created directory <tt><SDKHOME>\UnxUtils</tt></li><br />
</ol><br />
<br />
'''Result'''<br />
<br />
The applications reside in<br />
<tt><SDKHOME>\UnxUtils\bin</tt> and<br />
<tt><SDKHOME>\UnxUtils\usr\local\wbin</tt><br />
<br />
=== ExifTool ===<br />
<br />
<ol><br />
<li>Create the directory <tt><SDKHOME>\exiftool</tt></li><br />
<li>Decompress the file <tt>exiftool-8.23.zip</tt> to <tt><SDKHOME>\exiftool</tt></li><br />
<li>Rename the file <tt>exiftool(-k).exe</tt> to <tt>exiftool.exe</tt></li><br />
</ol><br />
<br />
'''Result'''<br />
<br />
The application resides in<br />
<tt><SDKHOME>\exiftool</tt><br />
<br />
=== GetText ===<br />
Binary only, 32-bit binaries work for a 64-bit build.<br />
<ol><br />
<li>Create the directory <tt><SDKHOME>\gettext</tt></li><br />
<li>Decompress the following files to created directory <tt><SDKHOME>\gettext</tt><br />
<ul><br />
<li><tt>gettext-runtime-0.13.1.bin.woe32.zip</tt></li><br />
<li><tt>gettext-tools-0.13.1.bin.woe32.zip</tt></li><br />
<li><tt>libiconv-1.9.1.bin.woe32.zip</tt></li><br />
</ul><br />
</li><br />
</ol><br />
'''Result'''<br />
<br />
The applications reside in<br />
<tt><SDKHOME>\gettext\bin</tt><br />
<br />
The include files reside in<br />
<tt><SDKHOME>\gettext\include</tt><br />
<br />
The libraries (unused) reside in<br />
<tt><SDKHOME>\gettext\lib</tt><br />
=== STLport (64-bit Enblend Only) ===<br />
<ol><br />
<li>Decompress the file <tt>STLport-5.2.1.tar.gz</tt> to directory <tt><SDKHOME></tt></li><br />
<li>Open a Windows SDK prompt by choosing Start -> Programs -> Microsoft Windows SDK v7.1 -> Windows SDK v7.1 Cmd Prompt</li><br />
<li>On the command prompt, enter the following command without any line breaks and press the Return/Enter key:<br/><br />
<pre><br />
setenv /Release /x64 /xp<br />
</pre><br />
It should now refresh and say<br />
<pre><br />
Setting SDK environment relative to <path where you installed the SDK><br />
Targeting Windows XP x64 RELEASE<br />
</pre></li><br />
<li>On the command prompt, change directory to <SDKHOME>\STLport-5.2.1<br/><br />
'''Example'''<br />
<pre><br />
C:\Program Files\Microsoft\Windows SDK\v6.1>d:<br />
<br />
D:>cd \usr\src\SDK\STLport-5.2.1<br />
<br />
D:\usr\src\SDK\STLport-5.2.1><br />
</pre></li><br />
<li>On the command prompt, enter the following commands without any line breaks and press the Return/Enter key:<br/><br />
<pre>configure msvc9 --with-static-rtl<br />
cd build/lib<br />
nmake clean install</pre><br />
</li><br />
<li>Compilation will fail, complaining about <br />
<pre>stlport\stl/_cstdlib.h(158) : error C2084: function '__int64<br />
abs(__int64)' already has a body </pre><br />
Comment that line out, and compile again. It should succeed.</li><br />
<li>Close the Windows SDK command prompt window</li><br />
</ol><br />
<br />
'''Result'''<br />
<br />
The includes reside in <tt><SDKHOME>\STLport-5.2.1\stlport</tt><br/><br />
The libraries reside in <tt><SDKHOME>\STLport-5.2.1\lib</tt><br />
<br />
=== lcms-1.18 (64-bit Enblend Only) ===<br />
<ol><br />
<li>Decompress the file <tt>lcms-1.18a.tar.gz</tt> to directory <tt><SDKHOME></tt></li><br />
<li>Apply the <tt>lcms-1.18.diff</tt> patch</li><br />
<li>Open the file <tt><SDKHOME>\lcms-1.18\Projects\VC2008\lcms.sln</tt>. Allow conversion.</li><br />
<li>Select project lcms, right-click Properties</li><br />
<li>Select "Release" in the Solution Configuration pull-down menu. Select "x64" in the Solution Platform pull-down menu</li><br />
<li>Select project lcms in Solution Explorer, and then choose Build > Project Only > Build Only lcms</li><br />
<li> changes to output file and intermediate directory for x64 </li><br />
<li>Close Visual Studio C++ 2010 Express </li><br />
</ol><br />
<br />
'''Result'''<br />
<br />
The library resides in <tt><SDKHOME>\lcms-1.18\Lib\MS-x64</tt><br />
<br />
{| class="wikitable" width="100%"<br />
|-<br />
! style="padding:5px; text-align:left" | Note<br />
|-<br />
| style="padding:5px; text-align:left" | During build process temporary object files are stored in following directories<br />
<ul><br />
<li><tt><SDKHOME>\lcms-1.18\Projects\VC2008\LibDebug</tt></li><br />
<li><tt><SDKHOME>\lcms-1.18\Projects\VC2008\LibRelease</tt></li><br />
</ul><br />
Both directories may be deleted to save disk space.<br />
|}<br />
<br />
=== libxmi-1.2.1 (64-bit Enblend Only) ===<br />
<ol><br />
<li>Open the file <tt>libxmi-1.2-1.src.zip</tt> in 7-Zip</li><br />
<li>Open the "src" folder by double-clicking</li><br />
<li>Open the "libxmi" folder by double-clicking</li><br />
<li>Open the "1.2" folder by double-clicking</li><br />
<li>Extract "libxmi-1.2" to the directory <tt><SDKHOME></tt></li><br />
<li>Apply the <tt>libxmi-1.2.diff</tt> patch</li><br />
<li>Open <tt>libxmi.vcproj</tt>. Allow conversion.</li><br />
<li>Set default Output/Intermediate options for x64</li><br />
<li>Build libxmi, x64 Debug and Release</li><br />
</ol><br />
<br />
'''Result'''<br />
<br />
The libxmi-1.2 sources now reside in <tt><SDKHOME>\libxmi-1.2</tt><br />
The libxmi-1.2 libs now reside in <tt><SDKHOME>\libxmi-1.2\x64\Debug</tt> or <tt>Release</tt><br />
<br />
=== wxWidgets ===<br />
<ol><br />
<li>Decompress the file <tt>wxMSW-2.8.11.zip</tt> to directory <tt><SDKHOME></tt></li><br />
<li>Rename the directory <tt><SDKHOME>\wxMSW-2.8.11</tt> to <tt><SDKHOME>\wxWidgets-2.8.11</tt></li><br />
<li>Apply the <tt>wxWidgets-2.8.11.diff</tt> patch [[Hugin SDK (MSVC 2008) Patches#wxWidgets]]</li><br />
<li><br />
{| class="wikitable" width="100%"<br />
|- valign="top"<br />
! style="padding:5px; text-align:left" width="50%" | 32-Bit Directions<br />
! style="padding:5px; text-align:left" | 64-Bit Directions<br />
|- valign="top"<br />
| style="padding:5px; text-align:left" | To open a Visual Studio command prompt choose Start > Programs > Microsoft Visual Studio 2010 Express Edition > Visual Studio Command Prompt (2010)<br />
| style="padding:5px; text-align:left" | <ol><br />
<li>Open a Windows SDK prompt by choosing Start -> Programs -> Microsoft Windows SDK v1.1 -> Windows SDK 7.1 Command Prompt</li><br />
<li>On the command prompt, enter the following command without any line breaks and press the Return/Enter key:<br/><br />
<pre><br />
setenv /Release /x64 /xp<br />
</pre><br />
It should now refresh and say<br />
<pre><br />
Setting SDK environment relative to <path where you installed the SDK><br />
Targeting Windows XP x64 Release<br />
</pre></li><br />
</ol><br />
|}</li><br />
<br />
<li>On command prompt change directory to <tt><SDKHOME>\wxWidgets-2.8.11\build\msw</tt><br/><br />
'''Example'''<br />
<pre><br />
C:\Program Files\Microsoft Visual Studio 10.0\VC>d:<br />
<br />
D:\>cd \usr\src\SDK\wxWidgets-2.8.11\build\msw<br />
<br />
D:\usr\src\SDK\wxWidgets-2.8.11\build\msw><br />
</pre><br />
</li><br />
<li>Enter each of the following two commands without any line break and press the Return key<br/><br />
<br />
32-Bit Directions<br />
<pre><br />
nmake -f makefile.vc BUILD=debug UNICODE=1 SHARED=0 USE_OPENGL=1 RUNTIME_LIBS=static<br />
nmake -f makefile.vc BUILD=release UNICODE=1 SHARED=0 USE_OPENGL=1 RUNTIME_LIBS=static<br />
</pre><br />
<br />
64-Bit Directions<br />
<pre><br />
nmake -f makefile.vc BUILD=debug TARGET_CPU=AMD64 UNICODE=1 SHARED=0 USE_OPENGL=1 RUNTIME_LIBS=static<br />
nmake -f makefile.vc BUILD=release TARGET_CPU=AMD64 UNICODE=1 SHARED=0 USE_OPENGL=1 RUNTIME_LIBS=static<br />
</pre><br />
</li><br />
<li>Close the Windows SDK command prompt window</li><br />
<br />
</ol><br />
<br />
'''Result'''<br />
<br />
The include files reside in<br />
<tt><SDKHOME>\wxWidgets-2.8.11\include</tt> and its subdirectories<br />
<br />
Hugin also depends on following files<br />
<ul><br />
<li><tt><SDKHOME>\wxWidgets-2.8.11\src\jpg\*.h</tt></li><br />
<li><tt><SDKHOME>\wxWidgets-2.8.11\src\jpg\jconfig.vc</tt></li><br />
<li><tt><SDKHOME>\wxWidgets-2.8.11\src\png\*.h</tt></li><br />
<li><tt><SDKHOME>\wxWidgets-2.8.11\src\tiff\*.h</tt></li><br />
<li><tt><SDKHOME>\wxWidgets-2.8.11\src\zlib\*.h</tt></li><br />
</ul><br />
<br />
The libraries reside in<br />
<tt><SDKHOME>\wxWidgets-2.8.11\lib\vc_lib</tt> and/or<br />
<tt><SDKHOME>wxWidgets-2.8.11\lib\vc_amd64_lib</tt><br />
<br />
{| class="wikitable"<br />
|-<br />
! style="padding:5px; text-align:left" | Note<br />
|-<br />
| style="padding:5px; text-align:left" | During build process temporary object files are stored in following directories<br />
{| class="wikitable" width="100%"<br />
|- valign="top"<br />
! style="padding:5px; text-align:left" | 32-Bit <br />
! style="padding:5px; text-align:left" | 64-Bit<br />
|- valign="top"<br />
| style="padding:5px; text-align:left" | <ul><br />
<li><tt><SDKHOME>\wxWidgets-2.8.11\build\msw\vc_mswu</tt></li><br />
<li><tt><SDKHOME>\wxWidgets-2.8.11\build\msw\vc_mswud</tt></li><br />
</ul><br />
| style="padding:5px; text-align:left" | <br />
<ul><br />
<li><tt><SDKHOME>\wxWidgets-2.8.11\build\msw\vc_mswu_amd64</tt></li><br />
<li><tt><SDKHOME>\wxWidgets-2.8.11\build\msw\vc_mswud_amd64</tt></li><br />
</ul><br />
|}<br />
Both directories may be deleted to save disk space.<br />
|}<br />
<br />
=== Boost ===<br />
<br />
<ol><br />
<li>Decompress the file <tt>boost_1_43_0.7z</tt> to directory <tt><SDKHOME></tt></li><br />
<li>(skip) Decompress the file <tt>boost-jam-3.1.17-1-ntx86.zip</tt> to an arbitrary directory and copy the application <tt>bjam.exe</tt> to <tt><SDKHOME>\boost_1_39_0</tt></li><br />
<li>Open a Visual Studio command prompt, like you did with wxWidgets</li><br />
<li>On command prompt change directory to <tt><SDKHOME>\boost_1_43_0</tt><br/><br />
'''Example'''<br />
<pre><br />
C:\Dokuments and Settings\Guido>d:<br />
<br />
D:\>cd \usr\src\SDK\boost_1_43_0<br />
<br />
D:\usr\src\SDK\boost_1_43_0><br />
</pre><br />
</li><br />
<li>Enter the command 'bootstrap' to build bjam.exe</li><br />
<li>Enter the following command without line breaks and press Return key<br/><br />
{| class="wikitable" <br />
|- valign="top"<br />
! style="padding:5px; text-align:left" | 32-Bit Directions<br />
! style="padding:5px; text-align:left" | 64-Bit Directions<br />
|- valign="top"<br />
| style="padding:5px; text-align:left" | <pre><br />
bjam --with-date_time --with-thread --with-system --with-signals --with-regex --with-iostreams --with-filesystem --with-serialization toolset=msvc variant=debug variant=release link=static threading=multi runtime-link=static stage<br />
</pre><br />
After <tt>bjam.exe</tt> finishes a statement like the following should be printed in the command prompt window<br />
<pre><br />
...updated 56 targets...<br />
<br />
d:\usr\src\SDK\boost_1_43_0><br />
</pre><br />
| style="padding:5px; text-align:left" | <pre><br />
bjam --with-date_time --with-thread --with-system --with-signals --with-regex --with-iostreams --with-filesystem --with-serialization toolset=msvc variant=debug variant=release link=static threading=multi runtime-link=static address-model=64 stage<br />
</pre><br />
After <tt>bjam.exe</tt> finishes a statement like the following should be printed in the command prompt window<br />
<pre><br />
...updated 44 targets...<br />
</pre><br />
|}</li><br />
<li>To build both 32-bit and 64-bit directions, rename boost_1_43_0\stage\lib directory to lib_win32 after building 32-bit, and to lib_x64 after building the 64-bit targets</li><br />
<li>Close the Windows command prompt window</li><br />
</ol><br />
<br />
'''Result'''<br />
<br />
The include files reside in<br />
<tt><SDKHOME>\boost_1_43_0</tt> and its subdirectory <tt>boost</tt><br />
<br />
The libraries reside in<br />
<tt><SDKHOME>\boost_1_43_0\stage\lib</tt> (or lib_win32 and lib_x64)<br />
<br />
{| class="wikitable" width="100%"<br />
|-<br />
! style="padding:5px; text-align:left" | Notes<br />
|-<br />
|<ul><br />
<li>During build process temporary files are generated in <tt><SDKHOME>\boost_1_43_0\bin.v2</tt>. This directory may be deleted to save disk space.<br />
</li><br />
<li>Hugin needs only a subset of the Boost libraries, thus only these required libraries have to be built.<br/><br />
If you want to build all Boost libraries enter following command on the Windows command prompt instead of the command described above and press Return key.<br />
<pre><br />
bjam -–build-type=complete toolset=msvc stage<br />
</pre><br />
There are about 7GB disc space needed during build of all libraries (3.5GB for libraries and the same amount for the temporary files).<br />
</li><br />
<li>The Boost include files are typically included by a statement like<br/><br />
<tt>#include "boost/whatever.hpp"</tt><br/><br />
Therefore the base directory of the Boost include files is <tt><SDKHOME>\boost_1_43_0</tt><br />
</li><br />
<li>Only the following libraries are needed to build a release version of Hugin:<br />
<ul><br />
<li><tt>libboost_date_time-vc100-mt-s.lib</tt></li><br />
<li><tt>libboost_thread-vc100-mt-s.lib</tt></li><br />
</ul><br />
The files with "<tt>gd</tt>" in the filename, e.g. <tt>libboost_thread-vc100-mt-sgd-1_43.lib</tt>, are the debug libraries.<br />
The library files without "<tt>-1_43</tt>" suffix are automatically generated copies of the libraries with version suffix. They are used by CMake to detect the library directory.<br />
</li><br />
</ul><br />
|}<br />
<br />
=== OpenEXR ===<br />
<br />
OpenEXR depends on following SDK component:<br />
<ul><br />
<li>wxWidgets</li><br />
</ul><br />
Prepare this component before OpenEXR.<br />
<br />
<ol><br />
<li>Create the directory <tt><SDKHOME>\OpenEXR</tt></li><br />
<li>Decompress the file <tt>ilmbase-1.0.1.tar.gz</tt> to created directory <tt><SDKHOME>\OpenEXR</tt><br/><br />
<li>Decompress the file <tt>openexr-1.6.1.tar.gz</tt> to the same directory <tt><SDKHOME>\OpenEXR</tt><br/><br />
After decompress there should only exist the two directories <tt>ilmbase-1.0.1</tt> and <tt>openexr-1.6.1</tt> in <tt><SDKHOME>\OpenEXR</tt></li><br />
<li>Apply the <tt>OpenEXR.diff</tt> patch [[Hugin SDK (MSVC 2008) Patches#OpenEXR]]</li><br />
<li>Open solution file <tt><SDKHOME>\OpenEXR\ilmbase-1.0.1\vc\vc8\IlmBase\IlmBase.sln</tt></li><br />
<li>Allow conversion to proceed. TODO is Batch Build better?</li><br />
<li>Select Debug in Solutions Configuration pull-down menu, and then choose Build > Build Solution</li><br />
<li>Select Release in Solutions Configuration pull-down menu, and then choose Build > Build Solution</li><br />
<li> TODO is 64-bit needed? Change General .. Platform Toolset to Win 7.1 SDK for all x64 projects. </li><br />
<li> ? For 64-bit, find the lines "HALF_EXPORT_CONST half::uif half::_toFloat[1 << 16] =" and "HALF_EXPORT_CONST unsigned short half::_eLut[1 << 9] =" in half.cpp and append "{};" to the end of each of them.<br />
<li>Open solution file <tt><SDKHOME>\OpenEXR\openexr-1.6.1\vc\vc8\OpenEXR\OpenEXR.sln</tt></li><br />
<li>TODO update reference for wxWidgets-2.8.11 (from wxWidgets-2.8.10 to wxWidgets-2.8.11)</li><br />
<li>Choose Build > Batch Build</li><br />
<li>Select Build for Project IlmImf with Solution Config <br/><br />
{| class="wikitable" <br />
|- valign="top"<br />
! style="padding:5px; text-align:left" | 32-Bit<br />
! style="padding:5px; text-align:left" | 64-Bit<br />
|- valign="top"<br />
| style="padding:5px; text-align:left" | Solution Config: "Debug" with Platform: "Win32"<br/><br />
Solution Config: "Release" with Platform: "Win32"<br />
| style="padding:5px; text-align:left" | Solution Config: "Debug" with Platform: "x64"<br/><br />
Solution Config: "Release" with Platform: "x64"<br />
|}</li><br />
<li>Click Build</li><br />
<li>Close Visual C++ 2010 Express</li><br />
</ol><br />
<br />
'''Result'''<br />
<br />
The include files reside in<br />
<tt><SDKHOME>\Deploy\include</tt><br />
<br />
The libraries reside in<br />
<tt><SDKHOME>\Deploy\lib\Debug</tt> and<br />
<tt><SDKHOME>\Deploy\lib\Release</tt> for win32,<br />
<tt><SDKHOME>\Deploy\lib\x64\Debug</tt> and<br />
<tt><SDKHOME>\Deploy\lib\x64\Release</tt> for x64.<br />
<br />
=== Enblend and Enfuse ===<br />
{| class="wikitable" <br />
|- valign="top"<br />
! style="padding:5px; text-align:left" | 32-Bit Directions<br />
! style="padding:5px; text-align:left" | 64-Bit Directions<br />
|- valign="top"<br />
| style="padding:5px; text-align:left" | <ol><br />
<li>Decompress the file <tt>enblend-enfuse-4.0.zip</tt> to directory <tt><SDKHOME></tt></li><br />
</ol><br />
| style="padding:5px; text-align:left" | Enblend & Enfuse depend on the following SDK components:<br />
<ul><br />
<li>wxWidgets</li><br />
<li>OpenEXR</li><br />
<li>lcms</li><br />
<li>STLport</li><br />
<li>boost</li><br />
<li>libxmi</li><br />
</ul><br />
Prepare these components before Enblend & Enfuse.<br />
<br />
<ol><br />
<li>Decompress the file <tt>enblend-enfuse-4.0.tar.gz</tt> to directory <tt><SDKHOME></tt><br/><br />
After decompression, you should now have a folder <tt><SDKHOME>\enblend-enfuse-4.0</tt></li><br />
<li>Alternate: get enblend from the Hg repository. Needed 7 July 2010 to get CMakeLists.txt</li><br />
<li>Run Cmake, use <tt><SDKHOME>\enblend-enfuse-4.0</tt> as the source, and <tt><SDKHOME>\enblend-build-x64</tt> as the build destination, and MSVC 2010 x64 as the compiler.</li><br />
<li>All the dependencies will be NOT FOUND or find the win32 versions - change to x64 versions.</li><br />
<li>Open the file <tt><SDKHOME>\enblend-build-x64\enblend.sln</tt></li><br />
<li>If one checked ENABLE_GPU in CMake, one must add FREEGLUT_STATIC to the preprocessor definitions of the enblend and enfuse projects.</li><br />
<li>Select Release in Solutions Configuration pull-down menu, choose x64 in the Solutions Platform pull-down menu, and then choose Build > Build Solution</li><br />
<li>Close Visual C++ 2010 Express </li><br />
</ol><br />
|}<br />
'''Result'''<br />
<br />
The applications reside in <tt><SDKHOME>\enblend-enfuse-4.0</tt> for 32-bit, <br/><br />
or <tt><SDKHOME>\enblend-build-x64</tt> for 64-bit.<br />
<br />
=== Expat ===<br />
<br />
<ol><br />
<li>Decompress the file <tt>expat-2.0.1.tar.gz</tt> to directory <tt><SDKHOME></tt></li><br />
<li>Apply the <tt>expat-2.0.1.diff</tt> patch [[Hugin SDK (MSVC 2008) Patches#expat]]</li><br />
<li>Open the file <tt><SDKHOME>\expat-2.0.1\Source\expat.sln</tt></li><br />
<li>Allow conversion to proceed.</li><br />
<li>Right-click expat_static, and choose Properties</li><br />
<li>Under Configuration Properties, General, change Output Dir to <tt>.\..\$(Platform)\bin\$(Configuration)\</tt></li><br />
<li>Change Intermediate Dir to <tt>.\..\$(Platform)\tmp\$(Configuration)_static\</tt></li><br />
<li>Change Target Name to libexpatMT</li><br />
<li>Configuration Properties, Librarian, Output File, change Output File to <tt>inherit from parent or project defaults</tt></li><br />
<li>Configuration Properties, C++, Output Files, change ASM List Location, Object File Name, and Program DB File Name to <tt>inherit from parent or project defaults</tt></li><br />
<br />
<li>Choose Build > Batch Build</li><br />
<li>Select Build for Project expat_static with <br/><br />
{| class="wikitable" <br />
|- valign="top"<br />
! style="padding:5px; text-align:left" | 32-Bit<br />
! style="padding:5px; text-align:left" | 64-Bit<br />
|- valign="top"<br />
| style="padding:5px; text-align:left" | Solution Config: "Debug" with Platform: "Win32"<br/><br />
Solution Config: "Release" with Platform: "Win32"<br />
| style="padding:5px; text-align:left" | Solution Config: "Debug" with Platform: "x64"<br/><br />
Solution Config: "Release" with Platform: "x64"<br />
|}</li><br />
<li>Click Build</li><br />
<li>Close Visual C++ 2010 Express</li><br />
</ol><br />
<br />
'''Result'''<br />
<br />
The include files reside in<br />
<tt><SDKHOME>\expat-2.0.1\lib</tt><br />
<br />
The libraries reside in<br />
<tt><SDKHOME>\expat-2.0.1\win32\bin\Debug</tt> and<br />
<tt><SDKHOME>\expat-2.0.1\win32\bin\Release</tt> <br/><br />
<tt><SDKHOME>\expat-2.0.1\x64\bin\Debug</tt> and<br />
<tt><SDKHOME>\expat-2.0.1\x64\bin\Release</tt><br />
<br />
=== Exiv2 ===<br />
<br />
Exiv2 depends on following SDK components:<br />
<ul><br />
<li>wxWidgets</li><br />
<li>GetText</li><br />
<li>Expat</li><br />
</ul><br />
Prepare these components before Exiv2.<br />
<br />
<ol><br />
<li>Decompress the file <tt>exiv2-0.20.tar.gz</tt> to directory <tt><SDKHOME></tt></li><br />
<li>Apply the <tt>exiv2-0.20.diff</tt> patch [[Hugin SDK (MSVC 2008) Patches#exiv2]]</li><br />
<li>(64-bit Only)Apply the <tt>exiv2-0.20.x64.diff</tt> patch</li><br />
<li>Open solution file <tt><SDKHOME>\exiv2-0.20\msvc\exiv2.sln</tt></li><br />
<li>In the Solution Explorer, select "exiv2lib"</li><br />
<li>Right-click exiv2lib, and choose Properties, select All Configurations, and All Platforms</li><br />
<li>Under Configuration Properties, General, change Output Dir and Intermediate Dir to <tt>inherit from parent or project defaults</tt></li><br />
<li>Change Target Name to exiv2</li><br />
<li>Configuration Properties, C++, General, change Treat Warnings as Errors to No</li><br />
<li>Configuration Properties, Librarian, Output File, change Output File to <tt>inherit from parent or project defaults</tt></li><br />
<br />
<li>Right-click exiv2lib, and choose Properties, select All Configurations, and All Platforms</li><br />
<li>Under Configuration Properties, General, change Output Dir and Intermediate Dir to <tt>inherit from parent or project defaults</tt></li><br />
<li>TODO update reference for wxWidgets-2.8.11 (from wxWidgets-2.8.10 to wxWidgets-2.8.11)</li><br />
<li>Choose Build > Batch Build</li><br />
<li>Select Build for Project exiv2lib with <br/><br />
{| class="wikitable" <br />
|- valign="top"<br />
! style="padding:5px; text-align:left" | 32-Bit<br />
! style="padding:5px; text-align:left" | 64-Bit<br />
|- valign="top"<br />
| style="padding:5px; text-align:left" | Solution Config: "Debug" with Platform: "Win32"<br/><br />
Solution Config: "Release" with Platform: "Win32"<br />
| style="padding:5px; text-align:left" | Solution Config: "Debug" with Platform: "x64"<br/><br />
Solution Config: "Release" with Platform: "x64"<br />
|}</li><br />
<li>Click Build</li><br />
<li>Close Visual C++ 2010 Express</li><br />
<li>Create the directory <tt><SDKHOME>\exiv2-0.20\msvc\lib</tt></li><br />
<li>Copy the following files to this directory and rename them as specified in Destination column.<br />
<br />
{| class="wikitable"<br />
|- valign="top"<br />
! style="padding:5px; text-align:left" | Source<br />
! style="padding:5px; text-align:left" | Destination<br />
|-<br />
| style="padding:5px; text-align:left" | <tt><SDKHOME>\exiv2-0.20\msvc\bin\Debug\exiv2.lib</tt><br />
| style="padding:5px; text-align:left" | <tt><SDKHOME>\exiv2-0.20\msvc\lib\''exiv2d''.lib</tt><br />
|-<br />
| style="padding:5px; text-align:left" | <tt><SDKHOME>\exiv2-0.20\msvc\bin\Release\exiv2.lib</tt><br />
| style="padding:5px; text-align:left" | <tt><SDKHOME>\exiv2-0.20\msvc\lib\exiv2.lib</tt><br />
|-<br />
| style="padding:5px; text-align:left" | <tt><SDKHOME>\expat-2.0.1\win32\bin\Debug\libexpatMT.lib</tt><br />
| style="padding:5px; text-align:left" | <tt><SDKHOME>\exiv2-0.20\msvc\lib\''libexpatd''.lib</tt><br />
|-<br />
| style="padding:5px; text-align:left" | <tt><SDKHOME>\expat-2.0.1\win32\bin\Release\libexpatMT.lib</tt><br />
| style="padding:5px; text-align:left" | <tt><SDKHOME>\exiv2-0.20\msvc\lib\''libexpat''.lib</tt><br />
|}<br />
</li><br />
<li> Similar for msvc\lib\x64\ </li><br />
</ol><br />
<br />
'''Comment'''<br />
<br />
When using exiv2 0.19 (which works better with bigger files), copy and rename also the following files:<br />
<br />
{| class="wikitable"<br />
|- valign="top"<br />
! style="padding:5px; text-align:left" | Source<br />
! style="padding:5px; text-align:left" | Destination<br />
|-<br />
| style="padding:5px; text-align:left" | <tt><SDKHOME>\exiv2-0.19\msvc\xmpsdk\Debug\xmpsdk.lib</tt><br />
| style="padding:5px; text-align:left" | <tt><SDKHOME>\exiv2-0.19\msvc\lib\''xmpsdkd''.lib</tt><br />
|-<br />
| style="padding:5px; text-align:left" | <tt><SDKHOME>\exiv2-0.19\msvc\xmpsdk\Release\xmpsdk.lib</tt><br />
| style="padding:5px; text-align:left" | <tt><SDKHOME>\exiv2-0.19\msvc\lib\xmpsdk.lib</tt><br />
|}<br />
<br />
Similar for msvc\lib\x64\ <br/><br />
<br />
'''Result'''<br />
<br />
The include files reside in<br />
<tt><SDKHOME>\exiv2-0.20\msvc\include</tt><br />
<br />
The libraries reside in<br />
<tt><SDKHOME>\exiv2-0.20\msvc\lib</tt> and <tt>lib\x64</tt><br />
<br />
=== GLEW ===<br />
<br />
<ol><br />
<li>Decompress the file <tt>glew-1.5.1-src.zip</tt> to directory <tt><SDKHOME></tt></li><br />
<li>Apply the <tt>glew.diff</tt> patch [[Hugin SDK (MSVC 2008) Patches#glew]]</li><br />
<li>Open the file <tt><SDKHOME>\glew\build\vc6\glew.sln</tt></li><br />
<li>Let the conversion wizard run.</li><br />
<li>(64-bit) For the glew_static project, right-click Properties, for each x64 configuration, change:<br />
<ol><br />
<li>Configuration Properties, General, Intermediate Dir, change <tt> .\static/debug\ </tt> to <tt> .\static\$(Platform)\debug\ </tt></li><br />
<li>Configuration Properties, Librarian, Output File, change <tt>../../lib/glew32sd.lib</tt> to <tt>../../lib/glew64sd.lib</tt> and change Target Machine to X64</li><br />
<li>Configuration Properties, C++, Output Files, change ASM List Location, Object File Name, and Program DB File Name to <tt>inherit from parent or project defaults</tt></li><br />
</ol><br />
<li>Choose Build > Batch Build</li><br />
<li>Select Build for Project glew_static with Solution Config <br/><br />
{| class="wikitable" <br />
|- valign="top"<br />
! style="padding:5px; text-align:left" | 32-Bit<br />
! style="padding:5px; text-align:left" | 64-Bit<br />
|- valign="top"<br />
| style="padding:5px; text-align:left" | Solution Config: "Debug" with Platform: "Win32"<br/><br />
Solution Config: "Release" with Platform: "Win32"<br />
| style="padding:5px; text-align:left" | Solution Config: "Debug" with Platform: "x64"<br/><br />
Solution Config: "Release" with Platform: "x64"<br />
|}</li><br />
<li>Click Build</li><br />
<li>Close Visual C++ 2010 Express </li><br />
</ol><br />
<br />
'''Result'''<br />
<br />
The include files reside in<br />
<tt><SDKHOME>\glew\include</tt><br />
<br />
The libraries reside in<br />
<tt><SDKHOME>\glew\lib</tt><br />
<br />
{| class="wikitable" width="100%"<br />
|-<br />
! style="padding:5px; text-align:left" | Note<br />
|-<br />
| style="padding:5px; text-align:left" | The GLEW include files are typically included by a statement like<br/><tt>#include "GL/glew.h"</tt><br/>Therefore the base directory of the GLEW include files is <tt><SDKHOME>\glew\include</tt><br />
|}<br />
<br />
=== Panorama Tools ===<br />
<br />
Panorama Tools depends on following SDK component:<br />
<ul><br />
<li>wxWidgets</li><br />
</ul><br />
Prepare this component before Panoroma Tools.<br />
<br />
<ol><br />
<li>Set two windows environment variables:<br />
<ul><br />
<li>Set variable <tt>WXWIDGETS_HOME</tt> to wxWidgets base folder <tt><SDKHOME>\wxWidgets-2.8.11</tt></li><br />
<li>Alternative: fix the LocalDefs.vsprops file next to the .sln file to point to wxWidgets base folder <tt><SDKHOME>\wxWidgets-2.8.11</tt>. This can be changed inside MSVC: View .. Property Manager, pano13 LocalDefs .. Common Properties .. User Macros </li><br />
</ul><br />
For changed environment variables to take effect you may have to logout and login.<br />
</li><br />
<li>Create the directory <tt><SDKHOME>\libpano\pano13</tt></li><br />
<li>In explorer right-click on created directory <tt><SDKHOME>\libpano\pano13</tt></li>, and then choose SVN Checkout from the shortcut menu. The Checkout dialog appears.</li><br />
<li>In "URL of repository" field enter following address:<br />
<pre><br />
https://panotools.svn.sourceforge.net/svnroot/panotools/trunk/libpano<br />
</pre><br />
</li><br />
<li>Click OK</li><br />
<li>After checkout has finished click OK</li><br />
<li>Open solution file <tt><SDKHOME>\libpano\pano13\libpano.sln</tt>, let the upgrade wizard run.</li><br />
<li>Select all projects, then right-click and choose Properties, select All Configurations, and All Platforms</li><br />
<li>Under Configuration Properties, General, change Platform Toolset from v100 to Windows7.1SDK</li><br />
<li>Under Configuration Properties, General, change Output Dir and Intermediate Dir to <tt>$(Configuration)\$(Platform)\</tt> (Note: already done in 2.9.17)</li><br />
<li>Temporary 2.9.17 fixes: optimize.c, change brackets to quotes, "filter.h" and "adjust.h". Release build, linker, wxWidgets\lib\vc_amd64_lib instead of vc_lib64. Get tools/*.rc from svn. (Sept 7, 2010)</li><br />
<li>Select your platform in the Solution Platform pull-down menu</li><br />
<li>Select "Debug CMD" in Solution Configuration pull-down menu</li><br />
<li>Select project pano13 in Solution Explorer, and then choose Build > Project Only > Build Only pano13</li><br />
<li>Select "Release CMD" in Solution Configuration pull-down menu, and then choose Build > Build Solution (Note: multi-core machines, right click and build each project individually, skipping PTAInterpolate. Avoids log-file write conflict.</li><br />
<li>Close Visual C++ 2010 Express </li><br />
</ol><br />
<br />
'''Result'''<br />
<br />
The applications reside in<br />
<tt><SDKHOME>\libpano\pano13\tools\Release CMD\Win32</tt> or <tt>x64</tt><br />
<br />
The include files reside in<br />
<tt><SDKHOME>\libpano\pano13</tt><br />
<br />
The libraries reside in<br />
<tt><SDKHOME>\libpano\pano13\Debug CMD\Win32</tt> or <tt>x64</tt> and <br />
<tt><SDKHOME>\libpano\pano13\Release CMD\Win32</tt> or <tt>x64</tt><br />
<br />
{| class="wikitable" width="100%"<br />
|- valign="top"<br />
! style="padding:5px; text-align:left" | Note<br />
|- valign="top"<br />
| style="padding:5px; text-align:left" | The applications have to be built in release version only. Therefore only pano13 library has to be built in Debug configuration.<br />
|}<br />
<br />
=== libxml2 ===<br />
<br />
Note: required by autopano-sift-c only, not by enblend or hugin. Untested and unchanged from MSVC 2008 version because autopano-sift-c untested.<br />
<ol><br />
<li>Decompress the file <tt>libxml2-sources-2.7.3.tar.gz</tt> to directory <tt><SDKHOME></tt></li><br />
<li><br />
{| class="wikitable" <br />
|- valign="top"<br />
! style="padding:5px; text-align:left" | 32-Bit Directions<br />
! style="padding:5px; text-align:left" | 64-Bit Directions<br />
|- valign="top"<br />
| style="padding:5px; text-align:left" | <ol><li>To open a Visual Studio command prompt choose Start > Programs > Microsoft Visual C++ 2008 Express Edition > Visual Studio Tools > Visual Studio 2008 Command Prompt</li></ol><br />
| style="padding: 5px; text-align:left" | <ol><br />
<li>Open a Windows SDK prompt by choosing Start -> Programs -> Microsoft Windows SDK v6.1 -> CMD Shell</li><br />
<li>On the command prompt, enter the following command without any line breaks and press the Return/Enter key:<br/><br />
<pre><br />
setenv /Release /x64 /xp<br />
</pre><br />
It should now refresh and say<br />
<pre><br />
Setting SDK environment relative to <path where you installed the SDK><br />
Targeting Windows XP x64 RELEASE<br />
</pre></li><br />
</ol><br />
|}<br />
</li><br />
<br />
<li>On command prompt change directory to <tt><SDKHOME>\libxml2-2.7.3\win32</tt><br/><br />
'''Example'''<br />
<pre><br />
Setting environment for using Microsoft Visual Studio 2008 x86 tools.<br />
<br />
C:\Program Files\Microsoft Visual Studio 9.0\VC>d:<br />
<br />
D:\>cd \usr\src\SDK\libxml2-2.7.3\win32 <br />
<br />
D:\usr\src\SDK\libxml2-2.7.3\win32><br />
</pre><br />
<br />
<li>Enter each of the following two commands without any line break and press the Return key.<br />
<pre><br />
cscript configure.js ftp=no http=no iconv=no cruntime=/MT<br />
nmake -f makefile.msvc libxmla<br />
</pre><br />
</li><br />
</ol><br />
<br />
'''Result'''<br />
<br />
The include files reside in<br />
<tt><SDKHOME>\libxml2-2.7.3\include</tt><br />
<br />
The libraries reside in<br />
<tt><SDKHOME>\libxml2-2.7.3\win32\bin.msvc</tt><br />
<br />
{| class="wikitable" width="100%"<br />
|-<br />
! style="padding:5px; text-align:left" | Notes<br />
|-<br />
| style="padding:5px; text-align:left" | <ul><br />
<li>During build process temporary object files are generated in directory<br />
<tt><SDKHOME>\libxml2-2.7.3\win32\int.a.msvc</tt>.<br />
This directories may be deleted to save disc space.</li><br />
<li>Hugin does not depend on libxml2 library, but autopano-sift-C. Therefore it is included in this SDK.</li><br />
</ul><br />
|}<br />
<br />
=== autopano-sift-C ===<br />
<br />
Note: Untested and unchanged from MSVC 2008 version because of patent restrictions for U.S.-based author ([[User:Helser|Aron Helser]]).<br/><br />
Autopano-SIFT-C depends on following SDK components:<br />
<ul><br />
<li>libxml2</li><br />
<li>Panorama Tool's pano13 library</li><br />
<li>wxWidgets</li><br />
</ul><br />
Prepare these components before Autopano-SIFT-C.<br />
<br />
<ol><br />
<li>Create the directory <tt><SDKHOME>\autopano-sift-C-trunk</tt></li><br />
<li>In explorer right-click on created directory <tt><SDKHOME>\autopano-sift-C-trunk</tt>, and then choose SVN Checkout from the shortcut menu. The Checkout dialog appears.</li><br />
<li>In "URL of repository" field enter following address:<br />
<pre><br />
https://hugin.svn.sourceforge.net/svnroot/hugin/autopano-sift-C/trunk<br />
</pre><br />
</li><br />
<li>Click OK</li><br />
<li>After checkout has finished click OK</li><br />
<li>Start CMake (cmake-gui). The CMake dialog appears.</li><br />
<li>In "Where is the source code" field enter<br />
<pre><br />
<SDKHOME>\autopano-sift-C-trunk<br />
</pre><br />
Alternatively click Browse Source to point to this directory</li><br />
<li>In "Where to build the binaries" field enter<br />
<pre><br />
<SDKHOME>\autopano-sift-C<br />
</pre><br />
</li><br />
<li>Click Configure<br/><br />
If a dialog appears, which asks to create the build directoy, click Yes.<br/><br />
A dialog appears, where you can specify the generator for the project.</li><br />
<li><br />
{| class="wikitable" <br />
|- valign="top"<br />
! style="padding:5px; text-align:left" | 32-Bit Directions<br />
! style="padding:5px; text-align:left" | 64-Bit Directions<br />
|- valign="top"<br />
| style="padding:5px; text-align:left" | Select "Visual Studio 9 2008" and select option "Use default native compilers"<br />
| style="padding:5px; text-align:left" | Select "Visual Studio 9 2008 Win64" and select option "Use default native compilers"<br />
|}</li><br />
<li>Click Finish<br/><br />
In the Name and Value list the entries are shown with red background.</li><br />
<li>Click Configure</li><br />
<li>Click Generate</li><br />
<li>Close CMake</li><br />
<li>Open solution file <tt><SDKHOME>\autopano-sift-C\autopano-sift-C.sln</tt></li><br />
<li>Select Release in Solution Configuration pull-down menu, and then choose Build > Build Solution</li><br />
<li>Select project INSTALL in Solution Explorer, and then choose Build > Project Only > Build Only INSTALL</li><br />
<li>Close Visual C++ 2008 Express Edition</li><br />
<li><br />
Copy the directories <tt>bin</tt> and <tt>shared</tt> from <tt><SDKHOME>\autopano-sift-C\INSTALL\FILES</tt> to <tt><SDKHOME>\autopano-sift-C</tt></li><br />
</ol><br />
<br />
'''Result'''<br />
<br />
The applications reside in<br />
<tt><SDKHOME>\autopano-sift-C\bin</tt><br />
<br />
The manual pages reside in<br />
<tt><SDKHOME>\autopano-sift-C\shared</tt><br />
<br />
{| class="wikitable" width="100%"<br />
|- valign="top"<br />
! style="padding:5px; text-align:left" | Note<br />
|- valign="top"<br />
| style="padding:5px; text-align:left" | To save disk space you may delete all files and directories in <tt><SDKHOME>\autopano-sift-C</tt>, except the subdirectories <tt>bin</tt> and <tt>shared</tt>.<br />
|}<br />
<br />
=== Freeglut ===<br />
<ol><br />
<li>Decompress the file <tt>freeglut-2.6.0.tar.gz</tt> to directory <tt><SDKHOME></tt></li><br />
<li>Open the file <tt><SDKHOME>\freeglut-2.6.0\VisualStudio2008Static\freeglut.sln</tt></li><br />
<li>Select "Debug" in the Solution Configuration pull-down menu. </li><br />
<li>Select project freeglut in Solution Explorer, and then choose Build > Project Only > Build Only freeglut</li><br />
<li>Select "Release" in the Solution Configuration pull-down menu. </li><br />
<li>Select project freeglut in Solution Explorer, and then choose Build > Project Only > Build Only freeglut</li><br />
<li>Close Visual Studio C++ 2010 Express </li><br />
</ol><br />
<br />
'''Result'''<br />
<br />
The library resides in <tt><SDKHOME>\freeglut-2.6.0\VisualStudio2008Static\Debug</tt> and <tt><SDKHOME>\freeglut-2.6.0\VisualStudio2008Static\Release</tt><br />
<br />
=== GNU Make ===<br />
<ol><br />
<li>Decompress the file <tt>make-3.81.tar.gz</tt> to directory <tt><SDKHOME></tt></li><br />
<li>Open the file <tt><SDKHOME>\make-3.81\make_msvc_net2003.sln</tt> (Confirm conversion.)</li> <br />
<li>Select "Release" in the Solution Configuration pull-down menu. </li><br />
<li>Select project make_msvc.net2003 Solution Explorer, and then choose Build > Project</li><br />
<li>Close Visual Studio C++ 2010 Express </li><br />
<li>Rename the file <tt><SDKHOME>\make-3.81\Release\make_msvc.net2003.exe</tt> to <tt><SDKHOME>\make-3.81\Release\make.exe</tt><br />
</ol><br />
<br />
'''Result'''<br />
<br />
The executable make.exe resides in <tt><SDKHOME>\make-3.81\Release\</tt><br />
<br />
(All other files in this directory can be deleted to save space.)<br />
<br />
--Created: [[User:Helser|Aron Helser]] 16:20, 29 June 2010 (UTC)<br />
<br />
=== Templatized C++ Command Line Parser Library (tclap) ===<br />
<br />
<ol><br />
<li>Decompress the file <tt>tclap-1.2.0.tar.gz</tt> to directory <tt><SDKHOME>\tclap-1.2.0</tt></li><br />
</ol><br />
<br />
'''Result'''<br />
<br />
The include files reside in<br />
<tt><SDKHOME>\tclap-1.2.0\include\tclap</tt><br />
<br />
=== Nullsoft Scriptable Install System (NSIS) ===<br />
Note: Only needed to build Hugin Setup installer<br />
<ol><br />
<li>Run the NSIS installer, <tt>nsis-2.46-setup.exe</tt>, installing to the default location.</li><br />
</ol><br />
<br />
'''Result'''<br />
<br />
NSIS should be installed to <tt><DRIVE>\Program Files\NSIS</tt><br />
<br />
[[Category:Software:Hugin]]<br />
[[Category:Software:Hugin:Compiling]]<br />
[[Category:Software:Platform:Windows]]</div>Onomouhttps://wiki.panotools.org/index.php?title=Hugin_SDK_(MSVC_2008)&diff=13655Hugin SDK (MSVC 2008)2011-07-16T23:30:06Z<p>Onomou: Add Compiling category</p>
<hr />
<div>Hugin depends on different components like libraries and tools, which are not available on a common Windows system. All these components can be combined to a Hugin Software Development Kit (SDK). This article gives step-by-step instructions to build such SDK for Hugin using Microsoft Visual C++ 2008 (MSVC 2008) Express Edition and precompiled dependencies. <br />
<br />
While this article is designed for developing a native 32-bit version, additional instructions are provided so that a 64-bit version of the Hugin SDK can be compiled. When appropriate, steps that only apply to the 32-bit or 64-bit versions will be noted as (32-bit) or (64-bit), and you can safely ignore them if you are not targeting that particular version. In order to compile a 64-bit version of the Hugin SDK, one does not need a 64-bit computer. However, if they wish to test or debug the binaries, or for some projects (such as OpenEXR) which execute compiled binaries as part of their build step, this will not necessarily be possible on Win32.<br />
<br />
First of all an overview is given over the contents of the SDK and the tools that are necessary to build the SDK.<br />
<br />
The build steps for each component are written like a walk-through and annotated on the end of each section.<br />
<br />
Maybe some of the described tools and packages, especially those fetched from Subversion (SVN) repository, will change over time and/or become obsolete. Hence it is likely that some steps will become invalid or won't work any more.<br />
<br />
The SDK is structured, that each component resides in its own subdirectory. This approach is different to other platforms like Linux, where some common directories are available to store include files, libraries and applications. The files of a component are spread over all these directories. Both approaches to structure the files in a file system have its assets and drawbacks.<br />
<br />
The base directory of the SDK is denoted as <tt><SDKHOME></tt> in this article. Replace <tt><SDKHOME></tt> by directory name where you store the SDK on your system. In the examples <tt><SDKHOME></tt> is replaced by the directory name <tt>D:\usr\src\SDK</tt>.<br />
<br />
== Prerequisites ==<br />
<br />
To build the SDK some tools are required that are listed in the table below. Download the tools and install them. The destination directory of each tool is arbitrary. If you are uncertain, choose the default given in the setup dialog of each tool.<br />
<br />
{| class="wikitable" width="100%"<br />
|- valign="top"<br />
! style="padding:5px; text-align:left" width="30%" | Tool<br />
! style="padding:5px; text-align:left" | Description<br />
|- valign="top"<br />
| style="padding:5px; text-align:left" | Microsoft Visual C++ 2008 Express Edition<br />
| style="padding:5px; text-align:left" | Compiler, Debugger and IDE<br/>Visit [http://www.microsoft.com/express/vc/ Download page] <br>If compiling for 64-bit, you will need to [http://jenshuebel.wordpress.com/2009/02/12/visual-c-2008-express-edition-and-64-bit-targets/ enable Express Edition to compile 64-bit projects]. <br />
|- valign="top"<br />
| style="padding:5px; text-align:left" | (x64 Only) Microsoft Windows SDK for Windows Server 2008 and .NET Framework 3.5<br />
| style="padding:5px; text-align:left" | x64 Compiler, Libraries, and Headers<br/>Visit [http://www.microsoft.com/downloads/details.aspx?FamilyId=F26B1AA4-741A-433A-9BE5-FA919850BDBF]<br> When installing, make sure to include the Visual C++ compilers for x64 (under Developer Tools) and the Header Files and x64 libraries (under Windows Headers and Libraries). Optionally consider installing all of the SDK, as it makes compiling generally easier.<br />
|- valign="top"<br />
| style="padding:5px; text-align:left" | CMake 2.6.4 (2009-05-05)<br />
| style="padding:5px; text-align:left" | Generator of solution and project files for MSVC 2008<br/>Visit [http://www.cmake.org/cmake/resources/software.html#latest Download page] or download [http://www.cmake.org/files/v2.6/cmake-2.6.4-win32-x86.exe <tt>cmake-2.6.4-win32-x86.exe</tt>]<br />
|- valign="top"<br />
| style="padding:5px; text-align:left" | TortoiseSVN 1.6.1.16129 (2009-02-13)<br />
| style="padding:5px; text-align:left" | Tool to handle source codes in Subversion repositories<br/>Visit [http://tortoisesvn.net/downloads Download page] or download<br/> [http://downloads.sourceforge.net/tortoisesvn/TortoiseSVN-1.6.1.16129-win32-svn-1.6.1.msi <tt>TortoiseSVN-1.6.1.16129-win32-svn-1.6.1.msi (32-bit)</tt>] or<br/> [http://downloads.sourceforge.net/tortoisesvn/TortoiseSVN-1.6.1.16129-x64-svn-1.6.1.msi <tt>TortoiseSVN-1.6.1.16129-x64-svn-1.6.1.msi (64-bit)</tt>]<br />
|- valign="top"<br />
| style="padding:5px; text-align:left" | TortoiseHg 1.0.4 (2010-06-11)<br />
| style="padding:5px; text-align:left" | Tool to handle source codes in Mercurial repositories<br/>Visit [http://tortoisehg.bitbucket.org/ Download page]<br/> <br />
|- valign="top"<br />
| style="padding:5px; text-align:left" | 7-Zip 4.65 (2009-02-03)<br />
| style="padding:5px; text-align:left" | Tool to decompress the source packages<br/>Visit [http://www.7-zip.org/download.html Download page] or download [http://downloads.sourceforge.net/sevenzip/7z465.exe <tt>7z465.exe (32-bit)</tt>] or [http://downloads.sourceforge.net/sevenzip/7z465-x64.msi <tt>7z465-x64.msi (64-bit)</tt>]<br />
|- valign="top"<br />
| style="padding:5px; text-align:left" | Java SE Development Kit 6 Update 13<br />
| style="padding:5px; text-align:left" | Java Development Kit (JDK)<br/>Visit [http://java.sun.com/javase/downloads/index.jsp Download page]<br />
|- valign="top"<br />
| style="padding:5px; text-align:left" | Microsoft HTML Help Workshop<br />
| style="padding:5px; text-align:left" | HTML Help Compiler<br/>Visit [http://www.microsoft.com/downloads/en/details.aspx?FamilyID=00535334-c8a6-452f-9aa0-d597d16580cc Download page for htmlhelp.exe] <br />
|}<br />
<br />
== Contents of the Hugin SDK ==<br />
<br />
=== Precompiled Version (32-bit only) ===<br />
<br />
For those who want to avoid to build the whole SDK from scratch a precompiled SDK is available.<br />
<br />
{| class="wikitable" width="100%"<br />
|- valign="top"<br />
! style="padding:5px; text-align:left" | Precompiled Hugin SDK (Win32)<br />
|- valign="top"<br />
| style="padding:5px; text-align:left" | [http://hugin.panotools.org/sdk/MSVC/Hugin-SDK-20090509-win32.exe <tt>Hugin-SDK-20090509-win32.exe </tt>] (76 MiB, 2009-05-09)<br />
|}<br />
<br />
=== Building from Source ===<br />
The contents of the Hugin SDK is shown in the following table. Download the packages, except the packages fetched from Subversion repository.<br />
<br />
{| class="wikitable" width="100%"<br />
|- valign="top"<br />
! style="padding:5px; text-align:left" width="30%" | Directory<br />
! style="padding:5px; text-align:left" | Description (Website)<br/>Download package (Date of the package)<br />
|- valign="top"<br />
| style="padding:5px; text-align:left" | <tt>autopano-sift-C</tt><br />
| style="padding:5px; text-align:left" | Autopano-SIFT-C (http://hugin.sourceforge.net/)<br/>Subversion repository<br/><tt>https://hugin.svn.sourceforge.net/svnroot/hugin/autopano-sift-C/trunk</tt><br />
|- valign="top"<br />
| style="padding:5px; text-align:left" | <tt>boost_1_39_0</tt><br />
| style="padding:5px; text-align:left" | Boost C++ libraries 1.39.0 (http://www.boost.org/)<br/>[http://downloads.sourceforge.net/boost/boost_1_39_0.7z <tt>boost_1_39_0.7z</tt>] (2009-02-09)<br/>[http://downloads.sourceforge.net/boost/boost-jam-3.1.17-1-ntx86.zip <tt>boost-jam-3.1.17-1-ntx86.zip</tt>] (2008-11-29)<br />
|- valign="top"<br />
| style="padding:5px; text-align:left" | <tt>Deploy</tt><br/><tt>OpenEXR</tt><br />
| style="padding:5px; text-align:left" | OpenEXR library 1.6.1 and IlmBase libraries 1.0.1 (http://www.openexr.com/)<br/>[http://download.savannah.nongnu.org/releases/openexr/ilmbase-1.0.1.tar.gz <tt>ilmbase-1.0.1.tar.gz</tt>] (2007-10-22)<br/>[http://download.savannah.nongnu.org/releases/openexr/openexr-1.6.1.tar.gz <tt>openexr-1.6.1.tar.gz</tt>] (2007-10-22)<br />
|- valign="top"<br />
| style="padding:5px; text-align:left" | <tt>enblend-enfuse-3.2</tt> <br />
| style="padding:5px; text-align:left" | Enblend 3.2 and Enfuse 3.2 (http://enblend.sourceforge.net/)<br/><br />
{| class="wikitable"<br />
|- valign="top"<br />
! style="padding:5px; text-align:left" | 32-Bit<br />
! style="padding:5px; text-align:left" | 64-Bit<br />
|- valign="top"<br />
| style="padding:5px; text-align:left" | [http://downloads.sourceforge.net/enblend/enblend-enfuse-3.2.zip <tt>enblend-enfuse-3.2.zip</tt>] (2008-09-09)<br />
| style="padding:5px; text-align:left" | [http://downloads.sourceforge.net/enblend/enblend-enfuse-3.2.tar.gz <tt>enblend-enfuse-3.2.tar.gz</tt>] (2008-09-09)<br />
|}<br />
|- valign="top"<br />
| style="padding:5px; text-align:left" | <tt>exiftool</tt><br />
| style="padding:5px; text-align:left" | ExifTool 7.74 (http://www.sno.phy.queensu.ca/~phil/exiftool)<br/>[http://www.sno.phy.queensu.ca/~phil/exiftool/exiftool-7.74.zip <tt>exiftool-7.74.zip</tt>] (2009-02-17)<br />
|- valign="top"<br />
| style="padding:5px; text-align:left" | <tt>exiv2-0.18.1</tt><br />
| style="padding:5px; text-align:left" | Exiv2 C++ library 0.18 (http://www.exiv2.org/)<br/>[http://www.exiv2.org/exiv2-0.18.1.tar.gz <tt>exiv2-0.18.1.tar.gz</tt>] (2009-04-06)<br />
|- valign="top"<br />
| style="padding:5px; text-align:left" | <tt>expat-2.0.1</tt><br />
| style="padding:5px; text-align:left" | Expat XML Parser library 2.0.1 (http://sourceforge.net/projects/expat/)<br/>[http://downloads.sourceforge.net/expat/expat-2.0.1.tar.gz <tt>expat-2.0.1.tar.gz</tt>] (2007-06-05)<br />
|- valign="top"<br />
| style="padding:5px; text-align:left" | <tt>gettext</tt><br />
| style="padding:5px; text-align:left" | GNU gettext 0.13.1 and iconv library 1.9.1 (http://www.gnu.org/)<br/><br />
{| class="wikitable"<br />
|- valign="top"<br />
! style="padding:5px; text-align:left" | 32-Bit<br />
! style="padding:5px; text-align:left" | 64-Bit<br />
|- valign="top"<br />
| style="padding:5px; text-align:left" | <ul><li>[http://ftp.gnu.org/gnu/gettext/gettext-runtime-0.13.1.bin.woe32.zip <tt>gettext-runtime-0.13.1.bin.woe32.zip</tt>] (2004-01-20)</li><li>[http://ftp.gnu.org/gnu/gettext/gettext-tools-0.13.1.bin.woe32.zip <tt>gettext-tools-0.13.1.bin.woe32.zip</tt>] (2004-01-20)</li><li>[http://ftp.gnu.org/gnu/libiconv/libiconv-1.9.1.bin.woe32.zip <tt>libiconv-1.9.1.bin.woe32.zip</tt>] (2004-01-20)</li></ul><br />
| style="padding:5px; text-align:left" | <ul><li> [http://ftp.gnu.org/gnu/libiconv/libiconv-1.9.1.tar.gz libiconv-1.9.1.tar.gz] (2003-05-27)</li><li>[http://ftp.gnu.org/gnu/gettext/gettext-0.13.1.tar.gz gettext-0.13.1.tar.gz] (2003-12-17)</li></ul><br />
|}<br />
|- valign="top"<br />
| style="padding:5px; text-align:left" | <tt>glew</tt><br />
| style="padding:5px; text-align:left" | OpenGL Extension Wrangler Library (GLEW) 1.5.1 (http://glew.sourceforge.net/)<br/>[http://downloads.sourceforge.net/glew/glew-1.5.1-src.zip <tt>glew-1.5.1-src.zip</tt>] (2008-11-03)<br />
|- valign="top"<br />
| style="padding:5px; text-align:left" | <tt>libpano\pano13</tt><br />
| style="padding:5px; text-align:left" | Panorama Tools and pano13 library (http://panotools.sourceforge.net/)<br/>Subversion repository<br/><tt>https://panotools.svn.sourceforge.net/svnroot/panotools/trunk/libpano</tt><br />
|- valign="top"<br />
| style="padding:5px; text-align:left" | <tt>libxml2-2.7.3</tt><br />
| style="padding:5px; text-align:left" | XML C parser and toolkit (http://www.xmlsoft.org/)<br/>[ftp://xmlsoft.org/libxml2/libxml2-sources-2.7.3.tar.gz <tt>libxml2-sources-2.7.3.tar.gz</tt>] (2009-01-18)<br />
|- valign="top"<br />
| style="padding:5px; text-align:left" | <tt>UnxUtils</tt><br />
| style="padding:5px; text-align:left" | GNU utilities ported to win32 platform (http://sourceforge.net/projects/unxutils/)<br/>[http://downloads.sourceforge.net/unxutils/UnxUtils.zip <tt>UnxUtils.zip</tt>] (2007-03-01)<br />
|- valign="top"<br />
| style="padding:5px; text-align:left" | <tt>wxWidgets-2.8.10</tt><br />
| style="padding:5px; text-align:left" | wxWidgets cross-platform GUI C++ framework 2.8.10 (http://www.wxwidgets.org/)<br/>[http://downloads.sourceforge.net/wxwindows/wxMSW-2.8.10.zip <tt>wxMSW-2.8.10.zip</tt>] (2009-03-17)<br />
|- valign="top"<br />
! colspan="2" | Additional files only necessary for building a 64-bit SDK<br />
|- valign="top"<br />
! style="padding:5px; text-align:left" width="30%" | Directory<br />
! style="padding:5px; text-align:left" | Description (Website)<br/>Download package (Date of the package)<br />
|- valign="top"<br />
| style="padding:5px; text-align:left" | <tt>(64-bit) libxmi-1.2-1</tt> <br />
| style="padding:5px; text-align:left" | GNU libxmi 2-D rasterization library (Win32 port) (http://gnuwin32.sourceforge.net)<br/> [http://downloads.sourceforge.net/gnuwin32/libxmi-1.2-1-src.zip <tt>libxmi-1.2-1-src.zip</tt>] (2004-04-16)<br/><br />
|- valign="top"<br />
| style="padding:5px; text-align:left" | <tt>(64-bit) STLport-5.2.1</tt> <br />
| style="padding:5px; text-align:left" | STLport Standard Library (http://stlport.sourceforge.net/)<br/> [http://downloads.sourceforge.net/stlport/STLport-5.2.1.tar.gz <tt>STLport-5.2.1.tar.gz</tt>] (2008-12-10)<br/><br />
|- valign="top"<br />
| style="padding:5px; text-align:left" | <tt>(64-bit) lcms-1.18a</tt> <br />
| style="padding:5px; text-align:left" | LittleCms Color management library (http://www.littlecms.com)<br/> [http://www.littlecms.com/lcms-1.18a.zip <tt>lcms-1.18a.zip</tt>] (2009-04-19)<br/><br />
|}<br />
<br />
In the following subsections each component is discussed in detail. The order of the subsections seems random, but I applied the approach to describe the precompiled packages first, followed by the big packages, where some of the small packages depend on.<br />
<br />
The decompress step of each component contains seemingly inconsistent namings of destination directories, because in some components a subdirectory is specified as destination directory and in some steps only the base directory. This is due to the fact that some package archives contain a base directory and some not. To check the right locations each result section of every component's description contains a summary of the expected files. <br />
<br />
The SDK is currently outdated. The following changes are necessary to build Hugin:<br />
<br />
{| class="wikitable" width="100%"<br />
|- valign="top"<br />
! style="padding:5px; text-align:left" width="30%" | Directory<br />
! style="padding:5px; text-align:left" | Description (Website)<br/>Download package <br />
|- valign="top"<br />
| style="padding:5px; text-align:left" | <tt>freeglut_2.6.0</tt><br />
| style="padding:5px; text-align:left" | Freeglut (http://freeglut.sourceforge.net/index.php)<br/> [http://prdownloads.sourceforge.net/freeglut/freeglut-2.6.0.tar.gz?download <tt>freeglut-2.6.0.tar.gz</tt>]<br />
|- valign="top"<br />
| style="padding:5px; text-align:left" | <tt>make_3.81</tt><br />
| style="padding:5px; text-align:left" | GNU make 3.81 (http://www.gnu.org/software/make/) <br/>[http://ftp.gnu.org/pub/gnu/make/make-3.81.tar.gz <tt>make-3.81.tar.gz</tt>] <br/> This package replaces UnxUtils.<br />
|- valign="top"<br />
| style="padding:5px; text-align:left" | <tt>Templatized C++ Command Line Parser 1.2.0</tt><br />
| style="padding:5px; text-align:left" | tclap (http://tclap.sourceforge.net/)<br/> [http://sourceforge.net/projects/tclap/files/tclap-1.2.0.tar.gz/download <tt>tclap-1.2.0.tar.gz</tt>]<br />
|}<br />
<br />
<br />
==== Diff Files ====<br />
In order to make compilation simple, a series of patch files are included below that contain all the necessary changes, not only to compile the SDK, but to optionally compile an x64 version of the SDK. When directed, you will need to apply the patch file specified. If you are compiling for x64, there may be additional patches you need to apply.<br />
<br />
The download link for the patches is [https://bugs.launchpad.net/hugin/+bug/679695/+attachment/1741338/+files/hugin_patches.zip https://bugs.launchpad.net/hugin/+bug/679695/+attachment/1741338/+files/hugin_patches.zip]<br />
<br />
In order to apply a patch, you will first have needed to follow directions for the [[#UnxUtils|UnxUtils]] step. You cannot apply any patches before that step. To apply a patch, follow these directions:<br />
<ol><br />
<li>Start a Command Prompt by choosing Start -> Run and typing in "cmd.exe"</li><br />
<li>On the Command Prompt, change directory to <tt><SDKHOME></tt><br/><br />
'''Example'''<br />
<pre><br />
C:\Program Files\Microsoft\Windows SDK\v6.1>d:<br />
<br />
D:>cd \usr\src\SDK<br />
<br />
D:\usr\src\SDK><br />
</pre></li><br />
<li>On the command prompt, enter the following commands without any line breaks and press the Return/Enter key, substituting <SDKHOME> where appropriate:<br/><br />
<pre><br />
set PATH=%PATH%;<SDKHOME>\UnxUtils\usr\local\wbin<br />
</pre><br />
</li><br />
<li>On the command prompt, enter the following commands without any line breaks and press the Return/Enter key, substituting <PATCHFILE> with the name of the patch file to apply:<br/><br />
<pre><br />
patch -p 0 -i <PATCHFILE><br />
</pre><br />
'''NOTE:''' On Vista and later systems, the filename "patch.exe" is a protected file name which will always result in a UAC prompt if the file does not include a manifest (which UnxUtils version does not). This can be worked around by copying the file <tt><SDKHOME>\UnxUtils\usr\local\wbin\patch.exe</tt> to another file not containing the name, such as <tt><SDKHOME>\UnxUtils\usr\local\wbin\apply_diff.exe</tt>. Then substitute the command <tt>'patch'</tt> in the above command with <tt>'apply_diff'</tt><br />
</li><br />
</ol><br />
<br />
'''Result'''<br />
<br />
If everything worked, you should see a list of filenames that were patched. <br />
'''Example'''<br />
<pre><br />
D:\usr\src\SDK>patch -p 0 -i libiconv-1.9.1.diff<br />
patching file 'libiconv-1.9.1/srclib/error.c'<br />
<br />
D:\usr\src\SDK><br />
</pre><br />
<br />
If there was an error, you may wish to consult the [[Hugin SDK (MSVC 2008) Patches]] page for instructions on what changes were contained in the patch.<br />
<br />
=== UnxUtils ===<br />
<br />
<ol><br />
<li>Create the directory <tt><SDKHOME>\UnxUtils</tt></li><br />
<li>Decompress the file <tt>UnxUtils.zip</tt> to created directory <tt><SDKHOME>\UnxUtils</tt></li><br />
</ol><br />
<br />
'''Result'''<br />
<br />
The applications reside in<br />
<tt><SDKHOME>\UnxUtils\bin</tt> and<br />
<tt><SDKHOME>\UnxUtils\usr\local\wbin</tt><br />
<br />
=== ExifTool ===<br />
<br />
<ol><br />
<li>Create the directory <tt><SDKHOME>\exiftool</tt></li><br />
<li>Decompress the file <tt>exiftool-7.74.zip</tt> to <tt><SDKHOME>\exiftool</tt></li><br />
<li>Rename the file <tt>exiftool(-k).exe</tt> to <tt>exiftool.exe</tt></li><br />
</ol><br />
<br />
'''Result'''<br />
<br />
The application resides in<br />
<tt><SDKHOME>\exiftool</tt><br />
<br />
=== GetText ===<br />
{| class="wikitable"<br />
|- valign="top"<br />
! style="padding:5px; text-align:left" | 32-Bit Directions<br />
! style="padding:5px; text-align:left" | 64-Bit Directions<br />
|- valign="top"<br />
| style="padding:5px; text-align:left" | <ol><br />
<li>Create the directory <tt><SDKHOME>\gettext</tt></li><br />
<li>Decompress the following files to created directory <tt><SDKHOME>\gettext</tt><br />
<ul><br />
<li><tt>gettext-runtime-0.13.1.bin.woe32.zip</tt></li><br />
<li><tt>gettext-tools-0.13.1.bin.woe32.zip</tt></li><br />
<li><tt>libiconv-1.9.1.bin.woe32.zip</tt></li><br />
</ul><br />
</li><br />
</ol><br />
| style="padding:5px; text-align:left" | <ol><br />
<li>Create the directory <tt><SDKHOME>\gettext</tt></li><br />
<li>Decompress the following files into the directory <tt><SDKHOME></tt><br />
<ul><br />
<li><tt>gettext-0.13.1.tar.gz</tt></li><br />
<li><tt>libiconv-1.9.1.tar.gz</tt></li><br />
</ul><br />
After decompress, there should be two new folders in <tt><SDKHOME></tt>: <tt><SDKHOME>\gettext-0.13.1</tt> and <tt><SDKHOME>\libiconv-1.9.1</tt><br />
</li><br />
<li>Apply the <tt>libiconv-1.9.1.diff</tt> patch</li><br />
<li>Apply the <tt>gettext-0.13.1.diff</tt> patch</li><br />
<li>Open a Windows SDK prompt by choosing Start -> Programs -> Microsoft Windows SDK v6.1 -> CMD Shell</li><br />
<li>On the command prompt, enter the following command without any line breaks and press the Return/Enter key:<br/><br />
<pre><br />
setenv /Release /x64 /xp<br />
</pre><br />
It should now refresh and say<br />
<pre><br />
Setting SDK environment relative to <path where you installed the SDK><br />
Targeting Windows XP x64 RELEASE<br />
</pre></li><br />
<li>On the command prompt, change directory to <SDKHOME>\libiconv-1.9.1<br/><br />
'''Example'''<br />
<pre><br />
C:\Program Files\Microsoft\Windows SDK\v6.1>d:<br />
<br />
D:>cd \usr\src\SDK\libiconv-1.9.1<br />
<br />
D:\usr\src\SDK\libiconv-1.9.1><br />
</pre></li><br />
<li>On the command prompt, enter the following commands without any line breaks and press the Return/Enter key, substituting <SDKHOME> where appropriate:<br/><br />
<pre><br />
nmake -f Makefile.msvc NO_NLS=1 MFLAGS=-MT<br />
nmake -f Makefile.msvc NO_NLS=1 MFLAGS=-MT install PREFIX=<SDKHOME>\gettext<br />
cd ..\gettext-0.13.1<br />
nmake -f Makefile.msvc MFLAGS=-MT PREFIX=<SDKHOME>\gettext<br />
nmake -f Makefile.msvc MFLAGS=-MT install PREFIX=<SDKHOME>\gettext<br />
cd ..\libiconv-1.9.2-src<br />
nmake -f Makefile.msvc NO_NLS=1 MFLAGS=-MT distclean<br />
nmake -f Makefile.msvc MFLAGS=-MT PREFIX=<SDKHOME>\gettext<br />
nmake -f Makefile.msvc MFLAGS=-MT install PREFIX=<SDKHOME>\gettext<br />
</pre></li><br />
<li>Close the Windows SDK command prompt window</li><br />
</ol><br />
|} <br />
'''Result'''<br />
<br />
The applications reside in<br />
<tt><SDKHOME>\gettext\bin</tt><br />
<br />
The include files reside in<br />
<tt><SDKHOME>\gettext\include</tt><br />
<br />
The libraries reside in<br />
<tt><SDKHOME>\gettext\lib</tt><br />
=== STLport (64-bit Only) ===<br />
<ol><br />
<li>Decompress the file <tt>STLport-5.2.1.tar.gz</tt> to directory <tt><SDKHOME></tt></li><br />
<li>Open a Windows SDK prompt by choosing Start -> Programs -> Microsoft Windows SDK v6.1 -> CMD Shell</li><br />
<li>On the command prompt, enter the following command without any line breaks and press the Return/Enter key:<br/><br />
<pre><br />
setenv /Release /x64 /xp<br />
</pre><br />
It should now refresh and say<br />
<pre><br />
Setting SDK environment relative to <path where you installed the SDK><br />
Targeting Windows XP x64 RELEASE<br />
</pre></li><br />
<li>On the command prompt, change directory to <SDKHOME>\STLport-5.2.1<br/><br />
'''Example'''<br />
<pre><br />
C:\Program Files\Microsoft\Windows SDK\v6.1>d:<br />
<br />
D:>cd \usr\src\SDK\STLport-5.2.1<br />
<br />
D:\usr\src\SDK\STLport-5.2.1><br />
</pre></li><br />
<li>On the command prompt, enter the following commands without any line breaks and press the Return/Enter key:<br/><br />
<pre>configure msvc9 --with-static-rtl<br />
cd build/lib<br />
nmake clean install</pre><br />
</li><br />
<li>Close the Windows SDK command prompt window</li><br />
</ol><br />
<br />
'''Result'''<br />
<br />
The libraries reside in <tt><SDKHOME>\STLport-5.2.1\lib</tt><br />
<br />
=== lcms-1.18 (64-bit Only) ===<br />
<ol><br />
<li>Decompress the file <tt>lcms-1.18a.tar.gz</tt> to directory <tt><SDKHOME></tt></li><br />
<li>Apply the <tt>lcms-1.18.diff</tt> patch</li><br />
<li>Open the file <tt><SDKHOME>\lcms-1.18\Projects\VC2008\lcms.sln</tt></li><br />
<li>Select "Release" in the Solution Configuration pull-down menu. Select "x64" in the Solution Platform pull-down menu</li><br />
<li>Select project lcms in Solution Explorer, and then choose Build > Project Only > Build Only lcms</li><br />
<li>Close Visual Studio C++ 2008 Express Edition</li><br />
</ol><br />
<br />
'''Result'''<br />
<br />
The library resides in <tt><SDKHOME>\lcms-1.18\Lib\MS</tt><br />
<br />
{| class="wikitable" width="100%"<br />
|-<br />
! style="padding:5px; text-align:left" | Note<br />
|-<br />
| style="padding:5px; text-align:left" | During build process temporary object files are stored in following directories<br />
<ul><br />
<li><tt><SDKHOME>\lcms-1.18\Projects\VC2008\LibDebug</tt></li><br />
<li><tt><SDKHOME>\lcms-1.18\Projects\VC2008\LibRelease</tt></li><br />
</ul><br />
Both directories may be deleted to save disk space.<br />
|}<br />
<br />
=== libxmi-1.2.1 (64-bit Only) ===<br />
<ol><br />
<li>Open the file <tt>libxmi-1.2-1.src.zip</tt> in 7-Zip</li><br />
<li>Open the "src" folder by double-clicking</li><br />
<li>Open the "libxmi" folder by double-clicking</li><br />
<li>Open the "1.2" folder by double-clicking</li><br />
<li>Extract "libxmi-1.2" to the directory <tt><SDKHOME></tt></li><br />
<li>Apply the <tt>libxmi-1.2.diff</tt> patch</li><br />
</ol><br />
<br />
'''Result'''<br />
<br />
The libxmi-1.2 sources now reside in <tt><SDKHOME>\libxmi-1.2</tt><br />
=== wxWidgets ===<br />
<ol><br />
<li>Decompress the file <tt>wxMSW-2.8.10.zip</tt> to directory <tt><SDKHOME></tt></li><br />
<li>Rename the directory <tt><SDKHOME>\wxMSW-2.8.10</tt> to <tt><SDKHOME>\wxWidgets-2.8.10</tt></li><br />
<li>Apply the <tt>wxWidgets-2.8.10.diff</tt> patch [[Hugin SDK (MSVC 2008) Patches#wxWidgets]]</li><br />
<li><br />
{| class="wikitable" width="100%"<br />
|- valign="top"<br />
! style="padding:5px; text-align:left" width="50%" | 32-Bit Directions<br />
! style="padding:5px; text-align:left" | 64-Bit Directions<br />
|- valign="top"<br />
| style="padding:5px; text-align:left" | To open a Visual Studio command prompt choose Start > Programs > Microsoft Visual C++ 2008 Express Edition > Visual Studio Tools > Visual Studio 2008 Command Prompt<br />
| style="padding:5px; text-align:left" | <ol><br />
<li>Open a Windows SDK prompt by choosing Start -> Programs -> Microsoft Windows SDK v6.1 -> CMD Shell</li><br />
<li>On the command prompt, enter the following command without any line breaks and press the Return/Enter key:<br/><br />
<pre><br />
setenv /Release /x64 /xp<br />
</pre><br />
It should now refresh and say<br />
<pre><br />
Setting SDK environment relative to <path where you installed the SDK><br />
Targeting Windows XP x64 RELEASE<br />
</pre></li><br />
</ol><br />
|}</li><br />
<br />
<li>On command prompt change directory to <tt><SDKHOME>\wxWidgets-2.8.10\build\msw</tt><br/><br />
'''Example'''<br />
<pre><br />
C:\Program Files\Microsoft Visual Studio 9.0\VC>d:<br />
<br />
D:\>cd \usr\src\SDK\wxWidgets-2.8.10\build\msw<br />
<br />
D:\usr\src\SDK\wxWidgets-2.8.10\build\msw><br />
</pre><br />
</li><br />
<li>Enter each of the following two commands without any line break and press the Return key<br />
{| class="wikitable" <br />
|- valign="top"<br />
! style="padding:5px; text-align:left" | 32-Bit Directions<br />
! style="padding:5px; text-align:left" | 64-Bit Directions<br />
|- valign="top"<br />
| style="padding:5px; text-align:left" | <pre><br />
nmake -f makefile.vc BUILD=debug UNICODE=1 SHARED=0 USE_OPENGL=1 RUNTIME_LIBS=static<br />
nmake -f makefile.vc BUILD=release UNICODE=1 SHARED=0 USE_OPENGL=1 RUNTIME_LIBS=static<br />
</pre><br />
| style="padding:5px; text-align:left" | <pre><br />
nmake -f makefile.vc BUILD=debug TARGET_CPU=AMD64 UNICODE=1 SHARED=0 USE_OPENGL=1 RUNTIME_LIBS=static<br />
nmake -f makefile.vc BUILD=release TARGET_CPU=AMD64 UNICODE=1 SHARED=0 USE_OPENGL=1 RUNTIME_LIBS=static<br />
</pre><br />
|}<br />
</li><br />
<li>Close the Windows SDK command prompt window</li><br />
<li>(64-bit Only)Rename the folder <tt><SDKHOME>wxWidgets-2.8.10\lib\vc_amd64_lib</tt> to <tt><SDKHOME>wxWidgets-2.8.10\lib\vc_lib</tt></li><br />
</ol><br />
<br />
'''Result'''<br />
<br />
The include files reside in<br />
<tt><SDKHOME>\wxWidgets-2.8.10\include</tt> and its subdirectories<br />
<br />
Additional Hugin depends on following files<br />
<ul><br />
<li><tt><SDKHOME>\wxWidgets-2.8.10\src\jpg\*.h</tt></li><br />
<li><tt><SDKHOME>\wxWidgets-2.8.10\src\jpg\jconfig.vc</tt></li><br />
<li><tt><SDKHOME>\wxWidgets-2.8.10\src\png\*.h</tt></li><br />
<li><tt><SDKHOME>\wxWidgets-2.8.10\src\tiff\*.h</tt></li><br />
<li><tt><SDKHOME>\wxWidgets-2.8.10\src\zlib\*.h</tt></li><br />
</ul><br />
<br />
The libraries reside in<br />
<tt><SDKHOME>\wxWidgets-2.8.10\lib\vc_lib</tt><br />
<br />
{| class="wikitable"<br />
|-<br />
! style="padding:5px; text-align:left" | Note<br />
|-<br />
| style="padding:5px; text-align:left" | During build process temporary object files are stored in following directories<br />
{| class="wikitable" width="100%"<br />
|- valign="top"<br />
! style="padding:5px; text-align:left" | 32-Bit <br />
! style="padding:5px; text-align:left" | 64-Bit<br />
|- valign="top"<br />
| style="padding:5px; text-align:left" | <ul><br />
<li><tt><SDKHOME>\wxWidgets-2.8.10\build\msw\vc_mswu</tt></li><br />
<li><tt><SDKHOME>\wxWidgets-2.8.10\build\msw\vc_mswud</tt></li><br />
</ul><br />
| style="padding:5px; text-align:left" | <br />
<ul><br />
<li><tt><SDKHOME>\wxWidgets-2.8.10\build\msw\vc_mswu_amd64</tt></li><br />
<li><tt><SDKHOME>\wxWidgets-2.8.10\build\msw\vc_mswud_amd64</tt></li><br />
</ul><br />
|}<br />
Both directories may be deleted to save disk space.<br />
|}<br />
<br />
=== Boost ===<br />
<br />
<ol><br />
<li>Decompress the file <tt>boost_1_39_0.7z</tt> to directory <tt><SDKHOME></tt></li><br />
<li>Decompress the file <tt>boost-jam-3.1.17-1-ntx86.zip</tt> to an arbitrary directory and copy the application <tt>bjam.exe</tt> to <tt><SDKHOME>\boost_1_39_0</tt></li><br />
<li>To open a Windows command prompt choose Start > Run, then enter <tt>cmd.exe</tt> and click OK.</li><br />
<li>On command prompt change directory to <tt><SDKHOME>\boost_1_39_0</tt><br/><br />
'''Example'''<br />
<pre><br />
Microsoft Windows XP [Version 5.1.2600]<br />
(C) Copyright 1985-2001 Microsoft Corp.<br />
<br />
C:\Dokuments and Settings\Guido>d:<br />
<br />
D:\>cd \usr\src\SDK\boost_1_39_0<br />
<br />
D:\usr\src\SDK\boost_1_39_0><br />
</pre><br />
</li><br />
<li>Enter the following command without line breaks and press Return key<br/><br />
{| class="wikitable" <br />
|- valign="top"<br />
! style="padding:5px; text-align:left" | 32-Bit Directions<br />
! style="padding:5px; text-align:left" | 64-Bit Directions<br />
|- valign="top"<br />
| style="padding:5px; text-align:left" | <pre><br />
bjam --with-date_time --with-thread toolset=msvc variant=debug variant=release link=static threading=multi runtime-link=static stage<br />
</pre><br />
After <tt>bjam.exe</tt> finished a statement like the following should be printed in the command prompt window<br />
<pre><br />
...updated 56 targets...<br />
<br />
d:\usr\src\SDK\boost_1_39_0><br />
</pre><br />
<br />
Since September 2010 Hugin requieres also the boost libraries regex, filesystem, iostream and system, since November 2010 also the boost library signals. If you want to compile this version you need to compile Boost lib with <br />
<pre><br />
bjam --with-date_time --with-thread --with-regex --with-filesystem --with-iostreams --with-system --with-signals toolset=msvc variant=debug variant=release link=static threading=multi runtime-link=static stage<br />
</pre><br />
<br />
| style="padding:5px; text-align:left" | <pre><br />
bjam --with-date_time --with-thread toolset=msvc variant=debug variant=release link=static threading=multi runtime-link=static address-model=64 stage<br />
</pre><br />
After <tt>bjam.exe</tt> finished a statement like the following should be printed in the command prompt window<br />
<pre><br />
...updated 26 targets...<br />
</pre><br />
|}</li><br />
<br />
<li>Close the Windows command prompt window</li><br />
</ol><br />
<br />
'''Result'''<br />
<br />
The include files reside in<br />
<tt><SDKHOME>\boost_1_39_0</tt> and its subdirectory <tt>boost</tt><br />
<br />
The libraries reside in<br />
<tt><SDKHOME>\boost_1_39_0\stage\lib</tt><br />
<br />
{| class="wikitable" width="100%"<br />
|-<br />
! style="padding:5px; text-align:left" | Notes<br />
|-<br />
|<ul><br />
<li>During build process temporary files are generated in <tt><SDKHOME>\boost_1_39_0\bin.v2</tt>. This directory may be deleted to save disk space.<br />
</li><br />
<li>Hugin needs only the two Boost libraries <tt>date_time</tt> and <tt>thread</tt>, thus only these two libraries have to be built.<br/><br />
If you want to build all Boost libraries enter following command on the Windows command prompt instead of the command described above and press Return key.<br />
<pre><br />
bjam -–build-type=complete toolset=msvc stage<br />
</pre><br />
There are about 7GB disc space needed during build of all libraries (3.5GB for libraries and the same amount for the temporary files).<br />
</li><br />
<li>The Boost include files are typically included by a statement like<br/><br />
<tt>#include "boost/whatever.hpp"</tt><br/><br />
Therefore the base directory of the Boost include files is <tt><SDKHOME>\boost_1_39_0</tt><br />
</li><br />
<li>Only the following libraries are needed to build a release version of Hugin:<br />
<ul><br />
<li><tt>libboost_date_time-vc90-mt-s-1_39.lib</tt></li><br />
<li><tt>libboost_thread-vc90-mt-s-1_39.lib</tt></li><br />
</ul><br />
The files with "<tt>gd</tt>" in the filename, e.g. <tt>libboost_thread-vc90-mt-sgd-1_39.lib</tt>, are the debug libraries.<br />
The library files without "<tt>-1_39</tt>" suffix are automatically generated copies of the libraries with version suffix. They are used by CMake to detect the library directory.<br />
</li><br />
</ul><br />
|}<br />
<br />
=== OpenEXR ===<br />
<br />
OpenEXR depends on following SDK component:<br />
<ul><br />
<li>wxWidgets</li><br />
</ul><br />
Prepare this component before OpenEXR.<br />
<br />
<ol><br />
<li>Create the directory <tt><SDKHOME>\OpenEXR</tt></li><br />
<li>Decompress the file <tt>ilmbase-1.0.1.tar.gz</tt> to created directory <tt><SDKHOME>\OpenEXR</tt><br/><br />
<li>Decompress the file <tt>openexr-1.6.1.tar.gz</tt> to the same directory <tt><SDKHOME>\OpenEXR</tt><br/><br />
After decompress there should only exist the two directories <tt>ilmbase-1.0.1</tt> and <tt>openexr-1.6.1</tt> in <tt><SDKHOME>\OpenEXR</tt></li><br />
<li>Apply the <tt>OpenEXR.diff</tt> patch [[Hugin SDK (MSVC 2008) Patches#OpenEXR]]</li><br />
<li>Open solution file <tt><SDKHOME>\OpenEXR\ilmbase-1.0.1\vc\vc8\IlmBase\IlmBase.sln</tt></li><br />
<li>Select Debug in Solutions Configuration pull-down menu, and then choose Build > Build Solution</li><br />
<li>Select Release in Solutions Configuration pull-down menu, and then choose Build > Build Solution</li><br />
<li>Open solution file <tt><SDKHOME>\OpenEXR\openexr-1.6.1\vc\vc8\OpenEXR\OpenEXR.sln</tt></li><br />
<li>Choose Build > Batch Build</li><br />
<li>Select Build for Project IlmImf with Solution Config <br/><br />
{| class="wikitable" <br />
|- valign="top"<br />
! style="padding:5px; text-align:left" | 32-Bit<br />
! style="padding:5px; text-align:left" | 64-Bit<br />
|- valign="top"<br />
| style="padding:5px; text-align:left" | Solution Config: "Debug" with Platform: "Win32"<br/><br />
Solution Config: "Release" with Platform: "Win32"<br />
| style="padding:5px; text-align:left" | Solution Config: "Debug" with Platform: "x64"<br/><br />
Solution Config: "Release" with Platform: "x64"<br />
|}</li><br />
<li>Click Build</li><br />
<li>Close Visual C++ 2008 Express Edition</li><br />
</ol><br />
<br />
'''Result'''<br />
<br />
The include files reside in<br />
<tt><SDKHOME>\Deploy\include</tt><br />
<br />
The libraries reside in<br />
<tt><SDKHOME>\Deploy\lib\Debug</tt> and<br />
<tt><SDKHOME>\Deploy\lib\Release</tt><br />
<br />
=== Enblend and Enfuse ===<br />
{| class="wikitable" <br />
|- valign="top"<br />
! style="padding:5px; text-align:left" | 32-Bit Directions<br />
! style="padding:5px; text-align:left" | 64-Bit Directions<br />
|- valign="top"<br />
| style="padding:5px; text-align:left" | <ol><br />
<li>Decompress the file <tt>enblend-enfuse-3.2.zip</tt> to directory <tt><SDKHOME></tt></li><br />
</ol><br />
| style="padding:5px; text-align:left" | Enblend & Enfuse depend on the following SDK components:<br />
<ul><br />
<li>wxWidgets</li><br />
<li>OpenEXR</li><br />
<li>lcms</li><br />
<li>STLport</li><br />
<li>boost</li><br />
<li>libxmi</li><br />
</ul><br />
Prepare these components before Enblend & Enfuse.<br />
<br />
<ol><br />
<li>Decompress the file <tt>enblend-enfuse-3.2.tar.gz</tt> to directory <tt><SDKHOME></tt><br/><br />
After decompression, you should now have a folder <tt><SDKHOME>\enblend-enfuse-3.2</tt></li><br />
<li>Apply the <tt>enblend-enfuse-3.2.diff</tt> patch [[Hugin SDK (MSVC 2008) Patches#Enblend/Enfuse/libxmi]]</li><br />
<li>Open the file <tt><SDKHOME>\enblend-enfuse-3.2\enblend_msvc2008.sln</tt></li><br />
<li>Select Release in Solutions Configuration pull-down menu, choose x64 in the Solutions Platform pull-down menu, and then choose Build > Build Solution</li><br />
<li>Close Visual C++ 2008 Express Edition</li><br />
</ol><br />
|}<br />
'''Result'''<br />
<br />
The applications reside in <tt><SDKHOME>\enblend-enfuse-3.2</tt><br />
<br />
=== Expat ===<br />
<br />
<ol><br />
<li>Decompress the file <tt>expat-2.0.1.tar.gz</tt> to directory <tt><SDKHOME></tt></li><br />
<li>Apply the <tt>expat-2.0.1.diff</tt> patch [[Hugin SDK (MSVC 2008) Patches#expat]]</li><br />
<li>Open the file <tt><SDKHOME>\expat-2.0.1\Source\expat.sln</tt></li><br />
<li>Choose Build > Batch Build</li><br />
<li>Select Build for Project expat_static with <br/><br />
{| class="wikitable" <br />
|- valign="top"<br />
! style="padding:5px; text-align:left" | 32-Bit<br />
! style="padding:5px; text-align:left" | 64-Bit<br />
|- valign="top"<br />
| style="padding:5px; text-align:left" | Solution Config: "Debug" with Platform: "Win32"<br/><br />
Solution Config: "Release" with Platform: "Win32"<br />
| style="padding:5px; text-align:left" | Solution Config: "Debug" with Platform: "x64"<br/><br />
Solution Config: "Release" with Platform: "x64"<br />
|}</li><br />
<li>Click Build</li><br />
<li>Close Visual C++ 2008 Express Edition</li><br />
</ol><br />
<br />
'''Result'''<br />
<br />
The include files reside in<br />
<tt><SDKHOME>\expat-2.0.1\lib</tt><br />
<br />
The libraries reside in<br />
<tt><SDKHOME>\expat-2.0.1\win32\bin\Debug</tt> and<br />
<tt><SDKHOME>\expat-2.0.1\win32\bin\Release</tt><br />
<br />
=== Exiv2 ===<br />
<br />
Exiv2 depends on following SDK components:<br />
<ul><br />
<li>wxWidgets</li><br />
<li>GetText</li><br />
<li>Expat</li><br />
</ul><br />
Prepare these components before Exiv2.<br />
<br />
<ol><br />
<li>Decompress the file <tt>exiv2-0.18.1.tar.gz</tt> to directory <tt><SDKHOME></tt></li><br />
<li>Apply the <tt>exiv2-0.18.1.diff</tt> patch [[Hugin SDK (MSVC 2008) Patches#exiv2]]</li><br />
<li>(64-bit Only)Apply the <tt>exiv2-0.18.1.x64.diff</tt> patch</li><br />
<li>Open solution file <tt><SDKHOME>\exiv2-0.18.1\msvc\exiv2.sln</tt></li><br />
<li>In the Solution Explorer, select "exiv2lib"</li><br />
<li>Select Debug in Solutions Configuration pull-down menu and your platform in the Solution Platform pull-down menu, and then choose Build > Build exiv2lib</li><br />
<li>Select Release in Solutions Configuration pull-down menu and your platform in the Solution Platform pull-down menu, and then choose Build > Build exiv2lib</li><br />
<li>Close Visual C++ 2008 Express Edition</li><br />
<li>Create the directory <tt><SDKHOME>\exiv2-0.18.1\msvc\lib</tt></li><br />
<li>Copy the following files to this directory and rename them as specified in Destination column.<br />
<br />
{| class="wikitable"<br />
|- valign="top"<br />
! style="padding:5px; text-align:left" | Source<br />
! style="padding:5px; text-align:left" | Destination<br />
|-<br />
| style="padding:5px; text-align:left" | <tt><SDKHOME>\exiv2-0.18.1\msvc\bin\Debug\exiv2.lib</tt><br />
| style="padding:5px; text-align:left" | <tt><SDKHOME>\exiv2-0.18.1\msvc\lib\''exiv2d''.lib</tt><br />
|-<br />
| style="padding:5px; text-align:left" | <tt><SDKHOME>\exiv2-0.18.1\msvc\bin\Release\exiv2.lib</tt><br />
| style="padding:5px; text-align:left" | <tt><SDKHOME>\exiv2-0.18.1\msvc\lib\exiv2.lib</tt><br />
|-<br />
| style="padding:5px; text-align:left" | <tt><SDKHOME>\expat-2.0.1\win32\bin\Debug\libexpatMT.lib</tt><br />
| style="padding:5px; text-align:left" | <tt><SDKHOME>\exiv2-0.18.1\msvc\lib\''libexpatd''.lib</tt><br />
|-<br />
| style="padding:5px; text-align:left" | <tt><SDKHOME>\expat-2.0.1\win32\bin\Release\libexpatMT.lib</tt><br />
| style="padding:5px; text-align:left" | <tt><SDKHOME>\exiv2-0.18.1\msvc\lib\''libexpat''.lib</tt><br />
|}<br />
</li><br />
</ol><br />
<br />
'''Comment'''<br />
<br />
When using exiv2 0.19 (which works better with bigger files), copy and rename also the following files:<br />
<br />
{| class="wikitable"<br />
|- valign="top"<br />
! style="padding:5px; text-align:left" | Source<br />
! style="padding:5px; text-align:left" | Destination<br />
|-<br />
| style="padding:5px; text-align:left" | <tt><SDKHOME>\exiv2-0.19\msvc\xmpsdk\Debug\xmpsdk.lib</tt><br />
| style="padding:5px; text-align:left" | <tt><SDKHOME>\exiv2-0.19\msvc\lib\''xmpsdkd''.lib</tt><br />
|-<br />
| style="padding:5px; text-align:left" | <tt><SDKHOME>\exiv2-0.19\msvc\xmpsdk\Release\xmpsdk.lib</tt><br />
| style="padding:5px; text-align:left" | <tt><SDKHOME>\exiv2-0.19\msvc\lib\xmpsdk.lib</tt><br />
|}<br />
<br />
'''Result'''<br />
<br />
The include files reside in<br />
<tt><SDKHOME>\exiv2-0.18.1\msvc\include</tt><br />
<br />
The libraries reside in<br />
<tt><SDKHOME>\exiv2-0.18.1\msvc\lib</tt><br />
<br />
=== GLEW ===<br />
<br />
<ol><br />
<li>Decompress the file <tt>glew-1.5.1-src.zip</tt> to directory <tt><SDKHOME></tt></li><br />
<li>Apply the <tt>glew.diff</tt> patch [[Hugin SDK (MSVC 2008) Patches#glew]]</li><br />
<li>Open the file <tt><SDKHOME>\glew\build\vc6\glew.sln</tt></li><br />
<li>Choose Build > Batch Build</li><br />
<li>Select Build for Project glew_static with Solution Config <br/><br />
{| class="wikitable" <br />
|- valign="top"<br />
! style="padding:5px; text-align:left" | 32-Bit<br />
! style="padding:5px; text-align:left" | 64-Bit<br />
|- valign="top"<br />
| style="padding:5px; text-align:left" | Solution Config: "Debug" with Platform: "Win32"<br/><br />
Solution Config: "Release" with Platform: "Win32"<br />
| style="padding:5px; text-align:left" | Solution Config: "Debug" with Platform: "x64"<br/><br />
Solution Config: "Release" with Platform: "x64"<br />
|}</li><br />
<li>Click Build</li><br />
<li>Close Visual C++ 2008 Express Edition</li><br />
</ol><br />
<br />
'''Result'''<br />
<br />
The include files reside in<br />
<tt><SDKHOME>\glew\include</tt><br />
<br />
The libraries reside in<br />
<tt><SDKHOME>\glew\lib</tt><br />
<br />
{| class="wikitable" width="100%"<br />
|-<br />
! style="padding:5px; text-align:left" | Note<br />
|-<br />
| style="padding:5px; text-align:left" | The GLEW include files are typically included by a statement like<br/><tt>#include "GL/glew.h"</tt><br/>Therefore the base directory of the GLEW include files is <tt><SDKHOME>\glew\include</tt><br />
|}<br />
<br />
=== Panorama Tools ===<br />
<br />
Panorama Tools depends on following SDK component:<br />
<ul><br />
<li>wxWidgets</li><br />
</ul><br />
Prepare this component before Panoroma Tools.<br />
<br />
<ol><br />
<li>Set two windows environment variables:<br />
<ul><br />
<li>Set variable <tt>WXWIDGETS_HOME</tt> to wxWidgets base folder <tt><SDKHOME>\wxWidgets-2.8.10</tt></li><br />
<li>Set variable <tt>JDK_HOME</tt> to Java SE Development Kit's destination directory name. This directory name was shown during the setup, e.g. <tt>C:\Program Files\Java\jdk1.6.0_13</tt></li><br />
</ul><br />
To take effect on changes of environment variables you may have to logout and login.<br />
</li><br />
<li>Create the directory <tt><SDKHOME>\libpano\pano13</tt></li><br />
<li>In explorer right-click on created directory <tt><SDKHOME>\libpano\pano13</tt></li>, and then choose SVN Checkout from the shortcut menu. The Checkout dialog appears.</li><br />
<li>In "URL of repository" field enter following address:<br />
<pre><br />
https://panotools.svn.sourceforge.net/svnroot/panotools/trunk/libpano<br />
</pre><br />
</li><br />
<li>Click OK</li><br />
<li>After checkout has finished click OK</li><br />
<li>Apply the <tt>libpano.diff</tt> patch [[Hugin SDK (MSVC 2008) Patches#Panorama Tools]]</li><br />
<li>Open solution file <tt><SDKHOME>\libpano\pano13\libpano.sln</tt></li><br />
<li>Select your platform in the Solution Platform pull-down menu</li><br />
<li>Select "Debug LIB CMD" in Solution Configuration pull-down menu</li><br />
<li>Select project pano13 in Solution Explorer, and then choose Build > Project Only > Build Only pano13</li><br />
<li>Select "Release LIB CMD" in Solution Configuration pull-down menu, and then choose Build > Build Solution</li><br />
<li>Close Visual C++ 2008 Express Edition</li><br />
</ol><br />
<br />
'''Result'''<br />
<br />
The applications reside in<br />
<tt><SDKHOME>\libpano\pano13\tools\Release</tt><br />
<br />
The include files reside in<br />
<tt><SDKHOME>\libpano\pano13</tt><br />
<br />
The libraries reside in<br />
"<tt><SDKHOME>\libpano\pano13\Debug LIB CMD</tt>" and <br />
"<tt><SDKHOME>\libpano\pano13\Release LIB CMD</tt>"<br />
<br />
{| class="wikitable" width="100%"<br />
|- valign="top"<br />
! style="padding:5px; text-align:left" | Note<br />
|- valign="top"<br />
| style="padding:5px; text-align:left" | The applications have to be built in release version only. Therefore only pano13 library has to be built in Debug configuration.<br />
|}<br />
<br />
=== libxml2 ===<br />
<br />
<ol><br />
<li>Decompress the file <tt>libxml2-sources-2.7.3.tar.gz</tt> to directory <tt><SDKHOME></tt></li><br />
<li><br />
{| class="wikitable" <br />
|- valign="top"<br />
! style="padding:5px; text-align:left" | 32-Bit Directions<br />
! style="padding:5px; text-align:left" | 64-Bit Directions<br />
|- valign="top"<br />
| style="padding:5px; text-align:left" | <ol><li>To open a Visual Studio command prompt choose Start > Programs > Microsoft Visual C++ 2008 Express Edition > Visual Studio Tools > Visual Studio 2008 Command Prompt</li></ol><br />
| style="padding: 5px; text-align:left" | <ol><br />
<li>Open a Windows SDK prompt by choosing Start -> Programs -> Microsoft Windows SDK v6.1 -> CMD Shell</li><br />
<li>On the command prompt, enter the following command without any line breaks and press the Return/Enter key:<br/><br />
<pre><br />
setenv /Release /x64 /xp<br />
</pre><br />
It should now refresh and say<br />
<pre><br />
Setting SDK environment relative to <path where you installed the SDK><br />
Targeting Windows XP x64 RELEASE<br />
</pre></li><br />
</ol><br />
|}<br />
</li><br />
<br />
<li>On command prompt change directory to <tt><SDKHOME>\libxml2-2.7.3\win32</tt><br/><br />
'''Example'''<br />
<pre><br />
Setting environment for using Microsoft Visual Studio 2008 x86 tools.<br />
<br />
C:\Program Files\Microsoft Visual Studio 9.0\VC>d:<br />
<br />
D:\>cd \usr\src\SDK\libxml2-2.7.3\win32 <br />
<br />
D:\usr\src\SDK\libxml2-2.7.3\win32><br />
</pre><br />
<br />
<li>Enter each of the following two commands without any line break and press the Return key.<br />
<pre><br />
cscript configure.js ftp=no http=no iconv=no cruntime=/MT<br />
nmake -f makefile.msvc libxmla<br />
</pre><br />
</li><br />
</ol><br />
<br />
'''Result'''<br />
<br />
The include files reside in<br />
<tt><SDKHOME>\libxml2-2.7.3\include</tt><br />
<br />
The libraries reside in<br />
<tt><SDKHOME>\libxml2-2.7.3\win32\bin.msvc</tt><br />
<br />
{| class="wikitable" width="100%"<br />
|-<br />
! style="padding:5px; text-align:left" | Notes<br />
|-<br />
| style="padding:5px; text-align:left" | <ul><br />
<li>During build process temporary object files are generated in directory<br />
<tt><SDKHOME>\libxml2-2.7.3\win32\int.a.msvc</tt>.<br />
This directories may be deleted to save disc space.</li><br />
<li>Hugin does not depend on libxml2 library, but autopano-sift-C. Therefore it is included in this SDK.</li><br />
</ul><br />
|}<br />
<br />
=== autopano-sift-C ===<br />
<br />
Autopano-SIFT-C depends on following SDK components:<br />
<ul><br />
<li>libxml2</li><br />
<li>Panorama Tool's pano13 library</li><br />
<li>wxWidgets</li><br />
</ul><br />
Prepare these components before Autopano-SIFT-C.<br />
<br />
<ol><br />
<li>Create the directory <tt><SDKHOME>\autopano-sift-C-trunk</tt></li><br />
<li>In explorer right-click on created directory <tt><SDKHOME>\autopano-sift-C-trunk</tt>, and then choose SVN Checkout from the shortcut menu. The Checkout dialog appears.</li><br />
<li>In "URL of repository" field enter following address:<br />
<pre><br />
https://hugin.svn.sourceforge.net/svnroot/hugin/autopano-sift-C/trunk<br />
</pre><br />
</li><br />
<li>Click OK</li><br />
<li>After checkout has finished click OK</li><br />
<li>Start CMake (cmake-gui). The CMake dialog appears.</li><br />
<li>In "Where is the source code" field enter<br />
<pre><br />
<SDKHOME>\autopano-sift-C-trunk<br />
</pre><br />
Alternatively click Browse Source to point to this directory</li><br />
<li>In "Where to build the binaries" field enter<br />
<pre><br />
<SDKHOME>\autopano-sift-C<br />
</pre><br />
</li><br />
<li>Click Configure<br/><br />
If a dialog appears, which asks to create the build directoy, click Yes.<br/><br />
A dialog appears, where you can specify the generator for the project.</li><br />
<li><br />
{| class="wikitable" <br />
|- valign="top"<br />
! style="padding:5px; text-align:left" | 32-Bit Directions<br />
! style="padding:5px; text-align:left" | 64-Bit Directions<br />
|- valign="top"<br />
| style="padding:5px; text-align:left" | Select "Visual Studio 9 2008" and select option "Use default native compilers"<br />
| style="padding:5px; text-align:left" | Select "Visual Studio 9 2008 Win64" and select option "Use default native compilers"<br />
|}</li><br />
<li>Click Finish<br/><br />
In the Name and Value list the entries are shown with red background.</li><br />
<li>Click Configure</li><br />
<li>Click Generate</li><br />
<li>Close CMake</li><br />
<li>Open solution file <tt><SDKHOME>\autopano-sift-C\autopano-sift-C.sln</tt></li><br />
<li>Select Release in Solution Configuration pull-down menu, and then choose Build > Build Solution</li><br />
<li>Select project INSTALL in Solution Explorer, and then choose Build > Project Only > Build Only INSTALL</li><br />
<li>Close Visual C++ 2008 Express Edition</li><br />
<li><br />
Copy the directories <tt>bin</tt> and <tt>shared</tt> from <tt><SDKHOME>\autopano-sift-C\INSTALL\FILES</tt> to <tt><SDKHOME>\autopano-sift-C</tt></li><br />
</ol><br />
<br />
'''Result'''<br />
<br />
The applications reside in<br />
<tt><SDKHOME>\autopano-sift-C\bin</tt><br />
<br />
The manual pages reside in<br />
<tt><SDKHOME>\autopano-sift-C\shared</tt><br />
<br />
{| class="wikitable" width="100%"<br />
|- valign="top"<br />
! style="padding:5px; text-align:left" | Note<br />
|- valign="top"<br />
| style="padding:5px; text-align:left" | To save disk space you may delete all files and directories in <tt><SDKHOME>\autopano-sift-C</tt>, except the subdirectories <tt>bin</tt> and <tt>shared</tt>.<br />
|}<br />
<br />
=== Freeglut ===<br />
<ol><br />
<li>Decompress the file <tt>freeglut-2.6.0.tar.gz</tt> to directory <tt><SDKHOME></tt></li><br />
<li>Open the file <tt><SDKHOME>\freeglut-2.6.0\VisualStudio2008Static\freeglut.sln</tt></li><br />
<li>Select "Debug" in the Solution Configuration pull-down menu. </li><br />
<li>Select project freeglut in Solution Explorer, and then choose Build > Project Only > Build Only freeglut</li><br />
<li>Select "Release" in the Solution Configuration pull-down menu. </li><br />
<li>Select project freeglut in Solution Explorer, and then choose Build > Project Only > Build Only freeglut</li><br />
<li>Close Visual Studio C++ 2008 Express Edition</li><br />
</ol><br />
<br />
'''Result'''<br />
<br />
The library resides in <tt><SDKHOME>\freeglut-2.6.0\VisualStudio2008Static\Debug</tt> and <tt><SDKHOME>\freeglut-2.6.0\VisualStudio2008Static\Release</tt><br />
<br />
=== GNU Make ===<br />
<ol><br />
<li>Decompress the file <tt>make-3.81.tar.gz</tt> to directory <tt><SDKHOME></tt></li><br />
<li>Open the file <tt><SDKHOME>\make-3.81\make_msvc_net2003.sln</tt> (Confirm convertion.)</li> <br />
<li>Select "Release" in the Solution Configuration pull-down menu. </li><br />
<li>Select project make_msvc.net2003 Solution Explorer, and then choose Build > Project</li><br />
<li>Close Visual Studio C++ 2008 Express Edition</li><br />
<li>Rename the file <tt><SDKHOME>\make-3.81\Release\make_msvc.net2003.exe</tt> to <tt><SDKHOME>\make-3.81\Release\make.exe</tt><br />
</ol><br />
<br />
'''Result'''<br />
<br />
The executable make.exe resides in <tt><SDKHOME>\make-3.81\Release\</tt><br />
<br />
(All other files in this directory can be deleted to save space.)<br />
<br />
=== Templatized C++ Command Line Parser Library (tclap) ===<br />
<br />
<ol><br />
<li>Decompress the file <tt>tclap-1.2.0.tar.gz</tt> to directory <tt><SDKHOME>\tclap-1.2.0</tt></li><br />
</ol><br />
<br />
'''Result'''<br />
<br />
The include files reside in<br />
<tt><SDKHOME>\tclap-1.2.0\include\tclap</tt><br />
<br />
<br />
[[User:Ryansleevi|Ryan Sleevi]] 17:00, 9 May 2009 (UTC)<br />
<br />
[[Category:Software:Hugin]]<br />
[[Category:Software:Hugin:Compiling]]<br />
[[Category:Software:Platform:Windows]]</div>Onomouhttps://wiki.panotools.org/index.php?title=Category:Software:Hugin:Compiling&diff=13652Category:Software:Hugin:Compiling2011-07-14T20:48:53Z<p>Onomou: Add hugin link</p>
<hr />
<div>This page contains all pages dealing with compiling Hugin. If you find a relevant page that is not listed here, feel free to add<br />
<br />
<nowiki>[[Category:Software:Hugin:Compiling]]</nowiki><br />
<br />
at the end of the page.<br />
<br />
[[Category:Software:Hugin]]</div>Onomouhttps://wiki.panotools.org/index.php?title=Category:Software:Hugin:Compiling&diff=13651Category:Software:Hugin:Compiling2011-07-14T20:46:38Z<p>Onomou: Add Compiling category</p>
<hr />
<div>This page contains all pages dealing with compiling Hugin. If you find a relevant page that is not listed here, feel free to add<br />
<br />
<nowiki>[[Category:Software:Hugin:Compiling]]</nowiki><br />
<br />
at the end of the page.</div>Onomouhttps://wiki.panotools.org/index.php?title=Hugin_Compiling_Windows_with_SDK&diff=13650Hugin Compiling Windows with SDK2011-07-14T20:45:35Z<p>Onomou: Change compiling category</p>
<hr />
<div>This article gives step-by-step instructions for building hugin from a source code snapshot using Visual C++ 2008 Express Edition and precompiled dependencies. That is the recommended way to build Hugin for Windows. Once you are proficient with this, you can venture in the more complex replacement of individual SDK component up until building from scratch. It also shows how to build enblend-enfuse, which hugin requires, with the same tools.<br />
<br />
Bear in mind that a source snapshot of hugin is a transient stage in an incomplete and rapidly evolving package, so may have a short useful life, and will contain bugs and defects. Your main purpose in building one should be to help find, report, and maybe correct some of those. <br />
<br />
== Background ==<br />
<br />
The hugin build is based on cmake, a cross platform makefile generator. On Windows, cmake can generate project files for various Microsoft Visual Studio toolsets, from the same specifications it uses to create makefiles on other platforms.<br />
<br />
There is an ongoing community effort to publish an SDK (Software Development Kit) containing all the support components needed to build hugin and enblend (and AutoPano-SIFT-C) on Windows. Pablo started the publication of SDKs two years ago. His last SDK only works for SVN revisions prior to '''3479''' because of new dependencies introduced with the Fast Preview project during Google Summer of Code 2008. For later revisions, the updated SDK is available [[Hugin_SDK_(MSVC_2008)|here]] . The current SDK works only for Microsoft Visual C++ 2008 Express. This has introduced problems with non-Latin characters in filenames. The old SDK was also built for Visual C++ 2003.<br />
<br />
You can install VC 2008 Express beside other Microsoft compiler versions, even professional ones, without damaging either toolset. <br />
<br />
The enblend source tree has projects for building with both the 2003 and 2008 tools (also 2005 but there is no sdk for that).<br />
<br />
The following instructions are for starting from scratch on a Windows PC without any software building tools installed. If you already have some of these things installed, you will need to take care that the right tools and components are used. It is vitally important that all object code is generated by the same compiler version and targeted to the same VC runtime library.<br />
<br />
The recommended Tortoise archive clients work through the Windows File Explorer: right-click a target directory and follow the popup menus.<br />
<br />
== Get Tools ==<br />
<br />
1) install [http://www.microsoft.com/express/download/ Visual C++ 2008 Express] -- Service Pack 1 recommended<br />
<br />
2) install [http://www.cmake.org/HTML/Download.html cmake] -- latest release recommended 2.6.4 is known to work<br />
<br />
3) install [http://tortoisesvn.net/downloads Tortoise SVN] and [http://bitbucket.org/tortoisehg/stable/downloads/ TortoiseHG] clients -- latest release recommended as the repositories are often upgraded in sync with the clients. If you know what you are doing, you may also want to install [http://bazaar-vcs.org/TortoiseBzr TortoiseBZR]<br />
<br />
3) Obtain [http://www.xmission.com/~nate/glut.html].<br />
<br />
== Get hugin SDK ==<br />
<br />
4) download the precompiled [http://hugin.panotools.org/sdk/MSVC/Hugin-SDK-20090509-win32.exe SDK] unpack it into new directory huginbase with winrar or 7zip.<br />
<br />
The SDK currently is outdated (January 2011). But for starting to compile Hugin for Windows it is a good start. Start with the provided SDK and see [[Hugin SDK (MSVC 2008)]] for details to get an up-to-date build environment.<br />
<br />
== Build enblend ==<br />
<br />
5) check out enblend source tree into huginbase. Create a folder huginbase/enblend. Right click on enblend in Windows Explorer and select "TortoiseHg..." from the context menu. Enter the following incantation into the Source Path field, make sure huginbase/enblend is in the Destination Path field and click Clone. <br />
<br />
<pre><br />
http://enblend.hg.sourceforge.net:8000/hgroot/enblend/enblend <br />
</pre><br />
<br />
The result should be a new directory, huginbase/enblend, containing the source tree.<br />
<br />
6) open huginbase/enblend/enblend_msvc2008.sln with Visual Studio 2008 Express. Change the target configuration to 'release' (build menu, configuration manager). Click build solution. After it completes, copy enblend/INSTALLDIR into huginbase/enblend-3.1/. The hugin install script expects this directory.<br />
<br />
If the compilation failed, the SDK is probably not synchronized with the source code. To find the cause, in MSDev, in the solution explorer, right click on the enblend project-> Properties. There, follow Configuration Properties -> C/C++ -> General. On the first line is additional include directories. Click on it, and expand the window it just opened. The list of folder starting by ..\..\XXX means that XXX is expected in the huginbase folder. Compare the list here with the folders in hugin base. Change the folders required and\or download and add the missing packages<br />
<br />
Current list of broken links between enblend and SDK:<br />
<br />
WARNING -> This section is a work in progress. Until finished, you may break something by following this.<br />
<br />
* LCMS required but not part of SDK -> <br />
** Download version 1.18 [http://www.littlecms.com/downloads.htm here] and unzip in huginbase folder<br />
** Change the dependency to point to 1.18<br />
** inside lcms-1.18 there is a Projects folder. Select the MSVC2008 project. Start it.<br />
** in the configuration manager, select to build lcms only. You do not need the other tools (that will raise an error because they don't find some dependencies)<br />
* SDK comes with wxMSW-2.8.10 but enblend expects versio 2.8.7 -> in MSDev in the additional DLL menu, change all paths to wxMSW-2.8.10 (don't forget, not only the version is different, the folder name is too) - do the same for enblend and enfuse projects<br />
* SDK provides tiff in wxMSW-2.8.10 while enblend searches in tiff-3.8.2 -> change that include for ..\..\..\wxWidgets-2.8.10\src\tiff - do the same for enblend and enfuse projects <br />
* SDK provides boost 1.39.0 and enblend expects trunk -> in MSDev in the additional DLL menu, change all paths from boost_trunk to boost_1_39_0 - do the same for enblend and enfuse projects<br />
* In the enfuse property window -> Linker -> General -> Additional Library Directories, change the path for wxWidgets for the new one. Also change the folder for lcms. Do these 2 actions on the enblend project<br />
* In the enfuse property window -> Linker -> Input-> Additional Dependencies, change tifflib for wxtiff.lib. Do the same for enblend<br />
<br />
<br />
<br />
== Build hugin ==<br />
<br />
7) check out hugin source tree into huginbase. Make a new folder called hugin inside huginbase. Right click on huginbase/hugin in Windows Explorer, select "TortoiseHg, Clone...", enter this source URL, set Destination path to "hugin" and click OK.<br />
http://hugin.hg.sourceforge.net:8000/hgroot/hugin/hugin<br />
<br />
The result should be a new directory, huginbase/hugin, containing the source tree. <br />
<br />
8) Start the cmake gui (cmakesetup.exe). <br />
<br />
Workaround: To ensure that the environment is set right, run cmakesetup.exe from the VC 2008 command shell (available under the Windows Start Menu) - essential if you have other compilers installed. You might want to create a desktop shortcut that does this with one click. (This should not be necessary if you installed Visual C++ correctly.)<br />
<br />
Set cmake's source code directory to huginbase/hugin and its build directory to huginbase/hugin-build (this will create a new directory for the build). Click Configure and tell it to use Visual C++ 2008. Cmake then checks the build tools and if that goes well does the first round of searching for components. When done it displays a list of configuration variable settings, on a red background. Click "Show Advanced Values" to display all of them.<br />
<br />
This is when you get to correct anything that needs correcting. <br />
<br />
Next, check that all component pathnames start at huginbase. Cmake may have found some things installed in standard places on your system; but it should only be using the ones in the sdk. To correct a pathname, click on it and either type in the right one or click '...' to pop a fileselector. Look out for values with "_NOT_FOUND" in them; these may indicate problems with your directory names or structure. You will need to set ENBLEND_EXE_DIR to huginbase/enblend-3.1/INSTALLDIR that that was created when you built enblend. Also, you need to set HUGIN_BUILDER and HUGIN_BUILDATE -- this is you name and date of the build that will appear on application splash screen.<br />
<br />
When you are satisfied the paths are right, click Configure again, and Cmake will try to validate the variables. That might set some new ones, which will appear in red. Recheck all values, even the grey ones. If a variable keeps coming up wrong try deleting it from cache (right click on name pops menu) and configure again; this is often necessary to trigger a new search. Keep fixing and clicking Configure until everything is OK. Then click OK to generate the project files.<br />
<br />
9) Open hugin.sln in the build directory with Visual Studio 2008 Express and wait while it loads and checks all the projects. Then select a target configuration and click "build solution". After a long time, and many warnings, you should get a successful build.<br />
<br />
10) Build the INSTALL project. This should put a complete hugin installation in huginbase/hugin-build/INSTALL/FILES.<br />
<br />
NOTE any missing file stops the install script, leaving the installation more or less incomplete. If this happens, first look at the install scripts, cmake_install.cmake (several places in the hugin-build tree) to identify all the files that were not found (paths with "_NOT_FOUND" in them). If you can find all of them, put them where the install script expects them -- hugin/cmakemodules/winbundle.cmake will help indentify those places. You can't just build INSTALL again, because the files are searched for at configuration time, so the install scripts will still contain invalid pathnames until you run cmakesetup again. Exit Visual Studio first, since all project files must be rebuilt. It may be necessary to delete pathnames of the failed places (such as enblend-3.1) from cache to ensure everything gets regenerated. Then Configure, OK, open the new hugin.sln and build INSTALL.<br />
<br />
== Updating the hugin build ==<br />
<br />
To update your source tree to to the latest revision, right click on huginbase/hugin in Windows Explorer and select "TortoiseHg/Synchronize". Set "Post Pull" drop down box to "Update", then select Pull. This will pull all new changeset from central repository and update your working copy to current default tip.<br />
<br />
Check if there is a new release of the sdk, and if so, download and install it.<br />
<br />
Then you have to run cmakesetup again. Proceed as in 8) above, but click "Delete Cache" before "Configure", so that the new configuration gets built from scratch.<br />
<br />
Remember to "Clean" or "Rebuild" the entire solution in MSVC.<br />
<br />
== Installing hugin on Windows ==<br />
<br />
Directory hugin-build/INSTALL/FILES contains a complete, self-contained hugin installation. You can use this as is, or copy it to a directory of your choice if you wish to delete the build tree (it is a good idea to put the the SVN version number in the name of that directory. e.g. FILES becomes "hugin_0.7.0.2766"). You should create a shortcut to hugin.exe on your desktop (note you can start new projects by dragging and dropping groups of files on the shortcut). You may also want to associate the new hugin.exe with the hugin project file (.pto) file extension. <br />
<br />
This way of installing can be undone simply by deleting the files. It will not break any other hugin installation that may be on your system. However, note that all instances of hugin do share the same persistent settings, so options you set in one version will affect the others, too.<br />
<br />
The source tree and sdk contain support for building Windows Installer (.msi) packages with War Setup and/or Innosetup. At present these are under development and could potentially damage your Registry and/or prior installations of hugin, so I would advise not using them until a stable release is issued.<br />
<br />
The hugin team periodically publishes "snapshot" builds for testing. The Windows versions of these come in two forms, as a self-installing archive that automates the simple "copy files" method described above, and as a Windows Installer package.<br />
<br />
== Some things that don't work ==<br />
<br />
Trying to target the dll versions of the Visual C runtimes. Only the static C libraries (libcmt, libcmtd) will do. You can't mix static and dll runtimes, so all (static) dependencies must also have been compiled with /MT or /MTd. While it might be possible to use dll versions of some of the support libraries, such as tiff or OpenEXR, it is safest to keep a strict policy of "static libraries only".<br />
<br />
Trying to use dependencies built with a different compiler. For all practical purposes, Microsoft runtime libraries are now usable with only one compiler version. Although linking code built with more than one compiler sometimes seems to work, the resulting program is likely to fail.<br />
<br />
Trying to link Boost libraries of a different source version than the Boost headers. Boost takes some trouble to lock object code to source version as well as compiler version, so it is rarely possible (and always a mistake) to do this.<br />
<br />
Occasionally a build step fails mysteriously, that has succeeded before. The main cause of this is a file being marked in the Windows filesystem as in use when a tool tries to open it. On a slow, heavily loaded machine, the filesystem may not update a closed file's status quickly enough -- solution: reduce the load. On any machine, Google Desktop Search (or other automatic indexer) may grab a recently updated file and really have it open -- solution: pause or disable indexing and retry the build step.<br />
<br />
<small>--[[User:Tksharpless|Tksharpless]] 16:42, 23 January 2008 (CET)</small><br />
<br />
[[Category:Software:Platform:Windows]]<br />
[[Category:Software:Hugin]]<br />
[[Category:Software:Hugin:Compiling]]</div>Onomouhttps://wiki.panotools.org/index.php?title=Hugin_Compiling_Windows&diff=13649Hugin Compiling Windows2011-07-14T20:45:20Z<p>Onomou: Change compiling category</p>
<hr />
<div>{| style="margin: 1em auto 1em 1em;background:#FFFF99;color:#FF0000;text-align:left;border: solid #FF3300;"<br />
|-valign="top"<br />
! '''NOTE:'''<br />
! This is work in progress and not finished yet. And as hugin progresses with the introduction of new dependencies this page becomes more outdated than ever. If you are new to building hugin, try first with [[Build_Hugin_for_Windows_with_SDK|this]] method. If you know what you are doing, keep reading / following this instructions and feel free to update them.<br />
|}<br />
<br />
Since mid January 2008, building hugin for Windows has been easier than this page might lead you to expect. The cmake build configuration and control system has become fully functional, and a complete set of precompiled dependencies (the ''Hugin SDK'') is available. There are step-by-step instructions here: [[Build Hugin for Windows with SDK]].<br />
<br />
= Why do I want to compile hugin? =<br />
<br />
If you want to fiddle with the hugin code, add new features or help squashing bugs, and do all that on Windows, this is the guide for you. Be warned that building hugin on Windows is not a piece of cake, so only try if you know the dark sides with all the development tools involved.<br />
<br />
For normal testing purpose it is better to use the occasional binary snapshot. For first-time builders it is better to use the SDK-based [[Build Hugin for Windows with SDK|instructions]].<br />
<br />
This guide is designed to be a help for people who have expressed interest in understanding the depth of building Windows version of the current hugin code on a regular basis.<br />
<br />
This guide will describe two ways of building the latest trunk. It does not apply to the hugin code prior to 2007/10/27.<br />
<br />
= Deciding on the toolchain =<br />
<br />
Currently, there are two methods for building hugin. Both are based on the CMake build system.<br />
<br />
# Compilation with Microsoft Visual Studio .NET. MSVC 2003 or 2008 is required. The recommended method is to download [http://www.microsoft.com/express/vc/ Microsoft Visual C++ 2008 Express Edition], and install it. For convenience a ''Hugin SDK'' with precompiled libraries for MSVC 2008 is provided. It is recommended to use these initially, rather than to compile your own libraries. There are detailed instructions at [[Build Hugin for Windows with SDK]]. Once you are familiar and comfortable with the process described there, you can move in to replace the precompiled libraries with your own self-built ones, step by step.<br />
# Compilation with MinGW32. This does not require the Microsoft compiler and even allows cross compilation of binaries for windows on a linux machine. Until now, only the cross compilation approach has been tried, but a building on a native system should also be possible.<br />
<br />
The following additional programs are also required for building a hugin installer package:<br />
<br />
# [http://www.cmake.org CMake] Note that Microsoft Visual C++ 2008 Express Edition is not supported by CMake 2.4. [http://www.cmake.org/HTML/Download.html Download] a recent Windows binary of CMake. These instructions were written at a time that only a recent CVS snapshot of CMake worked with this method. It is likely that CMake 2.6.x works as well, but it has not been tested.<br />
# [http://enblend.sf.net enblend 3.2]<br />
# [http://sf.net/projects/unxutils GNU make], required by hugin, not for building hugin. (included in ''Hugin SDK'')<br />
# GNU gettext. (included in ''Hugin SDK'')<br />
# Moreover, for packgaging the installer you will need [http://www.jrsoftware.org/isinfo.php Innosetup]. Instructions for this are in the Hugin repository.<br />
<br />
<br />
For both MSVC and MinGW32 approaches, the hardest task is the compilation of the libraries required by hugin. This mainly includes wxWidgets, boost, libpano13 and OpenEXR.<br />
<br />
= Building with Microsoft Visual C++ 2008 Express Edition =<br />
<br />
This also works with earlier version from 2003 onwards. However, you will need to compile the dependencies from scratch. For simpler installation (and less headaches during building) everything is built against the older, multithreaded runtime libraries (\MT option), and linked all executables statically.<br />
<br />
== Getting the dependencies ==<br />
<br />
It is tempting to download precompiled libraries from the different projects, and use those. Be prepared that they might have been created with different compiler setting (Especially with a different runtime libraries). This can lead to hard to find and nasty problems and amount to days of depressing work.<br />
<br />
=== Downloading precompiled dependencies ===<br />
<br />
This is the recommended approach.<br />
<br />
Download the [http://hugin.panotools.org/sdk/MSVC/hugin_enblend_sdk_msvc2008_v2.7z ''Hugin SDK'']. and unzip it into a directory of your choice. '''src''' is used in this document. Continue with [[#Building Hugin]].<br />
<br />
=== Build all required dependencies from scratch ===<br />
<br />
Download the source packages. Newer versions might work, too.<br />
<br />
# Download wxWidgets from http://www.wxwidgets.org, 2.8.4 were used to write this guide and it has been last tested to work with 2.8.9, but later version should work, too<br />
# Download boost from http://www.boost.org, I used 1.34_1<br />
# Download OpenEXR source (IlmBase and OpenEXR) from http://www.openexr.com/<br />
# Download panorama tools source (pano13), from http://panotools.sf.net. Use version 2.9.12 or later. Latest SVN is even better.<br />
# Download and install gettext installer package from http://gnuwin32.sf.net<br />
<br />
Unpack the source packages.<br />
<br />
==== Building wxWidgets ====<br />
<br />
NOTE: this will only work for hugin SVN revisions prior to 8-Oct-2008. TODO: describe how to activate the OpenGL canvas.<br />
<br />
1. Open libs/wxWidgets/src/tiff/tiffconf.h in your favorite editor, and add<br />
<br />
#define ZIP_SUPPORT<br />
<br />
near line 90 to support ZIP compressed tiff files (update: wxWidgets ships with an ancient version of libtiff, so LZW will still be disabled. The ''Hugin SDK'' additionally contains libtiff 3.8.2). To avoid nasty popup messages with the<br />
command line tools we are going to build, additionally add:<br />
<br />
#define TIF_PLATFORM_CONSOLE<br />
<br />
2. build wxWidgets: start the MSVC command line shell (from the startmenu) and cd to the wxWidgets/build/msw. To build Unicode debug release libraries, execute the following commands:<br />
<br />
cd wxWidgets*/build/msw<br />
nmake -f makefile.vc BUILD=debug UNICODE=1 SHARED=0 RUNTIME_LIBS=static<br />
nmake -f makefile.vc BUILD=release UNICODE=1 SHARED=0 RUNTIME_LIBS=static<br />
<br />
It may be more reliable to build the wxWidgets libraries with the distributed MSVC projects, as described [http://www.wxwidgets.org/wiki/index.php/MSVC_.NET_Setup_Guide here]. When I used the commandline method several libraries were built wrong, or not at all. -- TKSharpless<br />
<br />
I never had trouble using the makefiles, maybe thats a MSVC 2005 issue? -- Pablo d'Angelo<br />
<br />
==== Building boost ====<br />
<br />
Refer to the boost documentation for details, especially [http://www.boost.org/more/getting_started/windows.html#or-build-binaries-from-source Build binaries from source]. Download bjam exectable and place it in the boost directory. Open the MSVC Command line prompt located in Start Menu -> Programs Microsoft Visual Studio -> Utilities, change directory to the boost dir and issue<br />
<br />
bjam stage --with-thread<br />
<br />
This will build the boost thread library.<br />
<br />
If you are using Visual C++ 7.1 (Visual Studio 2003) or 8.0 (Visual Studio 2005), you can save a lot of time and aggravation by getting precompiled Boost libraries from [http://www.boost-consulting.com/products/free BoostConsulting]. You first download an installer program, which when run lets you choose which library variants you want to install. For Hugin you need the multithreaded static libraries, built for the static Microsoft C runtime with the compiler you intend to use. If you already have a Boost installation, you can just add these libraries to it, otherwise install the Boost headers too. <br />
<br />
Windows Boost libraries are named according to version, compiler and MS runtime variant (multi|single thread, static|dll) so take care that the Hugin build uses the right names. Example:<br />
libboost_date_time-vc80-mt-s-1_34_1.lib<br />
prefix 'lib' shows this is a static link library, not the import library for a Boost dll; 'vc80' says built with VC8.0; 'mt-s' built for release version of the Microsoft multithread static C runtime LIBCMT (i.e. with compiler switch '/MT') (the debug version has 'mt-sgd'); '1_34_1' built from Boost version 1.34.1 source.<br />
<br />
<br />
==== Building OpenEXR ====<br />
<br />
This is a tricky one, because the MSVC project files have been set up for DLL builds with the \MD runtime, and a custom program is used to prepare the DLLs. For the all static windows binaries, quite some changes to the MSVC project files are needed.<br />
<br />
Build according to README_win in ilmbase-1.0.0 but changed the runtime of all projects to MT. <br />
<br />
For all projects do:<br />
* set each project to static lib<br />
* remove OPENEXR_DLL, _USEDLL and *_EXPORTS defines<br />
* set runtime to MT<br />
* disable SSE2, to generate binaries that run on all platforms<br />
* remove the createDLL part of the post-build command, but keep the call to '''install*.cmd''', such as '''..\..\..\installIlmImf.cmd $(IntDir)'''<br />
<br />
Apply the same procedure to the openexr-1.6 source code. Here only the IlmImf and IlmImfTest projects are needed by Hugin.<br />
Follow the same process as for IlmBase, but additionally add include path for the zlib library (inside the wxWidget/src/zlib) to the IlmImf project, and wxWidget/libs/_vc/wxzlib.lib to the IlmImfTest linker options. The tests should run without errors.<br />
<br />
It is a good idea to create new target configurations, say HuginRelease and HuginDebug, with the Visual Studio Configuration Manager, and apply the above changes to them, so that you don't lose the original project settings. This also makes the Hugin-appropriate libraries easy to find as they will be built in directories named for the configurations. They should be installed in directories named that way, too; the install commands make those directories in the Deploy/... tree, but fail to copy the static libraries there because the dll library names are built into them. However it is easy enough to copy the libs from the build folders by hand. The ilmbase libraries must be in the Deploy tree before IlmImf is built. -- TKSharpless<br />
<br />
<br />
==== Building Panotools ====<br />
<br />
[[Build_pano12_from_sourcecode_MSVC|Building Pano13 with MSVC]] is described on a separate page.<br />
<br />
=== Building Hugin ===<br />
<br />
Use SVN to retrieve the latest hugin sourcecode (svn root is: https://hugin.svn.sourceforge.net/svnroot/hugin/hugin/trunk), and save it to src/hugin-trunk. Remember the SVN revision, it will be needed later.<br />
<br />
Place all dependencies alongside the hugin-trunk source directory. Example (versions might be slightly outdated):<br />
<br />
src/<br />
hugin-trunk<br />
OpenExr<br />
STLport-5.1.4<br />
boost_1_34_1<br />
enblend-3.1<br />
libpano/pano13<br />
wxMSW-2.8.6<br />
make/make.exe<br />
<br />
<br />
Run CMakeSetup to create the MSVC project files. If you use the ''Hugin SDK'' or have a 100% identical directory structure, CMakeSetup will pick up the dependencies automatically. Otherwise the paths to each dependency will have to specified manually during the following cmake step<br />
<br />
# Run cmake, select hugin source and build directories. Do not choose the same directories for both source and build.<br />
# Press '''Configure''.<br />
# If building is done using an SVN checkout, the SVN revision number needs to be specified manually. Press '''Configure'' again.<br />
# CMake will pick up the dependencies and show them to you. Press '''Configure''' again. Now the '''Ok''' button should be available. If CMake had problems picking up all dependencies (for example, if you build your own libraries). CMake will prompt you if it misses something. After some iterations, all dependencies should be picked up.<br />
# Press the '''Ok''' button.<br />
# Once all fields have been filled out, the "Ok" button should be available. Press it and open the generated hugin.sln file with MSVC. Switch to Build Type to Release and start the build (press F7). After quite some time hugin should be build. In order to run hugin, it needs to be installed so that data files are in the right place. This is done by building the '''INSTALL''' project. The binaries and all required files will be installed into INSTALL/FILES subdirectory of the build directory specified during the CMake step.<br />
# Creating the .msi installer by opening INSTALL/hugin.warsetup with the WarSetup program available from http://warsetup.jgaa.com/ and clicking on the '''Build''' button.<br />
# A NSIS installer can be build by building the '''PACKAGE''' target (NSIS needs to be installed for this). This is currently a default installer, without specific functionality.<br />
<br />
= Building using MinGW =<br />
<br />
I have managed to build the older, pre GSoC 2007 version with MinGW, but still having some problems with the new trunk. Once these are resolved, I will provide instructions<br />
<br />
<br />
<small>--[[User:Pablo|pablo]] 18:10, 13 January 2008 (CET)</small><br />
[[Category:Software:Platform:Windows]]<br />
[[Category:Software:Hugin]]<br />
[[Category:Software:Hugin:Compiling]]</div>Onomouhttps://wiki.panotools.org/index.php?title=Hugin_Compiling_Ubuntu&diff=13648Hugin Compiling Ubuntu2011-07-14T20:44:59Z<p>Onomou: Change compiling category</p>
<hr />
<div>== Who Is This Page For ==<br />
<br />
These instructions contain the collective wisdom of Hugin contributors that are using Ubuntu or any of its variations (Ku/Xu/Lu/Edu/...buntu). They are work in progress and updated when newer versions of Ubuntu are released or when Hugin introduces new dependencies. They have worked, at the time of release or soon thereafter, with all 'buntu versions up until 10.10. They are intended to help contributors on the learning curve. If you are not here to contribute, spare yourself the effort and see the [[#Shortcut|Shortcut]] section below.<br />
<br />
They are likely to work only for the latest 'buntu release, but you can check this page's history at the time that the older 'buntu version was the most recent one to find the specifics for that version.<br />
<br />
If you are new here, read the whole page. It is recommended that you go sequentially through it.<br />
<br />
If you're familiar with the process and have run it a few time, look at the what's new section for important news.<br />
<br />
Apart from the odd change in package name, nothing should be substantially different (and if does not work, please leave a comment on the [http://groups.google.com/group/hugin-ptx hugin-ptx mailing list]). Don't worry if the same package appears twice in an apt-get install line - apt-get will update existing packages if there is a newer version, and ignore duplicates if the latest version is already installed. On the other hand, if apt-get says that it can't find a package, it might be the odd change in package name. You can find a replacement package by using apt-cache search with a substring of the package required, e.g.<br />
<pre>apt-cache search wxW<br />
</pre><br />
<br />
The goal is to build hugin and the whole set of helper applications required, and start understanding the building process. You will need deeper understanding of the building process if you want to:<br />
* develop code<br />
* translate the latest strings<br />
* document the latest features with manuals and tutorials<br />
* package for distribution<br />
That knowledge is out of scope for this document. This document ends with a binary that is fit for installation on your machine. It is not fit for any other purpose, particularly not for distribution. CMake is [http://groups.google.com/group/hugin-ptx/msg/3f29b207c562fd63 known] to build broken deb packages. Please do not distribute these binaries.<br />
<br />
== What's New ==<br />
<br />
'''9 May 2011''': The integration of the python_scripting development branch brings new dependencies and a new build-time configuration switch for Hugin. See changes in the documentation below. swig2.0 is officially distributed only with Natty (11.04 onwards). If you have an older Ubuntu version you will either have to forego the python scripting feature or find an alternative swig2.0 (either a PPA or build it yourself).<br />
<br />
'''2 May 2011''': If you are using an earlier version of Ubuntu than 11.04, there is a chance that your Mercurial version is too old for grabbing updates. New (non-critical security) updates to a program do not get added to old versions of Ubuntu, so any new changes will need to be added manually. When running Mercurial (pull, update, etc), you may get an error like<br />
<pre><br />
abort: requirement 'dotencode' not supported!<br />
</pre><br />
To fix this, you can use the package archive from Mercurial PPA Packagers and get the latest release:<br />
<pre><br />
sudo apt-add-repository ppa:mercurial-ppa/releases<br />
sudo apt-get update<br />
sudo apt-get install mercurial<br />
</pre><br />
<br />
'''5-March-2010''': Foreign library libtclap removed from source tree. This introduces a new dependency on libtclap-dev<br />
<br />
'''February 2010''': Libpano has migrated from SVN to Mercurial.<br />
<br />
'''CMake 2.8.2''', as packaged in Ubuntu 10.10, contains a bug (http://public.kitware.com/Bug/view.php?id=11020) the prevents the created debs to install successfully, due to it not storing needed directories in the deb package.<br />
Installing the resulting debs will fail with a message error saying something like<br />
<br />
<pre><br />
unable to create `/usr/local/share/hugin/xrc/data/redo.png.dpkg-new' (while processing `./usr/local/share/hugin/xrc/data/redo.png'): No such file or directory<br />
</pre><br />
<br />
Commands to create the necessary folders have been documented below and may be added to the CMake build in the repository of Hugin, Libpano, Enblend. However it is possible that the lists are incomplete. If you bump in the above message, the solution is to create the full missing path and run dpkg -i again, recursively adding folders until the install succeed.<br />
<br />
<pre><br />
sudo mkdir -p /usr/local/share/hugin/xrc/data/<br />
</pre><br />
<br />
Another workaround is, to partially rebuild the deb package by hand:<br />
<br />
<pre><br />
mkdir unpacked<br />
cd unpacked/<br />
ar x ../hugin.build/hugin-2010.2.0-Linux.deb<br />
mkdir untarred<br />
cd untarred<br />
tar xzf ../data.tar.gz<br />
tar czf ../data.tar.gz .<br />
cd ..<br />
ar r ../hugin-2010.2.0-Linux.deb debian-binary control.tar.gz data.tar.gz<br />
</pre><br />
<br />
== Shortcut ==<br />
<br />
Hugin evolves fast and the official 'buntu distributions carry versions that are usually 3-6 months older than the 'buntu distribution date. Moreover, they do not backport Hugin and related tools.<br />
<br />
Even if you follow religiously the 'buntu six months update cycle, you may be using a version of Hugin that is one or two release cycles in our past. If your sole objective is to use the new features of Hugin, the instructions in this section are for you. Start a command line terminal, type the three commands and you're done.<br />
<br />
If for some reason that's not enough for you - if you want to actually learn and become a contributor; or if you're just curious about getting even closer to the bleeding edge and trade stability for features and excitement, the rest of this document is for you.<br />
<br />
=== Stable ===<br />
<br />
This will install you the latest stable version of the tools:<br />
<pre><br />
sudo add-apt-repository ppa:hugin/hugin-builds<br />
sudo apt-get update<br />
sudo apt-get install hugin enblend panini<br />
</pre><br />
<br />
=== Unstable ===<br />
<br />
This will install you the latest unstable version of the tools that has been built as a binary. While they are likely to work in most cases, there is no guarantee and they are not recommended for production environment. Use at your own risk, and please report (and if possible fix) bugs. Most of the time these unstable builds are closer to the bleeding edge than to the stable builds. If you want the really really really bleeding edge, you'll have to work through the instructions in the next sections, though.<br />
<br />
<pre><br />
sudo add-apt-repository ppa:hugin/hugin-builds<br />
sudo add-apt-repository ppa:hugin/nightly<br />
sudo apt-get update<br />
sudo apt-get install hugin enblend panini<br />
</pre><br />
<br />
== Building Environment ==<br />
Since we are going to build hugin, libpano13 and enblend we need to download and install all the development packages. This is very easy with apt-get.<br />
In a terminal window (K menu -> System -> Konsole or Applications -> Accessories -> Terminal (in Kubuntu), Applications -> Accessories -> Terminal (in Ubuntu))<br />
<br />
<pre>sudo apt-get install build-essential autoconf automake1.9 libtool flex bison gdb libc6-dev libgcc1 \<br />
cmake<br />
</pre><br />
<br />
To get the bleeding edge we'll need access to the SVN and Mercurial repositories, and for this we need the correct tools:<br />
<br />
<pre><br />
sudo apt-get install subversion mercurial<br />
</pre><br />
<br />
Not necessary, but useful if you want to revisit configuration sets in ccmake<br />
<pre><br />
sudo apt-get install cmake-curses-gui<br />
</pre><br />
<br />
To get on the same page as far as file system layout is concerned, we'll create a folder to contain all source code in your home folder:<br />
<pre><br />
cd<br />
mkdir -p src<br />
</pre><br />
<br />
=== For Coders ===<br />
<br />
If you want to start to navigate, understand and modify the code, the doxygen generated documentation will be helpful to you.<br />
<br />
<pre><br />
sudo apt-get install doxygen graphviz<br />
</pre><br />
<br />
=== For Distributors ===<br />
<br />
If you want to build packages for distribution, you will also need the following tools and settings.<br />
<br />
<pre><br />
sudo apt-get install subversion-tools<br />
sudo echo 'deb-src ftp://ftp.at.debian.org/debian ../project/experimental main' > debian-experimental.list<br />
mv debian-experimental.list /etc/apt/sources.list.d/<br />
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 55BE302B<br />
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 8B8D7663<br />
sudo apt-get update<br />
sudo apt-get install devscripts<br />
</pre><br />
<br />
You will also need an OpenPGP key, and a Launchpad account. Follow the [[Hugin_Trackers#Launchpad_Account|instructions]] for Launchpad account creation, including the signing of the Ubuntu Code of Conduct.<br />
<br />
Moreover, it is likely that your environment is not clean enough for distribution builds. In that case, and to produce binaries for other Ubuntu series than the one you are running, you will want to set up a dchroot environment (to be documented later on).<br />
<br />
== Building Enblend ==<br />
<br />
Get the dependencies. If you are working with large images (300 megapixels and up), you should have a libtiff-devel compiled with large file support and libstdc++6.<br />
<br />
<pre><br />
sudo apt-get install pkg-config libtiff4-dev libboost-graph-dev libboost-thread-dev \<br />
libboost-filesystem-dev liblcms1-dev libglew1.5-dev libplot-dev libglut3-dev libopenexr-dev \<br />
libxi-dev libxmu-dev help2man libplot-dev liblcms1-dev libboost-system-dev<br />
</pre><br />
<br />
If you also want to build the documentation, add the following dependencies, and add "-DDOC=ON" to the cmake command below. (Be warned, however, that this will drag in over 700MB of additional dependencies. Unless you have a pressing need to build the documentation yourself, you can save yourself some time and disk space by downloading the PDF docs from http://enblend.sourceforge.net .)<br />
<br />
<pre><br />
sudo apt-get install texi2html texinfo fig2ps tidy gnuplot libxml-xpath-perl imagemagick<br />
</pre><br />
<br />
Once all dependencies are in place, get the code. The official repository has migrated from CVS to Mercurial:<br />
<br />
<pre><br />
mkdir -p ~/src/enblend<br />
cd ~/src/enblend<br />
hg clone http://enblend.hg.sourceforge.net:8000/hgroot/enblend/enblend enblend.hg<br />
</pre><br />
<br />
If you already have checked out enblend, to update the code to the latest version you need to run:<br />
<pre><br />
cd enblend.hg<br />
hg pull<br />
hg update<br />
cd ..<br />
</pre><br />
<br />
Then create a build directory and build in there. And install the Package.<br />
<br />
The options below are good for modern multi-core computers. For a single core, you may be better off setting ENABLE_OPENMP to OFF and ENABLE_IMAGECACHE to ON. The two options are mutually exclusive.<br />
<pre><br />
mkdir enblend.build<br />
cd enblend.build<br />
cmake ../enblend.hg -DENABLE_GPU:BOOL=ON -DENABLE_IMAGECACHE:BOOL=OFF -DENABLE_OPENMP:BOOL=ON \<br />
-DCPACK_BINARY_DEB:BOOL=ON -DCPACK_BINARY_NSIS:BOOL=OFF -DCPACK_BINARY_RPM:BOOL=OFF \<br />
-DCPACK_BINARY_STGZ:BOOL=OFF -DCPACK_BINARY_TBZ2:BOOL=OFF -DCPACK_BINARY_TGZ:BOOL=OFF \<br />
-DCPACK_BINARY_TZ:BOOL=OFF -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX:PATH=/usr/local<br />
make package<br />
sudo dpkg -i enblend-4.1.1-Linux.deb<br />
</pre><br />
<br />
If the install quits with an error, it is likely because of missing folders. Run the following commands and retry:<br />
<pre><br />
sudo mkdir -p /usr/local/share/man/man1<br />
sudo mkdir -p /usr/local/bin<br />
</pre><br />
<br />
===The old autotools way===<br />
We are then ready to compile. The CXXFLAGS <tt>--param inline-unit-growth=60</tt> is a workaround for x86_64 systems, Feb 2009, and apparently no longer needed (set by default). If you have an SMP machine and you're building a recent version, <tt>--disable-image-cache</tt> and <tt>--enable-openmp</tt> will speed up enblend/enfuse massively but may cause segmentation faults; in that case you will be better off with <tt>--enable-image-cache</tt> and <tt>--disable-openmp.</tt> <tt>-march=native</tt> is also beneficial and -O2 is better than -O3.<br />
<br />
<pre><br />
make --makefile=Makefile.scm<br />
mkdir BUILD<br />
cd BUILD<br />
CXXFLAGS="--param inline-unit-growth=60 -march=native -O2" ../configure --disable-image-cache \<br />
--enable-openmp<br />
make<br />
</pre><br />
<br />
The second make step can be very long and memory consuming. Make sure you have enough swap space, and go get a healthy snack while the computer is compiling.<br />
<br />
If you encounter problems at any of these stages, please report back to the hugin-ptx mailing list. Report what command in the sequence you were executing, what machine/operating system, the revision checked out from CVS, and all other relevant information.<br />
<br />
You are then ready to install with<br />
<pre><br />
sudo make install<br />
</pre><br />
<br />
== Building Libpano13 ==<br />
<br />
libpano13 is the new version of the PanoTools libraries. This is a necessary component for hugin, and we need to build it first.<br />
To build libpano13 we need some libraries and particularly their <code>dev</code> package:<br />
<br />
<pre>sudo apt-get install zlib1g zlib1g-dev libpng12-dev libjpeg62-dev libtiff4-dev cmake</pre><br />
<br />
On older distributions, zlib1g and zlib1g-dev may not be found. In that case, the same library may be available with the names lib64z1 and lib64z1-dev.<br />
<br />
We then need to download the source code from the central repository:<br />
<br />
<pre><br />
mkdir -p ~/src/libpano<br />
cd ~/src/libpano<br />
hg clone http://panotools.hg.sourceforge.net:8000/hgroot/panotools/libpano libpano.hg<br />
</pre><br />
<br />
If you're a contributor with write access, use the following clone command instead:<br />
<pre><br />
hg clone ssh://${USER}@panotools.hg.sourceforge.net/hgroot/panotools/panotools/libpano libpano.hg<br />
</pre><br />
<br />
In the future there is no need to get the whole source again. Just issue the following commands to bring your source up to date:<br />
<pre><br />
cd libpano.hg<br />
hg pull<br />
hg up<br />
cd ..<br />
</pre><br />
<br />
Now start the building process.<br />
<br />
<pre><br />
mkdir libpano.build<br />
cd libpano.build<br />
cmake ../libpano.hg -DCMAKE_INSTALL_PREFIX=/usr/local -DCPACK_BINARY_DEB:BOOL=ON \<br />
-DCPACK_BINARY_NSIS:BOOL=OFF -DCPACK_BINARY_RPM:BOOL=OFF -DCPACK_BINARY_STGZ:BOOL=OFF \<br />
-DCPACK_BINARY_TBZ2:BOOL=OFF -DCPACK_BINARY_TGZ:BOOL=OFF -DCPACK_BINARY_TZ:BOOL=OFF \<br />
-DCMAKE_BUILD_TYPE=RelWithDebInfo<br />
make package<br />
sudo dpkg -i libpano13-*-Linux.deb<br />
</pre><br />
<br />
Set -DCMAKE_BUILD_TYPE=Debug if you want to help investigate/debug a problem and capture even more debugging information.<br />
<br />
If the install quits with an error, it is likely because of missing folders. Run the following commands and retry:<br />
<pre><br />
sudo mkdir -p /usr/local/include/pano13/<br />
sudo mkdir -p /usr/local/include/pano13/doc<br />
sudo mkdir -p /usr/local/lib/pkgconfig<br />
sudo mkdir -p /usr/local/share/man/man1<br />
sudo mkdir -p /usr/local/bin<br />
</pre><br />
<br />
=== The old autotools way ===<br />
<br />
The above described building process uses CMake to build libpano which has many advantages. Amongst others it creates a clean package to install / deinstall and decreases the likelihood of wrecking the system. However CMake support is relatively new in libpano. The old autotools way is documented below for completeness. You should not need it. However if you do, make sure to run either the CMake build or the autotools build on fresh repository checkouts to avoid interferences.<br />
<br />
<pre><br />
./bootstrap<br />
</pre><br />
<br />
If any libraries are missing, the script will complain (or at least, let you know that some library hasn't been found). In that case you probably need to install the library. To find in what package is that library, a general rule is to run the command <code>apt-cache search ''missingfile''</code>, find the relevant library and install both the library and the related <code>-dev</code> package.<br />
Run the <code>./configure</code> script and repeat this process until you have met all the dependencies.<br />
<br />
Then we are ready to launch the make process with<br />
<pre>make</pre><br />
<br />
If the library successfully compiles, you have to install it with<br />
<pre>sudo make install<br />
sudo ldconfig</pre><br />
The last part is for the OS to be aware of the new library (that has been installed in <code>/usr/local/lib</code>).<br />
We can now go back up one folder level and get ready for hugin.<br />
<pre>cd ..</pre><br />
<br />
== Building Hugin ==<br />
<br />
=== Dependencies ===<br />
<br />
First we need to activate the <code>universe</code> repository (in adept package manager, or by editing the /etc/apt/sources.lst file for example) and get the dependencies.<br />
<br />
If you want to build the Python scripting feature, your best bet is Natty (11.04). If you are on Lucid or Maverick, you can follow the instructions below to get a swig2.0 package. If nothing works and you still want Python scripting, you will have to build it from [https://sourceforge.net/projects/swig/ source].<br />
<br />
<pre><br />
sudo add-apt-repository ppa:hugin/hugin-builds<br />
sudo apt-get update<br />
</pre><br />
<br />
The following command will install on your system all build time dependencies except libpano13.<br />
<pre><br />
sudo apt-get install libwxgtk2.8-dev libtiff4-dev libpng12-dev \<br />
libopenexr-dev libexiv2-dev libglut3-dev libglew-dev libboost-dev \<br />
boost-build libboost-thread-dev libboost-graph-dev libboost-regex-dev \<br />
libboost-iostreams-dev libboost-filesystem-dev gettext liblapack-dev \<br />
libxi-dev libxmu-dev libboost-signals-dev libboost-system-dev \<br />
libtclap-dev<br />
</pre><br />
<br />
For the python scripting functionality, you will also need <br />
<pre><br />
sudo apt-get install libpython-dev python-dev swig2.0<br />
</pre><br />
<br />
Note that python-dev was the name for libpython-dev prior to Natty. Do not worry if it stops with the message<br />
<pre><br />
E: Unable to locate package {python-dev or libpython-dev}<br />
</pre><br />
Remove the package in error from the apt-get line and try again. You will still achieve the intended status. Tested on Natty and Lucid, most likely ok for Maverick as well.<br />
<br />
You could install libpano13 on your system with the command below. But it is recommended that you build your own libpano13 (see section [[Hugin_Compiling_Ubuntu#Building_Libpano13|above]]), since the version of libpano13 in the Ubuntu repositories is probably too old. Alternatively, there may be a recent enough version of libpano13 in the Hugin PPA. If going this last route, you can add it as shown above.<br />
<pre><br />
sudo apt-get install libpano13-dev<br />
</pre><br />
<br />
wxWidgets is a critical dependency for the Hugin GUI. In the official Ubuntu repositories it is usually at least a few releases behind the current release, and in some cases many releases behind. The wxWidgets project provides alternative [http://wiki.wxpython.org/InstallingOnUbuntuOrDebian repositories] with newer versions, as well as a [http://wiki.wxpython.org/BuildingDebianPackages instructions] to build binary packages of the most recent releases. Newer versions of wxWidgets are not (yet) absolutely necessary, but since eventually things evolve they are useful for development, testing, and in general should give a better user interface experience as wxWidgets improves over time.<br />
<br />
The following are run-time dependencies. Strictly speaking you don't need them to build Hugin, but you will need them to use it. If you follow the instructions on this page to build ExifTool and/or Enblend, you don't need to install them this way.<br />
<pre><br />
sudo apt-get install libimage-exiftool-perl enblend python-argparse<br />
</pre><br />
<br />
=== Fetch the Source Code with Mercurial ===<br />
<br />
If you already have a repository clone, you only need to pull the latest changes and update the code with:<br />
<pre><br />
cd ~/src/hugin/hugin.hg<br />
hg pull<br />
hg update<br />
</pre><br />
<br />
Otherwise, you need to clone the repository and decide which version/branch to build with:<br />
<pre><br />
mkdir -p ~/src/hugin<br />
cd ~/src/hugin<br />
hg clone http://hugin.hg.sourceforge.net:8000/hgroot/hugin/hugin hugin.hg<br />
cd hugin.hg<br />
hg branches<br />
</pre><br />
<br />
If you are a contributor with write access, you can use<br />
<pre><br />
hg clone ssh://${USER}@hugin.hg.sourceforge.net/hgroot/hugin/hugin hugin.hg<br />
</pre><br />
<br />
The `hg branches` command will list all available branches. If you decide, e.g., to build the 2010.0 branch, you will update to it with:<br />
<pre><br />
hg update -C 2010.0 <br />
</pre><br />
<br />
=== Advanced Use - Multiple Source Trees ===<br />
<br />
You may want to build multiple versions of Hugin on your machine at the same time, e.g. when you want to build side by side a stable version for your productivity and a development version to give feedback to the developers. In that case, you will clone the Mercurial repository that is already on your drive and update from it a source tree to a different branch. Mercurial takes care of details such as optimizing disk usage. The commands for this are:<br />
<br />
<pre><br />
cd ..<br />
hg clone hugin.hg another_hugin<br />
cd another_hugin<br />
hg update -C default<br />
</pre><br />
<br />
You can have as many "another_hugin" folders as you want. Just make sure, when pulling the latest updates from SourceForge, to first pull your main repository (the one you cloned from http://hugin.hg.sourceforge.net:8000/hgroot/hugin/hugin. Then pull all others:<br />
<pre><br />
cd ~/src/hugin/hugin.hg<br />
hg pull<br />
hg update<br />
cd ../another_hugin<br />
hg pull<br />
hg update<br />
</pre><br />
<br />
Reference: [http://groups.google.com/group/hugin-ptx/msg/1ce824dd1364e9be]<br />
<br />
=== Configure the Build Environment ===<br />
<br />
'''Rule:''' You always want to build outside of the source tree to keep the source tree clean. And to avoid confusion, if you have multiple source trees it is preferable to build for each of them in a separate build folder.<br />
<br />
Next we set up the build environment using cmake.<br />
<br />
If you compiled and installed libpano to a non standard location set the variables CMAKE_INCLUDE_PATH and CMAKE_LIBRARY_PATH to point to your install location's include and lib directories.<br />
<br />
If you are building for distribution, you want to set CMAKE_INSTALL_PREFIX=/usr<br />
<br />
<pre><br />
cd ~/src/hugin<br />
mkdir hugin.hg-build<br />
cd hugin.hg-build<br />
cmake ../hugin.hg -DENABLE_LAPACK=YES -DCPACK_BINARY_DEB:BOOL=ON -DCPACK_BINARY_NSIS:BOOL=OFF \<br />
-DCPACK_BINARY_RPM:BOOL=OFF -DCPACK_BINARY_STGZ:BOOL=OFF -DCPACK_BINARY_TBZ2:BOOL=OFF \<br />
-DCPACK_BINARY_TGZ:BOOL=OFF -DCPACK_BINARY_TZ:BOOL=OFF -DCMAKE_BUILD_TYPE=RelWithDebInfo \<br />
-DBUILD_HSI:BOOL=ON -DSWIG_EXECUTABLE=/usr/bin/swig2.0<br />
</pre><br />
<br />
The last line of the above cmake statement is for python scripting and will work with Ubuntu 11.04. The first switch activates the scripting interface (which is deactivated by default because it does not work simply out of the box on all supported platforms) and the second switch fixes a bug in the CMake script to find swig. Self-compiled swig does not need the -DSWIG_EXECUTABLE switch since it is found automatically by the CMake script.<br />
<br />
If you get an error building, try removing the last line of the above cmake statement. Another cause may be a wrong version of libpano13, even if you built it yourself. Go back and check that you are using a (newer) stable branch. Try switching to libpano13-2.9.18 (run hg update -C libpano13-2.9.18 in the proper folder), rebuild as instructed above, and try again.<br />
<br />
Set -DCMAKE_BUILD_TYPE=Debug if you want to help investigate/debug a problem and capture even more debugging information, however Hugin will be slower and may not work as expected. Don't use a Debug build for production.<br />
<br />
If you are building for install on your own machine only, -DDISABLE_DPKG=ON will significantly speed up the package generation. Do not distribute packages built this way, they don't have proper dependencies. This is primarily meant for developers doing cycles of fix-compile-install-test.<br />
<br />
=== Build and Install ===<br />
<br />
Finally, we use make to build the code and package it, and dpkg to install it. Look for the version number in the .deb file created and edit the lines below accordingly: <br />
<br />
<pre><br />
make package<br />
sudo dpkg -i hugin-*-Linux.deb<br />
sudo ldconfig<br />
</pre><br />
<br />
If the install quits with an error, it is likely because of missing folders. Run the following commands and retry: <br />
<pre><br />
sudo mkdir -p /usr/local/share/pixmaps<br />
sudo mkdir -p /usr/local/share/mime/packages<br />
sudo mkdir -p /usr/local/share/applications/<br />
sudo mkdir -p /usr/local/share/icons/gnome/48x48/mimetypes/<br />
sudo mkdir -p /usr/local/share/locale/en_GB/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/es_la/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/fr/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/zh_TW/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/ru/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/ro/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/bg/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/de/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/ko/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/pt_BR/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/zh_CN/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/ja/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/it/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/sl/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/sk/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/sv/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/ca_ES/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/nl/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/fi/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/cs_CZ/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/uk/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/es/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/pl/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/hu/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/es_VE/LC_MESSAGES<br />
sudo mkdir -p /usr/local/share/hugin/xrc/data/help_it_IT<br />
sudo mkdir -p /usr/local/share/hugin/xrc/data/help_en_EN<br />
sudo mkdir -p /usr/local/share/hugin/data/<br />
sudo mkdir -p /usr/local/lib/hugin<br />
sudo mkdir -p /usr/local/share/man/man1<br />
</pre><br />
<br />
'''Important:''' the package does not track dependencies yet, so it likely to fail on machines others than yours.<br />
<br />
Reference: [http://theseblog.free.fr/2007/10/building-hugin-in-ubuntu-feisty-fawn.php]<br />
<br />
=== Dive into the Code ===<br />
<br />
From time to time the API reference is published on the Hugin website, however you are better off with a local copy. To generate it, issue the following commands:<br />
<pre><br />
cd ~/src/hugin/hugin.hg/src<br />
doxygen Doxyfile<br />
</pre><br />
<br />
The documentation is generated in ~/src/hugin/hugin.hg/src/hugin/html<br />
<br />
Point your browser to index.html inside that folder and you have access to all available information. If you find that a class, a function, or anything else is not properly documented; and if you delve into the source code to understand it, kindly add documentation to the code so that the next person in your situation can use your experience as a stepping stone. Thank you!<br />
<br />
== Automatic Control Point Detectors ==<br />
<br />
=== Autopano-sift-C ===<br />
<br />
Pre-Requisites:<br />
<pre><br />
sudo apt-get install libxml2-dev<br />
</pre><br />
<br />
To build<br />
<br />
(Note February 2011: The latest source code of autopano-sift-C has been unstable for a long time now and nobody is working to fix it. Use the 2.5.1 release tarball instead)<br />
<br />
<pre><br />
mkdir -p ~/src/apsc<br />
cd ~/src/apsc<br />
hg clone http://hugin.hg.sourceforge.net:8000/hgroot/hugin/autopano-sift-C apsc.hg<br />
cd apsc.hg<br />
hg branches<br />
hg update -C 2.5.1<br />
cd ..<br />
mkdir apsc.hg.build<br />
cd apsc.hg.build<br />
cmake ../apsc.hg -DCMAKE_INSTALL_PREFIX=/usr/local -DCPACK_BINARY_DEB:BOOL=ON \<br />
-DCPACK_BINARY_NSIS:BOOL=OFF -DCPACK_BINARY_RPM:BOOL=OFF -DCPACK_BINARY_STGZ:BOOL=OFF \<br />
-DCPACK_BINARY_TBZ2:BOOL=OFF -DCPACK_BINARY_TGZ:BOOL=OFF -DCPACK_BINARY_TZ:BOOL=OFF \<br />
-DCMAKE_BUILD_TYPE=Debug<br />
make package<br />
sudo dpkg -i autopano-sift-C-*-Linux.deb<br />
</pre><br />
<br />
=== Match-n-shift ===<br />
<br />
Match-n-shift is yet an other Autopano-SIFT replacement. It comes in a bundle with pto file manipulation perl libraries and a rich selection of other tools that use nona, enblend, ImageMagick among other things. To use match-n-shift, you need to install at least the [http://search.cpan.org/dist/Panotools-Script/ Panotools::Script] library and some other perl modules. It requires:<br />
<br />
* Image::Size 2.9<br />
* Storable 2.0<br />
* Image::ExifTool 6<br />
<br />
Chances are that you do not need to update Storable which is a standard perl module. To check the version of installed versions of these modules, write these lines to the command prompt:<br />
<br />
perl -MStorable -le 'print Storable->VERSION;'<br />
perl -MImage::Size -le 'print Image::Size->VERSION;'<br />
perl -MImage::ExifTool -le 'print Image::ExifTool->VERSION;'<br />
<br />
There are various ways to install or upgrade these modules. Ubuntu has binary packages for many perl modules, you can skip the CPAN installation below and type:<br />
<br />
sudo apt-get install libimage-size-perl libimage-exiftool-perl<br />
<br />
Alternatively, perl is an interpreted language and these modules are pure perl, so installing from source is an easy thing.<br />
<br />
The best place to install perl modules is directly from a CPAN archive. CPAN is short for Comprehensive Perl Archive Network. The program to interact with CPAN comes with all perl installations. Start it by running:<br />
<br />
sudo cpan<br />
<br />
If this is your first time running the program you will be asked a number of questions (you can safely accept the suggested values). Last question lets you select a number of CPAN mirrors nearest to you.<br />
<br />
When all is done, you can enter the install commands after the 'cpan>' prompt:<br />
<br />
install Image::Size Storable Image::ExifTool<br />
<br />
Answer 'y' to any question of dependencies and wait for install to complete. 'exit' leaves the cpan shell.<br />
<br />
Next, you need to retrieve and install the Panotools-Script collection<br />
of perl libraries (Panotools::Script) and programs that use them -<br />
including match-n-shift:<br />
<br />
svn co https://panotools.svn.sourceforge.net/svnroot/panotools/trunk/Panotools-Script Panotools-Script<br />
cd Panotools-Script<br />
perl Makefile.PL<br />
make<br />
make test<br />
sudo make install<br />
<br />
Just to confuse you, you can also ignore everything above and just install Panotools::Script and all its dependencies from CPAN. From command line, type:<br />
<br />
sudo cpan Panotools::Script<br />
<br />
You can run match-n-shift from command line using the same parameters as autopano-c-complete.sh or you can modify hugin to run it for you:<br />
<br />
* start Hugin<br />
* navigate the menu File to Preferences<br />
* In the Preferences window, open the Autopano tab<br />
* Select Autopano -> Autopano-SIFT<br />
* tick the checkbox for Use alternative Autopano-SIFT program<br />
* enter the full path to match-n-shift (/usr/local/bin/match-n-shift) in the Autopano-SIFT field<br />
* enter the following string in the Arguments field:<br />
-f %f -v %v -c -p %p -o %o %i<br />
<br />
=== MatchPoint ===<br />
<br />
MatchPoint is a next generation CP generator. The result of a GSoC2007 project, it is still very experimental. Experience reports needed. Read more [http://groups.google.com/group/hugin-ptx/browse_thread/thread/cba2b2ce94dd9054 here]<br />
<br />
Matchpoint is now located inside the main hugin source tree, no need to checkout separately. It is compiled together with hugin, but not installed by default.<br />
<br />
* copy the MatchPoint executable into /usr/local/bin manually<br />
<pre><br />
cd ~/src/hugin/hugin.hg-build<br />
sudo cp src/matchpoint/matchpoint /usr/local/bin/<br />
</pre><br />
* edit /usr/local/bin/autopano-c-complete.sh (do it with sudo to have the necessary permission)<br />
** line 79: replace the .key.gz extension with .key (not sure if matchpoint supports compression)<br />
** lines 83 and 88: replace '''generatekeys "$arg" $FILENAME $SIZE''' with '''matchpoint "$arg" $FILENAME''' (not sure if the size option or any other options of the original generatekeys are applicable)<br />
<br />
=== Pan-o-matic ===<br />
<br />
Yet another control point generator [http://aorlinsk2.free.fr/panomatic/?p=home Home Page]<br />
<br />
<pre>sudo apt-get install libboost-dev</pre><br />
<br />
Download [http://aorlinsk2.free.fr/panomatic/download.php?d=7&v=0.9.4 Panomatic 0.9.4 bz2] and if you're on Ubuntu 9.10 or newer also the [http://aorlinsk2.free.fr/panomatic/panomatic_gcc44.patch patch] for the gcc4.4 compiler.<br />
<br />
<pre><br />
mkdir -p ~/src/panomatic<br />
cd ~/src/panomatic<br />
wget "http://aorlinsk2.free.fr/panomatic/download.php?d=7&v=0.9.4" -O panomatic-0.9.4-src.tar.bz2<br />
wget http://aorlinsk2.free.fr/panomatic/panomatic_gcc44.patch patch<br />
tar xvfj panomatic-0.9.4-src.tar.bz2<br />
cd panomatic-0.9.4<br />
patch -p 1 < ../panomatic_gcc44.patch<br />
./configure<br />
make<br />
sudo make install<br />
</pre><br />
<br />
To use Pano-o-matic, open Hugin<br />
<br />
* In File > Preferences > Autopano :<br />
* Select Autopano-SIFT<br />
* Check "Use alternative autopano-SIFT program"<br />
* Choose the path to the binary ( /usr/local/bin )<br />
* In Arguments, put : -o %o %i<br />
<br />
==== Pablo's variation ====<br />
<br />
Around the end of the year 2009, Pablo integrated a [http://groups.google.com/group/hugin-ptx/browse_thread/thread/d9c0558c679cad52 new] experimental descriptor based on the geometric blur and DAISY papers. Also, Pablo said that the algorithm is not really based on a published approach, just on some ideas that are mentioned in a few of them, and its currently simpler than any of them:<br />
<br />
o geometric blur: [http://www.eecs.berkeley.edu/~aberg/gb.html]<br />
<br />
o daisy: [http://cvlab.epfl.ch/~tola/daisy.html]<br />
<br />
o descriptor learning: [http://cvlab.epfl.ch/~brown/learndesc/learndesc.html]<br />
<br />
To build that version of panomatic instead, follow these instructions:<br />
<br />
This is current the subject of a GSoC 2010 project and may be available in future versions of Hugin.<br />
<br />
<pre><br />
sudo aptitude install libboost-python-dev bzr cmake libvigraimpex-dev<br />
</pre><br />
<br />
<pre><br />
bzr branch lp:~pablo.dangelo/hugin/panomatic-lib<br />
mkdir build<br />
cd build<br />
cmake ../panomatic-lib<br />
make<br />
sudo make install<br />
</pre><br />
<br />
To use the new descriptor the arguments for Hugin are: '''--sieve1size 100 --sieve2size 2 -o %o %i'''<br />
<br />
== ExifTool ==<br />
<br />
ExifTool is no longer mandatory for Hugin to work. It is used to pass metadata from the input to the output images during the stitching process. <br />
<br />
[http://www.sno.phy.queensu.ca/~phil/exiftool/ ExifTool] is a platform-independent Perl library plus a command-line application for reading, writing and editing meta information in image, audio and video files.<br />
<br />
Usually the version distributed with Ubuntu (8.15 in Ubuntu 10.10; 7.89 in Ubuntu 10.4) is good enough and you don't need to bother with the following instructions. However there were situations in the past and there might be situations in the future where the latest versions offer better support. These issues will occur most likely with specific camera brands/models and the most recent models. The following instructions are for those cases.<br />
<br />
<pre><br />
sudo apt-get purge libimage-exiftool-perl<br />
</pre><br />
<br />
<pre><br />
wget http://www.sno.phy.queensu.ca/~phil/exiftool/Image-ExifTool-8.50.tar.gz<br />
tar -xzf Image-ExifTool-8.50.tar.gz<br />
cd Image-ExifTool-8.50<br />
perl Makefile.PL<br />
make test<br />
sudo make install<br />
</pre><br />
<br />
== Pano Viewers ==<br />
<br />
=== PanoGLView ===<br />
<br />
PanoGLView is an OpenGL hardware accelerated interactive immersive viewer for equirectangular images.<br />
<br />
Pre-Requisites:<br />
<pre>sudo apt-get install wx-common libwxgtk2.8-dev libglew-dev</pre><br />
<br />
To build and install:<br />
<pre><br />
mkdir -p ~/src/panoglview<br />
cd ~/src/panoglview<br />
hg clone http://hugin.hg.sourceforge.net:8000/hgroot/hugin/panoglview panoglview.hg<br />
cd panoglview.hg<br />
hg update<br />
./bootstrap<br />
./configure<br />
make<br />
sudo make install<br />
</pre><br />
<br />
=== FreePV - DEPENDENCIES ARE BROKEN - FAILS TO BUILD ===<br />
<br />
Pre-Requisites:<br />
<pre><br />
sudo apt-get install cmake make pkg-config g++ mozilla-devscripts freeglut3-dev zlib1g-dev \<br />
libjpeg-dev libxext-dev libxmu-dev x11proto-xf86vidmode-dev libxxf86vm-dev libnspr4-dev \<br />
libxml2-dev libpng12-dev<br />
</pre><br />
To build<br />
<pre><br />
svn co https://freepv.svn.sourceforge.net/svnroot/freepv/freepv/trunk/ freepv<br />
cd freepv<br />
cmake .<br />
make<br />
sudo make install<br />
</pre><br />
<br />
=== Panini Perspective Tool ===<br />
<br />
Strictly speaking, Panini is more than just a viewer. It's a powerful tool to extract/transform views and can also be easily used as a viewer.<br />
<br />
Get dependencies:<br />
<pre><br />
sudo apt-get install qt4-qmake libqt4-dev zlib1g-dev<br />
</pre><br />
<br />
Get code:<br />
<pre><br />
mkdir -p ~/src/pvqt<br />
cd ~/src/pvqt<br />
svn co https://pvqt.svn.sourceforge.net/svnroot/pvqt pvqt.svn<br />
</pre><br />
<br />
Build:<br />
<pre><br />
cd pvqt.svn<br />
qmake panini.pro<br />
make<br />
</pre><br />
<br />
Install (brute force):<br />
<pre><br />
sudo cp Panini /usr/local/bin/ <br />
</pre><br />
<br />
Menu Entry for Kubuntu:<br />
<pre><br />
kmenuedit<br />
</pre><br />
<br />
in kmenuedit<br />
* navigate to Graphics<br />
** click on New Item<br />
** Enter "Panini" as Name<br />
** Enter "Perspective Tool" as Description<br />
** click on the empty icon and look for an icon (I used the akonadi one)<br />
** Enter "Panini" as Command<br />
** Click on Save button<br />
<br />
== Notes for Packagers ==<br />
<br />
=== Tarballs ===<br />
<br />
* to get an updated ChangeLog in Mercurial repositories (Hugin has it also in the cmake invocation, use '''-DUPDATE_CHANGELOG=1''')<br />
<pre><br />
hg log --follow --style=changelog <br />
</pre><br />
* to update the ChangeLog in SVN repositories (Panotools)<br />
<pre><br />
svn up<br />
svn2cl<br />
svn ci<br />
</pre><br />
<br />
=== Deb Packages ===<br />
<br />
The deb packages built by CMake (2.8.2) are broken by Debian standard. Please do not distribute them. There are official updated recent packages at the Hugin PPA mentioned above which include nightlies (produced every 24 hours) and stables (produced out of released tarballs). If you miss binaries for your series of Ubuntu and you have built them for yourself following the instructions above, considering moving up one level and contributing to the [[Hugin PPA]].<br />
<br />
[[Category:Software:Platform:Linux]]<br />
[[Category:Software:Hugin]]<br />
[[Category:Software:Hugin:Compiling]]</div>Onomouhttps://wiki.panotools.org/index.php?title=Hugin_Compiling_OpenSuse&diff=13647Hugin Compiling OpenSuse2011-07-14T20:44:34Z<p>Onomou: Change compiling category</p>
<hr />
<div>To build enblend, enfuse, libpano and hugin, follow the instructions below.<br />
<br />
== Dependencies and prerequisites needed for OpenSuSE 10.3 ==<br />
<br />
gettext<br />
libjpeg-devel<br />
boost-devel<br />
boost <br />
wxGTK-devel<br />
wxGTK<br />
OpenEXR-devel<br />
openEXR<br />
libexiv2-devel<br />
libtiff-devel<br />
liblcms-devel<br />
cmake<br />
<br />
== Enblend and Enfuse (cvs) ==<br />
<br />
cvs -d:pserver:anonymous@enblend.cvs.sourceforge.net:/cvsroot/enblend login<br />
cvs -z3 -d:pserver:anonymous@enblend.cvs.sourceforge.net:/cvsroot/enblend co -P enblend<br />
cd enblend<br />
make -f Makefile.cvs<br />
./configure<br />
make<br />
sudo make install<br />
<br />
== libpano13 ==<br />
<br />
mkdir -p /usr/src/panotools/trunk<br />
cd /usr/src/panotools/trunk<br />
svn co https://panotools.svn.sourceforge.net/svnroot/panotools/trunk/libpano libpano13<br />
cd libpano13<br />
sh ./bootstrap<br />
make<br />
sudo make install install-data-am<br />
<br />
== Hugin ==<br />
=== Checkout Hugin ===<br />
<br />
mkdir /usr/src/hugin<br />
cd /usr/src/hugin<br />
svn co https://hugin.svn.sourceforge.net/svnroot/hugin/hugin/trunk hugin<br />
<br />
* if you need to build a specific SVN revision, e.g. 2765, you can slightly change the svn command to get it. e.g.:<br />
<br />
svn co -r 2765 https://hugin.svn.sourceforge.net/svnroot/hugin/hugin/trunk/ hugin<br />
<br />
=== Compile Hugin ===<br />
<br />
mkdir /usr/src/hugin/BuildHugin<br />
cd /usr/src/hugin/BuildHugin<br />
ccmake /usr/src/hugin/hugin<br />
cmake /usr/src/hugin/hugin<br />
make && sudo make install<br />
<br />
== autopano-sift-C ==<br />
Needed for automatic control point generation, restricted by software patents in some countries.<br />
<br />
cd /usr/src<br />
svn co https://hugin.svn.sourceforge.net/svnroot/hugin/autopano-sift-C/trunk/ autopano-sift-C<br />
cd autopano-sift-C<br />
mkdir build && cd build<br />
cmake -DCMAKE_INSTALL_PREFIX=/usr/local ..<br />
make<br />
sudo make install<br />
<br />
== Status reports ==<br />
<br />
Success Report: On OpenSuSE 10.2 ist's really straightforward.<br />
* clean SVN chechout (version as of 20070204)<br />
* followed the instructions in '''INSTALL_cmake'''.<br />
* The only non-standard thing is libpano13, (2.9.12 was used)<br />
* All other dependencies have been resolved using the standard (smart) repositories for OpenSuSE (wxGTK is 2.6.3.3).<br />
<br />
Success Report: Confirmed working on OpenSuSE 10.3 and x86_64 architecture.<br />
<br />
Success Report: On OpenSuSE 11.0 x86_64.<br />
* you will need to make sure you have all of the build tools. (examples: gcc+ automake)<br />
* Also had to install libXML2 for autopano<br />
<br />
For OpenSuSE 11.1:<br />
* On x86_64 systems with libraries in /usr/lib64 or /usr/local/lib64 such as OpenSuSE, redhat or fedora you need to pass LIB_SUFFIX=64 to cmake<br />
<br />
[[Category:Software:Platform:Linux]]<br />
[[Category:Software:Hugin]]<br />
[[Category:Software:Hugin:Compiling]]</div>Onomouhttps://wiki.panotools.org/index.php?title=Hugin_Compiling_OSX&diff=13646Hugin Compiling OSX2011-07-14T20:44:20Z<p>Onomou: Change compiling category</p>
<hr />
<div>==Introduction==<br />
This tutorial describes how to build Hugin on OSX via [http://www.macports.org/ MacPorts]. [http://www.finkproject.org/ Fink] users should also be able to use it even though the commands and directory structure is different from MacPorts.<br />
*Directory structure where everything is built and installed:<br />
**MacPorts: /opt/local<br />
**Fink: /sw<br />
*Main commands to install/update/uninstall/deactivate packages:<br />
**MacPorts: sudo port [install][update][uninstall][search] <package1> <package2> <packagex><br />
**Fink: sudo apt-get [install][update][uninstall][search] <package1> <package2> <packagex><br />
'''Note:''' These are only the most used command options for both port and apt-get. See their respective websites [http://www.macports.org/ Macports.org] and [http://www.finkproject.org/ Finkproject.org] for documentation.<br />
<br />
'''Note:''' This Howto does not describe how to build a portable universal application. You can use the [[Build_a_MacOSX_Universal_Hugin_bundle_with_Xcode | Build a MacOSX Universal Hugin bundle with Xcode]]<br />
<br />
'''Note:''' In case you encounter problems, report them on [http://groups.google.com/group/hugin-ptx the Hugin mailing list].<br />
<br />
==Building environment==<br />
===Download and install XCode===<br />
[http://developer.apple.com/tools/download/ Download] and install the XCode Tools version for your MacOSX version: Xcode 2.5.x for MacOSX 10.4.x or below, Xcode 3.1.x for 10.5.x (Leopard) and Xcode 3.2.x for 10.6.x (Snow Leopard). You will not use the Xcode development environment itself, but the MacOSX system comes without the GNU compiler, builder, linker and so on.<br />
<br />
===Fink commander===<br />
''Note: This tutorial describes how to build Hugin with MacPorts. This should more or less be the same for Fink. All references to <tt>/opt/local</tt> that are mentioned here for MacPorts should be changed with <tt>/sw</tt> for Fink.''<br />
You may find [http://finkcommander.sourceforge.net/ Fink Commander] helpful. Unfortunately it [http://sourceforge.net/forum/forum.php?forum_id=684829 seems] unsupported / unmaintained. The Fink [http://www.finkproject.org/faq/index.php?phpLang=en FAQ] may help. Can somebody please describe here how to install Fink and Fink Commander?<br />
<br />
===Install Macports===<br />
If you don't have it already, install MacPorts, which provides the <tt>port</tt> command, from [http://www.macports.org MacPorts], giving you compilable package access to thousands of pieces of open source software. If you already have macports (formerly darwinports) installed, update it to at least version 1.7.0:<br />
<blockquote><br />
<pre><br />
sudo port selfupdate<br />
</pre><br />
Make sure you have synced the latest port files:<br />
<pre><br />
sudo port -d sync<br />
</pre><br />
</blockquote><br />
<br />
''Snow Leopard remarks:'' <br />
- edit your "/opt/local/etc/macports/macports.conf" and set "universal_archs" to "x86_64 i386" (off course without the double quotes).<br />
<br />
===Porticus===<br />
You may find the GUI frontend [http://porticus.alittledrop.com/ Porticus] helpful with [http://www.macports.org/ MacPorts]<br />
<br />
===Install CMake===<br />
Install cmake from MacPorts:<br />
<pre><br />
$ sudo port install cmake<br />
</pre><br />
<br />
Alternatively, you can download a prepackaged installer from [http://www.cmake.org/HTML/Download.html CMake].<br />
<br />
===Mercurial (HG)===<br />
You need to get and install Mercurial from MacPorts as the Hugin development trunk is in a Marcurial repository.<br><br />
''Note: Hugin used to be in a SVN repository but since mid May 2010 it has been moved to Mercurial''<br />
<br />
<br />
===Subversion (SVN)===<br />
You need to get and install Subversion from MacPorts. If you fancy a nice GUI you can download the Open-Source [http://www.lachoseinteractive.net/en/community/subversion/svnx/features/?sid=b42441f308810ad0d36b779f90319391 SVNX]. You still need svn installed as it is only a graphical shell and I won't explain SVNX here (I only used it once, I still like the terminal).<br />
''Note: Subversion comes preinstalled in Leopard and Snow Leopard. In Leopard, it is quite old, so you'll want to compile the newer version from MacPorts. In Snow Leopard, the pre-installed version is the quite current 1.6.5, and should be fine.''<br />
<br />
==Install necessary libraries== <br />
Use port to install the necessary libraries and commands for Hugin:<br />
<blockquote><br />
<pre><br />
sudo port install boost tiff jpeg libpng wxWidgets subversion openexr exiv2 glew mercurial tclap<br />
</pre><br />
</blockquote><br />
<br />
Wait as all of these source packages (and it's dependencies) are downloaded and compiled, and installed into /opt/local. Go get a frappe, walk the dog, and total the first 1000 prime numbers in binary.<br />
<br />
<br />
<br />
<br />
===libpano13===<br />
You can either build from the latest "tarball"release from [http://sourceforge.net/project/showfiles.php?group_id=96188&package_id=237430 SourceForge], which is currently 2.9.17 or from the latest version in SVN (preferred). The current MacPorts version is too old:<br />
<br />
<pre><br />
svn co https://panotools.svn.sourceforge.net/svnroot/panotools panotools<br />
</pre><br />
<br />
====Build libpano13 from SVN====<br />
To build and install the SVN version you first need to edit the bootstrap file and change:<br />
<br />
<tt>LIBTOOLIZE=${LIBTOOLIZE:-libtoolize}</tt><br />
<br />
to <br />
<br />
<tt>LIBTOOLIZE=${LIBTOOLIZE:-glibtoolize}</tt><br />
<br />
<pre><br />
$ cd DirectoryWherePanotoolsIs/panotools/trunk/libpano<br />
$ nano bootstrap (or do it with your preferred editor)<br />
</pre><br />
<br />
Alternatively, this command-line should work just as well (untested):<br />
<br />
export LIBTOOLIZE=glibtoolize<br />
<br />
Now you can build the library.<br />
<br />
On Tiger and Leopard do:<br />
<pre><br />
$ export CFLAGS="-I/opt/local/include -L/opt/local/lib"<br />
$ export CXXFLAGS="-I/opt/local/include -L/opt/local/lib"<br />
$ ./bootstrap --without-java<br />
$ make<br />
$ sudo make install<br />
</pre><br />
<br />
On Snow Leopard do:<br />
<pre><br />
$ export CFLAGS="-arch i386 -I/opt/local/include -L/opt/local/lib"<br />
$ export CXXFLAGS="-arch i386 -I/opt/local/include -L/opt/local/lib"<br />
$ ./bootstrap --without-java<br />
</pre><br />
Open the "libtool" file with an editor and change all occurrences of "-dynamiclib" to "-dynamiclib -arch i386" (2 occurrences).<br><br />
''Note:'' If you want to build universal on Snow Leopard for both i386 and x86_64, change the "-dynamiclib" to "-dynamiclib -arch i386 -arch x86_64" (2 occurrences).<br />
<pre><br />
$ make<br />
$ sudo make install<br />
</pre><br />
<br />
By default the library is installed into <tt>/usr/local/lib</tt>.<br />
<br />
====Build libpano13 from a tar.gz====<br />
To build libpano from a .tar.gz file, CD into the source directory of the unpacked .tar.gz. This will normally be "libpano13-2.9.xy" where "xy" is the version number. Note that the current Hugin version needs 2.9.18 or newer.<br />
Then do the following on Tiger and Leopard:<br />
<pre><br />
$ export CFLAGS="-I/opt/local/include -L/opt/local/lib"<br />
$ export CXXFLAGS="-I/opt/local/include -L/opt/local/lib"<br />
$ ./configure --without-java<br />
$ make<br />
$ sudo make install<br />
</pre><br />
On Snow Leopard do the following:<br />
<pre><br />
$ export CFLAGS="-arch i386 -I/opt/local/include -L/opt/local/lib"<br />
$ export CXXFLAGS="-arch i386 -I/opt/local/include -L/opt/local/lib"<br />
$ ./configure --without-java<br />
</pre><br />
Open the "libtool" file with an editor and change all occurrences of "-dynamiclib" to "-dynamiclib -arch i386" (4 occurrences).<br><br />
''Note:'' If you want to build universal on Snow Leopard for both i386 and x86_64, change the "-dynamiclib" to "-dynamiclib -arch i386 -arch x86_64" (4 occurrences).<br />
<pre><br />
$ make<br />
$ sudo make install<br />
</pre><br />
<br />
By default the library is installed into <tt>/usr/local/lib</tt>.<br />
<br />
===WxWidgets===<br />
Hugin requires wxWidgets, which is called wxMac for MacOSX, the GUI toolkit currently employed by Hugin, to be at version >= 2.8.7. The current version of wxWidgets at MacPorts is 2.8.11.<br />
Note: Hugin is not configured yet to use WxWidgets 2.9<br />
<br />
====Tiger (10.4.x) ====<br />
Fix a problem on Tiger (10.4.x): Tiger comes with WxWindows version 2.5. The Hugin cmake will search OS paths first and will find Tiger's own version 2.5 instead of your freshly compiled 2.8. You need to get Tiger's 2.5 version out of the way as you won't be able to build Hugin succesfully as long as it is in place.<br />
<blockquote><br />
<pre><br />
$ sudo mv /usr/bin/wx-config /usr/bin/wx-config-2.5<br />
$ sudo mv /usr/include/wx-2.5 /usr/include/wx-2.5-macTiger<br />
</pre><br />
</blockquote><br />
<br />
====Leopard (10.5.x)====<br />
Fix a problem on Leopard (10.5.x): Leopard comes with WxWindows version 2.8.4. The Hugin cmake will search OS paths first and will find Leopard's own version 2.8.4 instead of your freshly compiled 2.8.8 or above. You need to get Tiger's 2.8.4 version out of the way. Hugin will build succesfully with 2.8.4 and will run. However version 2.8.4 still contains some bugs that will cause "bleeding through" in the graphical CP windows. This means that when things change in wxwidgets objects, sometimes (most of the times) the CP window displays through your current GUI screen.<br />
<blockquote><br />
<pre><br />
sudo mv /usr/bin/wx-config /usr/bin/wx-config-2.8.4<br />
sudo mv /usr/include/wx-2.8 /usr/include/wx-2.8-macLeopard<br />
</pre><br />
</blockquote><br />
<br />
====Snow Leopard (10.6.x)====<br />
Snow Leopard comes with WxWindows 2.8.8 so no changes are required.<br />
<br />
==Build Hugin==<br />
===Get Hugin from Mercurial===<br />
Check out the hugin sources from the Mercurial repository, like:<br />
<blockquote><br />
<pre><br />
hg clone http://hugin.hg.sourceforge.net:8000/hgroot/hugin/hugin hugin<br />
</pre><br />
</blockquote><br />
If you are asked to accept the ssh key from the SourceForge server, do accept it permanently (p). Otherwise the configuring process using cmake will fail.<br />
<br />
On subsequent updates you simply cd into the hugin directory and issue the following two commands: <br />
<blockquote><br />
<pre><br />
hg pull<br />
hg update<br />
</pre><br />
</blockquote><br />
<br />
===Create hugin build directory===<br />
Create another directory alongside the newly created <tt>hugin/</tt> for the build files (a cool feature of CMake: it doesn't need to pollute your source directory with build files!):<br />
<blockquote><br />
<pre><br />
mkdir hugin_build; cd hugin_build<br />
</pre><br />
</blockquote><br />
''Note: You can give this directory any name you want, but hugin_build is chosen for it's clarity.''<br />
===Configure build===<br />
Before we configure hugin we need to set the build environment:<br />
<blockquote><br />
<pre><br />
export CFLAGS="-I/opt/local/include -L/opt/local/lib"<br />
export CXXFLAGS=$CFLAGS<br />
</pre><br />
</blockquote><br />
<br />
''Snow Leopard:''<br />
If you are on Snow Leopard you need to use the following C/CXX FLAGS: <br />
<blockquote><br />
<pre><br />
export CFLAGS="-arch i386 -I/opt/local/include -L/opt/local/lib"<br />
export CXXFLAGS=$CFLAGS<br />
</pre><br />
</blockquote><br />
''Note: On Snow Leopard, gcc builds for 64-bit architecture by default. However, some libraries that Hugin depends upon are not yet compilable as 64-bit libraries (such as wxWindows-2.8). Thus, the i386 flag is necessary to force a 32-bit build.''<br />
<br />
Configure hugin using cmake from inside the build directory you created:<br />
<blockquote><br />
<pre><br />
cmake ../hugin<br />
</pre><br />
</blockquote><br />
''Note: If you are rebuilding hugin after an svn upgrade or other (system) change, the savest way to proceed is to first remove the "CMakeCache.txt" from your build directory. It contains the build settings for your previous build.''<br />
<br />
===Compile Hugin===<br />
Compile Hugin and friends:<br />
<blockquote><br />
<pre><br />
make<br />
sudo make install<br />
</pre><br />
</blockquote><br />
Watch the pretty colors go by. Give the dog another quick spin around the block; you're finished. Look for the new bundle <tt>Hugin.app</tt> in <tt>usr/local/Applications/</tt> or in <tt>usr/local/bin/</tt>. Copy or link it to <tt>/Applications</tt>, or your preferred location, and commence testing.<br />
<br />
== Important Note on the produced Bundle ==<br />
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.<br />
You can use the [[Build_a_MacOSX_Universal_Hugin_bundle_with_Xcode | Build a MacOSX Universal Hugin bundle with Xcode]] to build a universal portable bundle.<br />
<br />
== Building Enblend (using Fink or MacPorts) ==<br />
follow these [[Enblend_Compiling_OSX|updated instructions]]<br />
<br />
== Building Autopano-Sift-C ==<br />
Follow [[autopano-sift-C_Compiling_OSX|these instructions]]<br />
<br />
[[Category:Software:Platform:Mac OS X]]<br />
[[Category:Software:Hugin]]<br />
[[Category:Software:Hugin:Compiling]]</div>Onomouhttps://wiki.panotools.org/index.php?title=Hugin_Compiling_Mandriva&diff=13645Hugin Compiling Mandriva2011-07-14T20:43:51Z<p>Onomou: Change compiling category</p>
<hr />
<div>in /etc/alternatives change the links:<br />
* wx-config to /usr/lib64/wx/config/gtk2-unicode-release-2.8<br />
* wxrc to /usr/bin/wxrc-2.8-unicode<br />
<br />
then it should compile as on other linux platforms.<br />
<br />
Reference: https://bugs.launchpad.net/hugin/+bug/704418<br />
<br />
[[Category:Software:Hugin:Compiling]]</div>Onomouhttps://wiki.panotools.org/index.php?title=Hugin_Compiling_Gentoo&diff=13644Hugin Compiling Gentoo2011-07-14T20:43:38Z<p>Onomou: Change compiling category</p>
<hr />
<div>== Preface ==<br />
These are instructions to build hugin and the whole set of helper applications required from CVS/SVN.<br />
<br />
{| style="margin: 1em auto 1em 1em;background:#FFFF99;color:#FF0000;text-align:left;border: solid #FF3300;"<br />
|-valign="top"<br />
! '''UPDATE:'''<br />
Hugin 2010.0.0 is now available in portage. If you prefer a in-portage solution instead of the bleeding edge, you should just 'emerge hugin'.<br />
|}<br />
<br />
<br />
These instructions are work in progress. They're tested on x86 only (though amd64 should work just fine). (Maybe ppc as well. If you try on ppc, please tell me if it works or not.)<br />
<br />
If anything does not work: [[Hugin_Compiling_Gentoo#Bugs|Bugs]]<br />
<br />
== Setting up the overlay ==<br />
<br />
{| style="margin: 1em auto 1em 1em;background:#FFFF99;color:#FF0000;text-align:left;border: solid #FF3300;"<br />
|-valign="top"<br />
! '''Note:'''<br />
The overlay listed below does not appear to be available.<br />
|}<br />
<br />
<br />
If you've never worked with a overlay, please read http://www.gentoo.org/proj/en/overlays/userguide.xml (especially the section on layman) to get an idea of what we're doing here.<br />
<br />
The next steps are:<br />
* Installing layman (if you haven't already).<br />
* Add the overlay listing to layman's config.<br />
* Add the overlay using layman.<br />
<br />
First sudo, so you have sufficient permissions:<br />
<pre><br />
sudo -s<br />
(enter your password)<br />
</pre><br />
<br />
Install layman (IF YOU HAVEN'T ALREADY DONE SO):<br />
<pre><br />
emerge -av layman<br />
echo "source /usr/portage/local/layman/make.conf" >> /etc/make.conf<br />
</pre><br />
<br />
Add the overlay listing:<br />
Open /etc/layman/layman.cfg in your favourite editor and change:<br />
<pre><br />
overlays : http://www.gentoo.org/proj/en/overlays/repositories.xml<br />
http://pani.webhop.org/download/overlays.xml<br />
</pre><br />
Save and exit.<br />
<br />
Add the overlay using layman:<br />
<pre><br />
layman -f<br />
layman -a panotools<br />
</pre><br />
<br />
Run "layman -S" (or eix-sync if you have it installed and configured to sync layman overlays) periodicaly for new updates.<br />
<br />
== Unmasking ==<br />
The versions in the overlay are masked as unstable. You'll have to unmask them:<br />
<br />
Open /etc/portage/package.keywords (if it doesn't exist, create it) and add the following lines:<br />
<pre><br />
=media-gfx/hugin-9999 ~x86<br />
=media-gfx/enblend-9999 ~x86<br />
=media-libs/libpano13-9999 ~x86<br />
=media-gfx/autopano-sift-C-9999 ~x86<br />
</pre><br />
<br />
For more information on unmasking, have a look at [http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=3&chap=3#doc_chap2 the Gentoo Handbook].<br />
<br />
== Installing ==<br />
Now the fun part! Run<br />
<pre><br />
emerge -av hugin<br />
</pre><br />
<br />
=== enblend-staging ===<br />
If you know what you're doing and want to install enblend from Christoph Spiel's -staging branch, you can do:<br />
<pre><br />
emerge --unmerge enblend<br />
emerge enblend-staging<br />
</pre><br />
<br />
== Staying up to date ==<br />
Run "emerge -av -1 hugin enblend libpano13 autopano-sift-C" regularly to build the latest versions.<br />
<br />
You could also use the [http://avuton.googlepages.com/update-live-ebuilds update-live-ebuilds script] that upgrades only if something actually changed.<br />
<br />
If you are running sys-apps/portage-2.2* you can run emerge -av @live-rebuild to rebuild all your live packages.<br />
<br />
== Bugs ==<br />
For ebuilds from the Gentoo portage tree, [http://bugs.gentoo.org Gentoo's Bugzilla] is the way to go.<br />
<br />
Please '''DO NOT''' report overlay-related bugs there. Instead, please [http://pani.webhop.org/c contact me directly].<br />
<br />
[[Category:Software:Hugin]]<br />
[[Category:Software:Platform:Linux]]<br />
[[Category:Software:Hugin:Compiling]]</div>Onomouhttps://wiki.panotools.org/index.php?title=Hugin_Compiling_FreeBSD&diff=13643Hugin Compiling FreeBSD2011-07-14T20:43:26Z<p>Onomou: Change compiling category</p>
<hr />
<div>Hugin is part of the FreeBSD [http://www.freebsd.org/cgi/cvsweb.cgi/ports/graphics/hugin/ ports collection]. Using the ports collection (and contributing fixes to it) is the recommended way to install Hugin on FreeBSD.<br />
<br />
== Install with the port ==<br />
<br />
<pre><br />
# su<br />
# cd /usr/ports/graphics/hugin<br />
# make<br />
# make install<br />
</pre><br />
<br />
== Update the port ==<br />
<br />
{| style="margin: 1em auto 1em 1em;background:#FFFF99;color:#FF0000;text-align:left;border: solid #FF3300;"<br />
|-valign="top"<br />
! '''WARNING:'''<br />
Below is newbie's work in progress. Following these instructions may corrupt your FreeBSD system or worse. Exercise caution (read: don't do this) until the experts confirm that the newbie has done things rights.<br />
|}<br />
<br />
to track closely Hugin's releases, after each new release edit the following files in the ports collection:<br />
<br />
1. edit '''[http://www.freebsd.org/cgi/cvsweb.cgi/ports/graphics/hugin/distinfo?rev=1.8;content-type=text%2Fplain distinfo]''' to point to the right tarball. You will need to edit the name in parenthesis, to calculate and edit the md5 and sha256 hashes, to edit the filesize.<br />
<br />
2. edit the '''Makefile'''.<br />
* edit PORTVERSION and PORTREVISION<br />
* add/update build dependencies to LIB_DEPENDS=<br />
* add/update runtime dependencies to RUN_DEPENDS=<br />
* add/update Cmake building arguments to CMAKE_ARGS=<br />
* if you're not sure about something that need to be done, ask the experts.<br />
<br />
3. edit the '''pkg-plist''' list of installed files. While it can't be done automatically, the trick is to 'make PREFIX=/tmp/foobar install' and then check the files under /tmp/foobar (assuming it was non-existent before)<br />
<br />
4. probably not necessary: edit the '''pkg-descr''' description of Hugin.<br />
<br />
make a diff and submit it to the FreeBSD experts.<br />
<br />
== files / patches ==<br />
<br />
{| style="margin: 1em auto 1em 1em;background:#FFFF99;color:#FF0000;text-align:left;border: solid #FF3300;"<br />
|-valign="top"<br />
! '''Note:'''<br />
This is a work in progress - mainly thoughts about simplifying / streamlining the patching to make life easier to the FreeBSD port maintainer. Please contribute if you have experience in this area.<br />
|}<br />
<br />
The patches are listed at http://www.freebsd.org/cgi/cvsweb.cgi/ports/graphics/hugin/files/<br />
<br />
=== CMake build ===<br />
* patch-CMakeLists.txt<br />
* patch-doc_CMakeLists.txt<br />
<br />
I think it makes sense for the variable mandir to be set in the general CMake build.<br />
<br />
if I put an IF(CMAKE_SYSTEM_NAME=="FreeBSD") condition and make the changes inside the Hugin repository, it should work, right?<br />
<br />
<br />
=== patch-src_hugin1_base_wx_RunStitchPanel.cpp ===<br />
<br />
I think this one I can apply upstream as-is?<br />
<br />
<br />
=== patch-src_hugin1_hugin_TextureManager.cpp ===<br />
<br />
Do I understand right that log2(x) is not defined in FreeBSD? and I fi put it inside a conditional expression, I could apply it upstream and it would coexist with the rest, e.g.<br />
<br />
<pre><br />
#if defined __FreeBSD__<br />
#define log2(x) (log(x) / log(2))<br />
#endif<br />
</pre><br />
<br />
?<br />
<br />
<br />
=== patch-src_hugin1_hugin_config_defaults.h ===<br />
<br />
this one looks outdated to me? Autopano-SIFT-C is now in the ports collection:<br />
<br />
http://www.freebsd.org/cgi/cvsweb.cgi/ports/graphics/autopano-sift-c/<br />
<br />
the "best practice" in the Hugin project is now to give users a choice of different CP generations. Panomatic is already in the Makefile of the Hugin port, and we now have also match-n-shift and a few other variations and more is expected in the future - each with its own specific settings.<br />
<br />
how would be the best way to approach this? should I submit a patch for the ports makefile with<br />
<br />
<pre><br />
.if defined(WITH_AUTOPANOSIFT-C)<br />
RUN_DEPENDS+= autopanog:${PORTSDIR}/graphics/autopano-sift-c<br />
.endif<br />
</pre><br />
<br />
?<br />
<br />
and what would be the optimal way to set different defaults for the different choices inside the above conditional expression? multiple patch-src_hugin1_hugin_config_defaults.h ? I don't think so but I'm not sure.<br />
<br />
I've added Bruno Postle to this mail. My goal is to streamline the process of getting the latest Hugin and related tools into FreeBSD. We'll have more frequent releases in the foreseeable future and the more we can simplify and automate, the better.<br />
<br />
thank you for your efforts.<br />
<br />
[[Category:Software:Hugin]]<br />
[[Category:Software:Hugin:Compiling]]</div>Onomouhttps://wiki.panotools.org/index.php?title=Hugin_Compiling_Fedora&diff=13642Hugin Compiling Fedora2011-07-14T20:43:03Z<p>Onomou: Change compiling category</p>
<hr />
<div>== Binary packages ==<br />
<br />
The [[hugin]] and [[enblend]] stable releases are part of default fedora, available via the ''Add/Remove Software'' menu. Note that there is no [[autopano-sift]] in fedora due to patent issues, but [[autopano-sift-C]] can be found in the [http://rpmfusion.org/ RPM Fusion] 3rd party package repository.<br />
<br />
Otherwise, recent-ish hugin snapshots and other panorama-related software can usually be found at the [http://bugbear.postle.net/~bruno/apt/fedora/linux/ fedora panorama repository]. To subscribe just follow this [http://bugbear.postle.net/~bruno/apt/fedora/linux/11/i386/RPMS.panorama/panorama-release-8-1.fc11.noarch.rpm panorama release] link, use the ''Package Installer'' option, and each time you do a ''Software Update'' hugin will be upgraded to the latest snapshot. (some redhat/centos packages can also be found at the same location).<br />
<br />
== Compiling ==<br />
<br />
If you want to compile hugin yourself, just follow the instructions in the '''INSTALL_cmake''' file, you will need these development RPM packages (January 2011):<br />
<br />
libpano13-devel zlib-devel libtiff-devel libjpeg-devel<br />
libpng-devel gettext-devel wxGTK-devel boost-devel<br />
cmake desktop-file-utils OpenEXR-devel gcc-c++ exiv2-devel glew-devel<br />
freeglut-devel mesa-libGLU-devel libXmu-devel<br />
<br />
To actually use hugin you also need make, shared-mime-info, [[enblend]] and perl-Image-ExifTool RPM packages. [[autopano-sift-C]] or [[panomatic]] are optional now that Hugin has a built-in control point generator.<br />
<br />
Basic compilation instructions are:<br />
<br />
tar -bxvf hugin-2010.4.0.tar.bz2<br />
cd hugin-2010.4.0<br />
mkdir BUILD<br />
cd BUILD<br />
cmake ..<br />
make<br />
sudo make install<br />
<br />
This will install Hugin and its libraries to /usr/local, this is the preferred location for any software installed without a package manager.<br />
<br />
== rpm building instructions ==<br />
<br />
The source RPM package contains an hugin.spec file which is both the build documentation and the script for an automated build (other linux packaging systems work basically the same way).<br />
<br />
=== fedora configuration ===<br />
<br />
First set up your fedora system for building rpms, install some packages (as root):<br />
<br />
yum groupinstall "Development Tools"<br />
yum install rpmdevtools<br />
<br />
Using a normal user account create a build tree, by default this is ~/rpmbuild:<br />
<br />
rpmdev-setuptree<br />
<br />
=== Get a source tarball of hugin ===<br />
<br />
Either [http://sourceforge.net/projects/hugin/files/ download the current stable .tar.gz (or tar.bz2) file] from sourceforge or [http://wiki.panotools.org/Hugin_Compiling_Ubuntu#Fetch_the_Source_Code_with_Mercurial get the latest from Mercurial].<br />
<br />
If you have fetched the code via Mercurial you can now create a tarball like so:<br />
<br />
mkdir BUILD<br />
cd BUILD<br />
cmake ..<br />
make package_source<br />
<br />
('package_source' is a ''make'' target, targets are things like 'all' or 'clean' or 'install', this one just creates a tarball)<br />
<br />
=== Get a hugin.spec file ===<br />
<br />
Download an existing hugin .src.rpm file and extract the ''hugin.spec'' file by running this command as a normal user:<br />
<br />
rpm -ivh hugin-2010.2.0-1.src.rpm<br />
<br />
This should put the .spec file where rpmbuild expects to find it.<br />
<br />
~/rpmbuild/SPECS/hugin.spec<br />
<br />
The next step is to put the .tar.bz2 file where rpmbuild expects to find it:<br />
<br />
~/rpmbuild/SOURCES/hugin-2010.4.0.tar.bz2<br />
<br />
..and run rpmbuild to create both the SRPM and RPMS at the same time:<br />
<br />
rpmbuild -ba ~/rpmbuild/SPECS/hugin.spec<br />
<br />
This will fail, probably. You need to edit the .spec file to change the 'Version:' entry to match the number of the tarball, install any missing build dependency rpms, and try again.<br />
<br />
== Building with mock ==<br />
<br />
'mock' is a more sophisticated system for creating RPMS, it is possible to build multiple architectures and create packages for different releases of fedora and redhat enterprise linux on a single fedora system. <br />
<br />
Install mock as root and add yourself to the 'mock' group (use your user name, not 'myusername'):<br />
<br />
yum install mock<br />
usermod -a -G mock myusername<br />
<br />
Follow the instructions above for creating rpms, but just create the source rpm instead:<br />
<br />
rpmbuild -bs ~/rpmbuild/SPECS/hugin.spec<br />
<br />
Then you can build rpms from this src.rpm with mock like so:<br />
<br />
mock -r fedora-11-i386 rebuild ~/rpmbuild/SRPMS/hugin-2009.1.0-0.src.rpm<br />
<br />
The first time you do this it will take a very long time while it downloads and assembles a 'virtual' machine, but subsequent builds will only take a few minutes.<br />
<br />
[[Category:Software:Platform:Linux]]<br />
[[Category:Software:Hugin]]<br />
[[Category:Software:Hugin:Compiling]]</div>Onomouhttps://wiki.panotools.org/index.php?title=User_talk:Onomou&diff=13633User talk:Onomou2011-07-14T07:37:05Z<p>Onomou: </p>
<hr />
<div>==Compiling:Hugin==<br />
Wouldn't it have been better to name the new category Software:Hugin:Compiling in order to place it in the hugin hierarchy? <br />
--[[User:Erik Krause|Erik Krause]] 07:24, 14 July 2011 (UTC)<br />
<br />
Probably. I think the reason I didn't do that is that I thought there might be other articles (present or to be written) involving the compilation of other programs/tools than just hugin. It seemed like it would be worth having all of the compilation articles under one umbrella so that people could find them - eg. I had a very hard time finding a link to the Windows compilation stuff when I was on the Ubuntu compilation page without using the search button. I think your suggestion is better though, and I'll go ahead and change all of the pages to reflect that tomorrow if no one gets to it first. Do you have any ideas for how to link different programs' compilation pages so someone in the Ubuntu compile page can find the {something} compile page? I have felt for a while like the Ubuntu page is too long and getting to be unnavigable with all the steps and options for programs other than Hugin.--[[User:Onomou|Onomou]] 07:37, 14 July 2011 (UTC)</div>Onomouhttps://wiki.panotools.org/index.php?title=Hugin_Compiling_FreeBSD&diff=13630Hugin Compiling FreeBSD2011-07-11T20:18:12Z<p>Onomou: /* Update the port */ Reword warning</p>
<hr />
<div>Hugin is part of the FreeBSD [http://www.freebsd.org/cgi/cvsweb.cgi/ports/graphics/hugin/ ports collection]. Using the ports collection (and contributing fixes to it) is the recommended way to install Hugin on FreeBSD.<br />
<br />
== Install with the port ==<br />
<br />
<pre><br />
# su<br />
# cd /usr/ports/graphics/hugin<br />
# make<br />
# make install<br />
</pre><br />
<br />
== Update the port ==<br />
<br />
{| style="margin: 1em auto 1em 1em;background:#FFFF99;color:#FF0000;text-align:left;border: solid #FF3300;"<br />
|-valign="top"<br />
! '''WARNING:'''<br />
Below is newbie's work in progress. Following these instructions may corrupt your FreeBSD system or worse. Exercise caution (read: don't do this) until the experts confirm that the newbie has done things rights.<br />
|}<br />
<br />
to track closely Hugin's releases, after each new release edit the following files in the ports collection:<br />
<br />
1. edit '''[http://www.freebsd.org/cgi/cvsweb.cgi/ports/graphics/hugin/distinfo?rev=1.8;content-type=text%2Fplain distinfo]''' to point to the right tarball. You will need to edit the name in parenthesis, to calculate and edit the md5 and sha256 hashes, to edit the filesize.<br />
<br />
2. edit the '''Makefile'''.<br />
* edit PORTVERSION and PORTREVISION<br />
* add/update build dependencies to LIB_DEPENDS=<br />
* add/update runtime dependencies to RUN_DEPENDS=<br />
* add/update Cmake building arguments to CMAKE_ARGS=<br />
* if you're not sure about something that need to be done, ask the experts.<br />
<br />
3. edit the '''pkg-plist''' list of installed files. While it can't be done automatically, the trick is to 'make PREFIX=/tmp/foobar install' and then check the files under /tmp/foobar (assuming it was non-existent before)<br />
<br />
4. probably not necessary: edit the '''pkg-descr''' description of Hugin.<br />
<br />
make a diff and submit it to the FreeBSD experts.<br />
<br />
== files / patches ==<br />
<br />
{| style="margin: 1em auto 1em 1em;background:#FFFF99;color:#FF0000;text-align:left;border: solid #FF3300;"<br />
|-valign="top"<br />
! '''Note:'''<br />
This is a work in progress - mainly thoughts about simplifying / streamlining the patching to make life easier to the FreeBSD port maintainer. Please contribute if you have experience in this area.<br />
|}<br />
<br />
The patches are listed at http://www.freebsd.org/cgi/cvsweb.cgi/ports/graphics/hugin/files/<br />
<br />
=== CMake build ===<br />
* patch-CMakeLists.txt<br />
* patch-doc_CMakeLists.txt<br />
<br />
I think it makes sense for the variable mandir to be set in the general CMake build.<br />
<br />
if I put an IF(CMAKE_SYSTEM_NAME=="FreeBSD") condition and make the changes inside the Hugin repository, it should work, right?<br />
<br />
<br />
=== patch-src_hugin1_base_wx_RunStitchPanel.cpp ===<br />
<br />
I think this one I can apply upstream as-is?<br />
<br />
<br />
=== patch-src_hugin1_hugin_TextureManager.cpp ===<br />
<br />
Do I understand right that log2(x) is not defined in FreeBSD? and I fi put it inside a conditional expression, I could apply it upstream and it would coexist with the rest, e.g.<br />
<br />
<pre><br />
#if defined __FreeBSD__<br />
#define log2(x) (log(x) / log(2))<br />
#endif<br />
</pre><br />
<br />
?<br />
<br />
<br />
=== patch-src_hugin1_hugin_config_defaults.h ===<br />
<br />
this one looks outdated to me? Autopano-SIFT-C is now in the ports collection:<br />
<br />
http://www.freebsd.org/cgi/cvsweb.cgi/ports/graphics/autopano-sift-c/<br />
<br />
the "best practice" in the Hugin project is now to give users a choice of different CP generations. Panomatic is already in the Makefile of the Hugin port, and we now have also match-n-shift and a few other variations and more is expected in the future - each with its own specific settings.<br />
<br />
how would be the best way to approach this? should I submit a patch for the ports makefile with<br />
<br />
<pre><br />
.if defined(WITH_AUTOPANOSIFT-C)<br />
RUN_DEPENDS+= autopanog:${PORTSDIR}/graphics/autopano-sift-c<br />
.endif<br />
</pre><br />
<br />
?<br />
<br />
and what would be the optimal way to set different defaults for the different choices inside the above conditional expression? multiple patch-src_hugin1_hugin_config_defaults.h ? I don't think so but I'm not sure.<br />
<br />
I've added Bruno Postle to this mail. My goal is to streamline the process of getting the latest Hugin and related tools into FreeBSD. We'll have more frequent releases in the foreseeable future and the more we can simplify and automate, the better.<br />
<br />
thank you for your efforts.<br />
<br />
[[Category:Software:Hugin]]<br />
[[Category:Compiling:Hugin]]</div>Onomouhttps://wiki.panotools.org/index.php?title=Hugin_Compiling_FreeBSD&diff=13629Hugin Compiling FreeBSD2011-07-11T20:16:52Z<p>Onomou: /* files / patches */ Note cleanup</p>
<hr />
<div>Hugin is part of the FreeBSD [http://www.freebsd.org/cgi/cvsweb.cgi/ports/graphics/hugin/ ports collection]. Using the ports collection (and contributing fixes to it) is the recommended way to install Hugin on FreeBSD.<br />
<br />
== Install with the port ==<br />
<br />
<pre><br />
# su<br />
# cd /usr/ports/graphics/hugin<br />
# make<br />
# make install<br />
</pre><br />
<br />
== Update the port ==<br />
<br />
{| style="margin: 1em auto 1em 1em;background:#FFFF99;color:#FF0000;text-align:left;border: solid #FF3300;"<br />
|-valign="top"<br />
! '''WARNING:'''<br />
Below is newbie's work in progress. Following these instructions may corrupt your FreeBSD system or worse. Don't do that until the experts confirm that the newbie has done things rights.<br />
|}<br />
<br />
to track closely Hugin's releases, after each new release edit the following files in the ports collection:<br />
<br />
1. edit '''[http://www.freebsd.org/cgi/cvsweb.cgi/ports/graphics/hugin/distinfo?rev=1.8;content-type=text%2Fplain distinfo]''' to point to the right tarball. You will need to edit the name in parenthesis, to calculate and edit the md5 and sha256 hashes, to edit the filesize.<br />
<br />
2. edit the '''Makefile'''.<br />
* edit PORTVERSION and PORTREVISION<br />
* add/update build dependencies to LIB_DEPENDS=<br />
* add/update runtime dependencies to RUN_DEPENDS=<br />
* add/update Cmake building arguments to CMAKE_ARGS=<br />
* if you're not sure about something that need to be done, ask the experts.<br />
<br />
3. edit the '''pkg-plist''' list of installed files. While it can't be done automatically, the trick is to 'make PREFIX=/tmp/foobar install' and then check the files under /tmp/foobar (assuming it was non-existent before)<br />
<br />
4. probably not necessary: edit the '''pkg-descr''' description of Hugin.<br />
<br />
make a diff and submit it to the FreeBSD experts.<br />
<br />
== files / patches ==<br />
<br />
{| style="margin: 1em auto 1em 1em;background:#FFFF99;color:#FF0000;text-align:left;border: solid #FF3300;"<br />
|-valign="top"<br />
! '''Note:'''<br />
This is a work in progress - mainly thoughts about simplifying / streamlining the patching to make life easier to the FreeBSD port maintainer. Please contribute if you have experience in this area.<br />
|}<br />
<br />
The patches are listed at http://www.freebsd.org/cgi/cvsweb.cgi/ports/graphics/hugin/files/<br />
<br />
=== CMake build ===<br />
* patch-CMakeLists.txt<br />
* patch-doc_CMakeLists.txt<br />
<br />
I think it makes sense for the variable mandir to be set in the general CMake build.<br />
<br />
if I put an IF(CMAKE_SYSTEM_NAME=="FreeBSD") condition and make the changes inside the Hugin repository, it should work, right?<br />
<br />
<br />
=== patch-src_hugin1_base_wx_RunStitchPanel.cpp ===<br />
<br />
I think this one I can apply upstream as-is?<br />
<br />
<br />
=== patch-src_hugin1_hugin_TextureManager.cpp ===<br />
<br />
Do I understand right that log2(x) is not defined in FreeBSD? and I fi put it inside a conditional expression, I could apply it upstream and it would coexist with the rest, e.g.<br />
<br />
<pre><br />
#if defined __FreeBSD__<br />
#define log2(x) (log(x) / log(2))<br />
#endif<br />
</pre><br />
<br />
?<br />
<br />
<br />
=== patch-src_hugin1_hugin_config_defaults.h ===<br />
<br />
this one looks outdated to me? Autopano-SIFT-C is now in the ports collection:<br />
<br />
http://www.freebsd.org/cgi/cvsweb.cgi/ports/graphics/autopano-sift-c/<br />
<br />
the "best practice" in the Hugin project is now to give users a choice of different CP generations. Panomatic is already in the Makefile of the Hugin port, and we now have also match-n-shift and a few other variations and more is expected in the future - each with its own specific settings.<br />
<br />
how would be the best way to approach this? should I submit a patch for the ports makefile with<br />
<br />
<pre><br />
.if defined(WITH_AUTOPANOSIFT-C)<br />
RUN_DEPENDS+= autopanog:${PORTSDIR}/graphics/autopano-sift-c<br />
.endif<br />
</pre><br />
<br />
?<br />
<br />
and what would be the optimal way to set different defaults for the different choices inside the above conditional expression? multiple patch-src_hugin1_hugin_config_defaults.h ? I don't think so but I'm not sure.<br />
<br />
I've added Bruno Postle to this mail. My goal is to streamline the process of getting the latest Hugin and related tools into FreeBSD. We'll have more frequent releases in the foreseeable future and the more we can simplify and automate, the better.<br />
<br />
thank you for your efforts.<br />
<br />
[[Category:Software:Hugin]]<br />
[[Category:Compiling:Hugin]]</div>Onomouhttps://wiki.panotools.org/index.php?title=Talk:Hugin_Compiling_Windows_with_SDK&diff=13628Talk:Hugin Compiling Windows with SDK2011-07-11T20:13:29Z<p>Onomou: /* Page Name */ new section</p>
<hr />
<div>TortoiseSVN has a tool called SubWCRev. Quoting from the help file: <br />
<br />
<code><br />
SubWCRev is Windows console program which can be used to read the status of a Subversion working copy and optionally perform keyword substitution in a template file. <br />
</code><br />
<br />
<code><br />
SubWCRev reads the Subversion status of all files in a working copy, excluding externals by default. It records the highest commit revision number found, and the commit timestamp of that revision, It also records whether there are local modifications in the working copy, or mixed update revisions. <br />
</code><br />
<br />
<code><br />
If you want SubWCRev to perform keyword substitution, so that fields like repository revision and URL are saved to a text file, you need to supply a template file SrcVersionFile and an output file DstVersionFile which contains the substituted version of the template. <br />
</code><br />
<br />
Full details can be found [http://tortoisesvn.net/docs/release/TortoiseSVN_en/tsvn-subwcrev.html here]<br />
<br />
Does anyone else think it is worth the effort to be incorporated into Windows build process? This will improve "fool-profeness" of test build, as the executable will always be traceable back to the SVN revision and one of CMake config parameters can be eliminated. I'm yet not proficient enough in the current toolchain to do this myself, but eager to help in testing, etc.<br />
<br />
<small>--[[User:MaximTee|MaximTee]] 17:50, 16 March 2008 (CET)</small><br />
<br />
== 1) install Visual C++ 2008 Express ==<br />
<br />
The Microsoft site asks to install Silverlight first. Done. After downloading Visual C++ 200 Express (vcsetup.exe) trying to install. Setup discovers (on my machine) a previous install of Visual Studio 2008 that must be updated to SP1 before installation can proceed. Trying to fetch that SP1 - estimated download time over 20 minutes on my relatively fast ADSL line. [[User:Dedalus|Dedalus]] 17:07, 17 August 2008 (CEST)<br />
<br />
== Removal of MSVC Files ==<br />
<br />
On attempting to follow this I have discovered that about 6 weeks ago someone removed the MSVC files from the Enblend Hg repository. No idea what to do now as was my first experiment with compiling myself. Aaargh!<br />
--[[User:Arfgab|Arfgab]] 11:16, 13 January 2010 (UTC)<br />
<br />
== Missing GLUT ==<br />
<br />
Attempt to build hugin from these instructions has fallen over due to missing GLUT from the SDK.--[[User:Arfgab|Arfgab]] 11:54, 13 January 2010 (UTC)<br />
<br />
== CMake ==<br />
<br />
Can only find cmake-gui.exe in cmake 2.8 (in cmake 2.8\bin) not cmakesetup.exe. Am I missing something?--[[User:Arfgab|Arfgab]] 11:56, 13 January 2010 (UTC)<br />
<br />
== Page Name ==<br />
<br />
I would like to request that this page be renamed '''Hugin Compiling Windows with SDK''' to correspond with the other pages on building hugin. I created a new Compiling category to help organize these pages, and this particular page is the only one not following the format '''Hugin Compiling <Operating System>''' Are there any objections? Discussion? --[[User:Onomou|Onomou]] 20:13, 11 July 2011 (UTC)</div>Onomouhttps://wiki.panotools.org/index.php?title=Hugin_Compiling_Ubuntu&diff=13627Hugin Compiling Ubuntu2011-07-11T20:02:32Z<p>Onomou: /* Who Is This Page For */ Clean shortcut reference</p>
<hr />
<div>== Who Is This Page For ==<br />
<br />
These instructions contain the collective wisdom of Hugin contributors that are using Ubuntu or any of its variations (Ku/Xu/Lu/Edu/...buntu). They are work in progress and updated when newer versions of Ubuntu are released or when Hugin introduces new dependencies. They have worked, at the time of release or soon thereafter, with all 'buntu versions up until 10.10. They are intended to help contributors on the learning curve. If you are not here to contribute, spare yourself the effort and see the [[#Shortcut|Shortcut]] section below.<br />
<br />
They are likely to work only for the latest 'buntu release, but you can check this page's history at the time that the older 'buntu version was the most recent one to find the specifics for that version.<br />
<br />
If you are new here, read the whole page. It is recommended that you go sequentially through it.<br />
<br />
If you're familiar with the process and have run it a few time, look at the what's new section for important news.<br />
<br />
Apart from the odd change in package name, nothing should be substantially different (and if does not work, please leave a comment on the [http://groups.google.com/group/hugin-ptx hugin-ptx mailing list]). Don't worry if the same package appears twice in an apt-get install line - apt-get will update existing packages if there is a newer version, and ignore duplicates if the latest version is already installed. On the other hand, if apt-get says that it can't find a package, it might be the odd change in package name. You can find a replacement package by using apt-cache search with a substring of the package required, e.g.<br />
<pre>apt-cache search wxW<br />
</pre><br />
<br />
The goal is to build hugin and the whole set of helper applications required, and start understanding the building process. You will need deeper understanding of the building process if you want to:<br />
* develop code<br />
* translate the latest strings<br />
* document the latest features with manuals and tutorials<br />
* package for distribution<br />
That knowledge is out of scope for this document. This document ends with a binary that is fit for installation on your machine. It is not fit for any other purpose, particularly not for distribution. CMake is [http://groups.google.com/group/hugin-ptx/msg/3f29b207c562fd63 known] to build broken deb packages. Please do not distribute these binaries.<br />
<br />
== What's New ==<br />
<br />
'''9 May 2011''': The integration of the python_scripting development branch brings new dependencies and a new build-time configuration switch for Hugin. See changes in the documentation below. swig2.0 is officially distributed only with Natty (11.04 onwards). If you have an older Ubuntu version you will either have to forego the python scripting feature or find an alternative swig2.0 (either a PPA or build it yourself).<br />
<br />
'''2 May 2011''': If you are using an earlier version of Ubuntu than 11.04, there is a chance that your Mercurial version is too old for grabbing updates. New (non-critical security) updates to a program do not get added to old versions of Ubuntu, so any new changes will need to be added manually. When running Mercurial (pull, update, etc), you may get an error like<br />
<pre><br />
abort: requirement 'dotencode' not supported!<br />
</pre><br />
To fix this, you can use the package archive from Mercurial PPA Packagers and get the latest release:<br />
<pre><br />
sudo apt-add-repository ppa:mercurial-ppa/releases<br />
sudo apt-get update<br />
sudo apt-get install mercurial<br />
</pre><br />
<br />
'''5-March-2010''': Foreign library libtclap removed from source tree. This introduces a new dependency on libtclap-dev<br />
<br />
'''February 2010''': Libpano has migrated from SVN to Mercurial.<br />
<br />
'''CMake 2.8.2''', as packaged in Ubuntu 10.10, contains a bug (http://public.kitware.com/Bug/view.php?id=11020) the prevents the created debs to install successfully, due to it not storing needed directories in the deb package.<br />
Installing the resulting debs will fail with a message error saying something like<br />
<br />
<pre><br />
unable to create `/usr/local/share/hugin/xrc/data/redo.png.dpkg-new' (while processing `./usr/local/share/hugin/xrc/data/redo.png'): No such file or directory<br />
</pre><br />
<br />
Commands to create the necessary folders have been documented below and may be added to the CMake build in the repository of Hugin, Libpano, Enblend. However it is possible that the lists are incomplete. If you bump in the above message, the solution is to create the full missing path and run dpkg -i again, recursively adding folders until the install succeed.<br />
<br />
<pre><br />
sudo mkdir -p /usr/local/share/hugin/xrc/data/<br />
</pre><br />
<br />
Another workaround is, to partially rebuild the deb package by hand:<br />
<br />
<pre><br />
mkdir unpacked<br />
cd unpacked/<br />
ar x ../hugin.build/hugin-2010.2.0-Linux.deb<br />
mkdir untarred<br />
cd untarred<br />
tar xzf ../data.tar.gz<br />
tar czf ../data.tar.gz .<br />
cd ..<br />
ar r ../hugin-2010.2.0-Linux.deb debian-binary control.tar.gz data.tar.gz<br />
</pre><br />
<br />
== Shortcut ==<br />
<br />
Hugin evolves fast and the official 'buntu distributions carry versions that are usually 3-6 months older than the 'buntu distribution date. Moreover, they do not backport Hugin and related tools.<br />
<br />
Even if you follow religiously the 'buntu six months update cycle, you may be using a version of Hugin that is one or two release cycles in our past. If your sole objective is to use the new features of Hugin, the instructions in this section are for you. Start a command line terminal, type the three commands and you're done.<br />
<br />
If for some reason that's not enough for you - if you want to actually learn and become a contributor; or if you're just curious about getting even closer to the bleeding edge and trade stability for features and excitement, the rest of this document is for you.<br />
<br />
=== Stable ===<br />
<br />
This will install you the latest stable version of the tools:<br />
<pre><br />
sudo add-apt-repository ppa:hugin/hugin-builds<br />
sudo apt-get update<br />
sudo apt-get install hugin enblend panini<br />
</pre><br />
<br />
=== Unstable ===<br />
<br />
This will install you the latest unstable version of the tools that has been built as a binary. While they are likely to work in most cases, there is no guarantee and they are not recommended for production environment. Use at your own risk, and please report (and if possible fix) bugs. Most of the time these unstable builds are closer to the bleeding edge than to the stable builds. If you want the really really really bleeding edge, you'll have to work through the instructions in the next sections, though.<br />
<br />
<pre><br />
sudo add-apt-repository ppa:hugin/hugin-builds<br />
sudo add-apt-repository ppa:hugin/nightly<br />
sudo apt-get update<br />
sudo apt-get install hugin enblend panini<br />
</pre><br />
<br />
== Building Environment ==<br />
Since we are going to build hugin, libpano13 and enblend we need to download and install all the development packages. This is very easy with apt-get.<br />
In a terminal window (K menu -> System -> Konsole or Applications -> Accessories -> Terminal (in Kubuntu), Applications -> Accessories -> Terminal (in Ubuntu))<br />
<br />
<pre>sudo apt-get install build-essential autoconf automake1.9 libtool flex bison gdb libc6-dev libgcc1 \<br />
cmake<br />
</pre><br />
<br />
To get the bleeding edge we'll need access to the SVN and Mercurial repositories, and for this we need the correct tools:<br />
<br />
<pre><br />
sudo apt-get install subversion mercurial<br />
</pre><br />
<br />
Not necessary, but useful if you want to revisit configuration sets in ccmake<br />
<pre><br />
sudo apt-get install cmake-curses-gui<br />
</pre><br />
<br />
To get on the same page as far as file system layout is concerned, we'll create a folder to contain all source code in your home folder:<br />
<pre><br />
cd<br />
mkdir -p src<br />
</pre><br />
<br />
=== For Coders ===<br />
<br />
If you want to start to navigate, understand and modify the code, the doxygen generated documentation will be helpful to you.<br />
<br />
<pre><br />
sudo apt-get install doxygen graphviz<br />
</pre><br />
<br />
=== For Distributors ===<br />
<br />
If you want to build packages for distribution, you will also need the following tools and settings.<br />
<br />
<pre><br />
sudo apt-get install subversion-tools<br />
sudo echo 'deb-src ftp://ftp.at.debian.org/debian ../project/experimental main' > debian-experimental.list<br />
mv debian-experimental.list /etc/apt/sources.list.d/<br />
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 55BE302B<br />
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 8B8D7663<br />
sudo apt-get update<br />
sudo apt-get install devscripts<br />
</pre><br />
<br />
You will also need an OpenPGP key, and a Launchpad account. Follow the [[Hugin_Trackers#Launchpad_Account|instructions]] for Launchpad account creation, including the signing of the Ubuntu Code of Conduct.<br />
<br />
Moreover, it is likely that your environment is not clean enough for distribution builds. In that case, and to produce binaries for other Ubuntu series than the one you are running, you will want to set up a dchroot environment (to be documented later on).<br />
<br />
== Building Enblend ==<br />
<br />
Get the dependencies. If you are working with large images (300 megapixels and up), you should have a libtiff-devel compiled with large file support and libstdc++6.<br />
<br />
<pre><br />
sudo apt-get install pkg-config libtiff4-dev libboost-graph-dev libboost-thread-dev \<br />
libboost-filesystem-dev liblcms1-dev libglew1.5-dev libplot-dev libglut3-dev libopenexr-dev \<br />
libxi-dev libxmu-dev help2man libplot-dev liblcms1-dev libboost-system-dev<br />
</pre><br />
<br />
If you also want to build the documentation, add the following dependencies, and add "-DDOC=ON" to the cmake command below. (Be warned, however, that this will drag in over 700MB of additional dependencies. Unless you have a pressing need to build the documentation yourself, you can save yourself some time and disk space by downloading the PDF docs from http://enblend.sourceforge.net .)<br />
<br />
<pre><br />
sudo apt-get install texi2html texinfo fig2ps tidy gnuplot libxml-xpath-perl imagemagick<br />
</pre><br />
<br />
Once all dependencies are in place, get the code. The official repository has migrated from CVS to Mercurial:<br />
<br />
<pre><br />
mkdir -p ~/src/enblend<br />
cd ~/src/enblend<br />
hg clone http://enblend.hg.sourceforge.net:8000/hgroot/enblend/enblend enblend.hg<br />
</pre><br />
<br />
If you already have checked out enblend, to update the code to the latest version you need to run:<br />
<pre><br />
cd enblend.hg<br />
hg pull<br />
hg update<br />
cd ..<br />
</pre><br />
<br />
Then create a build directory and build in there. And install the Package.<br />
<br />
The options below are good for modern multi-core computers. For a single core, you may be better off setting ENABLE_OPENMP to OFF and ENABLE_IMAGECACHE to ON. The two options are mutually exclusive.<br />
<pre><br />
mkdir enblend.build<br />
cd enblend.build<br />
cmake ../enblend.hg -DENABLE_GPU:BOOL=ON -DENABLE_IMAGECACHE:BOOL=OFF -DENABLE_OPENMP:BOOL=ON \<br />
-DCPACK_BINARY_DEB:BOOL=ON -DCPACK_BINARY_NSIS:BOOL=OFF -DCPACK_BINARY_RPM:BOOL=OFF \<br />
-DCPACK_BINARY_STGZ:BOOL=OFF -DCPACK_BINARY_TBZ2:BOOL=OFF -DCPACK_BINARY_TGZ:BOOL=OFF \<br />
-DCPACK_BINARY_TZ:BOOL=OFF -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX:PATH=/usr/local<br />
make package<br />
sudo dpkg -i enblend-4.1.1-Linux.deb<br />
</pre><br />
<br />
If the install quits with an error, it is likely because of missing folders. Run the following commands and retry:<br />
<pre><br />
sudo mkdir -p /usr/local/share/man/man1<br />
sudo mkdir -p /usr/local/bin<br />
</pre><br />
<br />
===The old autotools way===<br />
We are then ready to compile. The CXXFLAGS <tt>--param inline-unit-growth=60</tt> is a workaround for x86_64 systems, Feb 2009, and apparently no longer needed (set by default). If you have an SMP machine and you're building a recent version, <tt>--disable-image-cache</tt> and <tt>--enable-openmp</tt> will speed up enblend/enfuse massively but may cause segmentation faults; in that case you will be better off with <tt>--enable-image-cache</tt> and <tt>--disable-openmp.</tt> <tt>-march=native</tt> is also beneficial and -O2 is better than -O3.<br />
<br />
<pre><br />
make --makefile=Makefile.scm<br />
mkdir BUILD<br />
cd BUILD<br />
CXXFLAGS="--param inline-unit-growth=60 -march=native -O2" ../configure --disable-image-cache \<br />
--enable-openmp<br />
make<br />
</pre><br />
<br />
The second make step can be very long and memory consuming. Make sure you have enough swap space, and go get a healthy snack while the computer is compiling.<br />
<br />
If you encounter problems at any of these stages, please report back to the hugin-ptx mailing list. Report what command in the sequence you were executing, what machine/operating system, the revision checked out from CVS, and all other relevant information.<br />
<br />
You are then ready to install with<br />
<pre><br />
sudo make install<br />
</pre><br />
<br />
== Building Libpano13 ==<br />
<br />
libpano13 is the new version of the PanoTools libraries. This is a necessary component for hugin, and we need to build it first.<br />
To build libpano13 we need some libraries and particularly their <code>dev</code> package:<br />
<br />
<pre>sudo apt-get install zlib1g zlib1g-dev libpng12-dev libjpeg62-dev libtiff4-dev cmake</pre><br />
<br />
On older distributions, zlib1g and zlib1g-dev may not be found. In that case, the same library may be available with the names lib64z1 and lib64z1-dev.<br />
<br />
We then need to download the source code from the central repository:<br />
<br />
<pre><br />
mkdir -p ~/src/libpano<br />
cd ~/src/libpano<br />
hg clone http://panotools.hg.sourceforge.net:8000/hgroot/panotools/libpano libpano.hg<br />
</pre><br />
<br />
If you're a contributor with write access, use the following clone command instead:<br />
<pre><br />
hg clone ssh://${USER}@panotools.hg.sourceforge.net/hgroot/panotools/panotools/libpano libpano.hg<br />
</pre><br />
<br />
In the future there is no need to get the whole source again. Just issue the following commands to bring your source up to date:<br />
<pre><br />
cd libpano.hg<br />
hg pull<br />
hg up<br />
cd ..<br />
</pre><br />
<br />
Now start the building process.<br />
<br />
<pre><br />
mkdir libpano.build<br />
cd libpano.build<br />
cmake ../libpano.hg -DCMAKE_INSTALL_PREFIX=/usr/local -DCPACK_BINARY_DEB:BOOL=ON \<br />
-DCPACK_BINARY_NSIS:BOOL=OFF -DCPACK_BINARY_RPM:BOOL=OFF -DCPACK_BINARY_STGZ:BOOL=OFF \<br />
-DCPACK_BINARY_TBZ2:BOOL=OFF -DCPACK_BINARY_TGZ:BOOL=OFF -DCPACK_BINARY_TZ:BOOL=OFF \<br />
-DCMAKE_BUILD_TYPE=RelWithDebInfo<br />
make package<br />
sudo dpkg -i libpano13-*-Linux.deb<br />
</pre><br />
<br />
Set -DCMAKE_BUILD_TYPE=Debug if you want to help investigate/debug a problem and capture even more debugging information.<br />
<br />
If the install quits with an error, it is likely because of missing folders. Run the following commands and retry:<br />
<pre><br />
sudo mkdir -p /usr/local/include/pano13/<br />
sudo mkdir -p /usr/local/include/pano13/doc<br />
sudo mkdir -p /usr/local/lib/pkgconfig<br />
sudo mkdir -p /usr/local/share/man/man1<br />
sudo mkdir -p /usr/local/bin<br />
</pre><br />
<br />
=== The old autotools way ===<br />
<br />
The above described building process uses CMake to build libpano which has many advantages. Amongst others it creates a clean package to install / deinstall and decreases the likelihood of wrecking the system. However CMake support is relatively new in libpano. The old autotools way is documented below for completeness. You should not need it. However if you do, make sure to run either the CMake build or the autotools build on fresh repository checkouts to avoid interferences.<br />
<br />
<pre><br />
./bootstrap<br />
</pre><br />
<br />
If any libraries are missing, the script will complain (or at least, let you know that some library hasn't been found). In that case you probably need to install the library. To find in what package is that library, a general rule is to run the command <code>apt-cache search ''missingfile''</code>, find the relevant library and install both the library and the related <code>-dev</code> package.<br />
Run the <code>./configure</code> script and repeat this process until you have met all the dependencies.<br />
<br />
Then we are ready to launch the make process with<br />
<pre>make</pre><br />
<br />
If the library successfully compiles, you have to install it with<br />
<pre>sudo make install<br />
sudo ldconfig</pre><br />
The last part is for the OS to be aware of the new library (that has been installed in <code>/usr/local/lib</code>).<br />
We can now go back up one folder level and get ready for hugin.<br />
<pre>cd ..</pre><br />
<br />
== Building Hugin ==<br />
<br />
=== Dependencies ===<br />
<br />
First we need to activate the <code>universe</code> repository (in adept package manager, or by editing the /etc/apt/sources.lst file for example) and get the dependencies.<br />
<br />
If you want to build the Python scripting feature, your best bet is Natty (11.04). If you are on Lucid or Maverick, you can follow the instructions below to get a swig2.0 package. If nothing works and you still want Python scripting, you will have to build it from [https://sourceforge.net/projects/swig/ source].<br />
<br />
<pre><br />
sudo add-apt-repository ppa:hugin/hugin-builds<br />
sudo apt-get update<br />
</pre><br />
<br />
The following command will install on your system all build time dependencies except libpano13.<br />
<pre><br />
sudo apt-get install libwxgtk2.8-dev libtiff4-dev libpng12-dev \<br />
libopenexr-dev libexiv2-dev libglut3-dev libglew-dev libboost-dev \<br />
boost-build libboost-thread-dev libboost-graph-dev libboost-regex-dev \<br />
libboost-iostreams-dev libboost-filesystem-dev gettext liblapack-dev \<br />
libxi-dev libxmu-dev libboost-signals-dev libboost-system-dev \<br />
libtclap-dev<br />
</pre><br />
<br />
For the python scripting functionality, you will also need <br />
<pre><br />
sudo apt-get install libpython-dev python-dev swig2.0<br />
</pre><br />
<br />
Note that python-dev was the name for libpython-dev prior to Natty. Do not worry if it stops with the message<br />
<pre><br />
E: Unable to locate package {python-dev or libpython-dev}<br />
</pre><br />
Remove the package in error from the apt-get line and try again. You will still achieve the intended status. Tested on Natty and Lucid, most likely ok for Maverick as well.<br />
<br />
You could install libpano13 on your system with the command below. But it is recommended that you build your own libpano13 (see section [[Hugin_Compiling_Ubuntu#Building_Libpano13|above]]), since the version of libpano13 in the Ubuntu repositories is probably too old. Alternatively, there may be a recent enough version of libpano13 in the Hugin PPA. If going this last route, you can add it as shown above.<br />
<pre><br />
sudo apt-get install libpano13-dev<br />
</pre><br />
<br />
wxWidgets is a critical dependency for the Hugin GUI. In the official Ubuntu repositories it is usually at least a few releases behind the current release, and in some cases many releases behind. The wxWidgets project provides alternative [http://wiki.wxpython.org/InstallingOnUbuntuOrDebian repositories] with newer versions, as well as a [http://wiki.wxpython.org/BuildingDebianPackages instructions] to build binary packages of the most recent releases. Newer versions of wxWidgets are not (yet) absolutely necessary, but since eventually things evolve they are useful for development, testing, and in general should give a better user interface experience as wxWidgets improves over time.<br />
<br />
The following are run-time dependencies. Strictly speaking you don't need them to build Hugin, but you will need them to use it. If you follow the instructions on this page to build ExifTool and/or Enblend, you don't need to install them this way.<br />
<pre><br />
sudo apt-get install libimage-exiftool-perl enblend python-argparse<br />
</pre><br />
<br />
=== Fetch the Source Code with Mercurial ===<br />
<br />
If you already have a repository clone, you only need to pull the latest changes and update the code with:<br />
<pre><br />
cd ~/src/hugin/hugin.hg<br />
hg pull<br />
hg update<br />
</pre><br />
<br />
Otherwise, you need to clone the repository and decide which version/branch to build with:<br />
<pre><br />
mkdir -p ~/src/hugin<br />
cd ~/src/hugin<br />
hg clone http://hugin.hg.sourceforge.net:8000/hgroot/hugin/hugin hugin.hg<br />
cd hugin.hg<br />
hg branches<br />
</pre><br />
<br />
If you are a contributor with write access, you can use<br />
<pre><br />
hg clone ssh://${USER}@hugin.hg.sourceforge.net/hgroot/hugin/hugin hugin.hg<br />
</pre><br />
<br />
The `hg branches` command will list all available branches. If you decide, e.g., to build the 2010.0 branch, you will update to it with:<br />
<pre><br />
hg update -C 2010.0 <br />
</pre><br />
<br />
=== Advanced Use - Multiple Source Trees ===<br />
<br />
You may want to build multiple versions of Hugin on your machine at the same time, e.g. when you want to build side by side a stable version for your productivity and a development version to give feedback to the developers. In that case, you will clone the Mercurial repository that is already on your drive and update from it a source tree to a different branch. Mercurial takes care of details such as optimizing disk usage. The commands for this are:<br />
<br />
<pre><br />
cd ..<br />
hg clone hugin.hg another_hugin<br />
cd another_hugin<br />
hg update -C default<br />
</pre><br />
<br />
You can have as many "another_hugin" folders as you want. Just make sure, when pulling the latest updates from SourceForge, to first pull your main repository (the one you cloned from http://hugin.hg.sourceforge.net:8000/hgroot/hugin/hugin. Then pull all others:<br />
<pre><br />
cd ~/src/hugin/hugin.hg<br />
hg pull<br />
hg update<br />
cd ../another_hugin<br />
hg pull<br />
hg update<br />
</pre><br />
<br />
Reference: [http://groups.google.com/group/hugin-ptx/msg/1ce824dd1364e9be]<br />
<br />
=== Configure the Build Environment ===<br />
<br />
'''Rule:''' You always want to build outside of the source tree to keep the source tree clean. And to avoid confusion, if you have multiple source trees it is preferable to build for each of them in a separate build folder.<br />
<br />
Next we set up the build environment using cmake.<br />
<br />
If you compiled and installed libpano to a non standard location set the variables CMAKE_INCLUDE_PATH and CMAKE_LIBRARY_PATH to point to your install location's include and lib directories.<br />
<br />
If you are building for distribution, you want to set CMAKE_INSTALL_PREFIX=/usr<br />
<br />
<pre><br />
cd ~/src/hugin<br />
mkdir hugin.hg-build<br />
cd hugin.hg-build<br />
cmake ../hugin.hg -DENABLE_LAPACK=YES -DCPACK_BINARY_DEB:BOOL=ON -DCPACK_BINARY_NSIS:BOOL=OFF \<br />
-DCPACK_BINARY_RPM:BOOL=OFF -DCPACK_BINARY_STGZ:BOOL=OFF -DCPACK_BINARY_TBZ2:BOOL=OFF \<br />
-DCPACK_BINARY_TGZ:BOOL=OFF -DCPACK_BINARY_TZ:BOOL=OFF -DCMAKE_BUILD_TYPE=RelWithDebInfo \<br />
-DBUILD_HSI:BOOL=ON -DSWIG_EXECUTABLE=/usr/bin/swig2.0<br />
</pre><br />
<br />
The last line of the above cmake statement is for python scripting and will work with Ubuntu 11.04. The first switch activates the scripting interface (which is deactivated by default because it does not work simply out of the box on all supported platforms) and the second switch fixes a bug in the CMake script to find swig. Self-compiled swig does not need the -DSWIG_EXECUTABLE switch since it is found automatically by the CMake script.<br />
<br />
If you get an error building, try removing the last line of the above cmake statement. Another cause may be a wrong version of libpano13, even if you built it yourself. Go back and check that you are using a (newer) stable branch. Try switching to libpano13-2.9.18 (run hg update -C libpano13-2.9.18 in the proper folder), rebuild as instructed above, and try again.<br />
<br />
Set -DCMAKE_BUILD_TYPE=Debug if you want to help investigate/debug a problem and capture even more debugging information, however Hugin will be slower and may not work as expected. Don't use a Debug build for production.<br />
<br />
If you are building for install on your own machine only, -DDISABLE_DPKG=ON will significantly speed up the package generation. Do not distribute packages built this way, they don't have proper dependencies. This is primarily meant for developers doing cycles of fix-compile-install-test.<br />
<br />
=== Build and Install ===<br />
<br />
Finally, we use make to build the code and package it, and dpkg to install it. Look for the version number in the .deb file created and edit the lines below accordingly: <br />
<br />
<pre><br />
make package<br />
sudo dpkg -i hugin-*-Linux.deb<br />
sudo ldconfig<br />
</pre><br />
<br />
If the install quits with an error, it is likely because of missing folders. Run the following commands and retry: <br />
<pre><br />
sudo mkdir -p /usr/local/share/pixmaps<br />
sudo mkdir -p /usr/local/share/mime/packages<br />
sudo mkdir -p /usr/local/share/applications/<br />
sudo mkdir -p /usr/local/share/icons/gnome/48x48/mimetypes/<br />
sudo mkdir -p /usr/local/share/locale/en_GB/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/es_la/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/fr/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/zh_TW/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/ru/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/ro/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/bg/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/de/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/ko/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/pt_BR/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/zh_CN/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/ja/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/it/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/sl/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/sk/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/sv/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/ca_ES/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/nl/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/fi/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/cs_CZ/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/uk/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/es/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/pl/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/hu/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/es_VE/LC_MESSAGES<br />
sudo mkdir -p /usr/local/share/hugin/xrc/data/help_it_IT<br />
sudo mkdir -p /usr/local/share/hugin/xrc/data/help_en_EN<br />
sudo mkdir -p /usr/local/share/hugin/data/<br />
sudo mkdir -p /usr/local/lib/hugin<br />
sudo mkdir -p /usr/local/share/man/man1<br />
</pre><br />
<br />
'''Important:''' the package does not track dependencies yet, so it likely to fail on machines others than yours.<br />
<br />
Reference: [http://theseblog.free.fr/2007/10/building-hugin-in-ubuntu-feisty-fawn.php]<br />
<br />
=== Dive into the Code ===<br />
<br />
From time to time the API reference is published on the Hugin website, however you are better off with a local copy. To generate it, issue the following commands:<br />
<pre><br />
cd ~/src/hugin/hugin.hg/src<br />
doxygen Doxyfile<br />
</pre><br />
<br />
The documentation is generated in ~/src/hugin/hugin.hg/src/hugin/html<br />
<br />
Point your browser to index.html inside that folder and you have access to all available information. If you find that a class, a function, or anything else is not properly documented; and if you delve into the source code to understand it, kindly add documentation to the code so that the next person in your situation can use your experience as a stepping stone. Thank you!<br />
<br />
== Automatic Control Point Detectors ==<br />
<br />
=== Autopano-sift-C ===<br />
<br />
Pre-Requisites:<br />
<pre><br />
sudo apt-get install libxml2-dev<br />
</pre><br />
<br />
To build<br />
<br />
(Note February 2011: The latest source code of autopano-sift-C has been unstable for a long time now and nobody is working to fix it. Use the 2.5.1 release tarball instead)<br />
<br />
<pre><br />
mkdir -p ~/src/apsc<br />
cd ~/src/apsc<br />
hg clone http://hugin.hg.sourceforge.net:8000/hgroot/hugin/autopano-sift-C apsc.hg<br />
cd apsc.hg<br />
hg branches<br />
hg update -C 2.5.1<br />
cd ..<br />
mkdir apsc.hg.build<br />
cd apsc.hg.build<br />
cmake ../apsc.hg -DCMAKE_INSTALL_PREFIX=/usr/local -DCPACK_BINARY_DEB:BOOL=ON \<br />
-DCPACK_BINARY_NSIS:BOOL=OFF -DCPACK_BINARY_RPM:BOOL=OFF -DCPACK_BINARY_STGZ:BOOL=OFF \<br />
-DCPACK_BINARY_TBZ2:BOOL=OFF -DCPACK_BINARY_TGZ:BOOL=OFF -DCPACK_BINARY_TZ:BOOL=OFF \<br />
-DCMAKE_BUILD_TYPE=Debug<br />
make package<br />
sudo dpkg -i autopano-sift-C-*-Linux.deb<br />
</pre><br />
<br />
=== Match-n-shift ===<br />
<br />
Match-n-shift is yet an other Autopano-SIFT replacement. It comes in a bundle with pto file manipulation perl libraries and a rich selection of other tools that use nona, enblend, ImageMagick among other things. To use match-n-shift, you need to install at least the [http://search.cpan.org/dist/Panotools-Script/ Panotools::Script] library and some other perl modules. It requires:<br />
<br />
* Image::Size 2.9<br />
* Storable 2.0<br />
* Image::ExifTool 6<br />
<br />
Chances are that you do not need to update Storable which is a standard perl module. To check the version of installed versions of these modules, write these lines to the command prompt:<br />
<br />
perl -MStorable -le 'print Storable->VERSION;'<br />
perl -MImage::Size -le 'print Image::Size->VERSION;'<br />
perl -MImage::ExifTool -le 'print Image::ExifTool->VERSION;'<br />
<br />
There are various ways to install or upgrade these modules. Ubuntu has binary packages for many perl modules, you can skip the CPAN installation below and type:<br />
<br />
sudo apt-get install libimage-size-perl libimage-exiftool-perl<br />
<br />
Alternatively, perl is an interpreted language and these modules are pure perl, so installing from source is an easy thing.<br />
<br />
The best place to install perl modules is directly from a CPAN archive. CPAN is short for Comprehensive Perl Archive Network. The program to interact with CPAN comes with all perl installations. Start it by running:<br />
<br />
sudo cpan<br />
<br />
If this is your first time running the program you will be asked a number of questions (you can safely accept the suggested values). Last question lets you select a number of CPAN mirrors nearest to you.<br />
<br />
When all is done, you can enter the install commands after the 'cpan>' prompt:<br />
<br />
install Image::Size Storable Image::ExifTool<br />
<br />
Answer 'y' to any question of dependencies and wait for install to complete. 'exit' leaves the cpan shell.<br />
<br />
Next, you need to retrieve and install the Panotools-Script collection<br />
of perl libraries (Panotools::Script) and programs that use them -<br />
including match-n-shift:<br />
<br />
svn co https://panotools.svn.sourceforge.net/svnroot/panotools/trunk/Panotools-Script Panotools-Script<br />
cd Panotools-Script<br />
perl Makefile.PL<br />
make<br />
make test<br />
sudo make install<br />
<br />
Just to confuse you, you can also ignore everything above and just install Panotools::Script and all its dependencies from CPAN. From command line, type:<br />
<br />
sudo cpan Panotools::Script<br />
<br />
You can run match-n-shift from command line using the same parameters as autopano-c-complete.sh or you can modify hugin to run it for you:<br />
<br />
* start Hugin<br />
* navigate the menu File to Preferences<br />
* In the Preferences window, open the Autopano tab<br />
* Select Autopano -> Autopano-SIFT<br />
* tick the checkbox for Use alternative Autopano-SIFT program<br />
* enter the full path to match-n-shift (/usr/local/bin/match-n-shift) in the Autopano-SIFT field<br />
* enter the following string in the Arguments field:<br />
-f %f -v %v -c -p %p -o %o %i<br />
<br />
=== MatchPoint ===<br />
<br />
MatchPoint is a next generation CP generator. The result of a GSoC2007 project, it is still very experimental. Experience reports needed. Read more [http://groups.google.com/group/hugin-ptx/browse_thread/thread/cba2b2ce94dd9054 here]<br />
<br />
Matchpoint is now located inside the main hugin source tree, no need to checkout separately. It is compiled together with hugin, but not installed by default.<br />
<br />
* copy the MatchPoint executable into /usr/local/bin manually<br />
<pre><br />
cd ~/src/hugin/hugin.hg-build<br />
sudo cp src/matchpoint/matchpoint /usr/local/bin/<br />
</pre><br />
* edit /usr/local/bin/autopano-c-complete.sh (do it with sudo to have the necessary permission)<br />
** line 79: replace the .key.gz extension with .key (not sure if matchpoint supports compression)<br />
** lines 83 and 88: replace '''generatekeys "$arg" $FILENAME $SIZE''' with '''matchpoint "$arg" $FILENAME''' (not sure if the size option or any other options of the original generatekeys are applicable)<br />
<br />
=== Pan-o-matic ===<br />
<br />
Yet another control point generator [http://aorlinsk2.free.fr/panomatic/?p=home Home Page]<br />
<br />
<pre>sudo apt-get install libboost-dev</pre><br />
<br />
Download [http://aorlinsk2.free.fr/panomatic/download.php?d=7&v=0.9.4 Panomatic 0.9.4 bz2] and if you're on Ubuntu 9.10 or newer also the [http://aorlinsk2.free.fr/panomatic/panomatic_gcc44.patch patch] for the gcc4.4 compiler.<br />
<br />
<pre><br />
mkdir -p ~/src/panomatic<br />
cd ~/src/panomatic<br />
wget "http://aorlinsk2.free.fr/panomatic/download.php?d=7&v=0.9.4" -O panomatic-0.9.4-src.tar.bz2<br />
wget http://aorlinsk2.free.fr/panomatic/panomatic_gcc44.patch patch<br />
tar xvfj panomatic-0.9.4-src.tar.bz2<br />
cd panomatic-0.9.4<br />
patch -p 1 < ../panomatic_gcc44.patch<br />
./configure<br />
make<br />
sudo make install<br />
</pre><br />
<br />
To use Pano-o-matic, open Hugin<br />
<br />
* In File > Preferences > Autopano :<br />
* Select Autopano-SIFT<br />
* Check "Use alternative autopano-SIFT program"<br />
* Choose the path to the binary ( /usr/local/bin )<br />
* In Arguments, put : -o %o %i<br />
<br />
==== Pablo's variation ====<br />
<br />
Around the end of the year 2009, Pablo integrated a [http://groups.google.com/group/hugin-ptx/browse_thread/thread/d9c0558c679cad52 new] experimental descriptor based on the geometric blur and DAISY papers. Also, Pablo said that the algorithm is not really based on a published approach, just on some ideas that are mentioned in a few of them, and its currently simpler than any of them:<br />
<br />
o geometric blur: [http://www.eecs.berkeley.edu/~aberg/gb.html]<br />
<br />
o daisy: [http://cvlab.epfl.ch/~tola/daisy.html]<br />
<br />
o descriptor learning: [http://cvlab.epfl.ch/~brown/learndesc/learndesc.html]<br />
<br />
To build that version of panomatic instead, follow these instructions:<br />
<br />
This is current the subject of a GSoC 2010 project and may be available in future versions of Hugin.<br />
<br />
<pre><br />
sudo aptitude install libboost-python-dev bzr cmake libvigraimpex-dev<br />
</pre><br />
<br />
<pre><br />
bzr branch lp:~pablo.dangelo/hugin/panomatic-lib<br />
mkdir build<br />
cd build<br />
cmake ../panomatic-lib<br />
make<br />
sudo make install<br />
</pre><br />
<br />
To use the new descriptor the arguments for Hugin are: '''--sieve1size 100 --sieve2size 2 -o %o %i'''<br />
<br />
== ExifTool ==<br />
<br />
ExifTool is no longer mandatory for Hugin to work. It is used to pass metadata from the input to the output images during the stitching process. <br />
<br />
[http://www.sno.phy.queensu.ca/~phil/exiftool/ ExifTool] is a platform-independent Perl library plus a command-line application for reading, writing and editing meta information in image, audio and video files.<br />
<br />
Usually the version distributed with Ubuntu (8.15 in Ubuntu 10.10; 7.89 in Ubuntu 10.4) is good enough and you don't need to bother with the following instructions. However there were situations in the past and there might be situations in the future where the latest versions offer better support. These issues will occur most likely with specific camera brands/models and the most recent models. The following instructions are for those cases.<br />
<br />
<pre><br />
sudo apt-get purge libimage-exiftool-perl<br />
</pre><br />
<br />
<pre><br />
wget http://www.sno.phy.queensu.ca/~phil/exiftool/Image-ExifTool-8.50.tar.gz<br />
tar -xzf Image-ExifTool-8.50.tar.gz<br />
cd Image-ExifTool-8.50<br />
perl Makefile.PL<br />
make test<br />
sudo make install<br />
</pre><br />
<br />
== Pano Viewers ==<br />
<br />
=== PanoGLView ===<br />
<br />
PanoGLView is an OpenGL hardware accelerated interactive immersive viewer for equirectangular images.<br />
<br />
Pre-Requisites:<br />
<pre>sudo apt-get install wx-common libwxgtk2.8-dev libglew-dev</pre><br />
<br />
To build and install:<br />
<pre><br />
mkdir -p ~/src/panoglview<br />
cd ~/src/panoglview<br />
hg clone http://hugin.hg.sourceforge.net:8000/hgroot/hugin/panoglview panoglview.hg<br />
cd panoglview.hg<br />
hg update<br />
./bootstrap<br />
./configure<br />
make<br />
sudo make install<br />
</pre><br />
<br />
=== FreePV - DEPENDENCIES ARE BROKEN - FAILS TO BUILD ===<br />
<br />
Pre-Requisites:<br />
<pre><br />
sudo apt-get install cmake make pkg-config g++ mozilla-devscripts freeglut3-dev zlib1g-dev \<br />
libjpeg-dev libxext-dev libxmu-dev x11proto-xf86vidmode-dev libxxf86vm-dev libnspr4-dev \<br />
libxml2-dev libpng12-dev<br />
</pre><br />
To build<br />
<pre><br />
svn co https://freepv.svn.sourceforge.net/svnroot/freepv/freepv/trunk/ freepv<br />
cd freepv<br />
cmake .<br />
make<br />
sudo make install<br />
</pre><br />
<br />
=== Panini Perspective Tool ===<br />
<br />
Strictly speaking, Panini is more than just a viewer. It's a powerful tool to extract/transform views and can also be easily used as a viewer.<br />
<br />
Get dependencies:<br />
<pre><br />
sudo apt-get install qt4-qmake libqt4-dev zlib1g-dev<br />
</pre><br />
<br />
Get code:<br />
<pre><br />
mkdir -p ~/src/pvqt<br />
cd ~/src/pvqt<br />
svn co https://pvqt.svn.sourceforge.net/svnroot/pvqt pvqt.svn<br />
</pre><br />
<br />
Build:<br />
<pre><br />
cd pvqt.svn<br />
qmake panini.pro<br />
make<br />
</pre><br />
<br />
Install (brute force):<br />
<pre><br />
sudo cp Panini /usr/local/bin/ <br />
</pre><br />
<br />
Menu Entry for Kubuntu:<br />
<pre><br />
kmenuedit<br />
</pre><br />
<br />
in kmenuedit<br />
* navigate to Graphics<br />
** click on New Item<br />
** Enter "Panini" as Name<br />
** Enter "Perspective Tool" as Description<br />
** click on the empty icon and look for an icon (I used the akonadi one)<br />
** Enter "Panini" as Command<br />
** Click on Save button<br />
<br />
== Notes for Packagers ==<br />
<br />
=== Tarballs ===<br />
<br />
* to get an updated ChangeLog in Mercurial repositories (Hugin has it also in the cmake invocation, use '''-DUPDATE_CHANGELOG=1''')<br />
<pre><br />
hg log --follow --style=changelog <br />
</pre><br />
* to update the ChangeLog in SVN repositories (Panotools)<br />
<pre><br />
svn up<br />
svn2cl<br />
svn ci<br />
</pre><br />
<br />
=== Deb Packages ===<br />
<br />
The deb packages built by CMake (2.8.2) are broken by Debian standard. Please do not distribute them. There are official updated recent packages at the Hugin PPA mentioned above which include nightlies (produced every 24 hours) and stables (produced out of released tarballs). If you miss binaries for your series of Ubuntu and you have built them for yourself following the instructions above, considering moving up one level and contributing to the [[Hugin PPA]].<br />
<br />
[[Category:Software:Hugin]]<br />
[[Category:Software:Platform:Linux]]<br />
[[Category:Compiling:Hugin]]</div>Onomouhttps://wiki.panotools.org/index.php?title=Hugin_Compiling_Mandriva&diff=13624Hugin Compiling Mandriva2011-07-11T19:12:22Z<p>Onomou: Add Compiling category</p>
<hr />
<div>in /etc/alternatives change the links:<br />
* wx-config to /usr/lib64/wx/config/gtk2-unicode-release-2.8<br />
* wxrc to /usr/bin/wxrc-2.8-unicode<br />
<br />
then it should compile as on other linux platforms.<br />
<br />
Reference: https://bugs.launchpad.net/hugin/+bug/704418<br />
<br />
[[Category:Compiling:Hugin]]</div>Onomouhttps://wiki.panotools.org/index.php?title=Hugin_Compiling_FreeBSD&diff=13623Hugin Compiling FreeBSD2011-07-11T19:12:10Z<p>Onomou: Add Compiling category</p>
<hr />
<div>Hugin is part of the FreeBSD [http://www.freebsd.org/cgi/cvsweb.cgi/ports/graphics/hugin/ ports collection]. Using the ports collection (and contributing fixes to it) is the recommended way to install Hugin on FreeBSD.<br />
<br />
== Install with the port ==<br />
<br />
<pre><br />
# su<br />
# cd /usr/ports/graphics/hugin<br />
# make<br />
# make install<br />
</pre><br />
<br />
== Update the port ==<br />
<br />
{| style="margin: 1em auto 1em 1em;background:#FFFF99;color:#FF0000;text-align:left;border: solid #FF3300;"<br />
|-valign="top"<br />
! '''WARNING:'''<br />
Below is newbie's work in progress. Following these instructions may corrupt your FreeBSD system or worse. Don't do that until the experts confirm that the newbie has done things rights.<br />
|}<br />
<br />
to track closely Hugin's releases, after each new release edit the following files in the ports collection:<br />
<br />
1. edit '''[http://www.freebsd.org/cgi/cvsweb.cgi/ports/graphics/hugin/distinfo?rev=1.8;content-type=text%2Fplain distinfo]''' to point to the right tarball. You will need to edit the name in parenthesis, to calculate and edit the md5 and sha256 hashes, to edit the filesize.<br />
<br />
2. edit the '''Makefile'''.<br />
* edit PORTVERSION and PORTREVISION<br />
* add/update build dependencies to LIB_DEPENDS=<br />
* add/update runtime dependencies to RUN_DEPENDS=<br />
* add/update Cmake building arguments to CMAKE_ARGS=<br />
* if you're not sure about something that need to be done, ask the experts.<br />
<br />
3. edit the '''pkg-plist''' list of installed files. While it can't be done automatically, the trick is to 'make PREFIX=/tmp/foobar install' and then check the files under /tmp/foobar (assuming it was non-existent before)<br />
<br />
4. probably not necessary: edit the '''pkg-descr''' description of Hugin.<br />
<br />
make a diff and submit it to the FreeBSD experts.<br />
<br />
== files / patches ==<br />
<br />
{| style="margin: 1em auto 1em 1em;background:#FFFF99;color:#FF0000;text-align:left;border: solid #FF3300;"<br />
|-valign="top"<br />
! work in progress - thoughts about simplifying / streamlining the patching to make life easier to the FreeBSD port maintainer.<br />
|}<br />
<br />
The patches are listed at http://www.freebsd.org/cgi/cvsweb.cgi/ports/graphics/hugin/files/<br />
<br />
=== CMake build ===<br />
* patch-CMakeLists.txt<br />
* patch-doc_CMakeLists.txt<br />
<br />
I think it makes sense for the variable mandir to be set in the general CMake build.<br />
<br />
if I put an IF(CMAKE_SYSTEM_NAME=="FreeBSD") condition and make the changes inside the Hugin repository, it should work, right?<br />
<br />
<br />
=== patch-src_hugin1_base_wx_RunStitchPanel.cpp ===<br />
<br />
I think this one I can apply upstream as-is?<br />
<br />
<br />
=== patch-src_hugin1_hugin_TextureManager.cpp ===<br />
<br />
Do I understand right that log2(x) is not defined in FreeBSD? and I fi put it inside a conditional expression, I could apply it upstream and it would coexist with the rest, e.g.<br />
<br />
<pre><br />
#if defined __FreeBSD__<br />
#define log2(x) (log(x) / log(2))<br />
#endif<br />
</pre><br />
<br />
?<br />
<br />
<br />
=== patch-src_hugin1_hugin_config_defaults.h ===<br />
<br />
this one looks outdated to me? Autopano-SIFT-C is now in the ports collection:<br />
<br />
http://www.freebsd.org/cgi/cvsweb.cgi/ports/graphics/autopano-sift-c/<br />
<br />
the "best practice" in the Hugin project is now to give users a choice of different CP generations. Panomatic is already in the Makefile of the Hugin port, and we now have also match-n-shift and a few other variations and more is expected in the future - each with its own specific settings.<br />
<br />
how would be the best way to approach this? should I submit a patch for the ports makefile with<br />
<br />
<pre><br />
.if defined(WITH_AUTOPANOSIFT-C)<br />
RUN_DEPENDS+= autopanog:${PORTSDIR}/graphics/autopano-sift-c<br />
.endif<br />
</pre><br />
<br />
?<br />
<br />
and what would be the optimal way to set different defaults for the different choices inside the above conditional expression? multiple patch-src_hugin1_hugin_config_defaults.h ? I don't think so but I'm not sure.<br />
<br />
I've added Bruno Postle to this mail. My goal is to streamline the process of getting the latest Hugin and related tools into FreeBSD. We'll have more frequent releases in the foreseeable future and the more we can simplify and automate, the better.<br />
<br />
thank you for your efforts.<br />
<br />
[[Category:Software:Hugin]]<br />
[[Category:Compiling:Hugin]]</div>Onomouhttps://wiki.panotools.org/index.php?title=Hugin_Compiling_Gentoo&diff=13622Hugin Compiling Gentoo2011-07-11T19:11:56Z<p>Onomou: Add Compiling category</p>
<hr />
<div>== Preface ==<br />
These are instructions to build hugin and the whole set of helper applications required from CVS/SVN.<br />
<br />
{| style="margin: 1em auto 1em 1em;background:#FFFF99;color:#FF0000;text-align:left;border: solid #FF3300;"<br />
|-valign="top"<br />
! '''UPDATE:'''<br />
Hugin 2010.0.0 is now available in portage. If you prefer a in-portage solution instead of the bleeding edge, you should just 'emerge hugin'.<br />
|}<br />
<br />
<br />
These instructions are work in progress. They're tested on x86 only (though amd64 should work just fine). (Maybe ppc as well. If you try on ppc, please tell me if it works or not.)<br />
<br />
If anything does not work: [[Hugin_Compiling_Gentoo#Bugs|Bugs]]<br />
<br />
== Setting up the overlay ==<br />
<br />
{| style="margin: 1em auto 1em 1em;background:#FFFF99;color:#FF0000;text-align:left;border: solid #FF3300;"<br />
|-valign="top"<br />
! '''Note:'''<br />
The overlay listed below does not appear to be available.<br />
|}<br />
<br />
<br />
If you've never worked with a overlay, please read http://www.gentoo.org/proj/en/overlays/userguide.xml (especially the section on layman) to get an idea of what we're doing here.<br />
<br />
The next steps are:<br />
* Installing layman (if you haven't already).<br />
* Add the overlay listing to layman's config.<br />
* Add the overlay using layman.<br />
<br />
First sudo, so you have sufficient permissions:<br />
<pre><br />
sudo -s<br />
(enter your password)<br />
</pre><br />
<br />
Install layman (IF YOU HAVEN'T ALREADY DONE SO):<br />
<pre><br />
emerge -av layman<br />
echo "source /usr/portage/local/layman/make.conf" >> /etc/make.conf<br />
</pre><br />
<br />
Add the overlay listing:<br />
Open /etc/layman/layman.cfg in your favourite editor and change:<br />
<pre><br />
overlays : http://www.gentoo.org/proj/en/overlays/repositories.xml<br />
http://pani.webhop.org/download/overlays.xml<br />
</pre><br />
Save and exit.<br />
<br />
Add the overlay using layman:<br />
<pre><br />
layman -f<br />
layman -a panotools<br />
</pre><br />
<br />
Run "layman -S" (or eix-sync if you have it installed and configured to sync layman overlays) periodicaly for new updates.<br />
<br />
== Unmasking ==<br />
The versions in the overlay are masked as unstable. You'll have to unmask them:<br />
<br />
Open /etc/portage/package.keywords (if it doesn't exist, create it) and add the following lines:<br />
<pre><br />
=media-gfx/hugin-9999 ~x86<br />
=media-gfx/enblend-9999 ~x86<br />
=media-libs/libpano13-9999 ~x86<br />
=media-gfx/autopano-sift-C-9999 ~x86<br />
</pre><br />
<br />
For more information on unmasking, have a look at [http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=3&chap=3#doc_chap2 the Gentoo Handbook].<br />
<br />
== Installing ==<br />
Now the fun part! Run<br />
<pre><br />
emerge -av hugin<br />
</pre><br />
<br />
=== enblend-staging ===<br />
If you know what you're doing and want to install enblend from Christoph Spiel's -staging branch, you can do:<br />
<pre><br />
emerge --unmerge enblend<br />
emerge enblend-staging<br />
</pre><br />
<br />
== Staying up to date ==<br />
Run "emerge -av -1 hugin enblend libpano13 autopano-sift-C" regularly to build the latest versions.<br />
<br />
You could also use the [http://avuton.googlepages.com/update-live-ebuilds update-live-ebuilds script] that upgrades only if something actually changed.<br />
<br />
If you are running sys-apps/portage-2.2* you can run emerge -av @live-rebuild to rebuild all your live packages.<br />
<br />
== Bugs ==<br />
For ebuilds from the Gentoo portage tree, [http://bugs.gentoo.org Gentoo's Bugzilla] is the way to go.<br />
<br />
Please '''DO NOT''' report overlay-related bugs there. Instead, please [http://pani.webhop.org/c contact me directly].<br />
<br />
[[Category:Software:Hugin]]<br />
[[Category:Software:Platform:Linux]]<br />
[[Category:Compiling:Hugin]]</div>Onomouhttps://wiki.panotools.org/index.php?title=Hugin_Compiling_OpenSuse&diff=13621Hugin Compiling OpenSuse2011-07-11T19:11:40Z<p>Onomou: Add Compiling category</p>
<hr />
<div>To build enblend, enfuse, libpano and hugin, follow the instructions below.<br />
<br />
== Dependencies and prerequisites needed for OpenSuSE 10.3 ==<br />
<br />
gettext<br />
libjpeg-devel<br />
boost-devel<br />
boost <br />
wxGTK-devel<br />
wxGTK<br />
OpenEXR-devel<br />
openEXR<br />
libexiv2-devel<br />
libtiff-devel<br />
liblcms-devel<br />
cmake<br />
<br />
== Enblend and Enfuse (cvs) ==<br />
<br />
cvs -d:pserver:anonymous@enblend.cvs.sourceforge.net:/cvsroot/enblend login<br />
cvs -z3 -d:pserver:anonymous@enblend.cvs.sourceforge.net:/cvsroot/enblend co -P enblend<br />
cd enblend<br />
make -f Makefile.cvs<br />
./configure<br />
make<br />
sudo make install<br />
<br />
== libpano13 ==<br />
<br />
mkdir -p /usr/src/panotools/trunk<br />
cd /usr/src/panotools/trunk<br />
svn co https://panotools.svn.sourceforge.net/svnroot/panotools/trunk/libpano libpano13<br />
cd libpano13<br />
sh ./bootstrap<br />
make<br />
sudo make install install-data-am<br />
<br />
== Hugin ==<br />
=== Checkout Hugin ===<br />
<br />
mkdir /usr/src/hugin<br />
cd /usr/src/hugin<br />
svn co https://hugin.svn.sourceforge.net/svnroot/hugin/hugin/trunk hugin<br />
<br />
* if you need to build a specific SVN revision, e.g. 2765, you can slightly change the svn command to get it. e.g.:<br />
<br />
svn co -r 2765 https://hugin.svn.sourceforge.net/svnroot/hugin/hugin/trunk/ hugin<br />
<br />
=== Compile Hugin ===<br />
<br />
mkdir /usr/src/hugin/BuildHugin<br />
cd /usr/src/hugin/BuildHugin<br />
ccmake /usr/src/hugin/hugin<br />
cmake /usr/src/hugin/hugin<br />
make && sudo make install<br />
<br />
== autopano-sift-C ==<br />
Needed for automatic control point generation, restricted by software patents in some countries.<br />
<br />
cd /usr/src<br />
svn co https://hugin.svn.sourceforge.net/svnroot/hugin/autopano-sift-C/trunk/ autopano-sift-C<br />
cd autopano-sift-C<br />
mkdir build && cd build<br />
cmake -DCMAKE_INSTALL_PREFIX=/usr/local ..<br />
make<br />
sudo make install<br />
<br />
== Status reports ==<br />
<br />
Success Report: On OpenSuSE 10.2 ist's really straightforward.<br />
* clean SVN chechout (version as of 20070204)<br />
* followed the instructions in '''INSTALL_cmake'''.<br />
* The only non-standard thing is libpano13, (2.9.12 was used)<br />
* All other dependencies have been resolved using the standard (smart) repositories for OpenSuSE (wxGTK is 2.6.3.3).<br />
<br />
Success Report: Confirmed working on OpenSuSE 10.3 and x86_64 architecture.<br />
<br />
Success Report: On OpenSuSE 11.0 x86_64.<br />
* you will need to make sure you have all of the build tools. (examples: gcc+ automake)<br />
* Also had to install libXML2 for autopano<br />
<br />
For OpenSuSE 11.1:<br />
* On x86_64 systems with libraries in /usr/lib64 or /usr/local/lib64 such as OpenSuSE, redhat or fedora you need to pass LIB_SUFFIX=64 to cmake<br />
<br />
[[Category:Software:Platform:Linux]]<br />
[[Category:Software:Hugin]]<br />
[[Category:Compiling:Hugin]]</div>Onomouhttps://wiki.panotools.org/index.php?title=Hugin_Compiling_Fedora&diff=13620Hugin Compiling Fedora2011-07-11T19:11:26Z<p>Onomou: Add Compiling category</p>
<hr />
<div>== Binary packages ==<br />
<br />
The [[hugin]] and [[enblend]] stable releases are part of default fedora, available via the ''Add/Remove Software'' menu. Note that there is no [[autopano-sift]] in fedora due to patent issues, but [[autopano-sift-C]] can be found in the [http://rpmfusion.org/ RPM Fusion] 3rd party package repository.<br />
<br />
Otherwise, recent-ish hugin snapshots and other panorama-related software can usually be found at the [http://bugbear.postle.net/~bruno/apt/fedora/linux/ fedora panorama repository]. To subscribe just follow this [http://bugbear.postle.net/~bruno/apt/fedora/linux/11/i386/RPMS.panorama/panorama-release-8-1.fc11.noarch.rpm panorama release] link, use the ''Package Installer'' option, and each time you do a ''Software Update'' hugin will be upgraded to the latest snapshot. (some redhat/centos packages can also be found at the same location).<br />
<br />
== Compiling ==<br />
<br />
If you want to compile hugin yourself, just follow the instructions in the '''INSTALL_cmake''' file, you will need these development RPM packages (January 2011):<br />
<br />
libpano13-devel zlib-devel libtiff-devel libjpeg-devel<br />
libpng-devel gettext-devel wxGTK-devel boost-devel<br />
cmake desktop-file-utils OpenEXR-devel gcc-c++ exiv2-devel glew-devel<br />
freeglut-devel mesa-libGLU-devel libXmu-devel<br />
<br />
To actually use hugin you also need make, shared-mime-info, [[enblend]] and perl-Image-ExifTool RPM packages. [[autopano-sift-C]] or [[panomatic]] are optional now that Hugin has a built-in control point generator.<br />
<br />
Basic compilation instructions are:<br />
<br />
tar -bxvf hugin-2010.4.0.tar.bz2<br />
cd hugin-2010.4.0<br />
mkdir BUILD<br />
cd BUILD<br />
cmake ..<br />
make<br />
sudo make install<br />
<br />
This will install Hugin and its libraries to /usr/local, this is the preferred location for any software installed without a package manager.<br />
<br />
== rpm building instructions ==<br />
<br />
The source RPM package contains an hugin.spec file which is both the build documentation and the script for an automated build (other linux packaging systems work basically the same way).<br />
<br />
=== fedora configuration ===<br />
<br />
First set up your fedora system for building rpms, install some packages (as root):<br />
<br />
yum groupinstall "Development Tools"<br />
yum install rpmdevtools<br />
<br />
Using a normal user account create a build tree, by default this is ~/rpmbuild:<br />
<br />
rpmdev-setuptree<br />
<br />
=== Get a source tarball of hugin ===<br />
<br />
Either [http://sourceforge.net/projects/hugin/files/ download the current stable .tar.gz (or tar.bz2) file] from sourceforge or [http://wiki.panotools.org/Hugin_Compiling_Ubuntu#Fetch_the_Source_Code_with_Mercurial get the latest from Mercurial].<br />
<br />
If you have fetched the code via Mercurial you can now create a tarball like so:<br />
<br />
mkdir BUILD<br />
cd BUILD<br />
cmake ..<br />
make package_source<br />
<br />
('package_source' is a ''make'' target, targets are things like 'all' or 'clean' or 'install', this one just creates a tarball)<br />
<br />
=== Get a hugin.spec file ===<br />
<br />
Download an existing hugin .src.rpm file and extract the ''hugin.spec'' file by running this command as a normal user:<br />
<br />
rpm -ivh hugin-2010.2.0-1.src.rpm<br />
<br />
This should put the .spec file where rpmbuild expects to find it.<br />
<br />
~/rpmbuild/SPECS/hugin.spec<br />
<br />
The next step is to put the .tar.bz2 file where rpmbuild expects to find it:<br />
<br />
~/rpmbuild/SOURCES/hugin-2010.4.0.tar.bz2<br />
<br />
..and run rpmbuild to create both the SRPM and RPMS at the same time:<br />
<br />
rpmbuild -ba ~/rpmbuild/SPECS/hugin.spec<br />
<br />
This will fail, probably. You need to edit the .spec file to change the 'Version:' entry to match the number of the tarball, install any missing build dependency rpms, and try again.<br />
<br />
== Building with mock ==<br />
<br />
'mock' is a more sophisticated system for creating RPMS, it is possible to build multiple architectures and create packages for different releases of fedora and redhat enterprise linux on a single fedora system. <br />
<br />
Install mock as root and add yourself to the 'mock' group (use your user name, not 'myusername'):<br />
<br />
yum install mock<br />
usermod -a -G mock myusername<br />
<br />
Follow the instructions above for creating rpms, but just create the source rpm instead:<br />
<br />
rpmbuild -bs ~/rpmbuild/SPECS/hugin.spec<br />
<br />
Then you can build rpms from this src.rpm with mock like so:<br />
<br />
mock -r fedora-11-i386 rebuild ~/rpmbuild/SRPMS/hugin-2009.1.0-0.src.rpm<br />
<br />
The first time you do this it will take a very long time while it downloads and assembles a 'virtual' machine, but subsequent builds will only take a few minutes.<br />
<br />
[[Category:Software:Platform:Linux]]<br />
[[Category:Software:Hugin]]<br />
[[Category:Compiling:Hugin]]</div>Onomouhttps://wiki.panotools.org/index.php?title=Hugin_Compiling_Ubuntu&diff=13619Hugin Compiling Ubuntu2011-07-11T19:11:05Z<p>Onomou: Add Compiling category</p>
<hr />
<div>== Who Is This Page For ==<br />
<br />
These instructions contain the collective wisdom of Hugin contributors that are using Ubuntu or any of its variations (Ku/Xu/Lu/Edu/...buntu). They are work in progress and updated when newer versions of Ubuntu are released or when Hugin introduces new dependencies. They have worked, at the time of release or soon thereafter, with all 'buntu versions up until 10.10. They are intended to help contributors on the learning curve. If you are not here to contribute, spare yourself the effort and see the [[#Shortcut]] section below.<br />
<br />
They are likely to work only for the latest 'buntu release, but you can check this page's history at the time that the older 'buntu version was the most recent one to find the specifics for that version.<br />
<br />
If you are new here, read the whole page. It is recommended that you go sequentially through it.<br />
<br />
If you're familiar with the process and have run it a few time, look at the what's new section for important news.<br />
<br />
Apart from the odd change in package name, nothing should be substantially different (and if does not work, please leave a comment on the [http://groups.google.com/group/hugin-ptx hugin-ptx mailing list]). Don't worry if the same package appears twice in an apt-get install line - apt-get will update existing packages if there is a newer version, and ignore duplicates if the latest version is already installed. On the other hand, if apt-get says that it can't find a package, it might be the odd change in package name. You can find a replacement package by using apt-cache search with a substring of the package required, e.g.<br />
<pre>apt-cache search wxW<br />
</pre><br />
<br />
The goal is to build hugin and the whole set of helper applications required, and start understanding the building process. You will need deeper understanding of the building process if you want to:<br />
* develop code<br />
* translate the latest strings<br />
* document the latest features with manuals and tutorials<br />
* package for distribution<br />
That knowledge is out of scope for this document. This document ends with a binary that is fit for installation on your machine. It is not fit for any other purpose, particularly not for distribution. CMake is [http://groups.google.com/group/hugin-ptx/msg/3f29b207c562fd63 known] to build broken deb packages. Please do not distribute these binaries.<br />
<br />
== What's New ==<br />
<br />
'''9 May 2011''': The integration of the python_scripting development branch brings new dependencies and a new build-time configuration switch for Hugin. See changes in the documentation below. swig2.0 is officially distributed only with Natty (11.04 onwards). If you have an older Ubuntu version you will either have to forego the python scripting feature or find an alternative swig2.0 (either a PPA or build it yourself).<br />
<br />
'''2 May 2011''': If you are using an earlier version of Ubuntu than 11.04, there is a chance that your Mercurial version is too old for grabbing updates. New (non-critical security) updates to a program do not get added to old versions of Ubuntu, so any new changes will need to be added manually. When running Mercurial (pull, update, etc), you may get an error like<br />
<pre><br />
abort: requirement 'dotencode' not supported!<br />
</pre><br />
To fix this, you can use the package archive from Mercurial PPA Packagers and get the latest release:<br />
<pre><br />
sudo apt-add-repository ppa:mercurial-ppa/releases<br />
sudo apt-get update<br />
sudo apt-get install mercurial<br />
</pre><br />
<br />
'''5-March-2010''': Foreign library libtclap removed from source tree. This introduces a new dependency on libtclap-dev<br />
<br />
'''February 2010''': Libpano has migrated from SVN to Mercurial.<br />
<br />
'''CMake 2.8.2''', as packaged in Ubuntu 10.10, contains a bug (http://public.kitware.com/Bug/view.php?id=11020) the prevents the created debs to install successfully, due to it not storing needed directories in the deb package.<br />
Installing the resulting debs will fail with a message error saying something like<br />
<br />
<pre><br />
unable to create `/usr/local/share/hugin/xrc/data/redo.png.dpkg-new' (while processing `./usr/local/share/hugin/xrc/data/redo.png'): No such file or directory<br />
</pre><br />
<br />
Commands to create the necessary folders have been documented below and may be added to the CMake build in the repository of Hugin, Libpano, Enblend. However it is possible that the lists are incomplete. If you bump in the above message, the solution is to create the full missing path and run dpkg -i again, recursively adding folders until the install succeed.<br />
<br />
<pre><br />
sudo mkdir -p /usr/local/share/hugin/xrc/data/<br />
</pre><br />
<br />
Another workaround is, to partially rebuild the deb package by hand:<br />
<br />
<pre><br />
mkdir unpacked<br />
cd unpacked/<br />
ar x ../hugin.build/hugin-2010.2.0-Linux.deb<br />
mkdir untarred<br />
cd untarred<br />
tar xzf ../data.tar.gz<br />
tar czf ../data.tar.gz .<br />
cd ..<br />
ar r ../hugin-2010.2.0-Linux.deb debian-binary control.tar.gz data.tar.gz<br />
</pre><br />
<br />
== Shortcut ==<br />
<br />
Hugin evolves fast and the official 'buntu distributions carry versions that are usually 3-6 months older than the 'buntu distribution date. Moreover, they do not backport Hugin and related tools.<br />
<br />
Even if you follow religiously the 'buntu six months update cycle, you may be using a version of Hugin that is one or two release cycles in our past. If your sole objective is to use the new features of Hugin, the instructions in this section are for you. Start a command line terminal, type the three commands and you're done.<br />
<br />
If for some reason that's not enough for you - if you want to actually learn and become a contributor; or if you're just curious about getting even closer to the bleeding edge and trade stability for features and excitement, the rest of this document is for you.<br />
<br />
=== Stable ===<br />
<br />
This will install you the latest stable version of the tools:<br />
<pre><br />
sudo add-apt-repository ppa:hugin/hugin-builds<br />
sudo apt-get update<br />
sudo apt-get install hugin enblend panini<br />
</pre><br />
<br />
=== Unstable ===<br />
<br />
This will install you the latest unstable version of the tools that has been built as a binary. While they are likely to work in most cases, there is no guarantee and they are not recommended for production environment. Use at your own risk, and please report (and if possible fix) bugs. Most of the time these unstable builds are closer to the bleeding edge than to the stable builds. If you want the really really really bleeding edge, you'll have to work through the instructions in the next sections, though.<br />
<br />
<pre><br />
sudo add-apt-repository ppa:hugin/hugin-builds<br />
sudo add-apt-repository ppa:hugin/nightly<br />
sudo apt-get update<br />
sudo apt-get install hugin enblend panini<br />
</pre><br />
<br />
== Building Environment ==<br />
Since we are going to build hugin, libpano13 and enblend we need to download and install all the development packages. This is very easy with apt-get.<br />
In a terminal window (K menu -> System -> Konsole or Applications -> Accessories -> Terminal (in Kubuntu), Applications -> Accessories -> Terminal (in Ubuntu))<br />
<br />
<pre>sudo apt-get install build-essential autoconf automake1.9 libtool flex bison gdb libc6-dev libgcc1 \<br />
cmake<br />
</pre><br />
<br />
To get the bleeding edge we'll need access to the SVN and Mercurial repositories, and for this we need the correct tools:<br />
<br />
<pre><br />
sudo apt-get install subversion mercurial<br />
</pre><br />
<br />
Not necessary, but useful if you want to revisit configuration sets in ccmake<br />
<pre><br />
sudo apt-get install cmake-curses-gui<br />
</pre><br />
<br />
To get on the same page as far as file system layout is concerned, we'll create a folder to contain all source code in your home folder:<br />
<pre><br />
cd<br />
mkdir -p src<br />
</pre><br />
<br />
=== For Coders ===<br />
<br />
If you want to start to navigate, understand and modify the code, the doxygen generated documentation will be helpful to you.<br />
<br />
<pre><br />
sudo apt-get install doxygen graphviz<br />
</pre><br />
<br />
=== For Distributors ===<br />
<br />
If you want to build packages for distribution, you will also need the following tools and settings.<br />
<br />
<pre><br />
sudo apt-get install subversion-tools<br />
sudo echo 'deb-src ftp://ftp.at.debian.org/debian ../project/experimental main' > debian-experimental.list<br />
mv debian-experimental.list /etc/apt/sources.list.d/<br />
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 55BE302B<br />
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 8B8D7663<br />
sudo apt-get update<br />
sudo apt-get install devscripts<br />
</pre><br />
<br />
You will also need an OpenPGP key, and a Launchpad account. Follow the [[Hugin_Trackers#Launchpad_Account|instructions]] for Launchpad account creation, including the signing of the Ubuntu Code of Conduct.<br />
<br />
Moreover, it is likely that your environment is not clean enough for distribution builds. In that case, and to produce binaries for other Ubuntu series than the one you are running, you will want to set up a dchroot environment (to be documented later on).<br />
<br />
== Building Enblend ==<br />
<br />
Get the dependencies. If you are working with large images (300 megapixels and up), you should have a libtiff-devel compiled with large file support and libstdc++6.<br />
<br />
<pre><br />
sudo apt-get install pkg-config libtiff4-dev libboost-graph-dev libboost-thread-dev \<br />
libboost-filesystem-dev liblcms1-dev libglew1.5-dev libplot-dev libglut3-dev libopenexr-dev \<br />
libxi-dev libxmu-dev help2man libplot-dev liblcms1-dev libboost-system-dev<br />
</pre><br />
<br />
If you also want to build the documentation, add the following dependencies, and add "-DDOC=ON" to the cmake command below. (Be warned, however, that this will drag in over 700MB of additional dependencies. Unless you have a pressing need to build the documentation yourself, you can save yourself some time and disk space by downloading the PDF docs from http://enblend.sourceforge.net .)<br />
<br />
<pre><br />
sudo apt-get install texi2html texinfo fig2ps tidy gnuplot libxml-xpath-perl imagemagick<br />
</pre><br />
<br />
Once all dependencies are in place, get the code. The official repository has migrated from CVS to Mercurial:<br />
<br />
<pre><br />
mkdir -p ~/src/enblend<br />
cd ~/src/enblend<br />
hg clone http://enblend.hg.sourceforge.net:8000/hgroot/enblend/enblend enblend.hg<br />
</pre><br />
<br />
If you already have checked out enblend, to update the code to the latest version you need to run:<br />
<pre><br />
cd enblend.hg<br />
hg pull<br />
hg update<br />
cd ..<br />
</pre><br />
<br />
Then create a build directory and build in there. And install the Package.<br />
<br />
The options below are good for modern multi-core computers. For a single core, you may be better off setting ENABLE_OPENMP to OFF and ENABLE_IMAGECACHE to ON. The two options are mutually exclusive.<br />
<pre><br />
mkdir enblend.build<br />
cd enblend.build<br />
cmake ../enblend.hg -DENABLE_GPU:BOOL=ON -DENABLE_IMAGECACHE:BOOL=OFF -DENABLE_OPENMP:BOOL=ON \<br />
-DCPACK_BINARY_DEB:BOOL=ON -DCPACK_BINARY_NSIS:BOOL=OFF -DCPACK_BINARY_RPM:BOOL=OFF \<br />
-DCPACK_BINARY_STGZ:BOOL=OFF -DCPACK_BINARY_TBZ2:BOOL=OFF -DCPACK_BINARY_TGZ:BOOL=OFF \<br />
-DCPACK_BINARY_TZ:BOOL=OFF -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX:PATH=/usr/local<br />
make package<br />
sudo dpkg -i enblend-4.1.1-Linux.deb<br />
</pre><br />
<br />
If the install quits with an error, it is likely because of missing folders. Run the following commands and retry:<br />
<pre><br />
sudo mkdir -p /usr/local/share/man/man1<br />
sudo mkdir -p /usr/local/bin<br />
</pre><br />
<br />
===The old autotools way===<br />
We are then ready to compile. The CXXFLAGS <tt>--param inline-unit-growth=60</tt> is a workaround for x86_64 systems, Feb 2009, and apparently no longer needed (set by default). If you have an SMP machine and you're building a recent version, <tt>--disable-image-cache</tt> and <tt>--enable-openmp</tt> will speed up enblend/enfuse massively but may cause segmentation faults; in that case you will be better off with <tt>--enable-image-cache</tt> and <tt>--disable-openmp.</tt> <tt>-march=native</tt> is also beneficial and -O2 is better than -O3.<br />
<br />
<pre><br />
make --makefile=Makefile.scm<br />
mkdir BUILD<br />
cd BUILD<br />
CXXFLAGS="--param inline-unit-growth=60 -march=native -O2" ../configure --disable-image-cache \<br />
--enable-openmp<br />
make<br />
</pre><br />
<br />
The second make step can be very long and memory consuming. Make sure you have enough swap space, and go get a healthy snack while the computer is compiling.<br />
<br />
If you encounter problems at any of these stages, please report back to the hugin-ptx mailing list. Report what command in the sequence you were executing, what machine/operating system, the revision checked out from CVS, and all other relevant information.<br />
<br />
You are then ready to install with<br />
<pre><br />
sudo make install<br />
</pre><br />
<br />
== Building Libpano13 ==<br />
<br />
libpano13 is the new version of the PanoTools libraries. This is a necessary component for hugin, and we need to build it first.<br />
To build libpano13 we need some libraries and particularly their <code>dev</code> package:<br />
<br />
<pre>sudo apt-get install zlib1g zlib1g-dev libpng12-dev libjpeg62-dev libtiff4-dev cmake</pre><br />
<br />
On older distributions, zlib1g and zlib1g-dev may not be found. In that case, the same library may be available with the names lib64z1 and lib64z1-dev.<br />
<br />
We then need to download the source code from the central repository:<br />
<br />
<pre><br />
mkdir -p ~/src/libpano<br />
cd ~/src/libpano<br />
hg clone http://panotools.hg.sourceforge.net:8000/hgroot/panotools/libpano libpano.hg<br />
</pre><br />
<br />
If you're a contributor with write access, use the following clone command instead:<br />
<pre><br />
hg clone ssh://${USER}@panotools.hg.sourceforge.net/hgroot/panotools/panotools/libpano libpano.hg<br />
</pre><br />
<br />
In the future there is no need to get the whole source again. Just issue the following commands to bring your source up to date:<br />
<pre><br />
cd libpano.hg<br />
hg pull<br />
hg up<br />
cd ..<br />
</pre><br />
<br />
Now start the building process.<br />
<br />
<pre><br />
mkdir libpano.build<br />
cd libpano.build<br />
cmake ../libpano.hg -DCMAKE_INSTALL_PREFIX=/usr/local -DCPACK_BINARY_DEB:BOOL=ON \<br />
-DCPACK_BINARY_NSIS:BOOL=OFF -DCPACK_BINARY_RPM:BOOL=OFF -DCPACK_BINARY_STGZ:BOOL=OFF \<br />
-DCPACK_BINARY_TBZ2:BOOL=OFF -DCPACK_BINARY_TGZ:BOOL=OFF -DCPACK_BINARY_TZ:BOOL=OFF \<br />
-DCMAKE_BUILD_TYPE=RelWithDebInfo<br />
make package<br />
sudo dpkg -i libpano13-*-Linux.deb<br />
</pre><br />
<br />
Set -DCMAKE_BUILD_TYPE=Debug if you want to help investigate/debug a problem and capture even more debugging information.<br />
<br />
If the install quits with an error, it is likely because of missing folders. Run the following commands and retry:<br />
<pre><br />
sudo mkdir -p /usr/local/include/pano13/<br />
sudo mkdir -p /usr/local/include/pano13/doc<br />
sudo mkdir -p /usr/local/lib/pkgconfig<br />
sudo mkdir -p /usr/local/share/man/man1<br />
sudo mkdir -p /usr/local/bin<br />
</pre><br />
<br />
=== The old autotools way ===<br />
<br />
The above described building process uses CMake to build libpano which has many advantages. Amongst others it creates a clean package to install / deinstall and decreases the likelihood of wrecking the system. However CMake support is relatively new in libpano. The old autotools way is documented below for completeness. You should not need it. However if you do, make sure to run either the CMake build or the autotools build on fresh repository checkouts to avoid interferences.<br />
<br />
<pre><br />
./bootstrap<br />
</pre><br />
<br />
If any libraries are missing, the script will complain (or at least, let you know that some library hasn't been found). In that case you probably need to install the library. To find in what package is that library, a general rule is to run the command <code>apt-cache search ''missingfile''</code>, find the relevant library and install both the library and the related <code>-dev</code> package.<br />
Run the <code>./configure</code> script and repeat this process until you have met all the dependencies.<br />
<br />
Then we are ready to launch the make process with<br />
<pre>make</pre><br />
<br />
If the library successfully compiles, you have to install it with<br />
<pre>sudo make install<br />
sudo ldconfig</pre><br />
The last part is for the OS to be aware of the new library (that has been installed in <code>/usr/local/lib</code>).<br />
We can now go back up one folder level and get ready for hugin.<br />
<pre>cd ..</pre><br />
<br />
== Building Hugin ==<br />
<br />
=== Dependencies ===<br />
<br />
First we need to activate the <code>universe</code> repository (in adept package manager, or by editing the /etc/apt/sources.lst file for example) and get the dependencies.<br />
<br />
If you want to build the Python scripting feature, your best bet is Natty (11.04). If you are on Lucid or Maverick, you can follow the instructions below to get a swig2.0 package. If nothing works and you still want Python scripting, you will have to build it from [https://sourceforge.net/projects/swig/ source].<br />
<br />
<pre><br />
sudo add-apt-repository ppa:hugin/hugin-builds<br />
sudo apt-get update<br />
</pre><br />
<br />
The following command will install on your system all build time dependencies except libpano13.<br />
<pre><br />
sudo apt-get install libwxgtk2.8-dev libtiff4-dev libpng12-dev \<br />
libopenexr-dev libexiv2-dev libglut3-dev libglew-dev libboost-dev \<br />
boost-build libboost-thread-dev libboost-graph-dev libboost-regex-dev \<br />
libboost-iostreams-dev libboost-filesystem-dev gettext liblapack-dev \<br />
libxi-dev libxmu-dev libboost-signals-dev libboost-system-dev \<br />
libtclap-dev<br />
</pre><br />
<br />
For the python scripting functionality, you will also need <br />
<pre><br />
sudo apt-get install libpython-dev python-dev swig2.0<br />
</pre><br />
<br />
Note that python-dev was the name for libpython-dev prior to Natty. Do not worry if it stops with the message<br />
<pre><br />
E: Unable to locate package {python-dev or libpython-dev}<br />
</pre><br />
Remove the package in error from the apt-get line and try again. You will still achieve the intended status. Tested on Natty and Lucid, most likely ok for Maverick as well.<br />
<br />
You could install libpano13 on your system with the command below. But it is recommended that you build your own libpano13 (see section [[Hugin_Compiling_Ubuntu#Building_Libpano13|above]]), since the version of libpano13 in the Ubuntu repositories is probably too old. Alternatively, there may be a recent enough version of libpano13 in the Hugin PPA. If going this last route, you can add it as shown above.<br />
<pre><br />
sudo apt-get install libpano13-dev<br />
</pre><br />
<br />
wxWidgets is a critical dependency for the Hugin GUI. In the official Ubuntu repositories it is usually at least a few releases behind the current release, and in some cases many releases behind. The wxWidgets project provides alternative [http://wiki.wxpython.org/InstallingOnUbuntuOrDebian repositories] with newer versions, as well as a [http://wiki.wxpython.org/BuildingDebianPackages instructions] to build binary packages of the most recent releases. Newer versions of wxWidgets are not (yet) absolutely necessary, but since eventually things evolve they are useful for development, testing, and in general should give a better user interface experience as wxWidgets improves over time.<br />
<br />
The following are run-time dependencies. Strictly speaking you don't need them to build Hugin, but you will need them to use it. If you follow the instructions on this page to build ExifTool and/or Enblend, you don't need to install them this way.<br />
<pre><br />
sudo apt-get install libimage-exiftool-perl enblend python-argparse<br />
</pre><br />
<br />
=== Fetch the Source Code with Mercurial ===<br />
<br />
If you already have a repository clone, you only need to pull the latest changes and update the code with:<br />
<pre><br />
cd ~/src/hugin/hugin.hg<br />
hg pull<br />
hg update<br />
</pre><br />
<br />
Otherwise, you need to clone the repository and decide which version/branch to build with:<br />
<pre><br />
mkdir -p ~/src/hugin<br />
cd ~/src/hugin<br />
hg clone http://hugin.hg.sourceforge.net:8000/hgroot/hugin/hugin hugin.hg<br />
cd hugin.hg<br />
hg branches<br />
</pre><br />
<br />
If you are a contributor with write access, you can use<br />
<pre><br />
hg clone ssh://${USER}@hugin.hg.sourceforge.net/hgroot/hugin/hugin hugin.hg<br />
</pre><br />
<br />
The `hg branches` command will list all available branches. If you decide, e.g., to build the 2010.0 branch, you will update to it with:<br />
<pre><br />
hg update -C 2010.0 <br />
</pre><br />
<br />
=== Advanced Use - Multiple Source Trees ===<br />
<br />
You may want to build multiple versions of Hugin on your machine at the same time, e.g. when you want to build side by side a stable version for your productivity and a development version to give feedback to the developers. In that case, you will clone the Mercurial repository that is already on your drive and update from it a source tree to a different branch. Mercurial takes care of details such as optimizing disk usage. The commands for this are:<br />
<br />
<pre><br />
cd ..<br />
hg clone hugin.hg another_hugin<br />
cd another_hugin<br />
hg update -C default<br />
</pre><br />
<br />
You can have as many "another_hugin" folders as you want. Just make sure, when pulling the latest updates from SourceForge, to first pull your main repository (the one you cloned from http://hugin.hg.sourceforge.net:8000/hgroot/hugin/hugin. Then pull all others:<br />
<pre><br />
cd ~/src/hugin/hugin.hg<br />
hg pull<br />
hg update<br />
cd ../another_hugin<br />
hg pull<br />
hg update<br />
</pre><br />
<br />
Reference: [http://groups.google.com/group/hugin-ptx/msg/1ce824dd1364e9be]<br />
<br />
=== Configure the Build Environment ===<br />
<br />
'''Rule:''' You always want to build outside of the source tree to keep the source tree clean. And to avoid confusion, if you have multiple source trees it is preferable to build for each of them in a separate build folder.<br />
<br />
Next we set up the build environment using cmake.<br />
<br />
If you compiled and installed libpano to a non standard location set the variables CMAKE_INCLUDE_PATH and CMAKE_LIBRARY_PATH to point to your install location's include and lib directories.<br />
<br />
If you are building for distribution, you want to set CMAKE_INSTALL_PREFIX=/usr<br />
<br />
<pre><br />
cd ~/src/hugin<br />
mkdir hugin.hg-build<br />
cd hugin.hg-build<br />
cmake ../hugin.hg -DENABLE_LAPACK=YES -DCPACK_BINARY_DEB:BOOL=ON -DCPACK_BINARY_NSIS:BOOL=OFF \<br />
-DCPACK_BINARY_RPM:BOOL=OFF -DCPACK_BINARY_STGZ:BOOL=OFF -DCPACK_BINARY_TBZ2:BOOL=OFF \<br />
-DCPACK_BINARY_TGZ:BOOL=OFF -DCPACK_BINARY_TZ:BOOL=OFF -DCMAKE_BUILD_TYPE=RelWithDebInfo \<br />
-DBUILD_HSI:BOOL=ON -DSWIG_EXECUTABLE=/usr/bin/swig2.0<br />
</pre><br />
<br />
The last line of the above cmake statement is for python scripting and will work with Ubuntu 11.04. The first switch activates the scripting interface (which is deactivated by default because it does not work simply out of the box on all supported platforms) and the second switch fixes a bug in the CMake script to find swig. Self-compiled swig does not need the -DSWIG_EXECUTABLE switch since it is found automatically by the CMake script.<br />
<br />
If you get an error building, try removing the last line of the above cmake statement. Another cause may be a wrong version of libpano13, even if you built it yourself. Go back and check that you are using a (newer) stable branch. Try switching to libpano13-2.9.18 (run hg update -C libpano13-2.9.18 in the proper folder), rebuild as instructed above, and try again.<br />
<br />
Set -DCMAKE_BUILD_TYPE=Debug if you want to help investigate/debug a problem and capture even more debugging information, however Hugin will be slower and may not work as expected. Don't use a Debug build for production.<br />
<br />
If you are building for install on your own machine only, -DDISABLE_DPKG=ON will significantly speed up the package generation. Do not distribute packages built this way, they don't have proper dependencies. This is primarily meant for developers doing cycles of fix-compile-install-test.<br />
<br />
=== Build and Install ===<br />
<br />
Finally, we use make to build the code and package it, and dpkg to install it. Look for the version number in the .deb file created and edit the lines below accordingly: <br />
<br />
<pre><br />
make package<br />
sudo dpkg -i hugin-*-Linux.deb<br />
sudo ldconfig<br />
</pre><br />
<br />
If the install quits with an error, it is likely because of missing folders. Run the following commands and retry: <br />
<pre><br />
sudo mkdir -p /usr/local/share/pixmaps<br />
sudo mkdir -p /usr/local/share/mime/packages<br />
sudo mkdir -p /usr/local/share/applications/<br />
sudo mkdir -p /usr/local/share/icons/gnome/48x48/mimetypes/<br />
sudo mkdir -p /usr/local/share/locale/en_GB/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/es_la/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/fr/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/zh_TW/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/ru/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/ro/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/bg/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/de/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/ko/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/pt_BR/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/zh_CN/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/ja/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/it/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/sl/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/sk/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/sv/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/ca_ES/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/nl/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/fi/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/cs_CZ/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/uk/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/es/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/pl/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/hu/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/es_VE/LC_MESSAGES<br />
sudo mkdir -p /usr/local/share/hugin/xrc/data/help_it_IT<br />
sudo mkdir -p /usr/local/share/hugin/xrc/data/help_en_EN<br />
sudo mkdir -p /usr/local/share/hugin/data/<br />
sudo mkdir -p /usr/local/lib/hugin<br />
sudo mkdir -p /usr/local/share/man/man1<br />
</pre><br />
<br />
'''Important:''' the package does not track dependencies yet, so it likely to fail on machines others than yours.<br />
<br />
Reference: [http://theseblog.free.fr/2007/10/building-hugin-in-ubuntu-feisty-fawn.php]<br />
<br />
=== Dive into the Code ===<br />
<br />
From time to time the API reference is published on the Hugin website, however you are better off with a local copy. To generate it, issue the following commands:<br />
<pre><br />
cd ~/src/hugin/hugin.hg/src<br />
doxygen Doxyfile<br />
</pre><br />
<br />
The documentation is generated in ~/src/hugin/hugin.hg/src/hugin/html<br />
<br />
Point your browser to index.html inside that folder and you have access to all available information. If you find that a class, a function, or anything else is not properly documented; and if you delve into the source code to understand it, kindly add documentation to the code so that the next person in your situation can use your experience as a stepping stone. Thank you!<br />
<br />
== Automatic Control Point Detectors ==<br />
<br />
=== Autopano-sift-C ===<br />
<br />
Pre-Requisites:<br />
<pre><br />
sudo apt-get install libxml2-dev<br />
</pre><br />
<br />
To build<br />
<br />
(Note February 2011: The latest source code of autopano-sift-C has been unstable for a long time now and nobody is working to fix it. Use the 2.5.1 release tarball instead)<br />
<br />
<pre><br />
mkdir -p ~/src/apsc<br />
cd ~/src/apsc<br />
hg clone http://hugin.hg.sourceforge.net:8000/hgroot/hugin/autopano-sift-C apsc.hg<br />
cd apsc.hg<br />
hg branches<br />
hg update -C 2.5.1<br />
cd ..<br />
mkdir apsc.hg.build<br />
cd apsc.hg.build<br />
cmake ../apsc.hg -DCMAKE_INSTALL_PREFIX=/usr/local -DCPACK_BINARY_DEB:BOOL=ON \<br />
-DCPACK_BINARY_NSIS:BOOL=OFF -DCPACK_BINARY_RPM:BOOL=OFF -DCPACK_BINARY_STGZ:BOOL=OFF \<br />
-DCPACK_BINARY_TBZ2:BOOL=OFF -DCPACK_BINARY_TGZ:BOOL=OFF -DCPACK_BINARY_TZ:BOOL=OFF \<br />
-DCMAKE_BUILD_TYPE=Debug<br />
make package<br />
sudo dpkg -i autopano-sift-C-*-Linux.deb<br />
</pre><br />
<br />
=== Match-n-shift ===<br />
<br />
Match-n-shift is yet an other Autopano-SIFT replacement. It comes in a bundle with pto file manipulation perl libraries and a rich selection of other tools that use nona, enblend, ImageMagick among other things. To use match-n-shift, you need to install at least the [http://search.cpan.org/dist/Panotools-Script/ Panotools::Script] library and some other perl modules. It requires:<br />
<br />
* Image::Size 2.9<br />
* Storable 2.0<br />
* Image::ExifTool 6<br />
<br />
Chances are that you do not need to update Storable which is a standard perl module. To check the version of installed versions of these modules, write these lines to the command prompt:<br />
<br />
perl -MStorable -le 'print Storable->VERSION;'<br />
perl -MImage::Size -le 'print Image::Size->VERSION;'<br />
perl -MImage::ExifTool -le 'print Image::ExifTool->VERSION;'<br />
<br />
There are various ways to install or upgrade these modules. Ubuntu has binary packages for many perl modules, you can skip the CPAN installation below and type:<br />
<br />
sudo apt-get install libimage-size-perl libimage-exiftool-perl<br />
<br />
Alternatively, perl is an interpreted language and these modules are pure perl, so installing from source is an easy thing.<br />
<br />
The best place to install perl modules is directly from a CPAN archive. CPAN is short for Comprehensive Perl Archive Network. The program to interact with CPAN comes with all perl installations. Start it by running:<br />
<br />
sudo cpan<br />
<br />
If this is your first time running the program you will be asked a number of questions (you can safely accept the suggested values). Last question lets you select a number of CPAN mirrors nearest to you.<br />
<br />
When all is done, you can enter the install commands after the 'cpan>' prompt:<br />
<br />
install Image::Size Storable Image::ExifTool<br />
<br />
Answer 'y' to any question of dependencies and wait for install to complete. 'exit' leaves the cpan shell.<br />
<br />
Next, you need to retrieve and install the Panotools-Script collection<br />
of perl libraries (Panotools::Script) and programs that use them -<br />
including match-n-shift:<br />
<br />
svn co https://panotools.svn.sourceforge.net/svnroot/panotools/trunk/Panotools-Script Panotools-Script<br />
cd Panotools-Script<br />
perl Makefile.PL<br />
make<br />
make test<br />
sudo make install<br />
<br />
Just to confuse you, you can also ignore everything above and just install Panotools::Script and all its dependencies from CPAN. From command line, type:<br />
<br />
sudo cpan Panotools::Script<br />
<br />
You can run match-n-shift from command line using the same parameters as autopano-c-complete.sh or you can modify hugin to run it for you:<br />
<br />
* start Hugin<br />
* navigate the menu File to Preferences<br />
* In the Preferences window, open the Autopano tab<br />
* Select Autopano -> Autopano-SIFT<br />
* tick the checkbox for Use alternative Autopano-SIFT program<br />
* enter the full path to match-n-shift (/usr/local/bin/match-n-shift) in the Autopano-SIFT field<br />
* enter the following string in the Arguments field:<br />
-f %f -v %v -c -p %p -o %o %i<br />
<br />
=== MatchPoint ===<br />
<br />
MatchPoint is a next generation CP generator. The result of a GSoC2007 project, it is still very experimental. Experience reports needed. Read more [http://groups.google.com/group/hugin-ptx/browse_thread/thread/cba2b2ce94dd9054 here]<br />
<br />
Matchpoint is now located inside the main hugin source tree, no need to checkout separately. It is compiled together with hugin, but not installed by default.<br />
<br />
* copy the MatchPoint executable into /usr/local/bin manually<br />
<pre><br />
cd ~/src/hugin/hugin.hg-build<br />
sudo cp src/matchpoint/matchpoint /usr/local/bin/<br />
</pre><br />
* edit /usr/local/bin/autopano-c-complete.sh (do it with sudo to have the necessary permission)<br />
** line 79: replace the .key.gz extension with .key (not sure if matchpoint supports compression)<br />
** lines 83 and 88: replace '''generatekeys "$arg" $FILENAME $SIZE''' with '''matchpoint "$arg" $FILENAME''' (not sure if the size option or any other options of the original generatekeys are applicable)<br />
<br />
=== Pan-o-matic ===<br />
<br />
Yet another control point generator [http://aorlinsk2.free.fr/panomatic/?p=home Home Page]<br />
<br />
<pre>sudo apt-get install libboost-dev</pre><br />
<br />
Download [http://aorlinsk2.free.fr/panomatic/download.php?d=7&v=0.9.4 Panomatic 0.9.4 bz2] and if you're on Ubuntu 9.10 or newer also the [http://aorlinsk2.free.fr/panomatic/panomatic_gcc44.patch patch] for the gcc4.4 compiler.<br />
<br />
<pre><br />
mkdir -p ~/src/panomatic<br />
cd ~/src/panomatic<br />
wget "http://aorlinsk2.free.fr/panomatic/download.php?d=7&v=0.9.4" -O panomatic-0.9.4-src.tar.bz2<br />
wget http://aorlinsk2.free.fr/panomatic/panomatic_gcc44.patch patch<br />
tar xvfj panomatic-0.9.4-src.tar.bz2<br />
cd panomatic-0.9.4<br />
patch -p 1 < ../panomatic_gcc44.patch<br />
./configure<br />
make<br />
sudo make install<br />
</pre><br />
<br />
To use Pano-o-matic, open Hugin<br />
<br />
* In File > Preferences > Autopano :<br />
* Select Autopano-SIFT<br />
* Check "Use alternative autopano-SIFT program"<br />
* Choose the path to the binary ( /usr/local/bin )<br />
* In Arguments, put : -o %o %i<br />
<br />
==== Pablo's variation ====<br />
<br />
Around the end of the year 2009, Pablo integrated a [http://groups.google.com/group/hugin-ptx/browse_thread/thread/d9c0558c679cad52 new] experimental descriptor based on the geometric blur and DAISY papers. Also, Pablo said that the algorithm is not really based on a published approach, just on some ideas that are mentioned in a few of them, and its currently simpler than any of them:<br />
<br />
o geometric blur: [http://www.eecs.berkeley.edu/~aberg/gb.html]<br />
<br />
o daisy: [http://cvlab.epfl.ch/~tola/daisy.html]<br />
<br />
o descriptor learning: [http://cvlab.epfl.ch/~brown/learndesc/learndesc.html]<br />
<br />
To build that version of panomatic instead, follow these instructions:<br />
<br />
This is current the subject of a GSoC 2010 project and may be available in future versions of Hugin.<br />
<br />
<pre><br />
sudo aptitude install libboost-python-dev bzr cmake libvigraimpex-dev<br />
</pre><br />
<br />
<pre><br />
bzr branch lp:~pablo.dangelo/hugin/panomatic-lib<br />
mkdir build<br />
cd build<br />
cmake ../panomatic-lib<br />
make<br />
sudo make install<br />
</pre><br />
<br />
To use the new descriptor the arguments for Hugin are: '''--sieve1size 100 --sieve2size 2 -o %o %i'''<br />
<br />
== ExifTool ==<br />
<br />
ExifTool is no longer mandatory for Hugin to work. It is used to pass metadata from the input to the output images during the stitching process. <br />
<br />
[http://www.sno.phy.queensu.ca/~phil/exiftool/ ExifTool] is a platform-independent Perl library plus a command-line application for reading, writing and editing meta information in image, audio and video files.<br />
<br />
Usually the version distributed with Ubuntu (8.15 in Ubuntu 10.10; 7.89 in Ubuntu 10.4) is good enough and you don't need to bother with the following instructions. However there were situations in the past and there might be situations in the future where the latest versions offer better support. These issues will occur most likely with specific camera brands/models and the most recent models. The following instructions are for those cases.<br />
<br />
<pre><br />
sudo apt-get purge libimage-exiftool-perl<br />
</pre><br />
<br />
<pre><br />
wget http://www.sno.phy.queensu.ca/~phil/exiftool/Image-ExifTool-8.50.tar.gz<br />
tar -xzf Image-ExifTool-8.50.tar.gz<br />
cd Image-ExifTool-8.50<br />
perl Makefile.PL<br />
make test<br />
sudo make install<br />
</pre><br />
<br />
== Pano Viewers ==<br />
<br />
=== PanoGLView ===<br />
<br />
PanoGLView is an OpenGL hardware accelerated interactive immersive viewer for equirectangular images.<br />
<br />
Pre-Requisites:<br />
<pre>sudo apt-get install wx-common libwxgtk2.8-dev libglew-dev</pre><br />
<br />
To build and install:<br />
<pre><br />
mkdir -p ~/src/panoglview<br />
cd ~/src/panoglview<br />
hg clone http://hugin.hg.sourceforge.net:8000/hgroot/hugin/panoglview panoglview.hg<br />
cd panoglview.hg<br />
hg update<br />
./bootstrap<br />
./configure<br />
make<br />
sudo make install<br />
</pre><br />
<br />
=== FreePV - DEPENDENCIES ARE BROKEN - FAILS TO BUILD ===<br />
<br />
Pre-Requisites:<br />
<pre><br />
sudo apt-get install cmake make pkg-config g++ mozilla-devscripts freeglut3-dev zlib1g-dev \<br />
libjpeg-dev libxext-dev libxmu-dev x11proto-xf86vidmode-dev libxxf86vm-dev libnspr4-dev \<br />
libxml2-dev libpng12-dev<br />
</pre><br />
To build<br />
<pre><br />
svn co https://freepv.svn.sourceforge.net/svnroot/freepv/freepv/trunk/ freepv<br />
cd freepv<br />
cmake .<br />
make<br />
sudo make install<br />
</pre><br />
<br />
=== Panini Perspective Tool ===<br />
<br />
Strictly speaking, Panini is more than just a viewer. It's a powerful tool to extract/transform views and can also be easily used as a viewer.<br />
<br />
Get dependencies:<br />
<pre><br />
sudo apt-get install qt4-qmake libqt4-dev zlib1g-dev<br />
</pre><br />
<br />
Get code:<br />
<pre><br />
mkdir -p ~/src/pvqt<br />
cd ~/src/pvqt<br />
svn co https://pvqt.svn.sourceforge.net/svnroot/pvqt pvqt.svn<br />
</pre><br />
<br />
Build:<br />
<pre><br />
cd pvqt.svn<br />
qmake panini.pro<br />
make<br />
</pre><br />
<br />
Install (brute force):<br />
<pre><br />
sudo cp Panini /usr/local/bin/ <br />
</pre><br />
<br />
Menu Entry for Kubuntu:<br />
<pre><br />
kmenuedit<br />
</pre><br />
<br />
in kmenuedit<br />
* navigate to Graphics<br />
** click on New Item<br />
** Enter "Panini" as Name<br />
** Enter "Perspective Tool" as Description<br />
** click on the empty icon and look for an icon (I used the akonadi one)<br />
** Enter "Panini" as Command<br />
** Click on Save button<br />
<br />
== Notes for Packagers ==<br />
<br />
=== Tarballs ===<br />
<br />
* to get an updated ChangeLog in Mercurial repositories (Hugin has it also in the cmake invocation, use '''-DUPDATE_CHANGELOG=1''')<br />
<pre><br />
hg log --follow --style=changelog <br />
</pre><br />
* to update the ChangeLog in SVN repositories (Panotools)<br />
<pre><br />
svn up<br />
svn2cl<br />
svn ci<br />
</pre><br />
<br />
=== Deb Packages ===<br />
<br />
The deb packages built by CMake (2.8.2) are broken by Debian standard. Please do not distribute them. There are official updated recent packages at the Hugin PPA mentioned above which include nightlies (produced every 24 hours) and stables (produced out of released tarballs). If you miss binaries for your series of Ubuntu and you have built them for yourself following the instructions above, considering moving up one level and contributing to the [[Hugin PPA]].<br />
<br />
[[Category:Software:Hugin]]<br />
[[Category:Software:Platform:Linux]]<br />
[[Category:Compiling:Hugin]]</div>Onomouhttps://wiki.panotools.org/index.php?title=Hugin_Compiling_Windows_with_SDK&diff=13618Hugin Compiling Windows with SDK2011-07-11T19:10:40Z<p>Onomou: Add Compiling category</p>
<hr />
<div>This article gives step-by-step instructions for building hugin from a source code snapshot using Visual C++ 2008 Express Edition and precompiled dependencies. That is the recommended way to build Hugin for Windows. Once you are proficient with this, you can venture in the more complex replacement of individual SDK component up until building from scratch. It also shows how to build enblend-enfuse, which hugin requires, with the same tools.<br />
<br />
Bear in mind that a source snapshot of hugin is a transient stage in an incomplete and rapidly evolving package, so may have a short useful life, and will contain bugs and defects. Your main purpose in building one should be to help find, report, and maybe correct some of those. <br />
<br />
== Background ==<br />
<br />
The hugin build is based on cmake, a cross platform makefile generator. On Windows, cmake can generate project files for various Microsoft Visual Studio toolsets, from the same specifications it uses to create makefiles on other platforms.<br />
<br />
There is an ongoing community effort to publish an SDK (Software Development Kit) containing all the support components needed to build hugin and enblend (and AutoPano-SIFT-C) on Windows. Pablo started the publication of SDKs two years ago. His last SDK only works for SVN revisions prior to '''3479''' because of new dependencies introduced with the Fast Preview project during Google Summer of Code 2008. For later revisions, the updated SDK is available [[Hugin_SDK_(MSVC_2008)|here]] . The current SDK works only for Microsoft Visual C++ 2008 Express. This has introduced problems with non-Latin characters in filenames. The old SDK was also built for Visual C++ 2003.<br />
<br />
You can install VC 2008 Express beside other Microsoft compiler versions, even professional ones, without damaging either toolset. <br />
<br />
The enblend source tree has projects for building with both the 2003 and 2008 tools (also 2005 but there is no sdk for that).<br />
<br />
The following instructions are for starting from scratch on a Windows PC without any software building tools installed. If you already have some of these things installed, you will need to take care that the right tools and components are used. It is vitally important that all object code is generated by the same compiler version and targeted to the same VC runtime library.<br />
<br />
The recommended Tortoise archive clients work through the Windows File Explorer: right-click a target directory and follow the popup menus.<br />
<br />
== Get Tools ==<br />
<br />
1) install [http://www.microsoft.com/express/download/ Visual C++ 2008 Express] -- Service Pack 1 recommended<br />
<br />
2) install [http://www.cmake.org/HTML/Download.html cmake] -- latest release recommended 2.6.4 is known to work<br />
<br />
3) install [http://tortoisesvn.net/downloads Tortoise SVN] and [http://bitbucket.org/tortoisehg/stable/downloads/ TortoiseHG] clients -- latest release recommended as the repositories are often upgraded in sync with the clients. If you know what you are doing, you may also want to install [http://bazaar-vcs.org/TortoiseBzr TortoiseBZR]<br />
<br />
3) Obtain [http://www.xmission.com/~nate/glut.html].<br />
<br />
== Get hugin SDK ==<br />
<br />
4) download the precompiled [http://hugin.panotools.org/sdk/MSVC/Hugin-SDK-20090509-win32.exe SDK] unpack it into new directory huginbase with winrar or 7zip.<br />
<br />
The SDK currently is outdated (January 2011). But for starting to compile Hugin for Windows it is a good start. Start with the provided SDK and see [[Hugin SDK (MSVC 2008)]] for details to get an up-to-date build environment.<br />
<br />
== Build enblend ==<br />
<br />
5) check out enblend source tree into huginbase. Create a folder huginbase/enblend. Right click on enblend in Windows Explorer and select "TortoiseHg..." from the context menu. Enter the following incantation into the Source Path field, make sure huginbase/enblend is in the Destination Path field and click Clone. <br />
<br />
<pre><br />
http://enblend.hg.sourceforge.net:8000/hgroot/enblend/enblend <br />
</pre><br />
<br />
The result should be a new directory, huginbase/enblend, containing the source tree.<br />
<br />
6) open huginbase/enblend/enblend_msvc2008.sln with Visual Studio 2008 Express. Change the target configuration to 'release' (build menu, configuration manager). Click build solution. After it completes, copy enblend/INSTALLDIR into huginbase/enblend-3.1/. The hugin install script expects this directory.<br />
<br />
If the compilation failed, the SDK is probably not synchronized with the source code. To find the cause, in MSDev, in the solution explorer, right click on the enblend project-> Properties. There, follow Configuration Properties -> C/C++ -> General. On the first line is additional include directories. Click on it, and expand the window it just opened. The list of folder starting by ..\..\XXX means that XXX is expected in the huginbase folder. Compare the list here with the folders in hugin base. Change the folders required and\or download and add the missing packages<br />
<br />
Current list of broken links between enblend and SDK:<br />
<br />
WARNING -> This section is a work in progress. Until finished, you may break something by following this.<br />
<br />
* LCMS required but not part of SDK -> <br />
** Download version 1.18 [http://www.littlecms.com/downloads.htm here] and unzip in huginbase folder<br />
** Change the dependency to point to 1.18<br />
** inside lcms-1.18 there is a Projects folder. Select the MSVC2008 project. Start it.<br />
** in the configuration manager, select to build lcms only. You do not need the other tools (that will raise an error because they don't find some dependencies)<br />
* SDK comes with wxMSW-2.8.10 but enblend expects versio 2.8.7 -> in MSDev in the additional DLL menu, change all paths to wxMSW-2.8.10 (don't forget, not only the version is different, the folder name is too) - do the same for enblend and enfuse projects<br />
* SDK provides tiff in wxMSW-2.8.10 while enblend searches in tiff-3.8.2 -> change that include for ..\..\..\wxWidgets-2.8.10\src\tiff - do the same for enblend and enfuse projects <br />
* SDK provides boost 1.39.0 and enblend expects trunk -> in MSDev in the additional DLL menu, change all paths from boost_trunk to boost_1_39_0 - do the same for enblend and enfuse projects<br />
* In the enfuse property window -> Linker -> General -> Additional Library Directories, change the path for wxWidgets for the new one. Also change the folder for lcms. Do these 2 actions on the enblend project<br />
* In the enfuse property window -> Linker -> Input-> Additional Dependencies, change tifflib for wxtiff.lib. Do the same for enblend<br />
<br />
<br />
<br />
== Build hugin ==<br />
<br />
7) check out hugin source tree into huginbase. Make a new folder called hugin inside huginbase. Right click on huginbase/hugin in Windows Explorer, select "TortoiseHg, Clone...", enter this source URL, set Destination path to "hugin" and click OK.<br />
http://hugin.hg.sourceforge.net:8000/hgroot/hugin/hugin<br />
<br />
The result should be a new directory, huginbase/hugin, containing the source tree. <br />
<br />
8) Start the cmake gui (cmakesetup.exe). <br />
<br />
Workaround: To ensure that the environment is set right, run cmakesetup.exe from the VC 2008 command shell (available under the Windows Start Menu) - essential if you have other compilers installed. You might want to create a desktop shortcut that does this with one click. (This should not be necessary if you installed Visual C++ correctly.)<br />
<br />
Set cmake's source code directory to huginbase/hugin and its build directory to huginbase/hugin-build (this will create a new directory for the build). Click Configure and tell it to use Visual C++ 2008. Cmake then checks the build tools and if that goes well does the first round of searching for components. When done it displays a list of configuration variable settings, on a red background. Click "Show Advanced Values" to display all of them.<br />
<br />
This is when you get to correct anything that needs correcting. <br />
<br />
Next, check that all component pathnames start at huginbase. Cmake may have found some things installed in standard places on your system; but it should only be using the ones in the sdk. To correct a pathname, click on it and either type in the right one or click '...' to pop a fileselector. Look out for values with "_NOT_FOUND" in them; these may indicate problems with your directory names or structure. You will need to set ENBLEND_EXE_DIR to huginbase/enblend-3.1/INSTALLDIR that that was created when you built enblend. Also, you need to set HUGIN_BUILDER and HUGIN_BUILDATE -- this is you name and date of the build that will appear on application splash screen.<br />
<br />
When you are satisfied the paths are right, click Configure again, and Cmake will try to validate the variables. That might set some new ones, which will appear in red. Recheck all values, even the grey ones. If a variable keeps coming up wrong try deleting it from cache (right click on name pops menu) and configure again; this is often necessary to trigger a new search. Keep fixing and clicking Configure until everything is OK. Then click OK to generate the project files.<br />
<br />
9) Open hugin.sln in the build directory with Visual Studio 2008 Express and wait while it loads and checks all the projects. Then select a target configuration and click "build solution". After a long time, and many warnings, you should get a successful build.<br />
<br />
10) Build the INSTALL project. This should put a complete hugin installation in huginbase/hugin-build/INSTALL/FILES.<br />
<br />
NOTE any missing file stops the install script, leaving the installation more or less incomplete. If this happens, first look at the install scripts, cmake_install.cmake (several places in the hugin-build tree) to identify all the files that were not found (paths with "_NOT_FOUND" in them). If you can find all of them, put them where the install script expects them -- hugin/cmakemodules/winbundle.cmake will help indentify those places. You can't just build INSTALL again, because the files are searched for at configuration time, so the install scripts will still contain invalid pathnames until you run cmakesetup again. Exit Visual Studio first, since all project files must be rebuilt. It may be necessary to delete pathnames of the failed places (such as enblend-3.1) from cache to ensure everything gets regenerated. Then Configure, OK, open the new hugin.sln and build INSTALL.<br />
<br />
== Updating the hugin build ==<br />
<br />
To update your source tree to to the latest revision, right click on huginbase/hugin in Windows Explorer and select "TortoiseHg/Synchronize". Set "Post Pull" drop down box to "Update", then select Pull. This will pull all new changeset from central repository and update your working copy to current default tip.<br />
<br />
Check if there is a new release of the sdk, and if so, download and install it.<br />
<br />
Then you have to run cmakesetup again. Proceed as in 8) above, but click "Delete Cache" before "Configure", so that the new configuration gets built from scratch.<br />
<br />
Remember to "Clean" or "Rebuild" the entire solution in MSVC.<br />
<br />
== Installing hugin on Windows ==<br />
<br />
Directory hugin-build/INSTALL/FILES contains a complete, self-contained hugin installation. You can use this as is, or copy it to a directory of your choice if you wish to delete the build tree (it is a good idea to put the the SVN version number in the name of that directory. e.g. FILES becomes "hugin_0.7.0.2766"). You should create a shortcut to hugin.exe on your desktop (note you can start new projects by dragging and dropping groups of files on the shortcut). You may also want to associate the new hugin.exe with the hugin project file (.pto) file extension. <br />
<br />
This way of installing can be undone simply by deleting the files. It will not break any other hugin installation that may be on your system. However, note that all instances of hugin do share the same persistent settings, so options you set in one version will affect the others, too.<br />
<br />
The source tree and sdk contain support for building Windows Installer (.msi) packages with War Setup and/or Innosetup. At present these are under development and could potentially damage your Registry and/or prior installations of hugin, so I would advise not using them until a stable release is issued.<br />
<br />
The hugin team periodically publishes "snapshot" builds for testing. The Windows versions of these come in two forms, as a self-installing archive that automates the simple "copy files" method described above, and as a Windows Installer package.<br />
<br />
== Some things that don't work ==<br />
<br />
Trying to target the dll versions of the Visual C runtimes. Only the static C libraries (libcmt, libcmtd) will do. You can't mix static and dll runtimes, so all (static) dependencies must also have been compiled with /MT or /MTd. While it might be possible to use dll versions of some of the support libraries, such as tiff or OpenEXR, it is safest to keep a strict policy of "static libraries only".<br />
<br />
Trying to use dependencies built with a different compiler. For all practical purposes, Microsoft runtime libraries are now usable with only one compiler version. Although linking code built with more than one compiler sometimes seems to work, the resulting program is likely to fail.<br />
<br />
Trying to link Boost libraries of a different source version than the Boost headers. Boost takes some trouble to lock object code to source version as well as compiler version, so it is rarely possible (and always a mistake) to do this.<br />
<br />
Occasionally a build step fails mysteriously, that has succeeded before. The main cause of this is a file being marked in the Windows filesystem as in use when a tool tries to open it. On a slow, heavily loaded machine, the filesystem may not update a closed file's status quickly enough -- solution: reduce the load. On any machine, Google Desktop Search (or other automatic indexer) may grab a recently updated file and really have it open -- solution: pause or disable indexing and retry the build step.<br />
<br />
<small>--[[User:Tksharpless|Tksharpless]] 16:42, 23 January 2008 (CET)</small><br />
<br />
[[Category:Software:Hugin]]<br />
[[Category:Software:Platform:Windows]]<br />
[[Category:Compiling:Hugin]]</div>Onomouhttps://wiki.panotools.org/index.php?title=Hugin_Compiling_Windows&diff=13617Hugin Compiling Windows2011-07-11T19:10:16Z<p>Onomou: Add Compiling category</p>
<hr />
<div>{| style="margin: 1em auto 1em 1em;background:#FFFF99;color:#FF0000;text-align:left;border: solid #FF3300;"<br />
|-valign="top"<br />
! '''NOTE:'''<br />
! This is work in progress and not finished yet. And as hugin progresses with the introduction of new dependencies this page becomes more outdated than ever. If you are new to building hugin, try first with [[Build_Hugin_for_Windows_with_SDK|this]] method. If you know what you are doing, keep reading / following this instructions and feel free to update them.<br />
|}<br />
<br />
Since mid January 2008, building hugin for Windows has been easier than this page might lead you to expect. The cmake build configuration and control system has become fully functional, and a complete set of precompiled dependencies (the ''Hugin SDK'') is available. There are step-by-step instructions here: [[Build Hugin for Windows with SDK]].<br />
<br />
= Why do I want to compile hugin? =<br />
<br />
If you want to fiddle with the hugin code, add new features or help squashing bugs, and do all that on Windows, this is the guide for you. Be warned that building hugin on Windows is not a piece of cake, so only try if you know the dark sides with all the development tools involved.<br />
<br />
For normal testing purpose it is better to use the occasional binary snapshot. For first-time builders it is better to use the SDK-based [[Build Hugin for Windows with SDK|instructions]].<br />
<br />
This guide is designed to be a help for people who have expressed interest in understanding the depth of building Windows version of the current hugin code on a regular basis.<br />
<br />
This guide will describe two ways of building the latest trunk. It does not apply to the hugin code prior to 2007/10/27.<br />
<br />
= Deciding on the toolchain =<br />
<br />
Currently, there are two methods for building hugin. Both are based on the CMake build system.<br />
<br />
# Compilation with Microsoft Visual Studio .NET. MSVC 2003 or 2008 is required. The recommended method is to download [http://www.microsoft.com/express/vc/ Microsoft Visual C++ 2008 Express Edition], and install it. For convenience a ''Hugin SDK'' with precompiled libraries for MSVC 2008 is provided. It is recommended to use these initially, rather than to compile your own libraries. There are detailed instructions at [[Build Hugin for Windows with SDK]]. Once you are familiar and comfortable with the process described there, you can move in to replace the precompiled libraries with your own self-built ones, step by step.<br />
# Compilation with MinGW32. This does not require the Microsoft compiler and even allows cross compilation of binaries for windows on a linux machine. Until now, only the cross compilation approach has been tried, but a building on a native system should also be possible.<br />
<br />
The following additional programs are also required for building a hugin installer package:<br />
<br />
# [http://www.cmake.org CMake] Note that Microsoft Visual C++ 2008 Express Edition is not supported by CMake 2.4. [http://www.cmake.org/HTML/Download.html Download] a recent Windows binary of CMake. These instructions were written at a time that only a recent CVS snapshot of CMake worked with this method. It is likely that CMake 2.6.x works as well, but it has not been tested.<br />
# [http://enblend.sf.net enblend 3.2]<br />
# [http://sf.net/projects/unxutils GNU make], required by hugin, not for building hugin. (included in ''Hugin SDK'')<br />
# GNU gettext. (included in ''Hugin SDK'')<br />
# Moreover, for packgaging the installer you will need [http://www.jrsoftware.org/isinfo.php Innosetup]. Instructions for this are in the Hugin repository.<br />
<br />
<br />
For both MSVC and MinGW32 approaches, the hardest task is the compilation of the libraries required by hugin. This mainly includes wxWidgets, boost, libpano13 and OpenEXR.<br />
<br />
= Building with Microsoft Visual C++ 2008 Express Edition =<br />
<br />
This also works with earlier version from 2003 onwards. However, you will need to compile the dependencies from scratch. For simpler installation (and less headaches during building) everything is built against the older, multithreaded runtime libraries (\MT option), and linked all executables statically.<br />
<br />
== Getting the dependencies ==<br />
<br />
It is tempting to download precompiled libraries from the different projects, and use those. Be prepared that they might have been created with different compiler setting (Especially with a different runtime libraries). This can lead to hard to find and nasty problems and amount to days of depressing work.<br />
<br />
=== Downloading precompiled dependencies ===<br />
<br />
This is the recommended approach.<br />
<br />
Download the [http://hugin.panotools.org/sdk/MSVC/hugin_enblend_sdk_msvc2008_v2.7z ''Hugin SDK'']. and unzip it into a directory of your choice. '''src''' is used in this document. Continue with [[#Building Hugin]].<br />
<br />
=== Build all required dependencies from scratch ===<br />
<br />
Download the source packages. Newer versions might work, too.<br />
<br />
# Download wxWidgets from http://www.wxwidgets.org, 2.8.4 were used to write this guide and it has been last tested to work with 2.8.9, but later version should work, too<br />
# Download boost from http://www.boost.org, I used 1.34_1<br />
# Download OpenEXR source (IlmBase and OpenEXR) from http://www.openexr.com/<br />
# Download panorama tools source (pano13), from http://panotools.sf.net. Use version 2.9.12 or later. Latest SVN is even better.<br />
# Download and install gettext installer package from http://gnuwin32.sf.net<br />
<br />
Unpack the source packages.<br />
<br />
==== Building wxWidgets ====<br />
<br />
NOTE: this will only work for hugin SVN revisions prior to 8-Oct-2008. TODO: describe how to activate the OpenGL canvas.<br />
<br />
1. Open libs/wxWidgets/src/tiff/tiffconf.h in your favorite editor, and add<br />
<br />
#define ZIP_SUPPORT<br />
<br />
near line 90 to support ZIP compressed tiff files (update: wxWidgets ships with an ancient version of libtiff, so LZW will still be disabled. The ''Hugin SDK'' additionally contains libtiff 3.8.2). To avoid nasty popup messages with the<br />
command line tools we are going to build, additionally add:<br />
<br />
#define TIF_PLATFORM_CONSOLE<br />
<br />
2. build wxWidgets: start the MSVC command line shell (from the startmenu) and cd to the wxWidgets/build/msw. To build Unicode debug release libraries, execute the following commands:<br />
<br />
cd wxWidgets*/build/msw<br />
nmake -f makefile.vc BUILD=debug UNICODE=1 SHARED=0 RUNTIME_LIBS=static<br />
nmake -f makefile.vc BUILD=release UNICODE=1 SHARED=0 RUNTIME_LIBS=static<br />
<br />
It may be more reliable to build the wxWidgets libraries with the distributed MSVC projects, as described [http://www.wxwidgets.org/wiki/index.php/MSVC_.NET_Setup_Guide here]. When I used the commandline method several libraries were built wrong, or not at all. -- TKSharpless<br />
<br />
I never had trouble using the makefiles, maybe thats a MSVC 2005 issue? -- Pablo d'Angelo<br />
<br />
==== Building boost ====<br />
<br />
Refer to the boost documentation for details, especially [http://www.boost.org/more/getting_started/windows.html#or-build-binaries-from-source Build binaries from source]. Download bjam exectable and place it in the boost directory. Open the MSVC Command line prompt located in Start Menu -> Programs Microsoft Visual Studio -> Utilities, change directory to the boost dir and issue<br />
<br />
bjam stage --with-thread<br />
<br />
This will build the boost thread library.<br />
<br />
If you are using Visual C++ 7.1 (Visual Studio 2003) or 8.0 (Visual Studio 2005), you can save a lot of time and aggravation by getting precompiled Boost libraries from [http://www.boost-consulting.com/products/free BoostConsulting]. You first download an installer program, which when run lets you choose which library variants you want to install. For Hugin you need the multithreaded static libraries, built for the static Microsoft C runtime with the compiler you intend to use. If you already have a Boost installation, you can just add these libraries to it, otherwise install the Boost headers too. <br />
<br />
Windows Boost libraries are named according to version, compiler and MS runtime variant (multi|single thread, static|dll) so take care that the Hugin build uses the right names. Example:<br />
libboost_date_time-vc80-mt-s-1_34_1.lib<br />
prefix 'lib' shows this is a static link library, not the import library for a Boost dll; 'vc80' says built with VC8.0; 'mt-s' built for release version of the Microsoft multithread static C runtime LIBCMT (i.e. with compiler switch '/MT') (the debug version has 'mt-sgd'); '1_34_1' built from Boost version 1.34.1 source.<br />
<br />
<br />
==== Building OpenEXR ====<br />
<br />
This is a tricky one, because the MSVC project files have been set up for DLL builds with the \MD runtime, and a custom program is used to prepare the DLLs. For the all static windows binaries, quite some changes to the MSVC project files are needed.<br />
<br />
Build according to README_win in ilmbase-1.0.0 but changed the runtime of all projects to MT. <br />
<br />
For all projects do:<br />
* set each project to static lib<br />
* remove OPENEXR_DLL, _USEDLL and *_EXPORTS defines<br />
* set runtime to MT<br />
* disable SSE2, to generate binaries that run on all platforms<br />
* remove the createDLL part of the post-build command, but keep the call to '''install*.cmd''', such as '''..\..\..\installIlmImf.cmd $(IntDir)'''<br />
<br />
Apply the same procedure to the openexr-1.6 source code. Here only the IlmImf and IlmImfTest projects are needed by Hugin.<br />
Follow the same process as for IlmBase, but additionally add include path for the zlib library (inside the wxWidget/src/zlib) to the IlmImf project, and wxWidget/libs/_vc/wxzlib.lib to the IlmImfTest linker options. The tests should run without errors.<br />
<br />
It is a good idea to create new target configurations, say HuginRelease and HuginDebug, with the Visual Studio Configuration Manager, and apply the above changes to them, so that you don't lose the original project settings. This also makes the Hugin-appropriate libraries easy to find as they will be built in directories named for the configurations. They should be installed in directories named that way, too; the install commands make those directories in the Deploy/... tree, but fail to copy the static libraries there because the dll library names are built into them. However it is easy enough to copy the libs from the build folders by hand. The ilmbase libraries must be in the Deploy tree before IlmImf is built. -- TKSharpless<br />
<br />
<br />
==== Building Panotools ====<br />
<br />
[[Build_pano12_from_sourcecode_MSVC|Building Pano13 with MSVC]] is described on a separate page.<br />
<br />
=== Building Hugin ===<br />
<br />
Use SVN to retrieve the latest hugin sourcecode (svn root is: https://hugin.svn.sourceforge.net/svnroot/hugin/hugin/trunk), and save it to src/hugin-trunk. Remember the SVN revision, it will be needed later.<br />
<br />
Place all dependencies alongside the hugin-trunk source directory. Example (versions might be slightly outdated):<br />
<br />
src/<br />
hugin-trunk<br />
OpenExr<br />
STLport-5.1.4<br />
boost_1_34_1<br />
enblend-3.1<br />
libpano/pano13<br />
wxMSW-2.8.6<br />
make/make.exe<br />
<br />
<br />
Run CMakeSetup to create the MSVC project files. If you use the ''Hugin SDK'' or have a 100% identical directory structure, CMakeSetup will pick up the dependencies automatically. Otherwise the paths to each dependency will have to specified manually during the following cmake step<br />
<br />
# Run cmake, select hugin source and build directories. Do not choose the same directories for both source and build.<br />
# Press '''Configure''.<br />
# If building is done using an SVN checkout, the SVN revision number needs to be specified manually. Press '''Configure'' again.<br />
# CMake will pick up the dependencies and show them to you. Press '''Configure''' again. Now the '''Ok''' button should be available. If CMake had problems picking up all dependencies (for example, if you build your own libraries). CMake will prompt you if it misses something. After some iterations, all dependencies should be picked up.<br />
# Press the '''Ok''' button.<br />
# Once all fields have been filled out, the "Ok" button should be available. Press it and open the generated hugin.sln file with MSVC. Switch to Build Type to Release and start the build (press F7). After quite some time hugin should be build. In order to run hugin, it needs to be installed so that data files are in the right place. This is done by building the '''INSTALL''' project. The binaries and all required files will be installed into INSTALL/FILES subdirectory of the build directory specified during the CMake step.<br />
# Creating the .msi installer by opening INSTALL/hugin.warsetup with the WarSetup program available from http://warsetup.jgaa.com/ and clicking on the '''Build''' button.<br />
# A NSIS installer can be build by building the '''PACKAGE''' target (NSIS needs to be installed for this). This is currently a default installer, without specific functionality.<br />
<br />
= Building using MinGW =<br />
<br />
I have managed to build the older, pre GSoC 2007 version with MinGW, but still having some problems with the new trunk. Once these are resolved, I will provide instructions<br />
<br />
<br />
<small>--[[User:Pablo|pablo]] 18:10, 13 January 2008 (CET)</small><br />
[[Category:Software:Hugin]]<br />
[[Category:Software:Platform:Windows]]<br />
[[Category:Compiling:Hugin]]</div>Onomouhttps://wiki.panotools.org/index.php?title=Hugin_Compiling_OSX&diff=13616Hugin Compiling OSX2011-07-11T19:09:47Z<p>Onomou: Add Compiling category</p>
<hr />
<div>==Introduction==<br />
This tutorial describes how to build Hugin on OSX via [http://www.macports.org/ MacPorts]. [http://www.finkproject.org/ Fink] users should also be able to use it even though the commands and directory structure is different from MacPorts.<br />
*Directory structure where everything is built and installed:<br />
**MacPorts: /opt/local<br />
**Fink: /sw<br />
*Main commands to install/update/uninstall/deactivate packages:<br />
**MacPorts: sudo port [install][update][uninstall][search] <package1> <package2> <packagex><br />
**Fink: sudo apt-get [install][update][uninstall][search] <package1> <package2> <packagex><br />
'''Note:''' These are only the most used command options for both port and apt-get. See their respective websites [http://www.macports.org/ Macports.org] and [http://www.finkproject.org/ Finkproject.org] for documentation.<br />
<br />
'''Note:''' This Howto does not describe how to build a portable universal application. You can use the [[Build_a_MacOSX_Universal_Hugin_bundle_with_Xcode | Build a MacOSX Universal Hugin bundle with Xcode]]<br />
<br />
'''Note:''' In case you encounter problems, report them on [http://groups.google.com/group/hugin-ptx the Hugin mailing list].<br />
<br />
==Building environment==<br />
===Download and install XCode===<br />
[http://developer.apple.com/tools/download/ Download] and install the XCode Tools version for your MacOSX version: Xcode 2.5.x for MacOSX 10.4.x or below, Xcode 3.1.x for 10.5.x (Leopard) and Xcode 3.2.x for 10.6.x (Snow Leopard). You will not use the Xcode development environment itself, but the MacOSX system comes without the GNU compiler, builder, linker and so on.<br />
<br />
===Fink commander===<br />
''Note: This tutorial describes how to build Hugin with MacPorts. This should more or less be the same for Fink. All references to <tt>/opt/local</tt> that are mentioned here for MacPorts should be changed with <tt>/sw</tt> for Fink.''<br />
You may find [http://finkcommander.sourceforge.net/ Fink Commander] helpful. Unfortunately it [http://sourceforge.net/forum/forum.php?forum_id=684829 seems] unsupported / unmaintained. The Fink [http://www.finkproject.org/faq/index.php?phpLang=en FAQ] may help. Can somebody please describe here how to install Fink and Fink Commander?<br />
<br />
===Install Macports===<br />
If you don't have it already, install MacPorts, which provides the <tt>port</tt> command, from [http://www.macports.org MacPorts], giving you compilable package access to thousands of pieces of open source software. If you already have macports (formerly darwinports) installed, update it to at least version 1.7.0:<br />
<blockquote><br />
<pre><br />
sudo port selfupdate<br />
</pre><br />
Make sure you have synced the latest port files:<br />
<pre><br />
sudo port -d sync<br />
</pre><br />
</blockquote><br />
<br />
''Snow Leopard remarks:'' <br />
- edit your "/opt/local/etc/macports/macports.conf" and set "universal_archs" to "x86_64 i386" (off course without the double quotes).<br />
<br />
===Porticus===<br />
You may find the GUI frontend [http://porticus.alittledrop.com/ Porticus] helpful with [http://www.macports.org/ MacPorts]<br />
<br />
===Install CMake===<br />
Install cmake from MacPorts:<br />
<pre><br />
$ sudo port install cmake<br />
</pre><br />
<br />
Alternatively, you can download a prepackaged installer from [http://www.cmake.org/HTML/Download.html CMake].<br />
<br />
===Mercurial (HG)===<br />
You need to get and install Mercurial from MacPorts as the Hugin development trunk is in a Marcurial repository.<br><br />
''Note: Hugin used to be in a SVN repository but since mid May 2010 it has been moved to Mercurial''<br />
<br />
<br />
===Subversion (SVN)===<br />
You need to get and install Subversion from MacPorts. If you fancy a nice GUI you can download the Open-Source [http://www.lachoseinteractive.net/en/community/subversion/svnx/features/?sid=b42441f308810ad0d36b779f90319391 SVNX]. You still need svn installed as it is only a graphical shell and I won't explain SVNX here (I only used it once, I still like the terminal).<br />
''Note: Subversion comes preinstalled in Leopard and Snow Leopard. In Leopard, it is quite old, so you'll want to compile the newer version from MacPorts. In Snow Leopard, the pre-installed version is the quite current 1.6.5, and should be fine.''<br />
<br />
==Install necessary libraries== <br />
Use port to install the necessary libraries and commands for Hugin:<br />
<blockquote><br />
<pre><br />
sudo port install boost tiff jpeg libpng wxWidgets subversion openexr exiv2 glew mercurial tclap<br />
</pre><br />
</blockquote><br />
<br />
Wait as all of these source packages (and it's dependencies) are downloaded and compiled, and installed into /opt/local. Go get a frappe, walk the dog, and total the first 1000 prime numbers in binary.<br />
<br />
<br />
<br />
<br />
===libpano13===<br />
You can either build from the latest "tarball"release from [http://sourceforge.net/project/showfiles.php?group_id=96188&package_id=237430 SourceForge], which is currently 2.9.17 or from the latest version in SVN (preferred). The current MacPorts version is too old:<br />
<br />
<pre><br />
svn co https://panotools.svn.sourceforge.net/svnroot/panotools panotools<br />
</pre><br />
<br />
====Build libpano13 from SVN====<br />
To build and install the SVN version you first need to edit the bootstrap file and change:<br />
<br />
<tt>LIBTOOLIZE=${LIBTOOLIZE:-libtoolize}</tt><br />
<br />
to <br />
<br />
<tt>LIBTOOLIZE=${LIBTOOLIZE:-glibtoolize}</tt><br />
<br />
<pre><br />
$ cd DirectoryWherePanotoolsIs/panotools/trunk/libpano<br />
$ nano bootstrap (or do it with your preferred editor)<br />
</pre><br />
<br />
Alternatively, this command-line should work just as well (untested):<br />
<br />
export LIBTOOLIZE=glibtoolize<br />
<br />
Now you can build the library.<br />
<br />
On Tiger and Leopard do:<br />
<pre><br />
$ export CFLAGS="-I/opt/local/include -L/opt/local/lib"<br />
$ export CXXFLAGS="-I/opt/local/include -L/opt/local/lib"<br />
$ ./bootstrap --without-java<br />
$ make<br />
$ sudo make install<br />
</pre><br />
<br />
On Snow Leopard do:<br />
<pre><br />
$ export CFLAGS="-arch i386 -I/opt/local/include -L/opt/local/lib"<br />
$ export CXXFLAGS="-arch i386 -I/opt/local/include -L/opt/local/lib"<br />
$ ./bootstrap --without-java<br />
</pre><br />
Open the "libtool" file with an editor and change all occurrences of "-dynamiclib" to "-dynamiclib -arch i386" (2 occurrences).<br><br />
''Note:'' If you want to build universal on Snow Leopard for both i386 and x86_64, change the "-dynamiclib" to "-dynamiclib -arch i386 -arch x86_64" (2 occurrences).<br />
<pre><br />
$ make<br />
$ sudo make install<br />
</pre><br />
<br />
By default the library is installed into <tt>/usr/local/lib</tt>.<br />
<br />
====Build libpano13 from a tar.gz====<br />
To build libpano from a .tar.gz file, CD into the source directory of the unpacked .tar.gz. This will normally be "libpano13-2.9.xy" where "xy" is the version number. Note that the current Hugin version needs 2.9.18 or newer.<br />
Then do the following on Tiger and Leopard:<br />
<pre><br />
$ export CFLAGS="-I/opt/local/include -L/opt/local/lib"<br />
$ export CXXFLAGS="-I/opt/local/include -L/opt/local/lib"<br />
$ ./configure --without-java<br />
$ make<br />
$ sudo make install<br />
</pre><br />
On Snow Leopard do the following:<br />
<pre><br />
$ export CFLAGS="-arch i386 -I/opt/local/include -L/opt/local/lib"<br />
$ export CXXFLAGS="-arch i386 -I/opt/local/include -L/opt/local/lib"<br />
$ ./configure --without-java<br />
</pre><br />
Open the "libtool" file with an editor and change all occurrences of "-dynamiclib" to "-dynamiclib -arch i386" (4 occurrences).<br><br />
''Note:'' If you want to build universal on Snow Leopard for both i386 and x86_64, change the "-dynamiclib" to "-dynamiclib -arch i386 -arch x86_64" (4 occurrences).<br />
<pre><br />
$ make<br />
$ sudo make install<br />
</pre><br />
<br />
By default the library is installed into <tt>/usr/local/lib</tt>.<br />
<br />
===WxWidgets===<br />
Hugin requires wxWidgets, which is called wxMac for MacOSX, the GUI toolkit currently employed by Hugin, to be at version >= 2.8.7. The current version of wxWidgets at MacPorts is 2.8.11.<br />
Note: Hugin is not configured yet to use WxWidgets 2.9<br />
<br />
====Tiger (10.4.x) ====<br />
Fix a problem on Tiger (10.4.x): Tiger comes with WxWindows version 2.5. The Hugin cmake will search OS paths first and will find Tiger's own version 2.5 instead of your freshly compiled 2.8. You need to get Tiger's 2.5 version out of the way as you won't be able to build Hugin succesfully as long as it is in place.<br />
<blockquote><br />
<pre><br />
$ sudo mv /usr/bin/wx-config /usr/bin/wx-config-2.5<br />
$ sudo mv /usr/include/wx-2.5 /usr/include/wx-2.5-macTiger<br />
</pre><br />
</blockquote><br />
<br />
====Leopard (10.5.x)====<br />
Fix a problem on Leopard (10.5.x): Leopard comes with WxWindows version 2.8.4. The Hugin cmake will search OS paths first and will find Leopard's own version 2.8.4 instead of your freshly compiled 2.8.8 or above. You need to get Tiger's 2.8.4 version out of the way. Hugin will build succesfully with 2.8.4 and will run. However version 2.8.4 still contains some bugs that will cause "bleeding through" in the graphical CP windows. This means that when things change in wxwidgets objects, sometimes (most of the times) the CP window displays through your current GUI screen.<br />
<blockquote><br />
<pre><br />
sudo mv /usr/bin/wx-config /usr/bin/wx-config-2.8.4<br />
sudo mv /usr/include/wx-2.8 /usr/include/wx-2.8-macLeopard<br />
</pre><br />
</blockquote><br />
<br />
====Snow Leopard (10.6.x)====<br />
Snow Leopard comes with WxWindows 2.8.8 so no changes are required.<br />
<br />
==Build Hugin==<br />
===Get Hugin from Mercurial===<br />
Check out the hugin sources from the Mercurial repository, like:<br />
<blockquote><br />
<pre><br />
hg clone http://hugin.hg.sourceforge.net:8000/hgroot/hugin/hugin hugin<br />
</pre><br />
</blockquote><br />
If you are asked to accept the ssh key from the SourceForge server, do accept it permanently (p). Otherwise the configuring process using cmake will fail.<br />
<br />
On subsequent updates you simply cd into the hugin directory and issue the following two commands: <br />
<blockquote><br />
<pre><br />
hg pull<br />
hg update<br />
</pre><br />
</blockquote><br />
<br />
===Create hugin build directory===<br />
Create another directory alongside the newly created <tt>hugin/</tt> for the build files (a cool feature of CMake: it doesn't need to pollute your source directory with build files!):<br />
<blockquote><br />
<pre><br />
mkdir hugin_build; cd hugin_build<br />
</pre><br />
</blockquote><br />
''Note: You can give this directory any name you want, but hugin_build is chosen for it's clarity.''<br />
===Configure build===<br />
Before we configure hugin we need to set the build environment:<br />
<blockquote><br />
<pre><br />
export CFLAGS="-I/opt/local/include -L/opt/local/lib"<br />
export CXXFLAGS=$CFLAGS<br />
</pre><br />
</blockquote><br />
<br />
''Snow Leopard:''<br />
If you are on Snow Leopard you need to use the following C/CXX FLAGS: <br />
<blockquote><br />
<pre><br />
export CFLAGS="-arch i386 -I/opt/local/include -L/opt/local/lib"<br />
export CXXFLAGS=$CFLAGS<br />
</pre><br />
</blockquote><br />
''Note: On Snow Leopard, gcc builds for 64-bit architecture by default. However, some libraries that Hugin depends upon are not yet compilable as 64-bit libraries (such as wxWindows-2.8). Thus, the i386 flag is necessary to force a 32-bit build.''<br />
<br />
Configure hugin using cmake from inside the build directory you created:<br />
<blockquote><br />
<pre><br />
cmake ../hugin<br />
</pre><br />
</blockquote><br />
''Note: If you are rebuilding hugin after an svn upgrade or other (system) change, the savest way to proceed is to first remove the "CMakeCache.txt" from your build directory. It contains the build settings for your previous build.''<br />
<br />
===Compile Hugin===<br />
Compile Hugin and friends:<br />
<blockquote><br />
<pre><br />
make<br />
sudo make install<br />
</pre><br />
</blockquote><br />
Watch the pretty colors go by. Give the dog another quick spin around the block; you're finished. Look for the new bundle <tt>Hugin.app</tt> in <tt>usr/local/Applications/</tt> or in <tt>usr/local/bin/</tt>. Copy or link it to <tt>/Applications</tt>, or your preferred location, and commence testing.<br />
<br />
== Important Note on the produced Bundle ==<br />
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.<br />
You can use the [[Build_a_MacOSX_Universal_Hugin_bundle_with_Xcode | Build a MacOSX Universal Hugin bundle with Xcode]] to build a universal portable bundle.<br />
<br />
== Building Enblend (using Fink or MacPorts) ==<br />
follow these [[Enblend_Compiling_OSX|updated instructions]]<br />
<br />
== Building Autopano-Sift-C ==<br />
Follow [[autopano-sift-C_Compiling_OSX|these instructions]]<br />
<br />
[[Category:Software:Hugin]] [[Category:Software:Platform:Mac OS X]] [[Category:Compiling:Hugin]]</div>Onomouhttps://wiki.panotools.org/index.php?title=Hugin_Compiling_Ubuntu&diff=13592Hugin Compiling Ubuntu2011-06-23T16:13:49Z<p>Onomou: /* Dependencies */</p>
<hr />
<div>== Who Is This Page For ==<br />
<br />
These instructions contain the collective wisdom of Hugin contributors that are using Ubuntu or any of its variations (Ku/Xu/Lu/Edu/...buntu). They are work in progress and updated when newer versions of Ubuntu are released or when Hugin introduces new dependencies. They have worked, at the time of release or soon thereafter, with all 'buntu versions up until 10.10. They are intended to help contributors on the learning curve. If you are not here to contribute, spare yourself the effort and see the [[#Shortcut]] section below.<br />
<br />
They are likely to work only for the latest 'buntu release, but you can check this page's history at the time that the older 'buntu version was the most recent one to find the specifics for that version.<br />
<br />
If you are new here, read the whole page. It is recommended that you go sequentially through it.<br />
<br />
If you're familiar with the process and have run it a few time, look at the what's new section for important news.<br />
<br />
Apart from the odd change in package name, nothing should be substantially different (and if does not work, please leave a comment on the [http://groups.google.com/group/hugin-ptx hugin-ptx mailing list]). Don't worry if the same package appears twice in an apt-get install line - apt-get will update existing packages if there is a newer version, and ignore duplicates if the latest version is already installed. On the other hand, if apt-get says that it can't find a package, it might be the odd change in package name. You can find a replacement package by using apt-cache search with a substring of the package required, e.g.<br />
<pre>apt-cache search wxW<br />
</pre><br />
<br />
The goal is to build hugin and the whole set of helper applications required, and start understanding the building process. You will need deeper understanding of the building process if you want to:<br />
* develop code<br />
* translate the latest strings<br />
* document the latest features with manuals and tutorials<br />
* package for distribution<br />
That knowledge is out of scope for this document. This document ends with a binary that is fit for installation on your machine. It is not fit for any other purpose, particularly not for distribution. CMake is [http://groups.google.com/group/hugin-ptx/msg/3f29b207c562fd63 known] to build broken deb packages. Please do not distribute these binaries.<br />
<br />
== What's New ==<br />
<br />
'''9 May 2011''': The integration of the python_scripting development branch brings new dependencies and a new build-time configuration switch for Hugin. See changes in the documentation below. swig2.0 is officially distributed only with Natty (11.04 onwards). If you have an older Ubuntu version you will either have to forego the python scripting feature or find an alternative swig2.0 (either a PPA or build it yourself).<br />
<br />
'''2 May 2011''': If you are using an earlier version of Ubuntu than 11.04, there is a chance that your Mercurial version is too old for grabbing updates. New (non-critical security) updates to a program do not get added to old versions of Ubuntu, so any new changes will need to be added manually. When running Mercurial (pull, update, etc), you may get an error like<br />
<pre><br />
abort: requirement 'dotencode' not supported!<br />
</pre><br />
To fix this, you can use the package archive from Mercurial PPA Packagers and get the latest release:<br />
<pre><br />
sudo apt-add-repository ppa:mercurial-ppa/releases<br />
sudo apt-get update<br />
sudo apt-get install mercurial<br />
</pre><br />
<br />
'''5-March-2010''': Foreign library libtclap removed from source tree. This introduces a new dependency on libtclap-dev<br />
<br />
'''February 2010''': Libpano has migrated from SVN to Mercurial.<br />
<br />
'''CMake 2.8.2''', as packaged in Ubuntu 10.10, contains a bug (http://public.kitware.com/Bug/view.php?id=11020) the prevents the created debs to install successfully, due to it not storing needed directories in the deb package.<br />
Installing the resulting debs will fail with a message error saying something like<br />
<br />
<pre><br />
unable to create `/usr/local/share/hugin/xrc/data/redo.png.dpkg-new' (while processing `./usr/local/share/hugin/xrc/data/redo.png'): No such file or directory<br />
</pre><br />
<br />
Commands to create the necessary folders have been documented below and may be added to the CMake build in the repository of Hugin, Libpano, Enblend. However it is possible that the lists are incomplete. If you bump in the above message, the solution is to create the full missing path and run dpkg -i again, recursively adding folders until the install succeed.<br />
<br />
<pre><br />
sudo mkdir -p /usr/local/share/hugin/xrc/data/<br />
</pre><br />
<br />
Another workaround is, to partially rebuild the deb package by hand:<br />
<br />
<pre><br />
mkdir unpacked<br />
cd unpacked/<br />
ar x ../hugin.build/hugin-2010.2.0-Linux.deb<br />
mkdir untarred<br />
cd untarred<br />
tar xzf ../data.tar.gz<br />
tar czf ../data.tar.gz .<br />
cd ..<br />
ar r ../hugin-2010.2.0-Linux.deb debian-binary control.tar.gz data.tar.gz<br />
</pre><br />
<br />
== Shortcut ==<br />
<br />
Hugin evolves fast and the official 'buntu distributions carry versions that are usually 3-6 months older than the 'buntu distribution date. Moreover, they do not backport Hugin and related tools.<br />
<br />
Even if you follow religiously the 'buntu six months update cycle, you may be using a version of Hugin that is one or two release cycles in our past. If your sole objective is to use the new features of Hugin, the instructions in this section are for you. Start a command line terminal, type the three commands and you're done.<br />
<br />
If for some reason that's not enough for you - if you want to actually learn and become a contributor; or if you're just curious about getting even closer to the bleeding edge and trade stability for features and excitement, the rest of this document is for you.<br />
<br />
=== Stable ===<br />
<br />
This will install you the latest stable version of the tools:<br />
<pre><br />
sudo add-apt-repository ppa:hugin/hugin-builds<br />
sudo apt-get update<br />
sudo apt-get install hugin enblend panini<br />
</pre><br />
<br />
=== Unstable ===<br />
<br />
This will install you the latest unstable version of the tools that has been built as a binary. While they are likely to work in most cases, there is no guarantee and they are not recommended for production environment. Use at your own risk, and please report (and if possible fix) bugs. Most of the time these unstable builds are closer to the bleeding edge than to the stable builds. If you want the really really really bleeding edge, you'll have to work through the instructions in the next sections, though.<br />
<br />
<pre><br />
sudo add-apt-repository ppa:hugin/hugin-builds<br />
sudo add-apt-repository ppa:hugin/nightly<br />
sudo apt-get update<br />
sudo apt-get install hugin enblend panini<br />
</pre><br />
<br />
== Building Environment ==<br />
Since we are going to build hugin, libpano13 and enblend we need to download and install all the development packages. This is very easy with apt-get.<br />
In a terminal window (K menu -> System -> Konsole or Applications -> Accessories -> Terminal (in Kubuntu), Applications -> Accessories -> Terminal (in Ubuntu))<br />
<br />
<pre>sudo apt-get install build-essential autoconf automake1.9 libtool flex bison gdb libc6-dev libgcc1 \<br />
cmake<br />
</pre><br />
<br />
To get the bleeding edge we'll need access to the SVN and Mercurial repositories, and for this we need the correct tools:<br />
<br />
<pre><br />
sudo apt-get install subversion mercurial<br />
</pre><br />
<br />
Not necessary, but useful if you want to revisit configuration sets in ccmake<br />
<pre><br />
sudo apt-get install cmake-curses-gui<br />
</pre><br />
<br />
To get on the same page as far as file system layout is concerned, we'll create a folder to contain all source code in your home folder:<br />
<pre><br />
cd<br />
mkdir -p src<br />
</pre><br />
<br />
=== For Coders ===<br />
<br />
If you want to start to navigate, understand and modify the code, the doxygen generated documentation will be helpful to you.<br />
<br />
<pre><br />
sudo apt-get install doxygen graphviz<br />
</pre><br />
<br />
=== For Distributors ===<br />
<br />
If you want to build packages for distribution, you will also need the following tools and settings.<br />
<br />
<pre><br />
sudo apt-get install subversion-tools<br />
sudo echo 'deb-src ftp://ftp.at.debian.org/debian ../project/experimental main' > debian-experimental.list<br />
mv debian-experimental.list /etc/apt/sources.list.d/<br />
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 55BE302B<br />
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 8B8D7663<br />
sudo apt-get update<br />
sudo apt-get install devscripts<br />
</pre><br />
<br />
You will also need an OpenPGP key, and a Launchpad account. Follow the [[Hugin_Trackers#Launchpad_Account|instructions]] for Launchpad account creation, including the signing of the Ubuntu Code of Conduct.<br />
<br />
Moreover, it is likely that your environment is not clean enough for distribution builds. In that case, and to produce binaries for other Ubuntu series than the one you are running, you will want to set up a dchroot environment (to be documented later on).<br />
<br />
== Building Enblend ==<br />
<br />
Get the dependencies. If you are working with large images (300 megapixels and up), you should have a libtiff-devel compiled with large file support and libstdc++6.<br />
<br />
<pre><br />
sudo apt-get install pkg-config libtiff4-dev libboost-graph-dev libboost-thread-dev \<br />
libboost-filesystem-dev liblcms1-dev libglew1.5-dev libplot-dev libglut3-dev libopenexr-dev \<br />
libxi-dev libxmu-dev help2man libplot-dev liblcms1-dev libboost-system-dev<br />
</pre><br />
<br />
If you also want to build the documentation, add the following dependencies, and add "-DDOC=ON" to the cmake command below. (Be warned, however, that this will drag in over 700MB of additional dependencies. Unless you have a pressing need to build the documentation yourself, you can save yourself some time and disk space by downloading the PDF docs from http://enblend.sourceforge.net .)<br />
<br />
<pre><br />
sudo apt-get install texi2html texinfo fig2ps tidy gnuplot libxml-xpath-perl imagemagick<br />
</pre><br />
<br />
Once all dependencies are in place, get the code. The official repository has migrated from CVS to Mercurial:<br />
<br />
<pre><br />
mkdir -p ~/src/enblend<br />
cd ~/src/enblend<br />
hg clone http://enblend.hg.sourceforge.net:8000/hgroot/enblend/enblend enblend.hg<br />
</pre><br />
<br />
If you already have checked out enblend, to update the code to the latest version you need to run:<br />
<pre><br />
cd enblend.hg<br />
hg pull<br />
hg update<br />
cd ..<br />
</pre><br />
<br />
Then create a build directory and build in there. And install the Package.<br />
<br />
The options below are good for modern multi-core computers. For a single core, you may be better off setting ENABLE_OPENMP to OFF and ENABLE_IMAGECACHE to ON. The two options are mutually exclusive.<br />
<pre><br />
mkdir enblend.build<br />
cd enblend.build<br />
cmake ../enblend.hg -DENABLE_GPU:BOOL=ON -DENABLE_IMAGECACHE:BOOL=OFF -DENABLE_OPENMP:BOOL=ON \<br />
-DCPACK_BINARY_DEB:BOOL=ON -DCPACK_BINARY_NSIS:BOOL=OFF -DCPACK_BINARY_RPM:BOOL=OFF \<br />
-DCPACK_BINARY_STGZ:BOOL=OFF -DCPACK_BINARY_TBZ2:BOOL=OFF -DCPACK_BINARY_TGZ:BOOL=OFF \<br />
-DCPACK_BINARY_TZ:BOOL=OFF -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX:PATH=/usr/local<br />
make package<br />
sudo dpkg -i enblend-4.1.1-Linux.deb<br />
</pre><br />
<br />
If the install quits with an error, it is likely because of missing folders. Run the following commands and retry:<br />
<pre><br />
sudo mkdir -p /usr/local/share/man/man1<br />
sudo mkdir -p /usr/local/bin<br />
</pre><br />
<br />
===The old autotools way===<br />
We are then ready to compile. The CXXFLAGS <tt>--param inline-unit-growth=60</tt> is a workaround for x86_64 systems, Feb 2009, and apparently no longer needed (set by default). If you have an SMP machine and you're building a recent version, <tt>--disable-image-cache</tt> and <tt>--enable-openmp</tt> will speed up enblend/enfuse massively but may cause segmentation faults; in that case you will be better off with <tt>--enable-image-cache</tt> and <tt>--disable-openmp.</tt> <tt>-march=native</tt> is also beneficial and -O2 is better than -O3.<br />
<br />
<pre><br />
make --makefile=Makefile.scm<br />
mkdir BUILD<br />
cd BUILD<br />
CXXFLAGS="--param inline-unit-growth=60 -march=native -O2" ../configure --disable-image-cache \<br />
--enable-openmp<br />
make<br />
</pre><br />
<br />
The second make step can be very long and memory consuming. Make sure you have enough swap space, and go get a healthy snack while the computer is compiling.<br />
<br />
If you encounter problems at any of these stages, please report back to the hugin-ptx mailing list. Report what command in the sequence you were executing, what machine/operating system, the revision checked out from CVS, and all other relevant information.<br />
<br />
You are then ready to install with<br />
<pre><br />
sudo make install<br />
</pre><br />
<br />
== Building Libpano13 ==<br />
<br />
libpano13 is the new version of the PanoTools libraries. This is a necessary component for hugin, and we need to build it first.<br />
To build libpano13 we need some libraries and particularly their <code>dev</code> package:<br />
<br />
<pre>sudo apt-get install zlib1g zlib1g-dev libpng12-dev libjpeg62-dev libtiff4-dev cmake</pre><br />
<br />
On older distributions, zlib1g and zlib1g-dev may not be found. In that case, the same library may be available with the names lib64z1 and lib64z1-dev.<br />
<br />
We then need to download the source code from the central repository:<br />
<br />
<pre><br />
mkdir -p ~/src/libpano<br />
cd ~/src/libpano<br />
hg clone http://panotools.hg.sourceforge.net:8000/hgroot/panotools/libpano libpano.hg<br />
</pre><br />
<br />
If you're a contributor with write access, use the following clone command instead:<br />
<pre><br />
hg clone ssh://${USER}@panotools.hg.sourceforge.net/hgroot/panotools/panotools/libpano libpano.hg<br />
</pre><br />
<br />
In the future there is no need to get the whole source again. Just issue the following commands to bring your source up to date:<br />
<pre><br />
cd libpano.hg<br />
hg pull<br />
hg up<br />
cd ..<br />
</pre><br />
<br />
Now start the building process.<br />
<br />
<pre><br />
mkdir libpano.build<br />
cd libpano.build<br />
cmake ../libpano.hg -DCMAKE_INSTALL_PREFIX=/usr/local -DCPACK_BINARY_DEB:BOOL=ON \<br />
-DCPACK_BINARY_NSIS:BOOL=OFF -DCPACK_BINARY_RPM:BOOL=OFF -DCPACK_BINARY_STGZ:BOOL=OFF \<br />
-DCPACK_BINARY_TBZ2:BOOL=OFF -DCPACK_BINARY_TGZ:BOOL=OFF -DCPACK_BINARY_TZ:BOOL=OFF \<br />
-DCMAKE_BUILD_TYPE=RelWithDebInfo<br />
make package<br />
sudo dpkg -i libpano13-*-Linux.deb<br />
</pre><br />
<br />
Set -DCMAKE_BUILD_TYPE=Debug if you want to help investigate/debug a problem and capture even more debugging information.<br />
<br />
If the install quits with an error, it is likely because of missing folders. Run the following commands and retry:<br />
<pre><br />
sudo mkdir -p /usr/local/include/pano13/<br />
sudo mkdir -p /usr/local/include/pano13/doc<br />
sudo mkdir -p /usr/local/lib/pkgconfig<br />
sudo mkdir -p /usr/local/share/man/man1<br />
sudo mkdir -p /usr/local/bin<br />
</pre><br />
<br />
=== The old autotools way ===<br />
<br />
The above described building process uses CMake to build libpano which has many advantages. Amongst others it creates a clean package to install / deinstall and decreases the likelihood of wrecking the system. However CMake support is relatively new in libpano. The old autotools way is documented below for completeness. You should not need it. However if you do, make sure to run either the CMake build or the autotools build on fresh repository checkouts to avoid interferences.<br />
<br />
<pre><br />
./bootstrap<br />
</pre><br />
<br />
If any libraries are missing, the script will complain (or at least, let you know that some library hasn't been found). In that case you probably need to install the library. To find in what package is that library, a general rule is to run the command <code>apt-cache search ''missingfile''</code>, find the relevant library and install both the library and the related <code>-dev</code> package.<br />
Run the <code>./configure</code> script and repeat this process until you have met all the dependencies.<br />
<br />
Then we are ready to launch the make process with<br />
<pre>make</pre><br />
<br />
If the library successfully compiles, you have to install it with<br />
<pre>sudo make install<br />
sudo ldconfig</pre><br />
The last part is for the OS to be aware of the new library (that has been installed in <code>/usr/local/lib</code>).<br />
We can now go back up one folder level and get ready for hugin.<br />
<pre>cd ..</pre><br />
<br />
== Building Hugin ==<br />
<br />
=== Dependencies ===<br />
<br />
First we need to activate the <code>universe</code> repository (in adept package manager, or by editing the /etc/apt/sources.lst file for example) and get the dependencies.<br />
<br />
If you want to build the Python scripting feature, your best bet is Natty (11.04). If you are on Lucid or Maverick, you can follow the instructions below to get a swig2.0 package. If nothing works and you still want Python scripting, you will have to build it from [https://sourceforge.net/projects/swig/ source].<br />
<br />
<pre><br />
sudo add-apt-repository ppa:hugin/hugin-builds<br />
sudo apt-get update<br />
</pre><br />
<br />
The following command will install on your system all build time dependencies except libpano13.<br />
<pre><br />
sudo apt-get install libwxgtk2.8-dev libtiff4-dev libpng12-dev \<br />
libopenexr-dev libexiv2-dev libglut3-dev libglew-dev libboost-dev \<br />
boost-build libboost-thread-dev libboost-graph-dev libboost-regex-dev \<br />
libboost-iostreams-dev libboost-filesystem-dev gettext liblapack-dev \<br />
libxi-dev libxmu-dev libboost-signals-dev libboost-system-dev \<br />
libtclap-dev<br />
</pre><br />
<br />
For the python scripting functionality, you will also need <br />
<pre><br />
sudo apt-get install libpython-dev python-dev swig2.0<br />
</pre><br />
<br />
Note that python-dev was the name for libpython-dev prior to Natty. Do not worry if it stops with the message<br />
<pre><br />
E: Unable to locate package {python-dev or libpython-dev}<br />
</pre><br />
Remove the package in error from the apt-get line and try again. You will still achieve the intended status. Tested on Natty and Lucid, most likely ok for Maverick as well.<br />
<br />
You could install libpano13 on your system with the command below. But it is recommended that you build your own libpano13 (see section [[Hugin_Compiling_Ubuntu#Building_Libpano13|above]]), since the version of libpano13 in the Ubuntu repositories is probably too old. Alternatively, there may be a recent enough version of libpano13 in the Hugin PPA. If going this last route, you can add it as shown above.<br />
<pre><br />
sudo apt-get install libpano13-dev<br />
</pre><br />
<br />
wxWidgets is a critical dependency for the Hugin GUI. In the official Ubuntu repositories it is usually at least a few releases behind the current release, and in some cases many releases behind. The wxWidgets project provides alternative [http://wiki.wxpython.org/InstallingOnUbuntuOrDebian repositories] with newer versions, as well as a [http://wiki.wxpython.org/BuildingDebianPackages instructions] to build binary packages of the most recent releases. Newer versions of wxWidgets are not (yet) absolutely necessary, but since eventually things evolve they are useful for development, testing, and in general should give a better user interface experience as wxWidgets improves over time.<br />
<br />
The following are run-time dependencies. Strictly speaking you don't need them to build Hugin, but you will need them to use it. If you follow the instructions on this page to build ExifTool and/or Enblend, you don't need to install them this way.<br />
<pre><br />
sudo apt-get install libimage-exiftool-perl enblend python-argparse<br />
</pre><br />
<br />
=== Fetch the Source Code with Mercurial ===<br />
<br />
If you already have a repository clone, you only need to pull the latest changes and update the code with:<br />
<pre><br />
cd ~/src/hugin/hugin.hg<br />
hg pull<br />
hg update<br />
</pre><br />
<br />
Otherwise, you need to clone the repository and decide which version/branch to build with:<br />
<pre><br />
mkdir -p ~/src/hugin<br />
cd ~/src/hugin<br />
hg clone http://hugin.hg.sourceforge.net:8000/hgroot/hugin/hugin hugin.hg<br />
cd hugin.hg<br />
hg branches<br />
</pre><br />
<br />
If you are a contributor with write access, you can use<br />
<pre><br />
hg clone ssh://${USER}@hugin.hg.sourceforge.net/hgroot/hugin/hugin hugin.hg<br />
</pre><br />
<br />
The `hg branches` command will list all available branches. If you decide, e.g., to build the 2010.0 branch, you will update to it with:<br />
<pre><br />
hg update -C 2010.0 <br />
</pre><br />
<br />
=== Advanced Use - Multiple Source Trees ===<br />
<br />
You may want to build multiple versions of Hugin on your machine at the same time, e.g. when you want to build side by side a stable version for your productivity and a development version to give feedback to the developers. In that case, you will clone the Mercurial repository that is already on your drive and update from it a source tree to a different branch. Mercurial takes care of details such as optimizing disk usage. The commands for this are:<br />
<br />
<pre><br />
cd ..<br />
hg clone hugin.hg another_hugin<br />
cd another_hugin<br />
hg update -C default<br />
</pre><br />
<br />
You can have as many "another_hugin" folders as you want. Just make sure, when pulling the latest updates from SourceForge, to first pull your main repository (the one you cloned from http://hugin.hg.sourceforge.net:8000/hgroot/hugin/hugin. Then pull all others:<br />
<pre><br />
cd ~/src/hugin/hugin.hg<br />
hg pull<br />
hg update<br />
cd ../another_hugin<br />
hg pull<br />
hg update<br />
</pre><br />
<br />
Reference: [http://groups.google.com/group/hugin-ptx/msg/1ce824dd1364e9be]<br />
<br />
=== Configure the Build Environment ===<br />
<br />
'''Rule:''' You always want to build outside of the source tree to keep the source tree clean. And to avoid confusion, if you have multiple source trees it is preferable to build for each of them in a separate build folder.<br />
<br />
Next we set up the build environment using cmake.<br />
<br />
If you compiled and installed libpano to a non standard location set the variables CMAKE_INCLUDE_PATH and CMAKE_LIBRARY_PATH to point to your install location's include and lib directories.<br />
<br />
If you are building for distribution, you want to set CMAKE_INSTALL_PREFIX=/usr<br />
<br />
<pre><br />
cd ~/src/hugin<br />
mkdir hugin.hg-build<br />
cd hugin.hg-build<br />
cmake ../hugin.hg -DENABLE_LAPACK=YES -DCPACK_BINARY_DEB:BOOL=ON -DCPACK_BINARY_NSIS:BOOL=OFF \<br />
-DCPACK_BINARY_RPM:BOOL=OFF -DCPACK_BINARY_STGZ:BOOL=OFF -DCPACK_BINARY_TBZ2:BOOL=OFF \<br />
-DCPACK_BINARY_TGZ:BOOL=OFF -DCPACK_BINARY_TZ:BOOL=OFF -DCMAKE_BUILD_TYPE=RelWithDebInfo \<br />
-DBUILD_HSI:BOOL=ON -DSWIG_EXECUTABLE=/usr/bin/swig2.0<br />
</pre><br />
<br />
The last line of the above cmake statement is for python scripting and will work with Ubuntu 11.04. The first switch activates the scripting interface (which is deactivated by default because it does not work simply out of the box on all supported platforms) and the second switch fixes a bug in the CMake script to find swig. Self-compiled swig does not need the -DSWIG_EXECUTABLE switch since it is found automatically by the CMake script.<br />
<br />
If you get an error building, try removing the last line of the above cmake statement. Another cause may be a wrong version of libpano13, even if you built it yourself. Go back and check that you are using a (newer) stable branch. Try switching to libpano13-2.9.18 (run hg update -C libpano13-2.9.18 in the proper folder), rebuild as instructed above, and try again.<br />
<br />
Set -DCMAKE_BUILD_TYPE=Debug if you want to help investigate/debug a problem and capture even more debugging information, however Hugin will be slower and may not work as expected. Don't use a Debug build for production.<br />
<br />
=== Build and Install ===<br />
<br />
Finally, we use make to build the code and package it, and dpkg to install it. Look for the version number in the .deb file created and edit the lines below accordingly: <br />
<br />
<pre><br />
make package<br />
sudo dpkg -i hugin-*-Linux.deb<br />
sudo ldconfig<br />
</pre><br />
<br />
If the install quits with an error, it is likely because of missing folders. Run the following commands and retry: <br />
<pre><br />
sudo mkdir -p /usr/local/share/pixmaps<br />
sudo mkdir -p /usr/local/share/mime/packages<br />
sudo mkdir -p /usr/local/share/applications/<br />
sudo mkdir -p /usr/local/share/icons/gnome/48x48/mimetypes/<br />
sudo mkdir -p /usr/local/share/locale/en_GB/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/es_la/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/fr/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/zh_TW/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/ru/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/ro/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/bg/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/de/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/ko/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/pt_BR/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/zh_CN/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/ja/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/it/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/sl/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/sk/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/sv/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/ca_ES/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/nl/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/fi/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/cs_CZ/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/uk/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/es/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/pl/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/hu/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/es_VE/LC_MESSAGES<br />
sudo mkdir -p /usr/local/share/hugin/xrc/data/help_it_IT<br />
sudo mkdir -p /usr/local/share/hugin/xrc/data/help_en_EN<br />
sudo mkdir -p /usr/local/share/hugin/data/<br />
sudo mkdir -p /usr/local/lib/hugin<br />
sudo mkdir -p /usr/local/share/man/man1<br />
</pre><br />
<br />
'''Important:''' the package does not track dependencies yet, so it likely to fail on machines others than yours.<br />
<br />
Reference: [http://theseblog.free.fr/2007/10/building-hugin-in-ubuntu-feisty-fawn.php]<br />
<br />
=== Dive into the Code ===<br />
<br />
From time to time the API reference is published on the Hugin website, however you are better off with a local copy. To generate it, issue the following commands:<br />
<pre><br />
cd ~/src/hugin/hugin.hg/src<br />
doxygen Doxyfile<br />
</pre><br />
<br />
The documentation is generated in ~/src/hugin/hugin.hg/src/hugin/html<br />
<br />
Point your browser to index.html inside that folder and you have access to all available information. If you find that a class, a function, or anything else is not properly documented; and if you delve into the source code to understand it, kindly add documentation to the code so that the next person in your situation can use your experience as a stepping stone. Thank you!<br />
<br />
== Automatic Control Point Detectors ==<br />
<br />
=== Autopano-sift-C ===<br />
<br />
Pre-Requisites:<br />
<pre><br />
sudo apt-get install libxml2-dev<br />
</pre><br />
<br />
To build<br />
<br />
(Note February 2011: The latest source code of autopano-sift-C has been unstable for a long time now and nobody is working to fix it. Use the 2.5.1 release tarball instead)<br />
<br />
<pre><br />
mkdir -p ~/src/apsc<br />
cd ~/src/apsc<br />
hg clone http://hugin.hg.sourceforge.net:8000/hgroot/hugin/autopano-sift-C apsc.hg<br />
cd apsc.hg<br />
hg branches<br />
hg update -C 2.5.1<br />
cd ..<br />
mkdir apsc.hg.build<br />
cd apsc.hg.build<br />
cmake ../apsc.hg -DCMAKE_INSTALL_PREFIX=/usr/local -DCPACK_BINARY_DEB:BOOL=ON \<br />
-DCPACK_BINARY_NSIS:BOOL=OFF -DCPACK_BINARY_RPM:BOOL=OFF -DCPACK_BINARY_STGZ:BOOL=OFF \<br />
-DCPACK_BINARY_TBZ2:BOOL=OFF -DCPACK_BINARY_TGZ:BOOL=OFF -DCPACK_BINARY_TZ:BOOL=OFF \<br />
-DCMAKE_BUILD_TYPE=Debug<br />
make package<br />
sudo dpkg -i autopano-sift-C-*-Linux.deb<br />
</pre><br />
<br />
=== Match-n-shift ===<br />
<br />
Match-n-shift is yet an other Autopano-SIFT replacement. It comes in a bundle with pto file manipulation perl libraries and a rich selection of other tools that use nona, enblend, ImageMagick among other things. To use match-n-shift, you need to install at least the [http://search.cpan.org/dist/Panotools-Script/ Panotools::Script] library and some other perl modules. It requires:<br />
<br />
* Image::Size 2.9<br />
* Storable 2.0<br />
* Image::ExifTool 6<br />
<br />
Chances are that you do not need to update Storable which is a standard perl module. To check the version of installed versions of these modules, write these lines to the command prompt:<br />
<br />
perl -MStorable -le 'print Storable->VERSION;'<br />
perl -MImage::Size -le 'print Image::Size->VERSION;'<br />
perl -MImage::ExifTool -le 'print Image::ExifTool->VERSION;'<br />
<br />
There are various ways to install or upgrade these modules. Ubuntu has binary packages for many perl modules, you can skip the CPAN installation below and type:<br />
<br />
sudo apt-get install libimage-size-perl libimage-exiftool-perl<br />
<br />
Alternatively, perl is an interpreted language and these modules are pure perl, so installing from source is an easy thing.<br />
<br />
The best place to install perl modules is directly from a CPAN archive. CPAN is short for Comprehensive Perl Archive Network. The program to interact with CPAN comes with all perl installations. Start it by running:<br />
<br />
sudo cpan<br />
<br />
If this is your first time running the program you will be asked a number of questions (you can safely accept the suggested values). Last question lets you select a number of CPAN mirrors nearest to you.<br />
<br />
When all is done, you can enter the install commands after the 'cpan>' prompt:<br />
<br />
install Image::Size Storable Image::ExifTool<br />
<br />
Answer 'y' to any question of dependencies and wait for install to complete. 'exit' leaves the cpan shell.<br />
<br />
Next, you need to retrieve and install the Panotools-Script collection<br />
of perl libraries (Panotools::Script) and programs that use them -<br />
including match-n-shift:<br />
<br />
svn co https://panotools.svn.sourceforge.net/svnroot/panotools/trunk/Panotools-Script Panotools-Script<br />
cd Panotools-Script<br />
perl Makefile.PL<br />
make<br />
make test<br />
sudo make install<br />
<br />
Just to confuse you, you can also ignore everything above and just install Panotools::Script and all its dependencies from CPAN. From command line, type:<br />
<br />
sudo cpan Panotools::Script<br />
<br />
You can run match-n-shift from command line using the same parameters as autopano-c-complete.sh or you can modify hugin to run it for you:<br />
<br />
* start Hugin<br />
* navigate the menu File to Preferences<br />
* In the Preferences window, open the Autopano tab<br />
* Select Autopano -> Autopano-SIFT<br />
* tick the checkbox for Use alternative Autopano-SIFT program<br />
* enter the full path to match-n-shift (/usr/local/bin/match-n-shift) in the Autopano-SIFT field<br />
* enter the following string in the Arguments field:<br />
-f %f -v %v -c -p %p -o %o %i<br />
<br />
=== MatchPoint ===<br />
<br />
MatchPoint is a next generation CP generator. The result of a GSoC2007 project, it is still very experimental. Experience reports needed. Read more [http://groups.google.com/group/hugin-ptx/browse_thread/thread/cba2b2ce94dd9054 here]<br />
<br />
Matchpoint is now located inside the main hugin source tree, no need to checkout separately. It is compiled together with hugin, but not installed by default.<br />
<br />
* copy the MatchPoint executable into /usr/local/bin manually<br />
<pre><br />
cd ~/src/hugin/hugin.hg-build<br />
sudo cp src/matchpoint/matchpoint /usr/local/bin/<br />
</pre><br />
* edit /usr/local/bin/autopano-c-complete.sh (do it with sudo to have the necessary permission)<br />
** line 79: replace the .key.gz extension with .key (not sure if matchpoint supports compression)<br />
** lines 83 and 88: replace '''generatekeys "$arg" $FILENAME $SIZE''' with '''matchpoint "$arg" $FILENAME''' (not sure if the size option or any other options of the original generatekeys are applicable)<br />
<br />
=== Pan-o-matic ===<br />
<br />
Yet another control point generator [http://aorlinsk2.free.fr/panomatic/?p=home Home Page]<br />
<br />
<pre>sudo apt-get install libboost-dev</pre><br />
<br />
Download [http://aorlinsk2.free.fr/panomatic/download.php?d=7&v=0.9.4 Panomatic 0.9.4 bz2] and if you're on Ubuntu 9.10 or newer also the [http://aorlinsk2.free.fr/panomatic/panomatic_gcc44.patch patch] for the gcc4.4 compiler.<br />
<br />
<pre><br />
mkdir -p ~/src/panomatic<br />
cd ~/src/panomatic<br />
wget "http://aorlinsk2.free.fr/panomatic/download.php?d=7&v=0.9.4" -O panomatic-0.9.4-src.tar.bz2<br />
wget http://aorlinsk2.free.fr/panomatic/panomatic_gcc44.patch patch<br />
tar xvfj panomatic-0.9.4-src.tar.bz2<br />
cd panomatic-0.9.4<br />
patch -p 1 < ../panomatic_gcc44.patch<br />
./configure<br />
make<br />
sudo make install<br />
</pre><br />
<br />
To use Pano-o-matic, open Hugin<br />
<br />
* In File > Preferences > Autopano :<br />
* Select Autopano-SIFT<br />
* Check "Use alternative autopano-SIFT program"<br />
* Choose the path to the binary ( /usr/local/bin )<br />
* In Arguments, put : -o %o %i<br />
<br />
==== Pablo's variation ====<br />
<br />
Around the end of the year 2009, Pablo integrated a [http://groups.google.com/group/hugin-ptx/browse_thread/thread/d9c0558c679cad52 new] experimental descriptor based on the geometric blur and DAISY papers. Also, Pablo said that the algorithm is not really based on a published approach, just on some ideas that are mentioned in a few of them, and its currently simpler than any of them:<br />
<br />
o geometric blur: [http://www.eecs.berkeley.edu/~aberg/gb.html]<br />
<br />
o daisy: [http://cvlab.epfl.ch/~tola/daisy.html]<br />
<br />
o descriptor learning: [http://cvlab.epfl.ch/~brown/learndesc/learndesc.html]<br />
<br />
To build that version of panomatic instead, follow these instructions:<br />
<br />
This is current the subject of a GSoC 2010 project and may be available in future versions of Hugin.<br />
<br />
<pre><br />
sudo aptitude install libboost-python-dev bzr cmake libvigraimpex-dev<br />
</pre><br />
<br />
<pre><br />
bzr branch lp:~pablo.dangelo/hugin/panomatic-lib<br />
mkdir build<br />
cd build<br />
cmake ../panomatic-lib<br />
make<br />
sudo make install<br />
</pre><br />
<br />
To use the new descriptor the arguments for Hugin are: '''--sieve1size 100 --sieve2size 2 -o %o %i'''<br />
<br />
== ExifTool ==<br />
<br />
ExifTool is no longer mandatory for Hugin to work. It is used to pass metadata from the input to the output images during the stitching process. <br />
<br />
[http://www.sno.phy.queensu.ca/~phil/exiftool/ ExifTool] is a platform-independent Perl library plus a command-line application for reading, writing and editing meta information in image, audio and video files.<br />
<br />
Usually the version distributed with Ubuntu (8.15 in Ubuntu 10.10; 7.89 in Ubuntu 10.4) is good enough and you don't need to bother with the following instructions. However there were situations in the past and there might be situations in the future where the latest versions offer better support. These issues will occur most likely with specific camera brands/models and the most recent models. The following instructions are for those cases.<br />
<br />
<pre><br />
sudo apt-get purge libimage-exiftool-perl<br />
</pre><br />
<br />
<pre><br />
wget http://www.sno.phy.queensu.ca/~phil/exiftool/Image-ExifTool-8.50.tar.gz<br />
tar -xzf Image-ExifTool-8.50.tar.gz<br />
cd Image-ExifTool-8.50<br />
perl Makefile.PL<br />
make test<br />
sudo make install<br />
</pre><br />
<br />
== Pano Viewers ==<br />
<br />
=== PanoGLView ===<br />
<br />
PanoGLView is an OpenGL hardware accelerated interactive immersive viewer for equirectangular images.<br />
<br />
Pre-Requisites:<br />
<pre>sudo apt-get install wx-common libwxgtk2.8-dev libglew-dev</pre><br />
<br />
To build and install:<br />
<pre><br />
mkdir -p ~/src/panoglview<br />
cd ~/src/panoglview<br />
hg clone http://hugin.hg.sourceforge.net:8000/hgroot/hugin/panoglview panoglview.hg<br />
cd panoglview.hg<br />
hg update<br />
./bootstrap<br />
./configure<br />
make<br />
sudo make install<br />
</pre><br />
<br />
=== FreePV - DEPENDENCIES ARE BROKEN - FAILS TO BUILD ===<br />
<br />
Pre-Requisites:<br />
<pre><br />
sudo apt-get install cmake make pkg-config g++ mozilla-devscripts freeglut3-dev zlib1g-dev \<br />
libjpeg-dev libxext-dev libxmu-dev x11proto-xf86vidmode-dev libxxf86vm-dev libnspr4-dev \<br />
libxml2-dev libpng12-dev<br />
</pre><br />
To build<br />
<pre><br />
svn co https://freepv.svn.sourceforge.net/svnroot/freepv/freepv/trunk/ freepv<br />
cd freepv<br />
cmake .<br />
make<br />
sudo make install<br />
</pre><br />
<br />
=== Panini Perspective Tool ===<br />
<br />
Strictly speaking, Panini is more than just a viewer. It's a powerful tool to extract/transform views and can also be easily used as a viewer.<br />
<br />
Get dependencies:<br />
<pre><br />
sudo apt-get install qt4-qmake libqt4-dev zlib1g-dev<br />
</pre><br />
<br />
Get code:<br />
<pre><br />
mkdir -p ~/src/pvqt<br />
cd ~/src/pvqt<br />
svn co https://pvqt.svn.sourceforge.net/svnroot/pvqt pvqt.svn<br />
</pre><br />
<br />
Build:<br />
<pre><br />
cd pvqt.svn<br />
qmake panini.pro<br />
make<br />
</pre><br />
<br />
Install (brute force):<br />
<pre><br />
sudo cp Panini /usr/local/bin/ <br />
</pre><br />
<br />
Menu Entry for Kubuntu:<br />
<pre><br />
kmenuedit<br />
</pre><br />
<br />
in kmenuedit<br />
* navigate to Graphics<br />
** click on New Item<br />
** Enter "Panini" as Name<br />
** Enter "Perspective Tool" as Description<br />
** click on the empty icon and look for an icon (I used the akonadi one)<br />
** Enter "Panini" as Command<br />
** Click on Save button<br />
<br />
== Notes for Packagers ==<br />
<br />
=== Tarballs ===<br />
<br />
* to get an updated ChangeLog in Mercurial repositories (Hugin has it also in the cmake invocation, use '''-DUPDATE_CHANGELOG=1''')<br />
<pre><br />
hg log --follow --style=changelog <br />
</pre><br />
* to update the ChangeLog in SVN repositories (Panotools)<br />
<pre><br />
svn up<br />
svn2cl<br />
svn ci<br />
</pre><br />
<br />
=== Deb Packages ===<br />
<br />
The deb packages built by CMake (2.8.2) are broken by Debian standard. Please do not distribute them. There are official updated recent packages at the Hugin PPA mentioned above which include nightlies (produced every 24 hours) and stables (produced out of released tarballs). If you miss binaries for your series of Ubuntu and you have built them for yourself following the instructions above, considering moving up one level and contributing to the [[Hugin PPA]].<br />
<br />
[[Category:Software:Hugin]]<br />
[[Category:Software:Platform:Linux]]</div>Onomouhttps://wiki.panotools.org/index.php?title=Hugin_Compiling_Ubuntu&diff=13565Hugin Compiling Ubuntu2011-06-15T04:47:10Z<p>Onomou: /* Configure the Build Environment */ Add suggestion for resolving error</p>
<hr />
<div>== Who Is This Page For ==<br />
<br />
These instructions contain the collective wisdom of Hugin contributors that are using Ubuntu or any of its variations (Ku/Xu/Lu/Edu/...buntu). They are work in progress and updated when newer versions of Ubuntu are released or when Hugin introduces new dependencies. They have worked, at the time of release or soon thereafter, with all 'buntu versions up until 10.10. They are intended to help contributors on the learning curve. If you are not here to contribute, spare yourself the effort and see the [[#Shortcut]] section below.<br />
<br />
They are likely to work only for the latest 'buntu release, but you can check this page's history at the time that the older 'buntu version was the most recent one to find the specifics for that version.<br />
<br />
If you are new here, read the whole page. It is recommended that you go sequentially through it.<br />
<br />
If you're familiar with the process and have run it a few time, look at the what's new section for important news.<br />
<br />
Apart from the odd change in package name, nothing should be substantially different (and if does not work, please leave a comment on the [http://groups.google.com/group/hugin-ptx hugin-ptx mailing list]). Don't worry if the same package appears twice in an apt-get install line - apt-get will update existing packages if there is a newer version, and ignore duplicates if the latest version is already installed. On the other hand, if apt-get says that it can't find a package, it might be the odd change in package name. You can find a replacement package by using apt-cache search with a substring of the package required, e.g.<br />
<pre>apt-cache search wxW<br />
</pre><br />
<br />
The goal is to build hugin and the whole set of helper applications required, and start understanding the building process. You will need deeper understanding of the building process if you want to:<br />
* develop code<br />
* translate the latest strings<br />
* document the latest features with manuals and tutorials<br />
* package for distribution<br />
That knowledge is out of scope for this document. This document ends with a binary that is fit for installation on your machine. It is not fit for any other purpose, particularly not for distribution. CMake is [http://groups.google.com/group/hugin-ptx/msg/3f29b207c562fd63 known] to build broken deb packages. Please do not distribute these binaries.<br />
<br />
== What's New ==<br />
<br />
'''9 May 2011''': The integration of the python_scripting development branch brings new dependencies and a new build-time configuration switch for Hugin. See changes in the documentation below. swig2.0 is officially distributed only with Natty (11.04 onwards). If you have an older Ubuntu version you will either have to forego the python scripting feature or find an alternative swig2.0 (either a PPA or build it yourself).<br />
<br />
'''2 May 2011''': If you are using an earlier version of Ubuntu than 11.04, there is a chance that your Mercurial version is too old for grabbing updates. New (non-critical security) updates to a program do not get added to old versions of Ubuntu, so any new changes will need to be added manually. When running Mercurial (pull, update, etc), you may get an error like<br />
<pre><br />
abort: requirement 'dotencode' not supported!<br />
</pre><br />
To fix this, you can use the package archive from Mercurial PPA Packagers and get the latest release:<br />
<pre><br />
sudo apt-add-repository ppa:mercurial-ppa/releases<br />
sudo apt-get update<br />
sudo apt-get install mercurial<br />
</pre><br />
<br />
'''5-March-2010''': Foreign library libtclap removed from source tree. This introduces a new dependency on libtclap-dev<br />
<br />
'''February 2010''': Libpano has migrated from SVN to Mercurial.<br />
<br />
'''CMake 2.8.2''', as packaged in Ubuntu 10.10, contains a bug (http://public.kitware.com/Bug/view.php?id=11020) the prevents the created debs to install successfully, due to it not storing needed directories in the deb package.<br />
Installing the resulting debs will fail with a message error saying something like<br />
<br />
<pre><br />
unable to create `/usr/local/share/hugin/xrc/data/redo.png.dpkg-new' (while processing `./usr/local/share/hugin/xrc/data/redo.png'): No such file or directory<br />
</pre><br />
<br />
Commands to create the necessary folders have been documented below and may be added to the CMake build in the repository of Hugin, Libpano, Enblend. However it is possible that the lists are incomplete. If you bump in the above message, the solution is to create the full missing path and run dpkg -i again, recursively adding folders until the install succeed.<br />
<br />
<pre><br />
sudo mkdir -p /usr/local/share/hugin/xrc/data/<br />
</pre><br />
<br />
Another workaround is, to partially rebuild the deb package by hand:<br />
<br />
<pre><br />
mkdir unpacked<br />
cd unpacked/<br />
ar x ../hugin.build/hugin-2010.2.0-Linux.deb<br />
mkdir untarred<br />
cd untarred<br />
tar xzf ../data.tar.gz<br />
tar czf ../data.tar.gz .<br />
cd ..<br />
ar r ../hugin-2010.2.0-Linux.deb debian-binary control.tar.gz data.tar.gz<br />
</pre><br />
<br />
== Shortcut ==<br />
<br />
Hugin evolves fast and the official 'buntu distributions carry versions that are usually 3-6 months older than the 'buntu distribution date. Moreover, they do not backport Hugin and related tools.<br />
<br />
Even if you follow religiously the 'buntu six months update cycle, you may be using a version of Hugin that is one or two release cycles in our past. If your sole objective is to use the new features of Hugin, the instructions in this section are for you. Start a command line terminal, type the three commands and you're done.<br />
<br />
If for some reason that's not enough for you - if you want to actually learn and become a contributor; or if you're just curious about getting even closer to the bleeding edge and trade stability for features and excitement, the rest of this document is for you.<br />
<br />
=== Stable ===<br />
<br />
This will install you the latest stable version of the tools:<br />
<pre><br />
sudo add-apt-repository ppa:hugin/hugin-builds<br />
sudo apt-get update<br />
sudo apt-get install hugin enblend panini<br />
</pre><br />
<br />
=== Unstable ===<br />
<br />
This will install you the latest unstable version of the tools that has been built as a binary. While they are likely to work in most cases, there is no guarantee and they are not recommended for production environment. Use at your own risk, and please report (and if possible fix) bugs. Most of the time these unstable builds are closer to the bleeding edge than to the stable builds. If you want the really really really bleeding edge, you'll have to work through the instructions in the next sections, though.<br />
<br />
<pre><br />
sudo add-apt-repository ppa:hugin/hugin-builds<br />
sudo add-apt-repository ppa:hugin/nightly<br />
sudo apt-get update<br />
sudo apt-get install hugin enblend panini<br />
</pre><br />
<br />
== Building Environment ==<br />
Since we are going to build hugin, libpano13 and enblend we need to download and install all the development packages. This is very easy with apt-get.<br />
In a terminal window (K menu -> System -> Konsole or Applications -> Accessories -> Terminal (in Kubuntu), Applications -> Accessories -> Terminal (in Ubuntu))<br />
<br />
<pre>sudo apt-get install build-essential autoconf automake1.9 libtool flex bison gdb libc6-dev libgcc1 \<br />
cmake<br />
</pre><br />
<br />
To get the bleeding edge we'll need access to the SVN and Mercurial repositories, and for this we need the correct tools:<br />
<br />
<pre><br />
sudo apt-get install subversion mercurial<br />
</pre><br />
<br />
Not necessary, but useful if you want to revisit configuration sets in ccmake<br />
<pre><br />
sudo apt-get install cmake-curses-gui<br />
</pre><br />
<br />
To get on the same page as far as file system layout is concerned, we'll create a folder to contain all source code in your home folder:<br />
<pre><br />
cd<br />
mkdir -p src<br />
</pre><br />
<br />
=== For Coders ===<br />
<br />
If you want to start to navigate, understand and modify the code, the doxygen generated documentation will be helpful to you.<br />
<br />
<pre><br />
sudo apt-get install doxygen graphviz<br />
</pre><br />
<br />
=== For Distributors ===<br />
<br />
If you want to build packages for distribution, you will also need the following tools and settings.<br />
<br />
<pre><br />
sudo apt-get install subversion-tools<br />
sudo echo 'deb-src ftp://ftp.at.debian.org/debian ../project/experimental main' > debian-experimental.list<br />
mv debian-experimental.list /etc/apt/sources.list.d/<br />
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 55BE302B<br />
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 8B8D7663<br />
sudo apt-get update<br />
sudo apt-get install devscripts<br />
</pre><br />
<br />
You will also need an OpenPGP key, and a Launchpad account. Follow the [[Hugin_Trackers#Launchpad_Account|instructions]] for Launchpad account creation, including the signing of the Ubuntu Code of Conduct.<br />
<br />
Moreover, it is likely that your environment is not clean enough for distribution builds. In that case, and to produce binaries for other Ubuntu series than the one you are running, you will want to set up a dchroot environment (to be documented later on).<br />
<br />
== Building Enblend ==<br />
<br />
Get the dependencies. If you are working with large images (300 megapixels and up), you should have a libtiff-devel compiled with large file support and libstdc++6.<br />
<br />
<pre><br />
sudo apt-get install pkg-config libtiff4-dev libboost-graph-dev libboost-thread-dev \<br />
libboost-filesystem-dev liblcms1-dev libglew1.5-dev libplot-dev libglut3-dev libopenexr-dev \<br />
libxi-dev libxmu-dev help2man libplot-dev liblcms1-dev libboost-system-dev<br />
</pre><br />
<br />
If you also want to build the documentation, add the following dependencies, and add "-DDOC=ON" to the cmake command below. (Be warned, however, that this will drag in over 700MB of additional dependencies. Unless you have a pressing need to build the documentation yourself, you can save yourself some time and disk space by downloading the PDF docs from http://enblend.sourceforge.net .)<br />
<br />
<pre><br />
sudo apt-get install texi2html texinfo fig2ps tidy gnuplot libxml-xpath-perl imagemagick<br />
</pre><br />
<br />
Once all dependencies are in place, get the code. The official repository has migrated from CVS to Mercurial:<br />
<br />
<pre><br />
mkdir -p ~/src/enblend<br />
cd ~/src/enblend<br />
hg clone http://enblend.hg.sourceforge.net:8000/hgroot/enblend/enblend enblend.hg<br />
</pre><br />
<br />
If you already have checked out enblend, to update the code to the latest version you need to run:<br />
<pre><br />
cd enblend.hg<br />
hg pull<br />
hg update<br />
cd ..<br />
</pre><br />
<br />
Then create a build directory and build in there. And install the Package.<br />
<br />
The options below are good for modern multi-core computers. For a single core, you may be better off setting ENABLE_OPENMP to OFF and ENABLE_IMAGECACHE to ON. The two options are mutually exclusive.<br />
<pre><br />
mkdir enblend.build<br />
cd enblend.build<br />
cmake ../enblend.hg -DENABLE_GPU:BOOL=ON -DENABLE_IMAGECACHE:BOOL=OFF -DENABLE_OPENMP:BOOL=ON \<br />
-DCPACK_BINARY_DEB:BOOL=ON -DCPACK_BINARY_NSIS:BOOL=OFF -DCPACK_BINARY_RPM:BOOL=OFF \<br />
-DCPACK_BINARY_STGZ:BOOL=OFF -DCPACK_BINARY_TBZ2:BOOL=OFF -DCPACK_BINARY_TGZ:BOOL=OFF \<br />
-DCPACK_BINARY_TZ:BOOL=OFF -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX:PATH=/usr/local<br />
make package<br />
sudo dpkg -i enblend-4.1.1-Linux.deb<br />
</pre><br />
<br />
If the install quits with an error, it is likely because of missing folders. Run the following commands and retry:<br />
<pre><br />
sudo mkdir -p /usr/local/share/man/man1<br />
sudo mkdir -p /usr/local/bin<br />
</pre><br />
<br />
===The old autotools way===<br />
We are then ready to compile. The CXXFLAGS <tt>--param inline-unit-growth=60</tt> is a workaround for x86_64 systems, Feb 2009, and apparently no longer needed (set by default). If you have an SMP machine and you're building a recent version, <tt>--disable-image-cache</tt> and <tt>--enable-openmp</tt> will speed up enblend/enfuse massively but may cause segmentation faults; in that case you will be better off with <tt>--enable-image-cache</tt> and <tt>--disable-openmp.</tt> <tt>-march=native</tt> is also beneficial and -O2 is better than -O3.<br />
<br />
<pre><br />
make --makefile=Makefile.scm<br />
mkdir BUILD<br />
cd BUILD<br />
CXXFLAGS="--param inline-unit-growth=60 -march=native -O2" ../configure --disable-image-cache \<br />
--enable-openmp<br />
make<br />
</pre><br />
<br />
The second make step can be very long and memory consuming. Make sure you have enough swap space, and go get a healthy snack while the computer is compiling.<br />
<br />
If you encounter problems at any of these stages, please report back to the hugin-ptx mailing list. Report what command in the sequence you were executing, what machine/operating system, the revision checked out from CVS, and all other relevant information.<br />
<br />
You are then ready to install with<br />
<pre><br />
sudo make install<br />
</pre><br />
<br />
== Building Libpano13 ==<br />
<br />
libpano13 is the new version of the PanoTools libraries. This is a necessary component for hugin, and we need to build it first.<br />
To build libpano13 we need some libraries and particularly their <code>dev</code> package:<br />
<br />
<pre>sudo apt-get install zlib1g zlib1g-dev libpng12-dev libjpeg62-dev libtiff4-dev cmake</pre><br />
<br />
On older distributions, zlib1g and zlib1g-dev may not be found. In that case, the same library may be available with the names lib64z1 and lib64z1-dev.<br />
<br />
We then need to download the source code from the central repository:<br />
<br />
<pre><br />
mkdir -p ~/src/libpano<br />
cd ~/src/libpano<br />
hg clone http://panotools.hg.sourceforge.net:8000/hgroot/panotools/libpano libpano.hg<br />
</pre><br />
<br />
If you're a contributor with write access, use the following clone command instead:<br />
<pre><br />
hg clone ssh://${USER}@panotools.hg.sourceforge.net/hgroot/panotools/panotools/libpano libpano.hg<br />
</pre><br />
<br />
In the future there is no need to get the whole source again. Just issue the following commands to bring your source up to date:<br />
<pre><br />
cd libpano.hg<br />
hg pull<br />
hg up<br />
cd ..<br />
</pre><br />
<br />
Now start the building process.<br />
<br />
<pre><br />
mkdir libpano.build<br />
cd libpano.build<br />
cmake ../libpano.hg -DCMAKE_INSTALL_PREFIX=/usr/local -DCPACK_BINARY_DEB:BOOL=ON \<br />
-DCPACK_BINARY_NSIS:BOOL=OFF -DCPACK_BINARY_RPM:BOOL=OFF -DCPACK_BINARY_STGZ:BOOL=OFF \<br />
-DCPACK_BINARY_TBZ2:BOOL=OFF -DCPACK_BINARY_TGZ:BOOL=OFF -DCPACK_BINARY_TZ:BOOL=OFF \<br />
-DCMAKE_BUILD_TYPE=RelWithDebInfo<br />
make package<br />
sudo dpkg -i libpano13-*-Linux.deb<br />
</pre><br />
<br />
Set -DCMAKE_BUILD_TYPE=Debug if you want to help investigate/debug a problem and capture even more debugging information.<br />
<br />
If the install quits with an error, it is likely because of missing folders. Run the following commands and retry:<br />
<pre><br />
sudo mkdir -p /usr/local/include/pano13/<br />
sudo mkdir -p /usr/local/include/pano13/doc<br />
sudo mkdir -p /usr/local/lib/pkgconfig<br />
sudo mkdir -p /usr/local/share/man/man1<br />
sudo mkdir -p /usr/local/bin<br />
</pre><br />
<br />
=== The old autotools way ===<br />
<br />
The above described building process uses CMake to build libpano which has many advantages. Amongst others it creates a clean package to install / deinstall and decreases the likelihood of wrecking the system. However CMake support is relatively new in libpano. The old autotools way is documented below for completeness. You should not need it. However if you do, make sure to run either the CMake build or the autotools build on fresh repository checkouts to avoid interferences.<br />
<br />
<pre><br />
./bootstrap<br />
</pre><br />
<br />
If any libraries are missing, the script will complain (or at least, let you know that some library hasn't been found). In that case you probably need to install the library. To find in what package is that library, a general rule is to run the command <code>apt-cache search ''missingfile''</code>, find the relevant library and install both the library and the related <code>-dev</code> package.<br />
Run the <code>./configure</code> script and repeat this process until you have met all the dependencies.<br />
<br />
Then we are ready to launch the make process with<br />
<pre>make</pre><br />
<br />
If the library successfully compiles, you have to install it with<br />
<pre>sudo make install<br />
sudo ldconfig</pre><br />
The last part is for the OS to be aware of the new library (that has been installed in <code>/usr/local/lib</code>).<br />
We can now go back up one folder level and get ready for hugin.<br />
<pre>cd ..</pre><br />
<br />
== Building Hugin ==<br />
<br />
=== Dependencies ===<br />
<br />
First we need to activate the <code>universe</code> repository (in adept package manager, or by editing the /etc/apt/sources.lst file for example) and get the dependencies.<br />
<br />
If you want to build the Python scripting feature, your best bet is Natty (11.04). If you are on Lucid or Maverick, you can follow the instructions below to get a swig2.0 package. If nothing works and you still want Python scripting, you will have to build it from [https://sourceforge.net/projects/swig/ source].<br />
<br />
<pre><br />
sudo add-apt-repository ppa:hugin/hugin-builds<br />
sudo apt-get update<br />
</pre><br />
<br />
The following command will install on your system all build time dependencies except libpano13.<br />
<pre><br />
sudo apt-get install libwxgtk2.8-dev libtiff4-dev libpng12-dev \<br />
libopenexr-dev libexiv2-dev libglut3-dev libglew-dev libboost-dev \<br />
boost-build libboost-thread-dev libboost-graph-dev libboost-regex-dev \<br />
libboost-iostreams-dev libboost-filesystem-dev gettext liblapack-dev \<br />
libxi-dev libxmu-dev libboost-signals-dev libboost-system-dev \<br />
libtclap-dev<br />
</pre><br />
<br />
For the python scripting functionality, you will also need <br />
<pre><br />
sudo apt-get install libpython-dev python-dev swig2.0<br />
</pre><br />
<br />
python-dev was the name for libpython-dev prior to Natty. Do not worry if you are requesting a package that does not exist on your system, this will only return a warning but will achieve the intended status. Tested on Natty and Lucid, most likely ok for Maverick as well.<br />
<br />
You could install libpano13 on your system with the command below. However it is likely to be a version of libpano13 that is too old for the current Hugin. It is recommended that you first build your own libpano13 (above). Alternatively, there may be a recent enough version of libpano13 in the Hugin PPA.<br />
<pre><br />
sudo apt-get install libpano13-dev<br />
</pre><br />
<br />
wxWidgets is a critical dependency for the Hugin GUI. In the official Ubuntu repositories it is usually at least a few releases behind the current release, and in some cases many releases behind. The wxWidgets project provides alternative [http://wiki.wxpython.org/InstallingOnUbuntuOrDebian repositories] with newer versions, as well as a [http://wiki.wxpython.org/BuildingDebianPackages instructions] to build binary packages of the most recent releases. Newer versions of wxWidgets are not (yet) absolutely necessary, but since eventually things evolve they are useful for development, testing, and in general should give a better user interface experience as wxWidgets improves over time.<br />
<br />
The following are run-time dependencies. Strictly speaking you don't need them to build Hugin, but you will need them to use it. If you follow the instructions on this page to build ExifTool and/or Enblend, you don't need to install them this way.<br />
<pre><br />
sudo apt-get install libimage-exiftool-perl enblend python-argparse<br />
</pre><br />
<br />
=== Fetch the Source Code with Mercurial ===<br />
<br />
If you already have a repository clone, you only need to pull the latest changes and update the code with:<br />
<pre><br />
cd ~/src/hugin/hugin.hg<br />
hg pull<br />
hg update<br />
</pre><br />
<br />
Otherwise, you need to clone the repository and decide which version/branch to build with:<br />
<pre><br />
mkdir -p ~/src/hugin<br />
cd ~/src/hugin<br />
hg clone http://hugin.hg.sourceforge.net:8000/hgroot/hugin/hugin hugin.hg<br />
cd hugin.hg<br />
hg branches<br />
</pre><br />
<br />
If you are a contributor with write access, you can use<br />
<pre><br />
hg clone ssh://${USER}@hugin.hg.sourceforge.net/hgroot/hugin/hugin hugin.hg<br />
</pre><br />
<br />
The `hg branches` command will list all available branches. If you decide, e.g., to build the 2010.0 branch, you will update to it with:<br />
<pre><br />
hg update -C 2010.0 <br />
</pre><br />
<br />
=== Advanced Use - Multiple Source Trees ===<br />
<br />
You may want to build multiple versions of Hugin on your machine at the same time, e.g. when you want to build side by side a stable version for your productivity and a development version to give feedback to the developers. In that case, you will clone the Mercurial repository that is already on your drive and update from it a source tree to a different branch. Mercurial takes care of details such as optimizing disk usage. The commands for this are:<br />
<br />
<pre><br />
cd ..<br />
hg clone hugin.hg another_hugin<br />
cd another_hugin<br />
hg update -C default<br />
</pre><br />
<br />
You can have as many "another_hugin" folders as you want. Just make sure, when pulling the latest updates from SourceForge, to first pull your main repository (the one you cloned from http://hugin.hg.sourceforge.net:8000/hgroot/hugin/hugin. Then pull all others:<br />
<pre><br />
cd ~/src/hugin/hugin.hg<br />
hg pull<br />
hg update<br />
cd ../another_hugin<br />
hg pull<br />
hg update<br />
</pre><br />
<br />
Reference: [http://groups.google.com/group/hugin-ptx/msg/1ce824dd1364e9be]<br />
<br />
=== Configure the Build Environment ===<br />
<br />
'''Rule:''' You always want to build outside of the source tree to keep the source tree clean. And to avoid confusion, if you have multiple source trees it is preferable to build for each of them in a separate build folder.<br />
<br />
Next we set up the build environment using cmake.<br />
<br />
If you compiled and installed libpano to a non standard location set the variables CMAKE_INCLUDE_PATH and CMAKE_LIBRARY_PATH to point to your install location's include and lib directories.<br />
<br />
If you are building for distribution, you want to set CMAKE_INSTALL_PREFIX=/usr<br />
<br />
<pre><br />
cd ~/src/hugin<br />
mkdir hugin.hg-build<br />
cd hugin.hg-build<br />
cmake ../hugin.hg -DENABLE_LAPACK=YES -DCPACK_BINARY_DEB:BOOL=ON -DCPACK_BINARY_NSIS:BOOL=OFF \<br />
-DCPACK_BINARY_RPM:BOOL=OFF -DCPACK_BINARY_STGZ:BOOL=OFF -DCPACK_BINARY_TBZ2:BOOL=OFF \<br />
-DCPACK_BINARY_TGZ:BOOL=OFF -DCPACK_BINARY_TZ:BOOL=OFF -DCMAKE_BUILD_TYPE=RelWithDebInfo \<br />
-DBUILD_HSI:BOOL=ON -DSWIG_EXECUTABLE=/usr/bin/swig2.0<br />
</pre><br />
<br />
The last line of the above cmake statement is for python scripting and will work with Ubuntu 11.04. The first switch activates the scripting interface (which is deactivated by default because it does not work simply out of the box on all supported platforms) and the second switch fixes a bug in the CMake script to find swig. Self-compiled swig does not need the -DSWIG_EXECUTABLE switch since it is found automatically by the CMake script.<br />
<br />
If you get an error building, try removing the last line of the above cmake statement. Another cause may be a wrong version of libpano13, even if you built it yourself. Go back and check that you are using a (newer) stable branch. Try switching to libpano13-2.9.18 (run hg update -C libpano13-2.9.18 in the proper folder), rebuild as instructed above, and try again.<br />
<br />
Set -DCMAKE_BUILD_TYPE=Debug if you want to help investigate/debug a problem and capture even more debugging information, however Hugin will be slower and may not work as expected. Don't use a Debug build for production.<br />
<br />
=== Build and Install ===<br />
<br />
Finally, we use make to build the code and package it, and dpkg to install it. Look for the version number in the .deb file created and edit the lines below accordingly: <br />
<br />
<pre><br />
make package<br />
sudo dpkg -i hugin-*-Linux.deb<br />
sudo ldconfig<br />
</pre><br />
<br />
If the install quits with an error, it is likely because of missing folders. Run the following commands and retry: <br />
<pre><br />
sudo mkdir -p /usr/local/share/pixmaps<br />
sudo mkdir -p /usr/local/share/mime/packages<br />
sudo mkdir -p /usr/local/share/applications/<br />
sudo mkdir -p /usr/local/share/icons/gnome/48x48/mimetypes/<br />
sudo mkdir -p /usr/local/share/locale/en_GB/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/es_la/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/fr/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/zh_TW/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/ru/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/ro/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/bg/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/de/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/ko/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/pt_BR/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/zh_CN/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/ja/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/it/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/sl/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/sk/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/sv/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/ca_ES/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/nl/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/fi/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/cs_CZ/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/uk/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/es/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/pl/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/hu/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/es_VE/LC_MESSAGES<br />
sudo mkdir -p /usr/local/share/hugin/xrc/data/help_it_IT<br />
sudo mkdir -p /usr/local/share/hugin/xrc/data/help_en_EN<br />
sudo mkdir -p /usr/local/share/hugin/data/<br />
sudo mkdir -p /usr/local/lib/hugin<br />
sudo mkdir -p /usr/local/share/man/man1<br />
</pre><br />
<br />
'''Important:''' the package does not track dependencies yet, so it likely to fail on machines others than yours.<br />
<br />
Reference: [http://theseblog.free.fr/2007/10/building-hugin-in-ubuntu-feisty-fawn.php]<br />
<br />
=== Dive into the Code ===<br />
<br />
From time to time the API reference is published on the Hugin website, however you are better off with a local copy. To generate it, issue the following commands:<br />
<pre><br />
cd ~/src/hugin/hugin.hg/src<br />
doxygen Doxyfile<br />
</pre><br />
<br />
The documentation is generated in ~/src/hugin/hugin.hg/src/hugin/html<br />
<br />
Point your browser to index.html inside that folder and you have access to all available information. If you find that a class, a function, or anything else is not properly documented; and if you delve into the source code to understand it, kindly add documentation to the code so that the next person in your situation can use your experience as a stepping stone. Thank you!<br />
<br />
== Automatic Control Point Detectors ==<br />
<br />
=== Autopano-sift-C ===<br />
<br />
Pre-Requisites:<br />
<pre><br />
sudo apt-get install libxml2-dev<br />
</pre><br />
<br />
To build<br />
<br />
(Note February 2011: The latest source code of autopano-sift-C has been unstable for a long time now and nobody is working to fix it. Use the 2.5.1 release tarball instead)<br />
<br />
<pre><br />
mkdir -p ~/src/apsc<br />
cd ~/src/apsc<br />
hg clone http://hugin.hg.sourceforge.net:8000/hgroot/hugin/autopano-sift-C apsc.hg<br />
cd apsc.hg<br />
hg branches<br />
hg update -C 2.5.1<br />
cd ..<br />
mkdir apsc.hg.build<br />
cd apsc.hg.build<br />
cmake ../apsc.hg -DCMAKE_INSTALL_PREFIX=/usr/local -DCPACK_BINARY_DEB:BOOL=ON \<br />
-DCPACK_BINARY_NSIS:BOOL=OFF -DCPACK_BINARY_RPM:BOOL=OFF -DCPACK_BINARY_STGZ:BOOL=OFF \<br />
-DCPACK_BINARY_TBZ2:BOOL=OFF -DCPACK_BINARY_TGZ:BOOL=OFF -DCPACK_BINARY_TZ:BOOL=OFF \<br />
-DCMAKE_BUILD_TYPE=Debug<br />
make package<br />
sudo dpkg -i autopano-sift-C-*-Linux.deb<br />
</pre><br />
<br />
=== Match-n-shift ===<br />
<br />
Match-n-shift is yet an other Autopano-SIFT replacement. It comes in a bundle with pto file manipulation perl libraries and a rich selection of other tools that use nona, enblend, ImageMagick among other things. To use match-n-shift, you need to install at least the [http://search.cpan.org/dist/Panotools-Script/ Panotools::Script] library and some other perl modules. It requires:<br />
<br />
* Image::Size 2.9<br />
* Storable 2.0<br />
* Image::ExifTool 6<br />
<br />
Chances are that you do not need to update Storable which is a standard perl module. To check the version of installed versions of these modules, write these lines to the command prompt:<br />
<br />
perl -MStorable -le 'print Storable->VERSION;'<br />
perl -MImage::Size -le 'print Image::Size->VERSION;'<br />
perl -MImage::ExifTool -le 'print Image::ExifTool->VERSION;'<br />
<br />
There are various ways to install or upgrade these modules. Ubuntu has binary packages for many perl modules, you can skip the CPAN installation below and type:<br />
<br />
sudo apt-get install libimage-size-perl libimage-exiftool-perl<br />
<br />
Alternatively, perl is an interpreted language and these modules are pure perl, so installing from source is an easy thing.<br />
<br />
The best place to install perl modules is directly from a CPAN archive. CPAN is short for Comprehensive Perl Archive Network. The program to interact with CPAN comes with all perl installations. Start it by running:<br />
<br />
sudo cpan<br />
<br />
If this is your first time running the program you will be asked a number of questions (you can safely accept the suggested values). Last question lets you select a number of CPAN mirrors nearest to you.<br />
<br />
When all is done, you can enter the install commands after the 'cpan>' prompt:<br />
<br />
install Image::Size Storable Image::ExifTool<br />
<br />
Answer 'y' to any question of dependencies and wait for install to complete. 'exit' leaves the cpan shell.<br />
<br />
Next, you need to retrieve and install the Panotools-Script collection<br />
of perl libraries (Panotools::Script) and programs that use them -<br />
including match-n-shift:<br />
<br />
svn co https://panotools.svn.sourceforge.net/svnroot/panotools/trunk/Panotools-Script Panotools-Script<br />
cd Panotools-Script<br />
perl Makefile.PL<br />
make<br />
make test<br />
sudo make install<br />
<br />
Just to confuse you, you can also ignore everything above and just install Panotools::Script and all its dependencies from CPAN. From command line, type:<br />
<br />
sudo cpan Panotools::Script<br />
<br />
You can run match-n-shift from command line using the same parameters as autopano-c-complete.sh or you can modify hugin to run it for you:<br />
<br />
* start Hugin<br />
* navigate the menu File to Preferences<br />
* In the Preferences window, open the Autopano tab<br />
* Select Autopano -> Autopano-SIFT<br />
* tick the checkbox for Use alternative Autopano-SIFT program<br />
* enter the full path to match-n-shift (/usr/local/bin/match-n-shift) in the Autopano-SIFT field<br />
* enter the following string in the Arguments field:<br />
-f %f -v %v -c -p %p -o %o %i<br />
<br />
=== MatchPoint ===<br />
<br />
MatchPoint is a next generation CP generator. The result of a GSoC2007 project, it is still very experimental. Experience reports needed. Read more [http://groups.google.com/group/hugin-ptx/browse_thread/thread/cba2b2ce94dd9054 here]<br />
<br />
Matchpoint is now located inside the main hugin source tree, no need to checkout separately. It is compiled together with hugin, but not installed by default.<br />
<br />
* copy the MatchPoint executable into /usr/local/bin manually<br />
<pre><br />
cd ~/src/hugin/hugin.hg-build<br />
sudo cp src/matchpoint/matchpoint /usr/local/bin/<br />
</pre><br />
* edit /usr/local/bin/autopano-c-complete.sh (do it with sudo to have the necessary permission)<br />
** line 79: replace the .key.gz extension with .key (not sure if matchpoint supports compression)<br />
** lines 83 and 88: replace '''generatekeys "$arg" $FILENAME $SIZE''' with '''matchpoint "$arg" $FILENAME''' (not sure if the size option or any other options of the original generatekeys are applicable)<br />
<br />
=== Pan-o-matic ===<br />
<br />
Yet another control point generator [http://aorlinsk2.free.fr/panomatic/?p=home Home Page]<br />
<br />
<pre>sudo apt-get install libboost-dev</pre><br />
<br />
Download [http://aorlinsk2.free.fr/panomatic/download.php?d=7&v=0.9.4 Panomatic 0.9.4 bz2] and if you're on Ubuntu 9.10 or newer also the [http://aorlinsk2.free.fr/panomatic/panomatic_gcc44.patch patch] for the gcc4.4 compiler.<br />
<br />
<pre><br />
mkdir -p ~/src/panomatic<br />
cd ~/src/panomatic<br />
wget "http://aorlinsk2.free.fr/panomatic/download.php?d=7&v=0.9.4" -O panomatic-0.9.4-src.tar.bz2<br />
wget http://aorlinsk2.free.fr/panomatic/panomatic_gcc44.patch patch<br />
tar xvfj panomatic-0.9.4-src.tar.bz2<br />
cd panomatic-0.9.4<br />
patch -p 1 < ../panomatic_gcc44.patch<br />
./configure<br />
make<br />
sudo make install<br />
</pre><br />
<br />
To use Pano-o-matic, open Hugin<br />
<br />
* In File > Preferences > Autopano :<br />
* Select Autopano-SIFT<br />
* Check "Use alternative autopano-SIFT program"<br />
* Choose the path to the binary ( /usr/local/bin )<br />
* In Arguments, put : -o %o %i<br />
<br />
==== Pablo's variation ====<br />
<br />
Around the end of the year 2009, Pablo integrated a [http://groups.google.com/group/hugin-ptx/browse_thread/thread/d9c0558c679cad52 new] experimental descriptor based on the geometric blur and DAISY papers. Also, Pablo said that the algorithm is not really based on a published approach, just on some ideas that are mentioned in a few of them, and its currently simpler than any of them:<br />
<br />
o geometric blur: [http://www.eecs.berkeley.edu/~aberg/gb.html]<br />
<br />
o daisy: [http://cvlab.epfl.ch/~tola/daisy.html]<br />
<br />
o descriptor learning: [http://cvlab.epfl.ch/~brown/learndesc/learndesc.html]<br />
<br />
To build that version of panomatic instead, follow these instructions:<br />
<br />
This is current the subject of a GSoC 2010 project and may be available in future versions of Hugin.<br />
<br />
<pre><br />
sudo aptitude install libboost-python-dev bzr cmake libvigraimpex-dev<br />
</pre><br />
<br />
<pre><br />
bzr branch lp:~pablo.dangelo/hugin/panomatic-lib<br />
mkdir build<br />
cd build<br />
cmake ../panomatic-lib<br />
make<br />
sudo make install<br />
</pre><br />
<br />
To use the new descriptor the arguments for Hugin are: '''--sieve1size 100 --sieve2size 2 -o %o %i'''<br />
<br />
== ExifTool ==<br />
<br />
ExifTool is no longer mandatory for Hugin to work. It is used to pass metadata from the input to the output images during the stitching process. <br />
<br />
[http://www.sno.phy.queensu.ca/~phil/exiftool/ ExifTool] is a platform-independent Perl library plus a command-line application for reading, writing and editing meta information in image, audio and video files.<br />
<br />
Usually the version distributed with Ubuntu (8.15 in Ubuntu 10.10; 7.89 in Ubuntu 10.4) is good enough and you don't need to bother with the following instructions. However there were situations in the past and there might be situations in the future where the latest versions offer better support. These issues will occur most likely with specific camera brands/models and the most recent models. The following instructions are for those cases.<br />
<br />
<pre><br />
sudo apt-get purge libimage-exiftool-perl<br />
</pre><br />
<br />
<pre><br />
wget http://www.sno.phy.queensu.ca/~phil/exiftool/Image-ExifTool-8.50.tar.gz<br />
tar -xzf Image-ExifTool-8.50.tar.gz<br />
cd Image-ExifTool-8.50<br />
perl Makefile.PL<br />
make test<br />
sudo make install<br />
</pre><br />
<br />
== Pano Viewers ==<br />
<br />
=== PanoGLView ===<br />
<br />
PanoGLView is an OpenGL hardware accelerated interactive immersive viewer for equirectangular images.<br />
<br />
Pre-Requisites:<br />
<pre>sudo apt-get install wx-common libwxgtk2.8-dev libglew-dev</pre><br />
<br />
To build and install:<br />
<pre><br />
mkdir -p ~/src/panoglview<br />
cd ~/src/panoglview<br />
hg clone http://hugin.hg.sourceforge.net:8000/hgroot/hugin/panoglview panoglview.hg<br />
cd panoglview.hg<br />
hg update<br />
./bootstrap<br />
./configure<br />
make<br />
sudo make install<br />
</pre><br />
<br />
=== FreePV - DEPENDENCIES ARE BROKEN - FAILS TO BUILD ===<br />
<br />
Pre-Requisites:<br />
<pre><br />
sudo apt-get install cmake make pkg-config g++ mozilla-devscripts freeglut3-dev zlib1g-dev \<br />
libjpeg-dev libxext-dev libxmu-dev x11proto-xf86vidmode-dev libxxf86vm-dev libnspr4-dev \<br />
libxml2-dev libpng12-dev<br />
</pre><br />
To build<br />
<pre><br />
svn co https://freepv.svn.sourceforge.net/svnroot/freepv/freepv/trunk/ freepv<br />
cd freepv<br />
cmake .<br />
make<br />
sudo make install<br />
</pre><br />
<br />
=== Panini Perspective Tool ===<br />
<br />
Strictly speaking, Panini is more than just a viewer. It's a powerful tool to extract/transform views and can also be easily used as a viewer.<br />
<br />
Get dependencies:<br />
<pre><br />
sudo apt-get install qt4-qmake libqt4-dev zlib1g-dev<br />
</pre><br />
<br />
Get code:<br />
<pre><br />
mkdir -p ~/src/pvqt<br />
cd ~/src/pvqt<br />
svn co https://pvqt.svn.sourceforge.net/svnroot/pvqt pvqt.svn<br />
</pre><br />
<br />
Build:<br />
<pre><br />
cd pvqt.svn<br />
qmake panini.pro<br />
make<br />
</pre><br />
<br />
Install (brute force):<br />
<pre><br />
sudo cp Panini /usr/local/bin/ <br />
</pre><br />
<br />
Menu Entry for Kubuntu:<br />
<pre><br />
kmenuedit<br />
</pre><br />
<br />
in kmenuedit<br />
* navigate to Graphics<br />
** click on New Item<br />
** Enter "Panini" as Name<br />
** Enter "Perspective Tool" as Description<br />
** click on the empty icon and look for an icon (I used the akonadi one)<br />
** Enter "Panini" as Command<br />
** Click on Save button<br />
<br />
== Notes for Packagers ==<br />
<br />
=== Tarballs ===<br />
<br />
* to get an updated ChangeLog in Mercurial repositories (Hugin has it also in the cmake invocation, use '''-DUPDATE_CHANGELOG=1''')<br />
<pre><br />
hg log --follow --style=changelog <br />
</pre><br />
* to update the ChangeLog in SVN repositories (Panotools)<br />
<pre><br />
svn up<br />
svn2cl<br />
svn ci<br />
</pre><br />
<br />
=== Deb Packages ===<br />
<br />
The deb packages built by CMake (2.8.2) are broken by Debian standard. Please do not distribute them. There are official updated recent packages at the Hugin PPA mentioned above which include nightlies (produced every 24 hours) and stables (produced out of released tarballs). If you miss binaries for your series of Ubuntu and you have built them for yourself following the instructions above, considering moving up one level and contributing to the [[Hugin PPA]].<br />
<br />
[[Category:Software:Hugin]]<br />
[[Category:Software:Platform:Linux]]</div>Onomouhttps://wiki.panotools.org/index.php?title=Hugin_Compiling_Ubuntu&diff=13564Hugin Compiling Ubuntu2011-06-15T04:03:51Z<p>Onomou: spell check</p>
<hr />
<div>== Who Is This Page For ==<br />
<br />
These instructions contain the collective wisdom of Hugin contributors that are using Ubuntu or any of its variations (Ku/Xu/Lu/Edu/...buntu). They are work in progress and updated when newer versions of Ubuntu are released or when Hugin introduces new dependencies. They have worked, at the time of release or soon thereafter, with all 'buntu versions up until 10.10. They are intended to help contributors on the learning curve. If you are not here to contribute, spare yourself the effort and see the [[#Shortcut]] section below.<br />
<br />
They are likely to work only for the latest 'buntu release, but you can check this page's history at the time that the older 'buntu version was the most recent one to find the specifics for that version.<br />
<br />
If you are new here, read the whole page. It is recommended that you go sequentially through it.<br />
<br />
If you're familiar with the process and have run it a few time, look at the what's new section for important news.<br />
<br />
Apart from the odd change in package name, nothing should be substantially different (and if does not work, please leave a comment on the [http://groups.google.com/group/hugin-ptx hugin-ptx mailing list]). Don't worry if the same package appears twice in an apt-get install line - apt-get will update existing packages if there is a newer version, and ignore duplicates if the latest version is already installed. On the other hand, if apt-get says that it can't find a package, it might be the odd change in package name. You can find a replacement package by using apt-cache search with a substring of the package required, e.g.<br />
<pre>apt-cache search wxW<br />
</pre><br />
<br />
The goal is to build hugin and the whole set of helper applications required, and start understanding the building process. You will need deeper understanding of the building process if you want to:<br />
* develop code<br />
* translate the latest strings<br />
* document the latest features with manuals and tutorials<br />
* package for distribution<br />
That knowledge is out of scope for this document. This document ends with a binary that is fit for installation on your machine. It is not fit for any other purpose, particularly not for distribution. CMake is [http://groups.google.com/group/hugin-ptx/msg/3f29b207c562fd63 known] to build broken deb packages. Please do not distribute these binaries.<br />
<br />
== What's New ==<br />
<br />
'''9 May 2011''': The integration of the python_scripting development branch brings new dependencies and a new build-time configuration switch for Hugin. See changes in the documentation below. swig2.0 is officially distributed only with Natty (11.04 onwards). If you have an older Ubuntu version you will either have to forego the python scripting feature or find an alternative swig2.0 (either a PPA or build it yourself).<br />
<br />
'''2 May 2011''': If you are using an earlier version of Ubuntu than 11.04, there is a chance that your Mercurial version is too old for grabbing updates. New (non-critical security) updates to a program do not get added to old versions of Ubuntu, so any new changes will need to be added manually. When running Mercurial (pull, update, etc), you may get an error like<br />
<pre><br />
abort: requirement 'dotencode' not supported!<br />
</pre><br />
To fix this, you can use the package archive from Mercurial PPA Packagers and get the latest release:<br />
<pre><br />
sudo apt-add-repository ppa:mercurial-ppa/releases<br />
sudo apt-get update<br />
sudo apt-get install mercurial<br />
</pre><br />
<br />
'''5-March-2010''': Foreign library libtclap removed from source tree. This introduces a new dependency on libtclap-dev<br />
<br />
'''February 2010''': Libpano has migrated from SVN to Mercurial.<br />
<br />
'''CMake 2.8.2''', as packaged in Ubuntu 10.10, contains a bug (http://public.kitware.com/Bug/view.php?id=11020) the prevents the created debs to install successfully, due to it not storing needed directories in the deb package.<br />
Installing the resulting debs will fail with a message error saying something like<br />
<br />
<pre><br />
unable to create `/usr/local/share/hugin/xrc/data/redo.png.dpkg-new' (while processing `./usr/local/share/hugin/xrc/data/redo.png'): No such file or directory<br />
</pre><br />
<br />
Commands to create the necessary folders have been documented below and may be added to the CMake build in the repository of Hugin, Libpano, Enblend. However it is possible that the lists are incomplete. If you bump in the above message, the solution is to create the full missing path and run dpkg -i again, recursively adding folders until the install succeed.<br />
<br />
<pre><br />
sudo mkdir -p /usr/local/share/hugin/xrc/data/<br />
</pre><br />
<br />
Another workaround is, to partially rebuild the deb package by hand:<br />
<br />
<pre><br />
mkdir unpacked<br />
cd unpacked/<br />
ar x ../hugin.build/hugin-2010.2.0-Linux.deb<br />
mkdir untarred<br />
cd untarred<br />
tar xzf ../data.tar.gz<br />
tar czf ../data.tar.gz .<br />
cd ..<br />
ar r ../hugin-2010.2.0-Linux.deb debian-binary control.tar.gz data.tar.gz<br />
</pre><br />
<br />
== Shortcut ==<br />
<br />
Hugin evolves fast and the official 'buntu distributions carry versions that are usually 3-6 months older than the 'buntu distribution date. Moreover, they do not backport Hugin and related tools.<br />
<br />
Even if you follow religiously the 'buntu six months update cycle, you may be using a version of Hugin that is one or two release cycles in our past. If your sole objective is to use the new features of Hugin, the instructions in this section are for you. Start a command line terminal, type the three commands and you're done.<br />
<br />
If for some reason that's not enough for you - if you want to actually learn and become a contributor; or if you're just curious about getting even closer to the bleeding edge and trade stability for features and excitement, the rest of this document is for you.<br />
<br />
=== Stable ===<br />
<br />
This will install you the latest stable version of the tools:<br />
<pre><br />
sudo add-apt-repository ppa:hugin/hugin-builds<br />
sudo apt-get update<br />
sudo apt-get install hugin enblend panini<br />
</pre><br />
<br />
=== Unstable ===<br />
<br />
This will install you the latest unstable version of the tools that has been built as a binary. While they are likely to work in most cases, there is no guarantee and they are not recommended for production environment. Use at your own risk, and please report (and if possible fix) bugs. Most of the time these unstable builds are closer to the bleeding edge than to the stable builds. If you want the really really really bleeding edge, you'll have to work through the instructions in the next sections, though.<br />
<br />
<pre><br />
sudo add-apt-repository ppa:hugin/hugin-builds<br />
sudo add-apt-repository ppa:hugin/nightly<br />
sudo apt-get update<br />
sudo apt-get install hugin enblend panini<br />
</pre><br />
<br />
== Building Environment ==<br />
Since we are going to build hugin, libpano13 and enblend we need to download and install all the development packages. This is very easy with apt-get.<br />
In a terminal window (K menu -> System -> Konsole or Applications -> Accessories -> Terminal (in Kubuntu), Applications -> Accessories -> Terminal (in Ubuntu))<br />
<br />
<pre>sudo apt-get install build-essential autoconf automake1.9 libtool flex bison gdb libc6-dev libgcc1 \<br />
cmake<br />
</pre><br />
<br />
To get the bleeding edge we'll need access to the SVN and Mercurial repositories, and for this we need the correct tools:<br />
<br />
<pre><br />
sudo apt-get install subversion mercurial<br />
</pre><br />
<br />
Not necessary, but useful if you want to revisit configuration sets in ccmake<br />
<pre><br />
sudo apt-get install cmake-curses-gui<br />
</pre><br />
<br />
To get on the same page as far as file system layout is concerned, we'll create a folder to contain all source code in your home folder:<br />
<pre><br />
cd<br />
mkdir -p src<br />
</pre><br />
<br />
=== For Coders ===<br />
<br />
If you want to start to navigate, understand and modify the code, the doxygen generated documentation will be helpful to you.<br />
<br />
<pre><br />
sudo apt-get install doxygen graphviz<br />
</pre><br />
<br />
=== For Distributors ===<br />
<br />
If you want to build packages for distribution, you will also need the following tools and settings.<br />
<br />
<pre><br />
sudo apt-get install subversion-tools<br />
sudo echo 'deb-src ftp://ftp.at.debian.org/debian ../project/experimental main' > debian-experimental.list<br />
mv debian-experimental.list /etc/apt/sources.list.d/<br />
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 55BE302B<br />
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 8B8D7663<br />
sudo apt-get update<br />
sudo apt-get install devscripts<br />
</pre><br />
<br />
You will also need an OpenPGP key, and a Launchpad account. Follow the [[Hugin_Trackers#Launchpad_Account|instructions]] for Launchpad account creation, including the signing of the Ubuntu Code of Conduct.<br />
<br />
Moreover, it is likely that your environment is not clean enough for distribution builds. In that case, and to produce binaries for other Ubuntu series than the one you are running, you will want to set up a dchroot environment (to be documented later on).<br />
<br />
== Building Enblend ==<br />
<br />
Get the dependencies. If you are working with large images (300 megapixels and up), you should have a libtiff-devel compiled with large file support and libstdc++6.<br />
<br />
<pre><br />
sudo apt-get install pkg-config libtiff4-dev libboost-graph-dev libboost-thread-dev \<br />
libboost-filesystem-dev liblcms1-dev libglew1.5-dev libplot-dev libglut3-dev libopenexr-dev \<br />
libxi-dev libxmu-dev help2man libplot-dev liblcms1-dev libboost-system-dev<br />
</pre><br />
<br />
If you also want to build the documentation, add the following dependencies, and add "-DDOC=ON" to the cmake command below. (Be warned, however, that this will drag in over 700MB of additional dependencies. Unless you have a pressing need to build the documentation yourself, you can save yourself some time and disk space by downloading the PDF docs from http://enblend.sourceforge.net .)<br />
<br />
<pre><br />
sudo apt-get install texi2html texinfo fig2ps tidy gnuplot libxml-xpath-perl imagemagick<br />
</pre><br />
<br />
Once all dependencies are in place, get the code. The official repository has migrated from CVS to Mercurial:<br />
<br />
<pre><br />
mkdir -p ~/src/enblend<br />
cd ~/src/enblend<br />
hg clone http://enblend.hg.sourceforge.net:8000/hgroot/enblend/enblend enblend.hg<br />
</pre><br />
<br />
If you already have checked out enblend, to update the code to the latest version you need to run:<br />
<pre><br />
cd enblend.hg<br />
hg pull<br />
hg update<br />
cd ..<br />
</pre><br />
<br />
Then create a build directory and build in there. And install the Package.<br />
<br />
The options below are good for modern multi-core computers. For a single core, you may be better off setting ENABLE_OPENMP to OFF and ENABLE_IMAGECACHE to ON. The two options are mutually exclusive.<br />
<pre><br />
mkdir enblend.build<br />
cd enblend.build<br />
cmake ../enblend.hg -DENABLE_GPU:BOOL=ON -DENABLE_IMAGECACHE:BOOL=OFF -DENABLE_OPENMP:BOOL=ON \<br />
-DCPACK_BINARY_DEB:BOOL=ON -DCPACK_BINARY_NSIS:BOOL=OFF -DCPACK_BINARY_RPM:BOOL=OFF \<br />
-DCPACK_BINARY_STGZ:BOOL=OFF -DCPACK_BINARY_TBZ2:BOOL=OFF -DCPACK_BINARY_TGZ:BOOL=OFF \<br />
-DCPACK_BINARY_TZ:BOOL=OFF -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX:PATH=/usr/local<br />
make package<br />
sudo dpkg -i enblend-4.1.1-Linux.deb<br />
</pre><br />
<br />
If the install quits with an error, it is likely because of missing folders. Run the following commands and retry:<br />
<pre><br />
sudo mkdir -p /usr/local/share/man/man1<br />
sudo mkdir -p /usr/local/bin<br />
</pre><br />
<br />
===The old autotools way===<br />
We are then ready to compile. The CXXFLAGS <tt>--param inline-unit-growth=60</tt> is a workaround for x86_64 systems, Feb 2009, and apparently no longer needed (set by default). If you have an SMP machine and you're building a recent version, <tt>--disable-image-cache</tt> and <tt>--enable-openmp</tt> will speed up enblend/enfuse massively but may cause segmentation faults; in that case you will be better off with <tt>--enable-image-cache</tt> and <tt>--disable-openmp.</tt> <tt>-march=native</tt> is also beneficial and -O2 is better than -O3.<br />
<br />
<pre><br />
make --makefile=Makefile.scm<br />
mkdir BUILD<br />
cd BUILD<br />
CXXFLAGS="--param inline-unit-growth=60 -march=native -O2" ../configure --disable-image-cache \<br />
--enable-openmp<br />
make<br />
</pre><br />
<br />
The second make step can be very long and memory consuming. Make sure you have enough swap space, and go get a healthy snack while the computer is compiling.<br />
<br />
If you encounter problems at any of these stages, please report back to the hugin-ptx mailing list. Report what command in the sequence you were executing, what machine/operating system, the revision checked out from CVS, and all other relevant information.<br />
<br />
You are then ready to install with<br />
<pre><br />
sudo make install<br />
</pre><br />
<br />
== Building Libpano13 ==<br />
<br />
libpano13 is the new version of the PanoTools libraries. This is a necessary component for hugin, and we need to build it first.<br />
To build libpano13 we need some libraries and particularly their <code>dev</code> package:<br />
<br />
<pre>sudo apt-get install zlib1g zlib1g-dev libpng12-dev libjpeg62-dev libtiff4-dev cmake</pre><br />
<br />
On older distributions, zlib1g and zlib1g-dev may not be found. In that case, the same library may be available with the names lib64z1 and lib64z1-dev.<br />
<br />
We then need to download the source code from the central repository:<br />
<br />
<pre><br />
mkdir -p ~/src/libpano<br />
cd ~/src/libpano<br />
hg clone http://panotools.hg.sourceforge.net:8000/hgroot/panotools/libpano libpano.hg<br />
</pre><br />
<br />
If you're a contributor with write access, use the following clone command instead:<br />
<pre><br />
hg clone ssh://${USER}@panotools.hg.sourceforge.net/hgroot/panotools/panotools/libpano libpano.hg<br />
</pre><br />
<br />
In the future there is no need to get the whole source again. Just issue the following commands to bring your source up to date:<br />
<pre><br />
cd libpano.hg<br />
hg pull<br />
hg up<br />
cd ..<br />
</pre><br />
<br />
Now start the building process.<br />
<br />
<pre><br />
mkdir libpano.build<br />
cd libpano.build<br />
cmake ../libpano.hg -DCMAKE_INSTALL_PREFIX=/usr/local -DCPACK_BINARY_DEB:BOOL=ON \<br />
-DCPACK_BINARY_NSIS:BOOL=OFF -DCPACK_BINARY_RPM:BOOL=OFF -DCPACK_BINARY_STGZ:BOOL=OFF \<br />
-DCPACK_BINARY_TBZ2:BOOL=OFF -DCPACK_BINARY_TGZ:BOOL=OFF -DCPACK_BINARY_TZ:BOOL=OFF \<br />
-DCMAKE_BUILD_TYPE=RelWithDebInfo<br />
make package<br />
sudo dpkg -i libpano13-*-Linux.deb<br />
</pre><br />
<br />
Set -DCMAKE_BUILD_TYPE=Debug if you want to help investigate/debug a problem and capture even more debugging information.<br />
<br />
If the install quits with an error, it is likely because of missing folders. Run the following commands and retry:<br />
<pre><br />
sudo mkdir -p /usr/local/include/pano13/<br />
sudo mkdir -p /usr/local/include/pano13/doc<br />
sudo mkdir -p /usr/local/lib/pkgconfig<br />
sudo mkdir -p /usr/local/share/man/man1<br />
sudo mkdir -p /usr/local/bin<br />
</pre><br />
<br />
=== The old autotools way ===<br />
<br />
The above described building process uses CMake to build libpano which has many advantages. Amongst others it creates a clean package to install / deinstall and decreases the likelihood of wrecking the system. However CMake support is relatively new in libpano. The old autotools way is documented below for completeness. You should not need it. However if you do, make sure to run either the CMake build or the autotools build on fresh repository checkouts to avoid interferences.<br />
<br />
<pre><br />
./bootstrap<br />
</pre><br />
<br />
If any libraries are missing, the script will complain (or at least, let you know that some library hasn't been found). In that case you probably need to install the library. To find in what package is that library, a general rule is to run the command <code>apt-cache search ''missingfile''</code>, find the relevant library and install both the library and the related <code>-dev</code> package.<br />
Run the <code>./configure</code> script and repeat this process until you have met all the dependencies.<br />
<br />
Then we are ready to launch the make process with<br />
<pre>make</pre><br />
<br />
If the library successfully compiles, you have to install it with<br />
<pre>sudo make install<br />
sudo ldconfig</pre><br />
The last part is for the OS to be aware of the new library (that has been installed in <code>/usr/local/lib</code>).<br />
We can now go back up one folder level and get ready for hugin.<br />
<pre>cd ..</pre><br />
<br />
== Building Hugin ==<br />
<br />
=== Dependencies ===<br />
<br />
First we need to activate the <code>universe</code> repository (in adept package manager, or by editing the /etc/apt/sources.lst file for example) and get the dependencies.<br />
<br />
If you want to build the Python scripting feature, your best bet is Natty (11.04). If you are on Lucid or Maverick, you can follow the instructions below to get a swig2.0 package. If nothing works and you still want Python scripting, you will have to build it from [https://sourceforge.net/projects/swig/ source].<br />
<br />
<pre><br />
sudo add-apt-repository ppa:hugin/hugin-builds<br />
sudo apt-get update<br />
</pre><br />
<br />
The following command will install on your system all build time dependencies except libpano13.<br />
<pre><br />
sudo apt-get install libwxgtk2.8-dev libtiff4-dev libpng12-dev \<br />
libopenexr-dev libexiv2-dev libglut3-dev libglew-dev libboost-dev \<br />
boost-build libboost-thread-dev libboost-graph-dev libboost-regex-dev \<br />
libboost-iostreams-dev libboost-filesystem-dev gettext liblapack-dev \<br />
libxi-dev libxmu-dev libboost-signals-dev libboost-system-dev \<br />
libtclap-dev<br />
</pre><br />
<br />
For the python scripting functionality, you will also need <br />
<pre><br />
sudo apt-get install libpython-dev python-dev swig2.0<br />
</pre><br />
<br />
python-dev was the name for libpython-dev prior to Natty. Do not worry if you are requesting a package that does not exist on your system, this will only return a warning but will achieve the intended status. Tested on Natty and Lucid, most likely ok for Maverick as well.<br />
<br />
You could install libpano13 on your system with the command below. However it is likely to be a version of libpano13 that is too old for the current Hugin. It is recommended that you first build your own libpano13 (above). Alternatively, there may be a recent enough version of libpano13 in the Hugin PPA.<br />
<pre><br />
sudo apt-get install libpano13-dev<br />
</pre><br />
<br />
wxWidgets is a critical dependency for the Hugin GUI. In the official Ubuntu repositories it is usually at least a few releases behind the current release, and in some cases many releases behind. The wxWidgets project provides alternative [http://wiki.wxpython.org/InstallingOnUbuntuOrDebian repositories] with newer versions, as well as a [http://wiki.wxpython.org/BuildingDebianPackages instructions] to build binary packages of the most recent releases. Newer versions of wxWidgets are not (yet) absolutely necessary, but since eventually things evolve they are useful for development, testing, and in general should give a better user interface experience as wxWidgets improves over time.<br />
<br />
The following are run-time dependencies. Strictly speaking you don't need them to build Hugin, but you will need them to use it. If you follow the instructions on this page to build ExifTool and/or Enblend, you don't need to install them this way.<br />
<pre><br />
sudo apt-get install libimage-exiftool-perl enblend python-argparse<br />
</pre><br />
<br />
=== Fetch the Source Code with Mercurial ===<br />
<br />
If you already have a repository clone, you only need to pull the latest changes and update the code with:<br />
<pre><br />
cd ~/src/hugin/hugin.hg<br />
hg pull<br />
hg update<br />
</pre><br />
<br />
Otherwise, you need to clone the repository and decide which version/branch to build with:<br />
<pre><br />
mkdir -p ~/src/hugin<br />
cd ~/src/hugin<br />
hg clone http://hugin.hg.sourceforge.net:8000/hgroot/hugin/hugin hugin.hg<br />
cd hugin.hg<br />
hg branches<br />
</pre><br />
<br />
If you are a contributor with write access, you can use<br />
<pre><br />
hg clone ssh://${USER}@hugin.hg.sourceforge.net/hgroot/hugin/hugin hugin.hg<br />
</pre><br />
<br />
The `hg branches` command will list all available branches. If you decide, e.g., to build the 2010.0 branch, you will update to it with:<br />
<pre><br />
hg update -C 2010.0 <br />
</pre><br />
<br />
=== Advanced Use - Multiple Source Trees ===<br />
<br />
You may want to build multiple versions of Hugin on your machine at the same time, e.g. when you want to build side by side a stable version for your productivity and a development version to give feedback to the developers. In that case, you will clone the Mercurial repository that is already on your drive and update from it a source tree to a different branch. Mercurial takes care of details such as optimizing disk usage. The commands for this are:<br />
<br />
<pre><br />
cd ..<br />
hg clone hugin.hg another_hugin<br />
cd another_hugin<br />
hg update -C default<br />
</pre><br />
<br />
You can have as many "another_hugin" folders as you want. Just make sure, when pulling the latest updates from SourceForge, to first pull your main repository (the one you cloned from http://hugin.hg.sourceforge.net:8000/hgroot/hugin/hugin. Then pull all others:<br />
<pre><br />
cd ~/src/hugin/hugin.hg<br />
hg pull<br />
hg update<br />
cd ../another_hugin<br />
hg pull<br />
hg update<br />
</pre><br />
<br />
Reference: [http://groups.google.com/group/hugin-ptx/msg/1ce824dd1364e9be]<br />
<br />
=== Configure the Build Environment ===<br />
<br />
'''Rule:''' You always want to build outside of the source tree to keep the source tree clean. And to avoid confusion, if you have multiple source trees it is preferable to build for each of them in a separate build folder.<br />
<br />
Next we set up the build environment using cmake.<br />
<br />
If you compiled and installed libpano to a non standard location set the variables CMAKE_INCLUDE_PATH and CMAKE_LIBRARY_PATH to point to your install location's include and lib directories.<br />
<br />
If you are building for distribution, you want to set CMAKE_INSTALL_PREFIX=/usr<br />
<br />
<pre><br />
cd ~/src/hugin<br />
mkdir hugin.hg-build<br />
cd hugin.hg-build<br />
cmake ../hugin.hg -DENABLE_LAPACK=YES -DCPACK_BINARY_DEB:BOOL=ON -DCPACK_BINARY_NSIS:BOOL=OFF \<br />
-DCPACK_BINARY_RPM:BOOL=OFF -DCPACK_BINARY_STGZ:BOOL=OFF -DCPACK_BINARY_TBZ2:BOOL=OFF \<br />
-DCPACK_BINARY_TGZ:BOOL=OFF -DCPACK_BINARY_TZ:BOOL=OFF -DCMAKE_BUILD_TYPE=RelWithDebInfo \<br />
-DBUILD_HSI:BOOL=ON -DSWIG_EXECUTABLE=/usr/bin/swig2.0<br />
</pre><br />
<br />
The last line of the above cmake statement is for python scripting and will work with Ubuntu 11.04. The first switch activates the scripting interface (which is deactivated by default because it does not work simply out of the box on all supported platforms) and the second switch fixes a bug in the CMake script to find swig. Self-compiled swig does not need the -DSWIG_EXECUTABLE switch since it is found automatically by the CMake script.<br />
<br />
If you get an error building, try removing the last line of the above cmake statement.<br />
<br />
Set -DCMAKE_BUILD_TYPE=Debug if you want to help investigate/debug a problem and capture even more debugging information, however Hugin will be slower and may not work as expected. Don't use a Debug build for production.<br />
<br />
=== Build and Install ===<br />
<br />
Finally, we use make to build the code and package it, and dpkg to install it. Look for the version number in the .deb file created and edit the lines below accordingly: <br />
<br />
<pre><br />
make package<br />
sudo dpkg -i hugin-*-Linux.deb<br />
sudo ldconfig<br />
</pre><br />
<br />
If the install quits with an error, it is likely because of missing folders. Run the following commands and retry: <br />
<pre><br />
sudo mkdir -p /usr/local/share/pixmaps<br />
sudo mkdir -p /usr/local/share/mime/packages<br />
sudo mkdir -p /usr/local/share/applications/<br />
sudo mkdir -p /usr/local/share/icons/gnome/48x48/mimetypes/<br />
sudo mkdir -p /usr/local/share/locale/en_GB/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/es_la/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/fr/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/zh_TW/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/ru/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/ro/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/bg/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/de/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/ko/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/pt_BR/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/zh_CN/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/ja/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/it/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/sl/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/sk/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/sv/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/ca_ES/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/nl/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/fi/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/cs_CZ/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/uk/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/es/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/pl/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/hu/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/es_VE/LC_MESSAGES<br />
sudo mkdir -p /usr/local/share/hugin/xrc/data/help_it_IT<br />
sudo mkdir -p /usr/local/share/hugin/xrc/data/help_en_EN<br />
sudo mkdir -p /usr/local/share/hugin/data/<br />
sudo mkdir -p /usr/local/lib/hugin<br />
sudo mkdir -p /usr/local/share/man/man1<br />
</pre><br />
<br />
'''Important:''' the package does not track dependencies yet, so it likely to fail on machines others than yours.<br />
<br />
Reference: [http://theseblog.free.fr/2007/10/building-hugin-in-ubuntu-feisty-fawn.php]<br />
<br />
=== Dive into the Code ===<br />
<br />
From time to time the API reference is published on the Hugin website, however you are better off with a local copy. To generate it, issue the following commands:<br />
<pre><br />
cd ~/src/hugin/hugin.hg/src<br />
doxygen Doxyfile<br />
</pre><br />
<br />
The documentation is generated in ~/src/hugin/hugin.hg/src/hugin/html<br />
<br />
Point your browser to index.html inside that folder and you have access to all available information. If you find that a class, a function, or anything else is not properly documented; and if you delve into the source code to understand it, kindly add documentation to the code so that the next person in your situation can use your experience as a stepping stone. Thank you!<br />
<br />
== Automatic Control Point Detectors ==<br />
<br />
=== Autopano-sift-C ===<br />
<br />
Pre-Requisites:<br />
<pre><br />
sudo apt-get install libxml2-dev<br />
</pre><br />
<br />
To build<br />
<br />
(Note February 2011: The latest source code of autopano-sift-C has been unstable for a long time now and nobody is working to fix it. Use the 2.5.1 release tarball instead)<br />
<br />
<pre><br />
mkdir -p ~/src/apsc<br />
cd ~/src/apsc<br />
hg clone http://hugin.hg.sourceforge.net:8000/hgroot/hugin/autopano-sift-C apsc.hg<br />
cd apsc.hg<br />
hg branches<br />
hg update -C 2.5.1<br />
cd ..<br />
mkdir apsc.hg.build<br />
cd apsc.hg.build<br />
cmake ../apsc.hg -DCMAKE_INSTALL_PREFIX=/usr/local -DCPACK_BINARY_DEB:BOOL=ON \<br />
-DCPACK_BINARY_NSIS:BOOL=OFF -DCPACK_BINARY_RPM:BOOL=OFF -DCPACK_BINARY_STGZ:BOOL=OFF \<br />
-DCPACK_BINARY_TBZ2:BOOL=OFF -DCPACK_BINARY_TGZ:BOOL=OFF -DCPACK_BINARY_TZ:BOOL=OFF \<br />
-DCMAKE_BUILD_TYPE=Debug<br />
make package<br />
sudo dpkg -i autopano-sift-C-*-Linux.deb<br />
</pre><br />
<br />
=== Match-n-shift ===<br />
<br />
Match-n-shift is yet an other Autopano-SIFT replacement. It comes in a bundle with pto file manipulation perl libraries and a rich selection of other tools that use nona, enblend, ImageMagick among other things. To use match-n-shift, you need to install at least the [http://search.cpan.org/dist/Panotools-Script/ Panotools::Script] library and some other perl modules. It requires:<br />
<br />
* Image::Size 2.9<br />
* Storable 2.0<br />
* Image::ExifTool 6<br />
<br />
Chances are that you do not need to update Storable which is a standard perl module. To check the version of installed versions of these modules, write these lines to the command prompt:<br />
<br />
perl -MStorable -le 'print Storable->VERSION;'<br />
perl -MImage::Size -le 'print Image::Size->VERSION;'<br />
perl -MImage::ExifTool -le 'print Image::ExifTool->VERSION;'<br />
<br />
There are various ways to install or upgrade these modules. Ubuntu has binary packages for many perl modules, you can skip the CPAN installation below and type:<br />
<br />
sudo apt-get install libimage-size-perl libimage-exiftool-perl<br />
<br />
Alternatively, perl is an interpreted language and these modules are pure perl, so installing from source is an easy thing.<br />
<br />
The best place to install perl modules is directly from a CPAN archive. CPAN is short for Comprehensive Perl Archive Network. The program to interact with CPAN comes with all perl installations. Start it by running:<br />
<br />
sudo cpan<br />
<br />
If this is your first time running the program you will be asked a number of questions (you can safely accept the suggested values). Last question lets you select a number of CPAN mirrors nearest to you.<br />
<br />
When all is done, you can enter the install commands after the 'cpan>' prompt:<br />
<br />
install Image::Size Storable Image::ExifTool<br />
<br />
Answer 'y' to any question of dependencies and wait for install to complete. 'exit' leaves the cpan shell.<br />
<br />
Next, you need to retrieve and install the Panotools-Script collection<br />
of perl libraries (Panotools::Script) and programs that use them -<br />
including match-n-shift:<br />
<br />
svn co https://panotools.svn.sourceforge.net/svnroot/panotools/trunk/Panotools-Script Panotools-Script<br />
cd Panotools-Script<br />
perl Makefile.PL<br />
make<br />
make test<br />
sudo make install<br />
<br />
Just to confuse you, you can also ignore everything above and just install Panotools::Script and all its dependencies from CPAN. From command line, type:<br />
<br />
sudo cpan Panotools::Script<br />
<br />
You can run match-n-shift from command line using the same parameters as autopano-c-complete.sh or you can modify hugin to run it for you:<br />
<br />
* start Hugin<br />
* navigate the menu File to Preferences<br />
* In the Preferences window, open the Autopano tab<br />
* Select Autopano -> Autopano-SIFT<br />
* tick the checkbox for Use alternative Autopano-SIFT program<br />
* enter the full path to match-n-shift (/usr/local/bin/match-n-shift) in the Autopano-SIFT field<br />
* enter the following string in the Arguments field:<br />
-f %f -v %v -c -p %p -o %o %i<br />
<br />
=== MatchPoint ===<br />
<br />
MatchPoint is a next generation CP generator. The result of a GSoC2007 project, it is still very experimental. Experience reports needed. Read more [http://groups.google.com/group/hugin-ptx/browse_thread/thread/cba2b2ce94dd9054 here]<br />
<br />
Matchpoint is now located inside the main hugin source tree, no need to checkout separately. It is compiled together with hugin, but not installed by default.<br />
<br />
* copy the MatchPoint executable into /usr/local/bin manually<br />
<pre><br />
cd ~/src/hugin/hugin.hg-build<br />
sudo cp src/matchpoint/matchpoint /usr/local/bin/<br />
</pre><br />
* edit /usr/local/bin/autopano-c-complete.sh (do it with sudo to have the necessary permission)<br />
** line 79: replace the .key.gz extension with .key (not sure if matchpoint supports compression)<br />
** lines 83 and 88: replace '''generatekeys "$arg" $FILENAME $SIZE''' with '''matchpoint "$arg" $FILENAME''' (not sure if the size option or any other options of the original generatekeys are applicable)<br />
<br />
=== Pan-o-matic ===<br />
<br />
Yet another control point generator [http://aorlinsk2.free.fr/panomatic/?p=home Home Page]<br />
<br />
<pre>sudo apt-get install libboost-dev</pre><br />
<br />
Download [http://aorlinsk2.free.fr/panomatic/download.php?d=7&v=0.9.4 Panomatic 0.9.4 bz2] and if you're on Ubuntu 9.10 or newer also the [http://aorlinsk2.free.fr/panomatic/panomatic_gcc44.patch patch] for the gcc4.4 compiler.<br />
<br />
<pre><br />
mkdir -p ~/src/panomatic<br />
cd ~/src/panomatic<br />
wget "http://aorlinsk2.free.fr/panomatic/download.php?d=7&v=0.9.4" -O panomatic-0.9.4-src.tar.bz2<br />
wget http://aorlinsk2.free.fr/panomatic/panomatic_gcc44.patch patch<br />
tar xvfj panomatic-0.9.4-src.tar.bz2<br />
cd panomatic-0.9.4<br />
patch -p 1 < ../panomatic_gcc44.patch<br />
./configure<br />
make<br />
sudo make install<br />
</pre><br />
<br />
To use Pano-o-matic, open Hugin<br />
<br />
* In File > Preferences > Autopano :<br />
* Select Autopano-SIFT<br />
* Check "Use alternative autopano-SIFT program"<br />
* Choose the path to the binary ( /usr/local/bin )<br />
* In Arguments, put : -o %o %i<br />
<br />
==== Pablo's variation ====<br />
<br />
Around the end of the year 2009, Pablo integrated a [http://groups.google.com/group/hugin-ptx/browse_thread/thread/d9c0558c679cad52 new] experimental descriptor based on the geometric blur and DAISY papers. Also, Pablo said that the algorithm is not really based on a published approach, just on some ideas that are mentioned in a few of them, and its currently simpler than any of them:<br />
<br />
o geometric blur: [http://www.eecs.berkeley.edu/~aberg/gb.html]<br />
<br />
o daisy: [http://cvlab.epfl.ch/~tola/daisy.html]<br />
<br />
o descriptor learning: [http://cvlab.epfl.ch/~brown/learndesc/learndesc.html]<br />
<br />
To build that version of panomatic instead, follow these instructions:<br />
<br />
This is current the subject of a GSoC 2010 project and may be available in future versions of Hugin.<br />
<br />
<pre><br />
sudo aptitude install libboost-python-dev bzr cmake libvigraimpex-dev<br />
</pre><br />
<br />
<pre><br />
bzr branch lp:~pablo.dangelo/hugin/panomatic-lib<br />
mkdir build<br />
cd build<br />
cmake ../panomatic-lib<br />
make<br />
sudo make install<br />
</pre><br />
<br />
To use the new descriptor the arguments for Hugin are: '''--sieve1size 100 --sieve2size 2 -o %o %i'''<br />
<br />
== ExifTool ==<br />
<br />
ExifTool is no longer mandatory for Hugin to work. It is used to pass metadata from the input to the output images during the stitching process. <br />
<br />
[http://www.sno.phy.queensu.ca/~phil/exiftool/ ExifTool] is a platform-independent Perl library plus a command-line application for reading, writing and editing meta information in image, audio and video files.<br />
<br />
Usually the version distributed with Ubuntu (8.15 in Ubuntu 10.10; 7.89 in Ubuntu 10.4) is good enough and you don't need to bother with the following instructions. However there were situations in the past and there might be situations in the future where the latest versions offer better support. These issues will occur most likely with specific camera brands/models and the most recent models. The following instructions are for those cases.<br />
<br />
<pre><br />
sudo apt-get purge libimage-exiftool-perl<br />
</pre><br />
<br />
<pre><br />
wget http://www.sno.phy.queensu.ca/~phil/exiftool/Image-ExifTool-8.50.tar.gz<br />
tar -xzf Image-ExifTool-8.50.tar.gz<br />
cd Image-ExifTool-8.50<br />
perl Makefile.PL<br />
make test<br />
sudo make install<br />
</pre><br />
<br />
== Pano Viewers ==<br />
<br />
=== PanoGLView ===<br />
<br />
PanoGLView is an OpenGL hardware accelerated interactive immersive viewer for equirectangular images.<br />
<br />
Pre-Requisites:<br />
<pre>sudo apt-get install wx-common libwxgtk2.8-dev libglew-dev</pre><br />
<br />
To build and install:<br />
<pre><br />
mkdir -p ~/src/panoglview<br />
cd ~/src/panoglview<br />
hg clone http://hugin.hg.sourceforge.net:8000/hgroot/hugin/panoglview panoglview.hg<br />
cd panoglview.hg<br />
hg update<br />
./bootstrap<br />
./configure<br />
make<br />
sudo make install<br />
</pre><br />
<br />
=== FreePV - DEPENDENCIES ARE BROKEN - FAILS TO BUILD ===<br />
<br />
Pre-Requisites:<br />
<pre><br />
sudo apt-get install cmake make pkg-config g++ mozilla-devscripts freeglut3-dev zlib1g-dev \<br />
libjpeg-dev libxext-dev libxmu-dev x11proto-xf86vidmode-dev libxxf86vm-dev libnspr4-dev \<br />
libxml2-dev libpng12-dev<br />
</pre><br />
To build<br />
<pre><br />
svn co https://freepv.svn.sourceforge.net/svnroot/freepv/freepv/trunk/ freepv<br />
cd freepv<br />
cmake .<br />
make<br />
sudo make install<br />
</pre><br />
<br />
=== Panini Perspective Tool ===<br />
<br />
Strictly speaking, Panini is more than just a viewer. It's a powerful tool to extract/transform views and can also be easily used as a viewer.<br />
<br />
Get dependencies:<br />
<pre><br />
sudo apt-get install qt4-qmake libqt4-dev zlib1g-dev<br />
</pre><br />
<br />
Get code:<br />
<pre><br />
mkdir -p ~/src/pvqt<br />
cd ~/src/pvqt<br />
svn co https://pvqt.svn.sourceforge.net/svnroot/pvqt pvqt.svn<br />
</pre><br />
<br />
Build:<br />
<pre><br />
cd pvqt.svn<br />
qmake panini.pro<br />
make<br />
</pre><br />
<br />
Install (brute force):<br />
<pre><br />
sudo cp Panini /usr/local/bin/ <br />
</pre><br />
<br />
Menu Entry for Kubuntu:<br />
<pre><br />
kmenuedit<br />
</pre><br />
<br />
in kmenuedit<br />
* navigate to Graphics<br />
** click on New Item<br />
** Enter "Panini" as Name<br />
** Enter "Perspective Tool" as Description<br />
** click on the empty icon and look for an icon (I used the akonadi one)<br />
** Enter "Panini" as Command<br />
** Click on Save button<br />
<br />
== Notes for Packagers ==<br />
<br />
=== Tarballs ===<br />
<br />
* to get an updated ChangeLog in Mercurial repositories (Hugin has it also in the cmake invocation, use '''-DUPDATE_CHANGELOG=1''')<br />
<pre><br />
hg log --follow --style=changelog <br />
</pre><br />
* to update the ChangeLog in SVN repositories (Panotools)<br />
<pre><br />
svn up<br />
svn2cl<br />
svn ci<br />
</pre><br />
<br />
=== Deb Packages ===<br />
<br />
The deb packages built by CMake (2.8.2) are broken by Debian standard. Please do not distribute them. There are official updated recent packages at the Hugin PPA mentioned above which include nightlies (produced every 24 hours) and stables (produced out of released tarballs). If you miss binaries for your series of Ubuntu and you have built them for yourself following the instructions above, considering moving up one level and contributing to the [[Hugin PPA]].<br />
<br />
[[Category:Software:Hugin]]<br />
[[Category:Software:Platform:Linux]]</div>Onomouhttps://wiki.panotools.org/index.php?title=Hugin_Compiling_Ubuntu&diff=13429Hugin Compiling Ubuntu2011-05-02T19:06:37Z<p>Onomou: /* What's New */ Added info about Mercurial update problem</p>
<hr />
<div>== Who Is This Page For ==<br />
<br />
These instructions contain the collective wisdom of Hugin contributors that are using Ubuntu or any of its variations (Ku/Xu/Lu/Edu/...buntu). They are work in progress and updated when newer versions of Ubuntu are released or when Hugin introduces new dependencies. They have worked, at the time of release or soon thereafter, with all 'buntu versions up until 10.10. They are intended to help contributors on the learning curve. If you are not here to contribute, spare yourself the effort and see the [[#Shortcut]] section below.<br />
<br />
They are likely to work only for the latest 'buntu release, but you can check this page's history at the time that the older 'buntu version was the most recent one to find the specifics for that version.<br />
<br />
If you are new here, read the whole page. It is recommended that you go sequentially through it.<br />
<br />
If you're familiar with the process and have run it a few time, look at the what's new section for important news.<br />
<br />
Apart from the odd change in package name, nothing should be substantially different (and if does not work, please leave a comment on the [http://groups.google.com/group/hugin-ptx hugin-ptx mailing list]). Don't worry if the same package appears twice in an apt-get install line - apt-get will update existing packages if there is a newer version, and ignore duplicates if the latest version is already installed. On the other hand, if apt-get says that it can't find a package, it might be the odd change in package name. You can find a replacement package by using apt-cache search with a substring of the package required, e.g.<br />
<pre>apt-cache search wxW<br />
</pre><br />
<br />
The goal is to build hugin and the whole set of helper applications required, and start understanding the building process. You will need deeper understanding of the building process if you want to:<br />
* develop code<br />
* translate the latest strings<br />
* document the latest features with manuals and tutorials<br />
* package for distribution<br />
That knowledge is out of scope for this document. This document ends with a binary that is fit for installation on your machine. It is not fit for any other purpose, particularly not for distribution. CMake is [http://groups.google.com/group/hugin-ptx/msg/3f29b207c562fd63 known] to build broken deb packages. Please do not distribute these binaries.<br />
<br />
== What's New ==<br />
'''2 May 2011''': If you are using an earlier version of Ubuntu than 11.04, there is a chance that your Mercurial version is too old for grabbing updates. New (non-critical security) updates to a program do not get added to old versions of Ubuntu, so any new changes will need to be added manually. When running Mercurial (pull, update, etc), you may get an error like<br />
<pre><br />
abort: requirement 'dotencode' not supported!<br />
</pre><br />
To fix this, you can use the package archive from Mercurial PPA Packagers and get the latest release:<br />
<pre><br />
sudo apt-add-repository ppa:mercurial-ppa/releases<br />
sudo apt-get update<br />
sudo apt-get install mercurial<br />
</pre><br />
<br />
'''5-March-2010''': Foreign library libtclap removed from source tree. This introduces a new dependency on libtclap-dev<br />
<br />
'''February 2010''': Libpano has migrated from SVN to Mercurial.<br />
<br />
'''CMake 2.8.2''', as packaged in Ubuntu 10.10, contains a bug (http://public.kitware.com/Bug/view.php?id=11020) the prevents the created debs to install successfully, due to it not storing needed directories in the deb package.<br />
Installing the resulting debs will fail with a message error saying something like<br />
<br />
<pre><br />
unable to create `/usr/local/share/hugin/xrc/data/redo.png.dpkg-new' (while processing `./usr/local/share/hugin/xrc/data/redo.png'): No such file or directory<br />
</pre><br />
<br />
Commands to create the necessary folders have been documented below and may be added to the CMake build in the repository of Hugin, Libpano, Enblend. However it is possible that the lists are incomplete. If you bump in the above message, the solution is to create the full missing path and run dpkg -i again, recursively adding folders until the install succeed.<br />
<br />
<pre><br />
sudo mkdir -p /usr/local/share/hugin/xrc/data/<br />
</pre><br />
<br />
Another workaround is, to partially rebuild the deb package by hand:<br />
<br />
<pre><br />
mkdir unpacked<br />
cd unpacked/<br />
ar x ../hugin.build/hugin-2010.2.0-Linux.deb<br />
mkdir untarred<br />
cd untarred<br />
tar xzf ../data.tar.gz<br />
tar czf ../data.tar.gz .<br />
cd ..<br />
ar r ../hugin-2010.2.0-Linux.deb debian-binary control.tar.gz data.tar.gz<br />
</pre><br />
<br />
== Shortcut ==<br />
<br />
Hugin evolves fast and the official 'buntu distributions carry versions that are usually 3-6 months older than the 'buntu distribution date. Moreover, they do not backport Hugin and related tools.<br />
<br />
Even if you follow religiously the 'buntu six months update cycle, you may be using a version of Hugin that is one or two release cycles in our past. If your sole objective is to use the new features of Hugin, the instructions in this section are for you. Start a command line terminal, type the three commands and you're done.<br />
<br />
If for some reason that's not enough for you - if you want to actually learn and become a contributor; or if you're just curious about getting even closer to the bleeding edge and trade stability for features and excitement, the rest of this document is for you.<br />
<br />
=== Stable ===<br />
<br />
This will install you the latest stable version of the tools:<br />
<pre><br />
sudo add-apt-repository ppa:hugin/hugin-builds<br />
sudo apt-get update<br />
sudo apt-get install hugin enblend autopano-sift-c panini<br />
</pre><br />
<br />
=== Unstable ===<br />
<br />
This will install you the latest unstable version of the tools that has been built as a binary. While they are likely to work in most cases, there is no guarantee and they are not recommended for production environment. Use at your own risk, and please report (and if possible fix) bugs. Most of the time these unstable builds are closer to the bleeding edge than to the stable builds. If you want the really really really bleeding edge, you'll have to work through the instructions in the next sections, though.<br />
<br />
<pre><br />
sudo add-apt-repository ppa:hugin/hugin-builds<br />
sudo add-apt-repository ppa:hugin/nightly<br />
sudo apt-get update<br />
sudo apt-get install hugin enblend autopano-sift-c panini<br />
</pre><br />
<br />
== Building Environment ==<br />
Since we are going to build hugin, libpano13 and enblend we need to download and install all the development packages. This is very easy with apt-get.<br />
In a terminal window (K menu -> System -> Konsole or Applications -> Accessories -> Terminal (in Kubuntu), Applications -> Accessories -> Terminal (in Ubuntu))<br />
<br />
<pre>sudo apt-get install build-essential autoconf automake1.9 libtool flex bison gdb libc6-dev libgcc1 \<br />
cmake<br />
</pre><br />
<br />
To get the bleeding edge we'll need access to the SVN and Mercurial repositories, and for this we need the correct tools:<br />
<br />
<pre><br />
sudo apt-get install subversion mercurial<br />
</pre><br />
<br />
Not necessary, but useful if you want to revisit configuration sets in ccmake<br />
<pre><br />
sudo apt-get install cmake-curses-gui<br />
</pre><br />
<br />
To get on the same page as far as file system layout is concerned, we'll create a folder to contain all source code in your home folder:<br />
<pre><br />
cd<br />
mkdir -p src<br />
</pre><br />
<br />
=== For Coders ===<br />
<br />
If you want to start to navigate, understand and modify the code, the doxygen generated documentation will be helpful to you.<br />
<br />
<pre><br />
sudo apt-get install doxygen graphviz<br />
</pre><br />
<br />
=== For Distributors ===<br />
<br />
If you want to build packages for distribution, you will also need the following tools and settings.<br />
<br />
<pre><br />
sudo apt-get install subversion-tools<br />
sudo echo 'deb-src ftp://ftp.at.debian.org/debian ../project/experimental main' > debian-experimental.list<br />
mv debian-experimental.list /etc/apt/sources.list.d/<br />
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 55BE302B<br />
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 8B8D7663<br />
sudo apt-get update<br />
sudo apt-get install devscripts<br />
</pre><br />
<br />
You will also need an OpenPGP key, and a Launchpad account. Follow the [[Hugin_Trackers#Launchpad_Account|instructions]] for Launchpad account creation, including the signing of the Ubuntu Code of Conduct.<br />
<br />
Moreover, it is likely that your environment is not clean enough for distribution builds. In that case, and to produce binaries for other Ubuntu series than the one you are running, you will want to set up a dchroot environment (to be documented later on).<br />
<br />
== Building Enblend ==<br />
<br />
Get the dependencies. If you are working with large images (300 megapixels and up), you should have a libtiff-devel compiled with large file support and libstdc++6.<br />
<br />
<pre><br />
sudo apt-get install pkg-config libtiff4-dev libboost-graph-dev libboost-thread-dev \<br />
libboost-filesystem-dev liblcms1-dev libglew1.5-dev libplot-dev libglut3-dev libopenexr-dev \<br />
libxi-dev libxmu-dev help2man libplot-dev liblcms1-dev libboost-system-dev<br />
</pre><br />
<br />
If you also want to build the documentation, add the following dependencies, and add "-DDOC=ON" to the cmake command below. (Be warned, however, that this will drag in over 700MB of additional dependencies. Unless you have a pressing need to build the documentation yourself, you can save yourself some time and disk space by downloading the PDF docs from http://enblend.sourceforge.net .)<br />
<br />
<pre><br />
sudo apt-get install texi2html texinfo fig2ps tidy gnuplot libxml-xpath-perl imagemagick<br />
</pre><br />
<br />
Once all dependencies are in place, get the code. The official repository has migrated from CVS to Mercurial:<br />
<br />
<pre><br />
mkdir -p ~/src/enblend<br />
cd ~/src/enblend<br />
hg clone http://enblend.hg.sourceforge.net:8000/hgroot/enblend/enblend enblend.hg<br />
</pre><br />
<br />
If you already have checked out enblend, to update the code to the latest version you need to run:<br />
<pre><br />
cd enblend.hg<br />
hg pull<br />
hg update<br />
cd ..<br />
</pre><br />
<br />
Then create a build directory and build in there. And install the Package.<br />
<br />
The options below are good for modern multi-core computers. For a single core, you may be better off setting ENABLE_OPENMP to OFF and ENABLE_IMAGECACHE to ON. The two options are mutually exclusive.<br />
<pre><br />
mkdir enblend.build<br />
cd enblend.build<br />
cmake ../enblend.hg -DENABLE_GPU:BOOL=ON -DENABLE_IMAGECACHE:BOOL=OFF -DENABLE_OPENMP:BOOL=ON \<br />
-DCPACK_BINARY_DEB:BOOL=ON -DCPACK_BINARY_NSIS:BOOL=OFF -DCPACK_BINARY_RPM:BOOL=OFF \<br />
-DCPACK_BINARY_STGZ:BOOL=OFF -DCPACK_BINARY_TBZ2:BOOL=OFF -DCPACK_BINARY_TGZ:BOOL=OFF \<br />
-DCPACK_BINARY_TZ:BOOL=OFF -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX:PATH=/usr/local<br />
make package<br />
sudo dpkg -i enblend-4.1.1-Linux.deb<br />
</pre><br />
<br />
If the install quits with an error, it is likely because of missing folders. Run the following commands and retry:<br />
<pre><br />
sudo mkdir -p /usr/local/share/man/man1<br />
sudo mkdir -p /usr/local/bin<br />
</pre><br />
<br />
===The old autotools way===<br />
We are then ready to compile. The CXXFLAGS <tt>--param inline-unit-growth=60</tt> is a workaround for x86_64 systems, Feb 2009, and apparently no longer needed (set by default). If you have an SMP machine and you're building a recent version, <tt>--disable-image-cache</tt> and <tt>--enable-openmp</tt> will speed up enblend/enfuse massively but may cause segmentation faults; in that case you will be better off with <tt>--enable-image-cache</tt> and <tt>--disable-openmp.</tt> <tt>-march=native</tt> is also beneficial and -O2 is better than -O3.<br />
<br />
<pre><br />
make --makefile=Makefile.scm<br />
mkdir BUILD<br />
cd BUILD<br />
CXXFLAGS="--param inline-unit-growth=60 -march=native -O2" ../configure --disable-image-cache \<br />
--enable-openmp<br />
make<br />
</pre><br />
<br />
The second make step can be very long and memory consuming. Make sure you have enough swap space, and go get a healthy snack while the computer is compiling.<br />
<br />
If you encounter problems at any of these stages, please report back to the hugin-ptx mailing list. Report what command in the sequence you were executing, what machine/operating system, the revision checked out from CVS, and all other relevant information.<br />
<br />
You are then ready to install with<br />
<pre><br />
sudo make install<br />
</pre><br />
<br />
== Building Libpano13 ==<br />
<br />
libpano13 is the new version of the PanoTools libraries. This is a necessary component for hugin, and we need to build it first.<br />
To build libpano13 we need some libraries and particularly their <code>dev</code> package:<br />
<br />
<pre>sudo apt-get install zlib1g zlib1g-dev libpng12-dev libjpeg62-dev libtiff4-dev cmake</pre><br />
<br />
On older distributions, zlib1g and zlib1g-dev may not be found. In that case, the same library may be available with the names lib64z1 and lib64z1-dev.<br />
<br />
We then need to download the source code from the central repository:<br />
<br />
<pre><br />
mkdir -p ~/src/libpano<br />
cd ~/src/libpano<br />
hg clone http://panotools.hg.sourceforge.net:8000/hgroot/panotools/libpano libpano.hg<br />
</pre><br />
<br />
If you're a contributor with write access, use the following clone command instead:<br />
<pre><br />
hg clone ssh://${USER}@panotools.hg.sourceforge.net/hgroot/panotools/panotools/libpano libpano.hg<br />
</pre><br />
<br />
In the future there is no need to get the whole source again. Just issue the following commands to bring your source up to date:<br />
<pre><br />
cd libpano.hg<br />
hg pull<br />
hg up<br />
cd ..<br />
</pre><br />
<br />
Now start the building process.<br />
<br />
<pre><br />
mkdir libpano.build<br />
cd libpano.build<br />
cmake ../libpano.hg -DCMAKE_INSTALL_PREFIX=/usr/local -DCPACK_BINARY_DEB:BOOL=ON \<br />
-DCPACK_BINARY_NSIS:BOOL=OFF -DCPACK_BINARY_RPM:BOOL=OFF -DCPACK_BINARY_STGZ:BOOL=OFF \<br />
-DCPACK_BINARY_TBZ2:BOOL=OFF -DCPACK_BINARY_TGZ:BOOL=OFF -DCPACK_BINARY_TZ:BOOL=OFF \<br />
-DCMAKE_BUILD_TYPE=RelWithDebInfo<br />
make package<br />
sudo dpkg -i libpano13-*-Linux.deb<br />
</pre><br />
<br />
Set -DCMAKE_BUILD_TYPE=Debug if you want to help investigate/debug a problem and capture even more debugging information.<br />
<br />
If the install quits with an error, it is likely because of missing folders. Run the following commands and retry:<br />
<pre><br />
sudo mkdir -p /usr/local/include/pano13/<br />
sudo mkdir -p /usr/local/include/pano13/doc<br />
sudo mkdir -p /usr/local/lib/pkgconfig<br />
sudo mkdir -p /usr/local/share/man/man1<br />
sudo mkdir -p /usr/local/bin<br />
</pre><br />
<br />
=== The old autotools way ===<br />
<br />
The above described building process uses CMake to build libpano which has many advantages. Amongst others it creates a clean package to install / deinstall and decreases the likelihood of wrecking the system. However CMake support is relatively new in libpano. The old autotools way is documented below for completeness. You should not need it. However if you do, make sure to run either the CMake build or the autotools build on fresh repository checkouts to avoid interferences.<br />
<br />
<pre><br />
./bootstrap<br />
</pre><br />
<br />
If any libraries are missing, the script will complain (or at least, let you know that some library hasn't been found). In that case you probably need to install the library. To find in what package is that library, a general rule is to run the command <code>apt-cache search ''missingfile''</code>, find the relevant library and install both the library and the related <code>-dev</code> package.<br />
Run the <code>./configure</code> script and repeat this process until you have met all the dependencies.<br />
<br />
Then we are ready to launch the make process with<br />
<pre>make</pre><br />
<br />
If the library successfully compiles, you have to install it with<br />
<pre>sudo make install<br />
sudo ldconfig</pre><br />
The last part is for the OS to be aware of the new library (that has been installed in <code>/usr/local/lib</code>).<br />
We can now go back up one folder level and get ready for hugin.<br />
<pre>cd ..</pre><br />
<br />
== Building Hugin ==<br />
<br />
=== Dependencies ===<br />
<br />
First we need to activate the <code>universe</code> repository (in adept package manager, or by editing the /etc/apt/sources.lst file for example) and get the dependencies.<br />
<br />
The following command will install on your system all build time dependencies except libpano13.<br />
<pre><br />
sudo apt-get install libwxgtk2.8-dev libtiff4-dev libpng12-dev \<br />
libopenexr-dev libexiv2-dev libglut3-dev libglew-dev libboost-dev \<br />
boost-build libboost-thread-dev libboost-graph-dev libboost-regex-dev \<br />
libboost-iostreams-dev libboost-filesystem-dev gettext liblapack-dev \<br />
libxi-dev libxmu-dev libboost-signals-dev libboost-system-dev \<br />
libtclap-dev<br />
</pre><br />
<br />
You could install libpano13 on your system with the command below. However it is likely to be a version of libpano13 that is too old for the current Hugin. It is recommended that you first build your own libpano13 (above). Alternatively, there may be a recent enough version of libpano13 in the Hugin PPA.<br />
<pre><br />
sudo apt-get install libpano13-dev<br />
</pre><br />
<br />
wxWidgets is a critical dependency for the Hugin GUI. In the official Ubuntu repositories it is usually at least a few releases behind the current release, and in some cases many releases behind. The wxWidgets project provides alternative [http://wiki.wxpython.org/InstallingOnUbuntuOrDebian repositories] with newer versions, as well as a [http://wiki.wxpython.org/BuildingDebianPackages instructions] to build binary packages of the most recent releases. Newer versions of wxWidgets are not (yet) absolutely necessary, but since eventually things evolve they are useful for development, testing, and in general should give a better user interface experience as wxWidgets improves over time.<br />
<br />
The following are run-time dependencies. Strictly speaking you don't need them to build Hugin, but you will need them to use it. You don't need this line if you follow the instructions on this page to build ExifTool, Enblend, Autopano-SIFT-C.<br />
<pre><br />
sudo apt-get install libimage-exiftool-perl enblend autopano-sift-c<br />
</pre><br />
<br />
If you want to use the Python scripting tools, you will also need the following dependencies at runtime.<br />
<br />
<pre><br />
sudo apt-get install python-argparse<br />
</pre><br />
<br />
=== Fetch the Source Code with Mercurial ===<br />
<br />
If you already have a repository clone, you only need to pull the latest changes and update the code with:<br />
<pre><br />
cd ~/src/hugin/hugin.hg<br />
hg pull<br />
hg update<br />
</pre><br />
<br />
Otherwise, you need to clone the repository and decide which version/branch to build with:<br />
<pre><br />
mkdir -p ~/src/hugin<br />
cd ~/src/hugin<br />
hg clone http://hugin.hg.sourceforge.net:8000/hgroot/hugin/hugin hugin.hg<br />
cd hugin.hg<br />
hg branches<br />
</pre><br />
<br />
If you are a contributor with write access, you can use<br />
<pre><br />
hg clone ssh://${USER}@hugin.hg.sourceforge.net/hgroot/hugin/hugin hugin.hg<br />
</pre><br />
<br />
The `hg branches` command will list all available branches. If you decide, e.g., to build the 2010.0 branch, you will update to it with:<br />
<pre><br />
hg update -C 2010.0 <br />
</pre><br />
<br />
=== Advanced Use - Multiple Source Trees ===<br />
<br />
You may want to build multiple versions of Hugin on your machine at the same time, e.g. when you want to build side by side a stable version for your productivity and a development version to give feedback to the developers. In that case, you will clone the Mercurial repository that is already on your drive and update from it a source tree to a different branch. Mercurial takes care of details such as optimizing disk usage. The commands for this are:<br />
<br />
<pre><br />
cd ..<br />
hg clone hugin.hg another_hugin<br />
cd another_hugin<br />
hg update -C default<br />
</pre><br />
<br />
You can have as many "another_hugin" folders as you want. Just make sure, when pulling the latest updates from SourceForge, to first pull your main repository (the one you cloned from http://hugin.hg.sourceforge.net:8000/hgroot/hugin/hugin. Then pull all others:<br />
<pre><br />
cd ~/src/hugin/hugin.hg<br />
hg pull<br />
hg update<br />
cd ../another_hugin<br />
hg pull<br />
hg update<br />
</pre><br />
<br />
Reference: [http://groups.google.com/group/hugin-ptx/msg/1ce824dd1364e9be]<br />
<br />
=== Configure the Build Environment ===<br />
<br />
'''Rule:''' You always want to build outside of the source tree to keep the source tree clean. And to avoid confusion, if you have multiple source trees it is preferable to build for each of them in a separate build folder.<br />
<br />
Next we set up the build environment using cmake.<br />
<br />
If you compiled and installed libpano to a non standard location set the variables CMAKE_INCLUDE_PATH and CMAKE_LIBRARY_PATH to point to your install location's include and lib directories.<br />
<br />
If you are building for distribution, you want to set CMAKE_INSTALL_PREFIX=/usr<br />
<br />
<pre><br />
cd ~/src/hugin<br />
mkdir hugin.hg-build<br />
cd hugin.hg-build<br />
cmake ../hugin.hg -DENABLE_LAPACK=YES -DCPACK_BINARY_DEB:BOOL=ON -DCPACK_BINARY_NSIS:BOOL=OFF \<br />
-DCPACK_BINARY_RPM:BOOL=OFF -DCPACK_BINARY_STGZ:BOOL=OFF -DCPACK_BINARY_TBZ2:BOOL=OFF \<br />
-DCPACK_BINARY_TGZ:BOOL=OFF -DCPACK_BINARY_TZ:BOOL=OFF -DCMAKE_BUILD_TYPE=RelWithDebInfo<br />
</pre><br />
<br />
Set -DCMAKE_BUILD_TYPE=Debug if you want to help investigate/debug a problem and capture even more debugging information, however Hugin will be slower and may not work as expected. Don't use a Debug build for production.<br />
<br />
=== Build and Install ===<br />
<br />
Finally, we use make to build the code and package it, and dpkg to install it. Look for the version number in the .deb file created and edit the lines below accordingly: <br />
<br />
<pre><br />
make package<br />
sudo dpkg -i hugin-*-Linux.deb<br />
sudo ldconfig<br />
</pre><br />
<br />
If the install quits with an error, it is likely because of missing folders. Run the following commands and retry: <br />
<pre><br />
sudo mkdir -p /usr/local/share/pixmaps<br />
sudo mkdir -p /usr/local/share/mime/packages<br />
sudo mkdir -p /usr/local/share/applications/<br />
sudo mkdir -p /usr/local/share/icons/gnome/48x48/mimetypes/<br />
sudo mkdir -p /usr/local/share/locale/en_GB/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/es_la/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/fr/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/zh_TW/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/ru/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/ro/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/bg/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/de/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/ko/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/pt_BR/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/zh_CN/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/ja/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/it/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/sl/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/sk/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/sv/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/ca_ES/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/nl/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/fi/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/cs_CZ/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/uk/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/es/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/pl/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/hu/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/es_VE/LC_MESSAGES<br />
sudo mkdir -p /usr/local/share/hugin/xrc/data/help_it_IT<br />
sudo mkdir -p /usr/local/share/hugin/xrc/data/help_en_EN<br />
sudo mkdir -p /usr/local/share/hugin/data/<br />
sudo mkdir -p /usr/local/lib/hugin<br />
sudo mkdir -p /usr/local/share/man/man1<br />
</pre><br />
<br />
'''Important:''' the package does not track dependencies yet, so it likely to fail on machines others than yours.<br />
<br />
Reference: [http://theseblog.free.fr/2007/10/building-hugin-in-ubuntu-feisty-fawn.php]<br />
<br />
=== Dive into the Code ===<br />
<br />
From time to time the API reference is published on the Hugin website, however you are better off with a local copy. To generate it, issue the following commands:<br />
<pre><br />
cd ~/src/hugin/hugin.hg/src<br />
doxygen Doxyfile<br />
</pre><br />
<br />
The documentation is generated in ~/src/hugin/hugin.hg/src/hugin/html<br />
<br />
Point your browser to index.html inside that folder and you have access to all available information. If you find that a class, a function, or anything else is not properly documented; and if you delve into the source code to understand it, kindly add documentation to the code so that the next person in your situation can use your experience as a stepping stone. Thank you!<br />
<br />
== Automatic Control Point Detectors ==<br />
<br />
=== Autopano-sift-C ===<br />
<br />
Pre-Requisites:<br />
<pre><br />
sudo apt-get install libxml2-dev<br />
</pre><br />
<br />
To build<br />
<br />
(Note February 2011: The latest source code of autopano-sift-C has been unstable for a long time now and nobody is working to fix it. Use the 2.5.1 release tarball instead)<br />
<br />
<pre><br />
mkdir -p ~/src/apsc<br />
cd ~/src/apsc<br />
hg clone http://hugin.hg.sourceforge.net:8000/hgroot/hugin/autopano-sift-C apsc.hg<br />
cd apsc.hg<br />
hg branches<br />
hg update -C 2.5.1<br />
cd ..<br />
mkdir apsc.hg.build<br />
cd apsc.hg.build<br />
cmake ../apsc.hg -DCMAKE_INSTALL_PREFIX=/usr/local -DCPACK_BINARY_DEB:BOOL=ON \<br />
-DCPACK_BINARY_NSIS:BOOL=OFF -DCPACK_BINARY_RPM:BOOL=OFF -DCPACK_BINARY_STGZ:BOOL=OFF \<br />
-DCPACK_BINARY_TBZ2:BOOL=OFF -DCPACK_BINARY_TGZ:BOOL=OFF -DCPACK_BINARY_TZ:BOOL=OFF \<br />
-DCMAKE_BUILD_TYPE=Debug<br />
make package<br />
sudo dpkg -i autopano-sift-C-*-Linux.deb<br />
</pre><br />
<br />
=== Match-n-shift ===<br />
<br />
Match-n-shift is yet an other Autopano-SIFT replacement. It comes in a bundle with pto file manipulation perl libraries and a rich selection of other tools that use nona, enblend, ImageMagick among other things. To use match-n-shift, you need to install at least the [http://search.cpan.org/dist/Panotools-Script/ Panotools::Script] library and some other perl modules. It requires:<br />
<br />
* Image::Size 2.9<br />
* Storable 2.0<br />
* Image::ExifTool 6<br />
<br />
Chances are that you do not need to update Storable which is a standard perl module. To check the version of installed versions of these modules, write these lines to the command prompt:<br />
<br />
perl -MStorable -le 'print Storable->VERSION;'<br />
perl -MImage::Size -le 'print Image::Size->VERSION;'<br />
perl -MImage::ExifTool -le 'print Image::ExifTool->VERSION;'<br />
<br />
There are various ways to install or upgrade these modules. Ubuntu has binary packages for many perl modules, you can skip the CPAN installation below and type:<br />
<br />
sudo apt-get install libimage-size-perl libimage-exiftool-perl<br />
<br />
Alternatively, perl is an interpreted language and these modules are pure perl, so installing from source is an easy thing.<br />
<br />
The best place to install perl modules is directly from a CPAN archive. CPAN is short for Comprehensive Perl Archive Network. The program to interact with CPAN comes with all perl installations. Start it by running:<br />
<br />
sudo cpan<br />
<br />
If this is your first time running the program you will be asked a number of questions (you can safely accept the suggested values). Last question lets you select a number of CPAN mirrors nearest to you.<br />
<br />
When all is done, you can enter the install commands after the 'cpan>' prompt:<br />
<br />
install Image::Size Storable Image::ExifTool<br />
<br />
Answer 'y' to any question of dependencies and wait for install to complete. 'exit' leaves the cpan shell.<br />
<br />
Next, you need to retrieve and install the Panotools-Script collection<br />
of perl libraries (Panotools::Script) and programs that use them -<br />
including match-n-shift:<br />
<br />
svn co https://panotools.svn.sourceforge.net/svnroot/panotools/trunk/Panotools-Script Panotools-Script<br />
cd Panotools-Script<br />
perl Makefile.PL<br />
make<br />
make test<br />
sudo make install<br />
<br />
Just to confuse you, you can also ignore everything above and just install Panotools::Script and all its dependencies from CPAN. From command line, type:<br />
<br />
sudo cpan Panotools::Script<br />
<br />
You can run match-n-shift from command line using the same parameters as autopano-c-complete.sh or you can modify hugin to run it for you:<br />
<br />
* start Hugin<br />
* navigate the menu File to Preferences<br />
* In the Preferences window, open the Autopano tab<br />
* Select Autopano -> Autopano-SIFT<br />
* tick the checkbox for Use alternative Autopano-SIFT program<br />
* enter the full path to match-n-shift (/usr/local/bin/match-n-shift) in the Autopano-SIFT field<br />
* enter the following string in the Arguments field:<br />
-f %f -v %v -c -p %p -o %o %i<br />
<br />
=== MatchPoint ===<br />
<br />
MatchPoint is a next generation CP generator. The result of a GSoC2007 project, it is still very experimental. Experience reports needed. Read more [http://groups.google.com/group/hugin-ptx/browse_thread/thread/cba2b2ce94dd9054 here]<br />
<br />
Matchpoint is now located inside the main hugin source tree, no need to checkout separately. It is compiled together with hugin, but not installed by default.<br />
<br />
* copy the MatchPoint executable into /usr/local/bin manually<br />
<pre><br />
cd ~/src/hugin/hugin.hg-build<br />
sudo cp src/matchpoint/matchpoint /usr/local/bin/<br />
</pre><br />
* edit /usr/local/bin/autopano-c-complete.sh (do it with sudo to have the necessary permission)<br />
** line 79: replace the .key.gz extension with .key (not sure if matchpoint supports compression)<br />
** lines 83 and 88: replace '''generatekeys "$arg" $FILENAME $SIZE''' with '''matchpoint "$arg" $FILENAME''' (not sure if the size option or any other options of the original generatekeys are applicable)<br />
<br />
=== Pan-o-matic ===<br />
<br />
Yet another control point generator [http://aorlinsk2.free.fr/panomatic/?p=home Home Page]<br />
<br />
<pre>sudo apt-get install libboost-dev</pre><br />
<br />
Download [http://aorlinsk2.free.fr/panomatic/download.php?d=7&v=0.9.4 Panomatic 0.9.4 bz2] and if you're on Ubuntu 9.10 or newer also the [http://aorlinsk2.free.fr/panomatic/panomatic_gcc44.patch patch] for the gcc4.4 compiler.<br />
<br />
<pre><br />
mkdir -p ~/src/panomatic<br />
cd ~/src/panomatic<br />
wget "http://aorlinsk2.free.fr/panomatic/download.php?d=7&v=0.9.4" -O panomatic-0.9.4-src.tar.bz2<br />
wget http://aorlinsk2.free.fr/panomatic/panomatic_gcc44.patch patch<br />
tar xvfj panomatic-0.9.4-src.tar.bz2<br />
cd panomatic-0.9.4<br />
patch -p 1 < ../panomatic_gcc44.patch<br />
./configure<br />
make<br />
sudo make install<br />
</pre><br />
<br />
To use Pano-o-matic, open Hugin<br />
<br />
* In File > Preferences > Autopano :<br />
* Select Autopano-SIFT<br />
* Check "Use alternative autopano-SIFT program"<br />
* Choose the path to the binary ( /usr/local/bin )<br />
* In Arguments, put : -o %o %i<br />
<br />
==== Pablo's variation ====<br />
<br />
Around the end of the year 2009, Pablo integrated a [http://groups.google.com/group/hugin-ptx/browse_thread/thread/d9c0558c679cad52 new] experimental descriptor based on the geometric blur and DAISY papers. Also, Pablo said that the algorithm is not really based on a published approach, just on some ideas that are mentioned in a few of them, and its currently simpler than any of them:<br />
<br />
o geometric blur: [http://www.eecs.berkeley.edu/~aberg/gb.html]<br />
<br />
o daisy: [http://cvlab.epfl.ch/~tola/daisy.html]<br />
<br />
o descriptor learning: [http://cvlab.epfl.ch/~brown/learndesc/learndesc.html]<br />
<br />
To build that version of panomatic instead, follow these instructions:<br />
<br />
This is current the subject of a GSoC 2010 project and may be available in future versions of Hugin.<br />
<br />
<pre><br />
sudo aptitude install libboost-python-dev bzr cmake libvigraimpex-dev<br />
</pre><br />
<br />
<pre><br />
bzr branch lp:~pablo.dangelo/hugin/panomatic-lib<br />
mkdir build<br />
cd build<br />
cmake ../panomatic-lib<br />
make<br />
sudo make install<br />
</pre><br />
<br />
To use the new descriptor the arguments for Hugin are: '''--sieve1size 100 --sieve2size 2 -o %o %i'''<br />
<br />
== ExifTool ==<br />
<br />
ExifTool is no longer mandatory for Hugin to work. It is used to pass metadata from the input to the output images during the stitching process. <br />
<br />
[http://www.sno.phy.queensu.ca/~phil/exiftool/ ExifTool] is a platform-independent Perl library plus a command-line application for reading, writing and editing meta information in image, audio and video files.<br />
<br />
Usually the version distributed with Ubuntu (8.15 in Ubuntu 10.10; 7.89 in Ubuntu 10.4) is good enough and you don't need to bother with the following instructions. However there were situations in the past and there might be situations in the future where the latest versions offer better support. These issues will occur most likely with specific camera brands/models and the most recent models. The following instructions are for those cases.<br />
<br />
<pre><br />
sudo apt-get purge libimage-exiftool-perl<br />
</pre><br />
<br />
<pre><br />
wget http://www.sno.phy.queensu.ca/~phil/exiftool/Image-ExifTool-8.50.tar.gz<br />
tar -xzf Image-ExifTool-8.50.tar.gz<br />
cd Image-ExifTool-8.50<br />
perl Makefile.PL<br />
make test<br />
sudo make install<br />
</pre><br />
<br />
== Pano Viewers ==<br />
<br />
=== PanoGLView ===<br />
<br />
PanoGLView is an OpenGL hardware accelerated interactive immersive viewer for equirectangular images.<br />
<br />
Pre-Requisites:<br />
<pre>sudo apt-get install wx-common libwxgtk2.8-dev libglew-dev</pre><br />
<br />
To build and install:<br />
<pre><br />
mkdir -p ~/src/panoglview<br />
cd ~/src/panoglview<br />
hg clone http://hugin.hg.sourceforge.net:8000/hgroot/hugin/panoglview panoglview.hg<br />
cd panoglview.hg<br />
hg update<br />
./bootstrap<br />
./configure<br />
make<br />
sudo make install<br />
</pre><br />
<br />
=== FreePV - DEPENDENCIES ARE BROKEN - FAILS TO BUILD ===<br />
<br />
Pre-Requisites:<br />
<pre><br />
sudo apt-get install cmake make pkg-config g++ mozilla-devscripts freeglut3-dev zlib1g-dev \<br />
libjpeg-dev libxext-dev libxmu-dev x11proto-xf86vidmode-dev libxxf86vm-dev libnspr4-dev \<br />
libxml2-dev libpng12-dev<br />
</pre><br />
To build<br />
<pre><br />
svn co https://freepv.svn.sourceforge.net/svnroot/freepv/freepv/trunk/ freepv<br />
cd freepv<br />
cmake .<br />
make<br />
sudo make install<br />
</pre><br />
<br />
=== Panini Perspective Tool ===<br />
<br />
Strictly speaking, Panini is more than just a viewer. It's a powerful tool to extract/transform views and can also be easily used as a viewer.<br />
<br />
Get dependencies:<br />
<pre><br />
sudo apt-get install qt4-qmake libqt4-dev zlib1g-dev<br />
</pre><br />
<br />
Get code:<br />
<pre><br />
mkdir -p ~/src/pvqt<br />
cd ~/src/pvqt<br />
svn co https://pvqt.svn.sourceforge.net/svnroot/pvqt pvqt.svn<br />
</pre><br />
<br />
Build:<br />
<pre><br />
cd pvqt.svn<br />
qmake panini.pro<br />
make<br />
</pre><br />
<br />
Install (brute force):<br />
<pre><br />
sudo cp Panini /usr/local/bin/ <br />
</pre><br />
<br />
Menu Entry for Kubuntu:<br />
<pre><br />
kmenuedit<br />
</pre><br />
<br />
in kmenuedit<br />
* navigate to Graphics<br />
** click on New Item<br />
** Enter "Panini" as Name<br />
** Enter "Perspective Tool" as Description<br />
** click on the empty icon and look for an icon (I used the akonadi one)<br />
** Enter "Panini" as Command<br />
** Click on Save button<br />
<br />
== Notes for Packagers ==<br />
<br />
=== Tarballs ===<br />
<br />
* to get an updated ChangeLog in Mercurial repositories (Hugin has it also in the cmake invocation, use '''-DUPDATE_CHANGELOG=1''')<br />
<pre><br />
hg log --follow --style=changelog <br />
</pre><br />
* to update the ChangeLog in SVN repositories (Panotools)<br />
<pre><br />
svn up<br />
svn2cl<br />
svn ci<br />
</pre><br />
<br />
=== Deb Packages ===<br />
<br />
The deb packages built by CMake (2.8.2) are broken by Debian standard. Please do not distribute them. There are official updated recent packages at the Hugin PPA mentioned above which include nightlies (produced every 24 hours) and stables (produced out of released tarballs). If you miss binaries for your series of Ubuntu and you have built them for yourself following the instructions above, considering moving up one level and contributing to the [[Hugin PPA]].<br />
<br />
[[Category:Software:Hugin]]<br />
[[Category:Software:Platform:Linux]]</div>Onomouhttps://wiki.panotools.org/index.php?title=Talk:Hugin_Compiling_Ubuntu&diff=13428Talk:Hugin Compiling Ubuntu2011-05-02T18:31:52Z<p>Onomou: /* Folder naming convention to build */</p>
<hr />
<div>== enblend build ==<br />
<br />
I just added the -DCMAKE_INSTALL_PREFIX... to the enblend build instructions. This to make it<br />
easier to find how to change it if you don't want the default. -- [[User:Rew|Rew]] 15:42, 5 February 2011 (UTC)<br />
<br />
== older stuff ==<br />
<br />
In paragraph:<br />
<br />
''In ubuntu 7.10 AMD64, replace lib64z1 and lib64z1-dev with zlib1g and zlib1g-dev in the above command. COULD SOMEBODY PLEASE DOUBLE-CHECK?<br />
''<br />
You probably meant "In 32bit ubuntu 7.10 systems, ..." And yes, I this works. [[User:Heikki|Heikki]] 12:10, 4 February 2008 (CET)<br />
<br />
<br />
This page being about the bleeding edge versioning system installation, it would be useful to note that enfuse adds one more dependency to hugin: exiftools. You need to run <code>sudo apt-get install libimage-exiftool-perl </code> before running it. Personally, I think exiftools is not a good choice for this. Use something that is smaller and more focused to just copying the EXIF data over. Why not use jhead that is already part of hugin distribution? [[User:Heikki|Heikki]] 12:18, 4 February 2008 (CET)<br />
<br />
== Folder naming convention to build ==<br />
<br />
I noticed libpano now uses cmake.<br />
cd build.libpano was missing. Fixed it.<br />
Wouldn't it better to use the same naming convention for hugin, like suggesting to create a build.hugin instead of hugin-build? <br />
[[User:Esby|esby]] 22:31, 3 October 2009 (UTC)<br />
<br />
Looking through the steps today, I noticed the same sort of thing - in the libpano and enblend steps, the folder structure is libpano.hg and libpano.build (etc.) whereas for hugin we have hugin.hg and hugin.hg-build. Is it okay to rename our build directory for hugin to hugin.build?<br />
--[[User:Onomou|Onomou]] 18:31, 2 May 2011 (UTC)<br />
<br />
== Error executing hugin ==<br />
<br />
I'm using ubuntu 9.10, and after compiling and installing hugin, when I try executing it I get:<br />
<br />
<code><br />
$ hugin<br><br />
hugin: error while loading shared libraries: libhuginbase.so.0.0: cannot open shared object file: No such file or directory<br><br />
$ which hugin<br><br />
/usr/local/bin/hugin<br />
</code><br />
<br />
The deb package installs everything in /usr/local, and libhuginbase.so.0.0 is in /usr/local/lib/.<br />
<br />
What am I wrong in? [[User:DonPaolo|donPaolo]] 22:01, 1 January 2010 (UTC)<br />
<br />
'''Hello,''' <br />
<br />
Try to do this:<br />
<br />
<code><br />
$ sudo ldconfig<br />
<br />
worked for me, and maybe it could be interesting to add that to the wiki --[[User:Lepuma|Lepuma]] 23:25, 19 October 2010 (UTC)<br />
<br />
== autotools ==<br />
<br />
If autotools is not being used anymore, could we drop it from the compile list?</div>Onomouhttps://wiki.panotools.org/index.php?title=Hugin_Compiling_Ubuntu&diff=13427Hugin Compiling Ubuntu2011-05-02T18:27:30Z<p>Onomou: /* Fetch the Source Code with Mercurial */ Better grammar</p>
<hr />
<div>== Who Is This Page For ==<br />
<br />
These instructions contain the collective wisdom of Hugin contributors that are using Ubuntu or any of its variations (Ku/Xu/Lu/Edu/...buntu). They are work in progress and updated when newer versions of Ubuntu are released or when Hugin introduces new dependencies. They have worked, at the time of release or soon thereafter, with all 'buntu versions up until 10.10. They are intended to help contributors on the learning curve. If you are not here to contribute, spare yourself the effort and see the [[#Shortcut]] section below.<br />
<br />
They are likely to work only for the latest 'buntu release, but you can check this page's history at the time that the older 'buntu version was the most recent one to find the specifics for that version.<br />
<br />
If you are new here, read the whole page. It is recommended that you go sequentially through it.<br />
<br />
If you're familiar with the process and have run it a few time, look at the what's new section for important news.<br />
<br />
Apart from the odd change in package name, nothing should be substantially different (and if does not work, please leave a comment on the [http://groups.google.com/group/hugin-ptx hugin-ptx mailing list]). Don't worry if the same package appears twice in an apt-get install line - apt-get will update existing packages if there is a newer version, and ignore duplicates if the latest version is already installed. On the other hand, if apt-get says that it can't find a package, it might be the odd change in package name. You can find a replacement package by using apt-cache search with a substring of the package required, e.g.<br />
<pre>apt-cache search wxW<br />
</pre><br />
<br />
The goal is to build hugin and the whole set of helper applications required, and start understanding the building process. You will need deeper understanding of the building process if you want to:<br />
* develop code<br />
* translate the latest strings<br />
* document the latest features with manuals and tutorials<br />
* package for distribution<br />
That knowledge is out of scope for this document. This document ends with a binary that is fit for installation on your machine. It is not fit for any other purpose, particularly not for distribution. CMake is [http://groups.google.com/group/hugin-ptx/msg/3f29b207c562fd63 known] to build broken deb packages. Please do not distribute these binaries.<br />
<br />
== What's New ==<br />
<br />
'''5-March-2010''': Foreign library libtclap removed from source tree. This introduces a new dependency on libtclap-dev<br />
<br />
'''February 2010''': Libpano has migrated from SVN to Mercurial.<br />
<br />
'''CMake 2.8.2''', as packaged in Ubuntu 10.10, contains a bug (http://public.kitware.com/Bug/view.php?id=11020) the prevents the created debs to install successfully, due to it not storing needed directories in the deb package.<br />
Installing the resulting debs will fail with a message error saying something like<br />
<br />
<pre><br />
unable to create `/usr/local/share/hugin/xrc/data/redo.png.dpkg-new' (while processing `./usr/local/share/hugin/xrc/data/redo.png'): No such file or directory<br />
</pre><br />
<br />
Commands to create the necessary folders have been documented below and may be added to the CMake build in the repository of Hugin, Libpano, Enblend. However it is possible that the lists are incomplete. If you bump in the above message, the solution is to create the full missing path and run dpkg -i again, recursively adding folders until the install succeed.<br />
<br />
<pre><br />
sudo mkdir -p /usr/local/share/hugin/xrc/data/<br />
</pre><br />
<br />
Another workaround is, to partially rebuild the deb package by hand:<br />
<br />
<pre><br />
mkdir unpacked<br />
cd unpacked/<br />
ar x ../hugin.build/hugin-2010.2.0-Linux.deb<br />
mkdir untarred<br />
cd untarred<br />
tar xzf ../data.tar.gz<br />
tar czf ../data.tar.gz .<br />
cd ..<br />
ar r ../hugin-2010.2.0-Linux.deb debian-binary control.tar.gz data.tar.gz<br />
</pre><br />
<br />
== Shortcut ==<br />
<br />
Hugin evolves fast and the official 'buntu distributions carry versions that are usually 3-6 months older than the 'buntu distribution date. Moreover, they do not backport Hugin and related tools.<br />
<br />
Even if you follow religiously the 'buntu six months update cycle, you may be using a version of Hugin that is one or two release cycles in our past. If your sole objective is to use the new features of Hugin, the instructions in this section are for you. Start a command line terminal, type the three commands and you're done.<br />
<br />
If for some reason that's not enough for you - if you want to actually learn and become a contributor; or if you're just curious about getting even closer to the bleeding edge and trade stability for features and excitement, the rest of this document is for you.<br />
<br />
=== Stable ===<br />
<br />
This will install you the latest stable version of the tools:<br />
<pre><br />
sudo add-apt-repository ppa:hugin/hugin-builds<br />
sudo apt-get update<br />
sudo apt-get install hugin enblend autopano-sift-c panini<br />
</pre><br />
<br />
=== Unstable ===<br />
<br />
This will install you the latest unstable version of the tools that has been built as a binary. While they are likely to work in most cases, there is no guarantee and they are not recommended for production environment. Use at your own risk, and please report (and if possible fix) bugs. Most of the time these unstable builds are closer to the bleeding edge than to the stable builds. If you want the really really really bleeding edge, you'll have to work through the instructions in the next sections, though.<br />
<br />
<pre><br />
sudo add-apt-repository ppa:hugin/hugin-builds<br />
sudo add-apt-repository ppa:hugin/nightly<br />
sudo apt-get update<br />
sudo apt-get install hugin enblend autopano-sift-c panini<br />
</pre><br />
<br />
== Building Environment ==<br />
Since we are going to build hugin, libpano13 and enblend we need to download and install all the development packages. This is very easy with apt-get.<br />
In a terminal window (K menu -> System -> Konsole or Applications -> Accessories -> Terminal (in Kubuntu), Applications -> Accessories -> Terminal (in Ubuntu))<br />
<br />
<pre>sudo apt-get install build-essential autoconf automake1.9 libtool flex bison gdb libc6-dev libgcc1 \<br />
cmake<br />
</pre><br />
<br />
To get the bleeding edge we'll need access to the SVN and Mercurial repositories, and for this we need the correct tools:<br />
<br />
<pre><br />
sudo apt-get install subversion mercurial<br />
</pre><br />
<br />
Not necessary, but useful if you want to revisit configuration sets in ccmake<br />
<pre><br />
sudo apt-get install cmake-curses-gui<br />
</pre><br />
<br />
To get on the same page as far as file system layout is concerned, we'll create a folder to contain all source code in your home folder:<br />
<pre><br />
cd<br />
mkdir -p src<br />
</pre><br />
<br />
=== For Coders ===<br />
<br />
If you want to start to navigate, understand and modify the code, the doxygen generated documentation will be helpful to you.<br />
<br />
<pre><br />
sudo apt-get install doxygen graphviz<br />
</pre><br />
<br />
=== For Distributors ===<br />
<br />
If you want to build packages for distribution, you will also need the following tools and settings.<br />
<br />
<pre><br />
sudo apt-get install subversion-tools<br />
sudo echo 'deb-src ftp://ftp.at.debian.org/debian ../project/experimental main' > debian-experimental.list<br />
mv debian-experimental.list /etc/apt/sources.list.d/<br />
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 55BE302B<br />
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 8B8D7663<br />
sudo apt-get update<br />
sudo apt-get install devscripts<br />
</pre><br />
<br />
You will also need an OpenPGP key, and a Launchpad account. Follow the [[Hugin_Trackers#Launchpad_Account|instructions]] for Launchpad account creation, including the signing of the Ubuntu Code of Conduct.<br />
<br />
Moreover, it is likely that your environment is not clean enough for distribution builds. In that case, and to produce binaries for other Ubuntu series than the one you are running, you will want to set up a dchroot environment (to be documented later on).<br />
<br />
== Building Enblend ==<br />
<br />
Get the dependencies. If you are working with large images (300 megapixels and up), you should have a libtiff-devel compiled with large file support and libstdc++6.<br />
<br />
<pre><br />
sudo apt-get install pkg-config libtiff4-dev libboost-graph-dev libboost-thread-dev \<br />
libboost-filesystem-dev liblcms1-dev libglew1.5-dev libplot-dev libglut3-dev libopenexr-dev \<br />
libxi-dev libxmu-dev help2man libplot-dev liblcms1-dev libboost-system-dev<br />
</pre><br />
<br />
If you also want to build the documentation, add the following dependencies, and add "-DDOC=ON" to the cmake command below. (Be warned, however, that this will drag in over 700MB of additional dependencies. Unless you have a pressing need to build the documentation yourself, you can save yourself some time and disk space by downloading the PDF docs from http://enblend.sourceforge.net .)<br />
<br />
<pre><br />
sudo apt-get install texi2html texinfo fig2ps tidy gnuplot libxml-xpath-perl imagemagick<br />
</pre><br />
<br />
Once all dependencies are in place, get the code. The official repository has migrated from CVS to Mercurial:<br />
<br />
<pre><br />
mkdir -p ~/src/enblend<br />
cd ~/src/enblend<br />
hg clone http://enblend.hg.sourceforge.net:8000/hgroot/enblend/enblend enblend.hg<br />
</pre><br />
<br />
If you already have checked out enblend, to update the code to the latest version you need to run:<br />
<pre><br />
cd enblend.hg<br />
hg pull<br />
hg update<br />
cd ..<br />
</pre><br />
<br />
Then create a build directory and build in there. And install the Package.<br />
<br />
The options below are good for modern multi-core computers. For a single core, you may be better off setting ENABLE_OPENMP to OFF and ENABLE_IMAGECACHE to ON. The two options are mutually exclusive.<br />
<pre><br />
mkdir enblend.build<br />
cd enblend.build<br />
cmake ../enblend.hg -DENABLE_GPU:BOOL=ON -DENABLE_IMAGECACHE:BOOL=OFF -DENABLE_OPENMP:BOOL=ON \<br />
-DCPACK_BINARY_DEB:BOOL=ON -DCPACK_BINARY_NSIS:BOOL=OFF -DCPACK_BINARY_RPM:BOOL=OFF \<br />
-DCPACK_BINARY_STGZ:BOOL=OFF -DCPACK_BINARY_TBZ2:BOOL=OFF -DCPACK_BINARY_TGZ:BOOL=OFF \<br />
-DCPACK_BINARY_TZ:BOOL=OFF -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX:PATH=/usr/local<br />
make package<br />
sudo dpkg -i enblend-4.1.1-Linux.deb<br />
</pre><br />
<br />
If the install quits with an error, it is likely because of missing folders. Run the following commands and retry:<br />
<pre><br />
sudo mkdir -p /usr/local/share/man/man1<br />
sudo mkdir -p /usr/local/bin<br />
</pre><br />
<br />
===The old autotools way===<br />
We are then ready to compile. The CXXFLAGS <tt>--param inline-unit-growth=60</tt> is a workaround for x86_64 systems, Feb 2009, and apparently no longer needed (set by default). If you have an SMP machine and you're building a recent version, <tt>--disable-image-cache</tt> and <tt>--enable-openmp</tt> will speed up enblend/enfuse massively but may cause segmentation faults; in that case you will be better off with <tt>--enable-image-cache</tt> and <tt>--disable-openmp.</tt> <tt>-march=native</tt> is also beneficial and -O2 is better than -O3.<br />
<br />
<pre><br />
make --makefile=Makefile.scm<br />
mkdir BUILD<br />
cd BUILD<br />
CXXFLAGS="--param inline-unit-growth=60 -march=native -O2" ../configure --disable-image-cache \<br />
--enable-openmp<br />
make<br />
</pre><br />
<br />
The second make step can be very long and memory consuming. Make sure you have enough swap space, and go get a healthy snack while the computer is compiling.<br />
<br />
If you encounter problems at any of these stages, please report back to the hugin-ptx mailing list. Report what command in the sequence you were executing, what machine/operating system, the revision checked out from CVS, and all other relevant information.<br />
<br />
You are then ready to install with<br />
<pre><br />
sudo make install<br />
</pre><br />
<br />
== Building Libpano13 ==<br />
<br />
libpano13 is the new version of the PanoTools libraries. This is a necessary component for hugin, and we need to build it first.<br />
To build libpano13 we need some libraries and particularly their <code>dev</code> package:<br />
<br />
<pre>sudo apt-get install zlib1g zlib1g-dev libpng12-dev libjpeg62-dev libtiff4-dev cmake</pre><br />
<br />
On older distributions, zlib1g and zlib1g-dev may not be found. In that case, the same library may be available with the names lib64z1 and lib64z1-dev.<br />
<br />
We then need to download the source code from the central repository:<br />
<br />
<pre><br />
mkdir -p ~/src/libpano<br />
cd ~/src/libpano<br />
hg clone http://panotools.hg.sourceforge.net:8000/hgroot/panotools/libpano libpano.hg<br />
</pre><br />
<br />
If you're a contributor with write access, use the following clone command instead:<br />
<pre><br />
hg clone ssh://${USER}@panotools.hg.sourceforge.net/hgroot/panotools/panotools/libpano libpano.hg<br />
</pre><br />
<br />
In the future there is no need to get the whole source again. Just issue the following commands to bring your source up to date:<br />
<pre><br />
cd libpano.hg<br />
hg pull<br />
hg up<br />
cd ..<br />
</pre><br />
<br />
Now start the building process.<br />
<br />
<pre><br />
mkdir libpano.build<br />
cd libpano.build<br />
cmake ../libpano.hg -DCMAKE_INSTALL_PREFIX=/usr/local -DCPACK_BINARY_DEB:BOOL=ON \<br />
-DCPACK_BINARY_NSIS:BOOL=OFF -DCPACK_BINARY_RPM:BOOL=OFF -DCPACK_BINARY_STGZ:BOOL=OFF \<br />
-DCPACK_BINARY_TBZ2:BOOL=OFF -DCPACK_BINARY_TGZ:BOOL=OFF -DCPACK_BINARY_TZ:BOOL=OFF \<br />
-DCMAKE_BUILD_TYPE=RelWithDebInfo<br />
make package<br />
sudo dpkg -i libpano13-*-Linux.deb<br />
</pre><br />
<br />
Set -DCMAKE_BUILD_TYPE=Debug if you want to help investigate/debug a problem and capture even more debugging information.<br />
<br />
If the install quits with an error, it is likely because of missing folders. Run the following commands and retry:<br />
<pre><br />
sudo mkdir -p /usr/local/include/pano13/<br />
sudo mkdir -p /usr/local/include/pano13/doc<br />
sudo mkdir -p /usr/local/lib/pkgconfig<br />
sudo mkdir -p /usr/local/share/man/man1<br />
sudo mkdir -p /usr/local/bin<br />
</pre><br />
<br />
=== The old autotools way ===<br />
<br />
The above described building process uses CMake to build libpano which has many advantages. Amongst others it creates a clean package to install / deinstall and decreases the likelihood of wrecking the system. However CMake support is relatively new in libpano. The old autotools way is documented below for completeness. You should not need it. However if you do, make sure to run either the CMake build or the autotools build on fresh repository checkouts to avoid interferences.<br />
<br />
<pre><br />
./bootstrap<br />
</pre><br />
<br />
If any libraries are missing, the script will complain (or at least, let you know that some library hasn't been found). In that case you probably need to install the library. To find in what package is that library, a general rule is to run the command <code>apt-cache search ''missingfile''</code>, find the relevant library and install both the library and the related <code>-dev</code> package.<br />
Run the <code>./configure</code> script and repeat this process until you have met all the dependencies.<br />
<br />
Then we are ready to launch the make process with<br />
<pre>make</pre><br />
<br />
If the library successfully compiles, you have to install it with<br />
<pre>sudo make install<br />
sudo ldconfig</pre><br />
The last part is for the OS to be aware of the new library (that has been installed in <code>/usr/local/lib</code>).<br />
We can now go back up one folder level and get ready for hugin.<br />
<pre>cd ..</pre><br />
<br />
== Building Hugin ==<br />
<br />
=== Dependencies ===<br />
<br />
First we need to activate the <code>universe</code> repository (in adept package manager, or by editing the /etc/apt/sources.lst file for example) and get the dependencies.<br />
<br />
The following command will install on your system all build time dependencies except libpano13.<br />
<pre><br />
sudo apt-get install libwxgtk2.8-dev libtiff4-dev libpng12-dev \<br />
libopenexr-dev libexiv2-dev libglut3-dev libglew-dev libboost-dev \<br />
boost-build libboost-thread-dev libboost-graph-dev libboost-regex-dev \<br />
libboost-iostreams-dev libboost-filesystem-dev gettext liblapack-dev \<br />
libxi-dev libxmu-dev libboost-signals-dev libboost-system-dev \<br />
libtclap-dev<br />
</pre><br />
<br />
You could install libpano13 on your system with the command below. However it is likely to be a version of libpano13 that is too old for the current Hugin. It is recommended that you first build your own libpano13 (above). Alternatively, there may be a recent enough version of libpano13 in the Hugin PPA.<br />
<pre><br />
sudo apt-get install libpano13-dev<br />
</pre><br />
<br />
wxWidgets is a critical dependency for the Hugin GUI. In the official Ubuntu repositories it is usually at least a few releases behind the current release, and in some cases many releases behind. The wxWidgets project provides alternative [http://wiki.wxpython.org/InstallingOnUbuntuOrDebian repositories] with newer versions, as well as a [http://wiki.wxpython.org/BuildingDebianPackages instructions] to build binary packages of the most recent releases. Newer versions of wxWidgets are not (yet) absolutely necessary, but since eventually things evolve they are useful for development, testing, and in general should give a better user interface experience as wxWidgets improves over time.<br />
<br />
The following are run-time dependencies. Strictly speaking you don't need them to build Hugin, but you will need them to use it. You don't need this line if you follow the instructions on this page to build ExifTool, Enblend, Autopano-SIFT-C.<br />
<pre><br />
sudo apt-get install libimage-exiftool-perl enblend autopano-sift-c<br />
</pre><br />
<br />
If you want to use the Python scripting tools, you will also need the following dependencies at runtime.<br />
<br />
<pre><br />
sudo apt-get install python-argparse<br />
</pre><br />
<br />
=== Fetch the Source Code with Mercurial ===<br />
<br />
If you already have a repository clone, you only need to pull the latest changes and update the code with:<br />
<pre><br />
cd ~/src/hugin/hugin.hg<br />
hg pull<br />
hg update<br />
</pre><br />
<br />
Otherwise, you need to clone the repository and decide which version/branch to build with:<br />
<pre><br />
mkdir -p ~/src/hugin<br />
cd ~/src/hugin<br />
hg clone http://hugin.hg.sourceforge.net:8000/hgroot/hugin/hugin hugin.hg<br />
cd hugin.hg<br />
hg branches<br />
</pre><br />
<br />
If you are a contributor with write access, you can use<br />
<pre><br />
hg clone ssh://${USER}@hugin.hg.sourceforge.net/hgroot/hugin/hugin hugin.hg<br />
</pre><br />
<br />
The `hg branches` command will list all available branches. If you decide, e.g., to build the 2010.0 branch, you will update to it with:<br />
<pre><br />
hg update -C 2010.0 <br />
</pre><br />
<br />
=== Advanced Use - Multiple Source Trees ===<br />
<br />
You may want to build multiple versions of Hugin on your machine at the same time, e.g. when you want to build side by side a stable version for your productivity and a development version to give feedback to the developers. In that case, you will clone the Mercurial repository that is already on your drive and update from it a source tree to a different branch. Mercurial takes care of details such as optimizing disk usage. The commands for this are:<br />
<br />
<pre><br />
cd ..<br />
hg clone hugin.hg another_hugin<br />
cd another_hugin<br />
hg update -C default<br />
</pre><br />
<br />
You can have as many "another_hugin" folders as you want. Just make sure, when pulling the latest updates from SourceForge, to first pull your main repository (the one you cloned from http://hugin.hg.sourceforge.net:8000/hgroot/hugin/hugin. Then pull all others:<br />
<pre><br />
cd ~/src/hugin/hugin.hg<br />
hg pull<br />
hg update<br />
cd ../another_hugin<br />
hg pull<br />
hg update<br />
</pre><br />
<br />
Reference: [http://groups.google.com/group/hugin-ptx/msg/1ce824dd1364e9be]<br />
<br />
=== Configure the Build Environment ===<br />
<br />
'''Rule:''' You always want to build outside of the source tree to keep the source tree clean. And to avoid confusion, if you have multiple source trees it is preferable to build for each of them in a separate build folder.<br />
<br />
Next we set up the build environment using cmake.<br />
<br />
If you compiled and installed libpano to a non standard location set the variables CMAKE_INCLUDE_PATH and CMAKE_LIBRARY_PATH to point to your install location's include and lib directories.<br />
<br />
If you are building for distribution, you want to set CMAKE_INSTALL_PREFIX=/usr<br />
<br />
<pre><br />
cd ~/src/hugin<br />
mkdir hugin.hg-build<br />
cd hugin.hg-build<br />
cmake ../hugin.hg -DENABLE_LAPACK=YES -DCPACK_BINARY_DEB:BOOL=ON -DCPACK_BINARY_NSIS:BOOL=OFF \<br />
-DCPACK_BINARY_RPM:BOOL=OFF -DCPACK_BINARY_STGZ:BOOL=OFF -DCPACK_BINARY_TBZ2:BOOL=OFF \<br />
-DCPACK_BINARY_TGZ:BOOL=OFF -DCPACK_BINARY_TZ:BOOL=OFF -DCMAKE_BUILD_TYPE=RelWithDebInfo<br />
</pre><br />
<br />
Set -DCMAKE_BUILD_TYPE=Debug if you want to help investigate/debug a problem and capture even more debugging information, however Hugin will be slower and may not work as expected. Don't use a Debug build for production.<br />
<br />
=== Build and Install ===<br />
<br />
Finally, we use make to build the code and package it, and dpkg to install it. Look for the version number in the .deb file created and edit the lines below accordingly: <br />
<br />
<pre><br />
make package<br />
sudo dpkg -i hugin-*-Linux.deb<br />
sudo ldconfig<br />
</pre><br />
<br />
If the install quits with an error, it is likely because of missing folders. Run the following commands and retry: <br />
<pre><br />
sudo mkdir -p /usr/local/share/pixmaps<br />
sudo mkdir -p /usr/local/share/mime/packages<br />
sudo mkdir -p /usr/local/share/applications/<br />
sudo mkdir -p /usr/local/share/icons/gnome/48x48/mimetypes/<br />
sudo mkdir -p /usr/local/share/locale/en_GB/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/es_la/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/fr/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/zh_TW/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/ru/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/ro/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/bg/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/de/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/ko/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/pt_BR/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/zh_CN/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/ja/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/it/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/sl/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/sk/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/sv/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/ca_ES/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/nl/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/fi/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/cs_CZ/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/uk/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/es/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/pl/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/hu/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/es_VE/LC_MESSAGES<br />
sudo mkdir -p /usr/local/share/hugin/xrc/data/help_it_IT<br />
sudo mkdir -p /usr/local/share/hugin/xrc/data/help_en_EN<br />
sudo mkdir -p /usr/local/share/hugin/data/<br />
sudo mkdir -p /usr/local/lib/hugin<br />
sudo mkdir -p /usr/local/share/man/man1<br />
</pre><br />
<br />
'''Important:''' the package does not track dependencies yet, so it likely to fail on machines others than yours.<br />
<br />
Reference: [http://theseblog.free.fr/2007/10/building-hugin-in-ubuntu-feisty-fawn.php]<br />
<br />
=== Dive into the Code ===<br />
<br />
From time to time the API reference is published on the Hugin website, however you are better off with a local copy. To generate it, issue the following commands:<br />
<pre><br />
cd ~/src/hugin/hugin.hg/src<br />
doxygen Doxyfile<br />
</pre><br />
<br />
The documentation is generated in ~/src/hugin/hugin.hg/src/hugin/html<br />
<br />
Point your browser to index.html inside that folder and you have access to all available information. If you find that a class, a function, or anything else is not properly documented; and if you delve into the source code to understand it, kindly add documentation to the code so that the next person in your situation can use your experience as a stepping stone. Thank you!<br />
<br />
== Automatic Control Point Detectors ==<br />
<br />
=== Autopano-sift-C ===<br />
<br />
Pre-Requisites:<br />
<pre><br />
sudo apt-get install libxml2-dev<br />
</pre><br />
<br />
To build<br />
<br />
(Note February 2011: The latest source code of autopano-sift-C has been unstable for a long time now and nobody is working to fix it. Use the 2.5.1 release tarball instead)<br />
<br />
<pre><br />
mkdir -p ~/src/apsc<br />
cd ~/src/apsc<br />
hg clone http://hugin.hg.sourceforge.net:8000/hgroot/hugin/autopano-sift-C apsc.hg<br />
cd apsc.hg<br />
hg branches<br />
hg update -C 2.5.1<br />
cd ..<br />
mkdir apsc.hg.build<br />
cd apsc.hg.build<br />
cmake ../apsc.hg -DCMAKE_INSTALL_PREFIX=/usr/local -DCPACK_BINARY_DEB:BOOL=ON \<br />
-DCPACK_BINARY_NSIS:BOOL=OFF -DCPACK_BINARY_RPM:BOOL=OFF -DCPACK_BINARY_STGZ:BOOL=OFF \<br />
-DCPACK_BINARY_TBZ2:BOOL=OFF -DCPACK_BINARY_TGZ:BOOL=OFF -DCPACK_BINARY_TZ:BOOL=OFF \<br />
-DCMAKE_BUILD_TYPE=Debug<br />
make package<br />
sudo dpkg -i autopano-sift-C-*-Linux.deb<br />
</pre><br />
<br />
=== Match-n-shift ===<br />
<br />
Match-n-shift is yet an other Autopano-SIFT replacement. It comes in a bundle with pto file manipulation perl libraries and a rich selection of other tools that use nona, enblend, ImageMagick among other things. To use match-n-shift, you need to install at least the [http://search.cpan.org/dist/Panotools-Script/ Panotools::Script] library and some other perl modules. It requires:<br />
<br />
* Image::Size 2.9<br />
* Storable 2.0<br />
* Image::ExifTool 6<br />
<br />
Chances are that you do not need to update Storable which is a standard perl module. To check the version of installed versions of these modules, write these lines to the command prompt:<br />
<br />
perl -MStorable -le 'print Storable->VERSION;'<br />
perl -MImage::Size -le 'print Image::Size->VERSION;'<br />
perl -MImage::ExifTool -le 'print Image::ExifTool->VERSION;'<br />
<br />
There are various ways to install or upgrade these modules. Ubuntu has binary packages for many perl modules, you can skip the CPAN installation below and type:<br />
<br />
sudo apt-get install libimage-size-perl libimage-exiftool-perl<br />
<br />
Alternatively, perl is an interpreted language and these modules are pure perl, so installing from source is an easy thing.<br />
<br />
The best place to install perl modules is directly from a CPAN archive. CPAN is short for Comprehensive Perl Archive Network. The program to interact with CPAN comes with all perl installations. Start it by running:<br />
<br />
sudo cpan<br />
<br />
If this is your first time running the program you will be asked a number of questions (you can safely accept the suggested values). Last question lets you select a number of CPAN mirrors nearest to you.<br />
<br />
When all is done, you can enter the install commands after the 'cpan>' prompt:<br />
<br />
install Image::Size Storable Image::ExifTool<br />
<br />
Answer 'y' to any question of dependencies and wait for install to complete. 'exit' leaves the cpan shell.<br />
<br />
Next, you need to retrieve and install the Panotools-Script collection<br />
of perl libraries (Panotools::Script) and programs that use them -<br />
including match-n-shift:<br />
<br />
svn co https://panotools.svn.sourceforge.net/svnroot/panotools/trunk/Panotools-Script Panotools-Script<br />
cd Panotools-Script<br />
perl Makefile.PL<br />
make<br />
make test<br />
sudo make install<br />
<br />
Just to confuse you, you can also ignore everything above and just install Panotools::Script and all its dependencies from CPAN. From command line, type:<br />
<br />
sudo cpan Panotools::Script<br />
<br />
You can run match-n-shift from command line using the same parameters as autopano-c-complete.sh or you can modify hugin to run it for you:<br />
<br />
* start Hugin<br />
* navigate the menu File to Preferences<br />
* In the Preferences window, open the Autopano tab<br />
* Select Autopano -> Autopano-SIFT<br />
* tick the checkbox for Use alternative Autopano-SIFT program<br />
* enter the full path to match-n-shift (/usr/local/bin/match-n-shift) in the Autopano-SIFT field<br />
* enter the following string in the Arguments field:<br />
-f %f -v %v -c -p %p -o %o %i<br />
<br />
=== MatchPoint ===<br />
<br />
MatchPoint is a next generation CP generator. The result of a GSoC2007 project, it is still very experimental. Experience reports needed. Read more [http://groups.google.com/group/hugin-ptx/browse_thread/thread/cba2b2ce94dd9054 here]<br />
<br />
Matchpoint is now located inside the main hugin source tree, no need to checkout separately. It is compiled together with hugin, but not installed by default.<br />
<br />
* copy the MatchPoint executable into /usr/local/bin manually<br />
<pre><br />
cd ~/src/hugin/hugin.hg-build<br />
sudo cp src/matchpoint/matchpoint /usr/local/bin/<br />
</pre><br />
* edit /usr/local/bin/autopano-c-complete.sh (do it with sudo to have the necessary permission)<br />
** line 79: replace the .key.gz extension with .key (not sure if matchpoint supports compression)<br />
** lines 83 and 88: replace '''generatekeys "$arg" $FILENAME $SIZE''' with '''matchpoint "$arg" $FILENAME''' (not sure if the size option or any other options of the original generatekeys are applicable)<br />
<br />
=== Pan-o-matic ===<br />
<br />
Yet another control point generator [http://aorlinsk2.free.fr/panomatic/?p=home Home Page]<br />
<br />
<pre>sudo apt-get install libboost-dev</pre><br />
<br />
Download [http://aorlinsk2.free.fr/panomatic/download.php?d=7&v=0.9.4 Panomatic 0.9.4 bz2] and if you're on Ubuntu 9.10 or newer also the [http://aorlinsk2.free.fr/panomatic/panomatic_gcc44.patch patch] for the gcc4.4 compiler.<br />
<br />
<pre><br />
mkdir -p ~/src/panomatic<br />
cd ~/src/panomatic<br />
wget "http://aorlinsk2.free.fr/panomatic/download.php?d=7&v=0.9.4" -O panomatic-0.9.4-src.tar.bz2<br />
wget http://aorlinsk2.free.fr/panomatic/panomatic_gcc44.patch patch<br />
tar xvfj panomatic-0.9.4-src.tar.bz2<br />
cd panomatic-0.9.4<br />
patch -p 1 < ../panomatic_gcc44.patch<br />
./configure<br />
make<br />
sudo make install<br />
</pre><br />
<br />
To use Pano-o-matic, open Hugin<br />
<br />
* In File > Preferences > Autopano :<br />
* Select Autopano-SIFT<br />
* Check "Use alternative autopano-SIFT program"<br />
* Choose the path to the binary ( /usr/local/bin )<br />
* In Arguments, put : -o %o %i<br />
<br />
==== Pablo's variation ====<br />
<br />
Around the end of the year 2009, Pablo integrated a [http://groups.google.com/group/hugin-ptx/browse_thread/thread/d9c0558c679cad52 new] experimental descriptor based on the geometric blur and DAISY papers. Also, Pablo said that the algorithm is not really based on a published approach, just on some ideas that are mentioned in a few of them, and its currently simpler than any of them:<br />
<br />
o geometric blur: [http://www.eecs.berkeley.edu/~aberg/gb.html]<br />
<br />
o daisy: [http://cvlab.epfl.ch/~tola/daisy.html]<br />
<br />
o descriptor learning: [http://cvlab.epfl.ch/~brown/learndesc/learndesc.html]<br />
<br />
To build that version of panomatic instead, follow these instructions:<br />
<br />
This is current the subject of a GSoC 2010 project and may be available in future versions of Hugin.<br />
<br />
<pre><br />
sudo aptitude install libboost-python-dev bzr cmake libvigraimpex-dev<br />
</pre><br />
<br />
<pre><br />
bzr branch lp:~pablo.dangelo/hugin/panomatic-lib<br />
mkdir build<br />
cd build<br />
cmake ../panomatic-lib<br />
make<br />
sudo make install<br />
</pre><br />
<br />
To use the new descriptor the arguments for Hugin are: '''--sieve1size 100 --sieve2size 2 -o %o %i'''<br />
<br />
== ExifTool ==<br />
<br />
ExifTool is no longer mandatory for Hugin to work. It is used to pass metadata from the input to the output images during the stitching process. <br />
<br />
[http://www.sno.phy.queensu.ca/~phil/exiftool/ ExifTool] is a platform-independent Perl library plus a command-line application for reading, writing and editing meta information in image, audio and video files.<br />
<br />
Usually the version distributed with Ubuntu (8.15 in Ubuntu 10.10; 7.89 in Ubuntu 10.4) is good enough and you don't need to bother with the following instructions. However there were situations in the past and there might be situations in the future where the latest versions offer better support. These issues will occur most likely with specific camera brands/models and the most recent models. The following instructions are for those cases.<br />
<br />
<pre><br />
sudo apt-get purge libimage-exiftool-perl<br />
</pre><br />
<br />
<pre><br />
wget http://www.sno.phy.queensu.ca/~phil/exiftool/Image-ExifTool-8.50.tar.gz<br />
tar -xzf Image-ExifTool-8.50.tar.gz<br />
cd Image-ExifTool-8.50<br />
perl Makefile.PL<br />
make test<br />
sudo make install<br />
</pre><br />
<br />
== Pano Viewers ==<br />
<br />
=== PanoGLView ===<br />
<br />
PanoGLView is an OpenGL hardware accelerated interactive immersive viewer for equirectangular images.<br />
<br />
Pre-Requisites:<br />
<pre>sudo apt-get install wx-common libwxgtk2.8-dev libglew-dev</pre><br />
<br />
To build and install:<br />
<pre><br />
mkdir -p ~/src/panoglview<br />
cd ~/src/panoglview<br />
hg clone http://hugin.hg.sourceforge.net:8000/hgroot/hugin/panoglview panoglview.hg<br />
cd panoglview.hg<br />
hg update<br />
./bootstrap<br />
./configure<br />
make<br />
sudo make install<br />
</pre><br />
<br />
=== FreePV - DEPENDENCIES ARE BROKEN - FAILS TO BUILD ===<br />
<br />
Pre-Requisites:<br />
<pre><br />
sudo apt-get install cmake make pkg-config g++ mozilla-devscripts freeglut3-dev zlib1g-dev \<br />
libjpeg-dev libxext-dev libxmu-dev x11proto-xf86vidmode-dev libxxf86vm-dev libnspr4-dev \<br />
libxml2-dev libpng12-dev<br />
</pre><br />
To build<br />
<pre><br />
svn co https://freepv.svn.sourceforge.net/svnroot/freepv/freepv/trunk/ freepv<br />
cd freepv<br />
cmake .<br />
make<br />
sudo make install<br />
</pre><br />
<br />
=== Panini Perspective Tool ===<br />
<br />
Strictly speaking, Panini is more than just a viewer. It's a powerful tool to extract/transform views and can also be easily used as a viewer.<br />
<br />
Get dependencies:<br />
<pre><br />
sudo apt-get install qt4-qmake libqt4-dev zlib1g-dev<br />
</pre><br />
<br />
Get code:<br />
<pre><br />
mkdir -p ~/src/pvqt<br />
cd ~/src/pvqt<br />
svn co https://pvqt.svn.sourceforge.net/svnroot/pvqt pvqt.svn<br />
</pre><br />
<br />
Build:<br />
<pre><br />
cd pvqt.svn<br />
qmake panini.pro<br />
make<br />
</pre><br />
<br />
Install (brute force):<br />
<pre><br />
sudo cp Panini /usr/local/bin/ <br />
</pre><br />
<br />
Menu Entry for Kubuntu:<br />
<pre><br />
kmenuedit<br />
</pre><br />
<br />
in kmenuedit<br />
* navigate to Graphics<br />
** click on New Item<br />
** Enter "Panini" as Name<br />
** Enter "Perspective Tool" as Description<br />
** click on the empty icon and look for an icon (I used the akonadi one)<br />
** Enter "Panini" as Command<br />
** Click on Save button<br />
<br />
== Notes for Packagers ==<br />
<br />
=== Tarballs ===<br />
<br />
* to get an updated ChangeLog in Mercurial repositories (Hugin has it also in the cmake invocation, use '''-DUPDATE_CHANGELOG=1''')<br />
<pre><br />
hg log --follow --style=changelog <br />
</pre><br />
* to update the ChangeLog in SVN repositories (Panotools)<br />
<pre><br />
svn up<br />
svn2cl<br />
svn ci<br />
</pre><br />
<br />
=== Deb Packages ===<br />
<br />
The deb packages built by CMake (2.8.2) are broken by Debian standard. Please do not distribute them. There are official updated recent packages at the Hugin PPA mentioned above which include nightlies (produced every 24 hours) and stables (produced out of released tarballs). If you miss binaries for your series of Ubuntu and you have built them for yourself following the instructions above, considering moving up one level and contributing to the [[Hugin PPA]].<br />
<br />
[[Category:Software:Hugin]]<br />
[[Category:Software:Platform:Linux]]</div>Onomouhttps://wiki.panotools.org/index.php?title=Hugin_Compiling_Ubuntu&diff=13426Hugin Compiling Ubuntu2011-05-02T18:24:58Z<p>Onomou: /* Building Libpano13 */ Same as other edit</p>
<hr />
<div>== Who Is This Page For ==<br />
<br />
These instructions contain the collective wisdom of Hugin contributors that are using Ubuntu or any of its variations (Ku/Xu/Lu/Edu/...buntu). They are work in progress and updated when newer versions of Ubuntu are released or when Hugin introduces new dependencies. They have worked, at the time of release or soon thereafter, with all 'buntu versions up until 10.10. They are intended to help contributors on the learning curve. If you are not here to contribute, spare yourself the effort and see the [[#Shortcut]] section below.<br />
<br />
They are likely to work only for the latest 'buntu release, but you can check this page's history at the time that the older 'buntu version was the most recent one to find the specifics for that version.<br />
<br />
If you are new here, read the whole page. It is recommended that you go sequentially through it.<br />
<br />
If you're familiar with the process and have run it a few time, look at the what's new section for important news.<br />
<br />
Apart from the odd change in package name, nothing should be substantially different (and if does not work, please leave a comment on the [http://groups.google.com/group/hugin-ptx hugin-ptx mailing list]). Don't worry if the same package appears twice in an apt-get install line - apt-get will update existing packages if there is a newer version, and ignore duplicates if the latest version is already installed. On the other hand, if apt-get says that it can't find a package, it might be the odd change in package name. You can find a replacement package by using apt-cache search with a substring of the package required, e.g.<br />
<pre>apt-cache search wxW<br />
</pre><br />
<br />
The goal is to build hugin and the whole set of helper applications required, and start understanding the building process. You will need deeper understanding of the building process if you want to:<br />
* develop code<br />
* translate the latest strings<br />
* document the latest features with manuals and tutorials<br />
* package for distribution<br />
That knowledge is out of scope for this document. This document ends with a binary that is fit for installation on your machine. It is not fit for any other purpose, particularly not for distribution. CMake is [http://groups.google.com/group/hugin-ptx/msg/3f29b207c562fd63 known] to build broken deb packages. Please do not distribute these binaries.<br />
<br />
== What's New ==<br />
<br />
'''5-March-2010''': Foreign library libtclap removed from source tree. This introduces a new dependency on libtclap-dev<br />
<br />
'''February 2010''': Libpano has migrated from SVN to Mercurial.<br />
<br />
'''CMake 2.8.2''', as packaged in Ubuntu 10.10, contains a bug (http://public.kitware.com/Bug/view.php?id=11020) the prevents the created debs to install successfully, due to it not storing needed directories in the deb package.<br />
Installing the resulting debs will fail with a message error saying something like<br />
<br />
<pre><br />
unable to create `/usr/local/share/hugin/xrc/data/redo.png.dpkg-new' (while processing `./usr/local/share/hugin/xrc/data/redo.png'): No such file or directory<br />
</pre><br />
<br />
Commands to create the necessary folders have been documented below and may be added to the CMake build in the repository of Hugin, Libpano, Enblend. However it is possible that the lists are incomplete. If you bump in the above message, the solution is to create the full missing path and run dpkg -i again, recursively adding folders until the install succeed.<br />
<br />
<pre><br />
sudo mkdir -p /usr/local/share/hugin/xrc/data/<br />
</pre><br />
<br />
Another workaround is, to partially rebuild the deb package by hand:<br />
<br />
<pre><br />
mkdir unpacked<br />
cd unpacked/<br />
ar x ../hugin.build/hugin-2010.2.0-Linux.deb<br />
mkdir untarred<br />
cd untarred<br />
tar xzf ../data.tar.gz<br />
tar czf ../data.tar.gz .<br />
cd ..<br />
ar r ../hugin-2010.2.0-Linux.deb debian-binary control.tar.gz data.tar.gz<br />
</pre><br />
<br />
== Shortcut ==<br />
<br />
Hugin evolves fast and the official 'buntu distributions carry versions that are usually 3-6 months older than the 'buntu distribution date. Moreover, they do not backport Hugin and related tools.<br />
<br />
Even if you follow religiously the 'buntu six months update cycle, you may be using a version of Hugin that is one or two release cycles in our past. If your sole objective is to use the new features of Hugin, the instructions in this section are for you. Start a command line terminal, type the three commands and you're done.<br />
<br />
If for some reason that's not enough for you - if you want to actually learn and become a contributor; or if you're just curious about getting even closer to the bleeding edge and trade stability for features and excitement, the rest of this document is for you.<br />
<br />
=== Stable ===<br />
<br />
This will install you the latest stable version of the tools:<br />
<pre><br />
sudo add-apt-repository ppa:hugin/hugin-builds<br />
sudo apt-get update<br />
sudo apt-get install hugin enblend autopano-sift-c panini<br />
</pre><br />
<br />
=== Unstable ===<br />
<br />
This will install you the latest unstable version of the tools that has been built as a binary. While they are likely to work in most cases, there is no guarantee and they are not recommended for production environment. Use at your own risk, and please report (and if possible fix) bugs. Most of the time these unstable builds are closer to the bleeding edge than to the stable builds. If you want the really really really bleeding edge, you'll have to work through the instructions in the next sections, though.<br />
<br />
<pre><br />
sudo add-apt-repository ppa:hugin/hugin-builds<br />
sudo add-apt-repository ppa:hugin/nightly<br />
sudo apt-get update<br />
sudo apt-get install hugin enblend autopano-sift-c panini<br />
</pre><br />
<br />
== Building Environment ==<br />
Since we are going to build hugin, libpano13 and enblend we need to download and install all the development packages. This is very easy with apt-get.<br />
In a terminal window (K menu -> System -> Konsole or Applications -> Accessories -> Terminal (in Kubuntu), Applications -> Accessories -> Terminal (in Ubuntu))<br />
<br />
<pre>sudo apt-get install build-essential autoconf automake1.9 libtool flex bison gdb libc6-dev libgcc1 \<br />
cmake<br />
</pre><br />
<br />
To get the bleeding edge we'll need access to the SVN and Mercurial repositories, and for this we need the correct tools:<br />
<br />
<pre><br />
sudo apt-get install subversion mercurial<br />
</pre><br />
<br />
Not necessary, but useful if you want to revisit configuration sets in ccmake<br />
<pre><br />
sudo apt-get install cmake-curses-gui<br />
</pre><br />
<br />
To get on the same page as far as file system layout is concerned, we'll create a folder to contain all source code in your home folder:<br />
<pre><br />
cd<br />
mkdir -p src<br />
</pre><br />
<br />
=== For Coders ===<br />
<br />
If you want to start to navigate, understand and modify the code, the doxygen generated documentation will be helpful to you.<br />
<br />
<pre><br />
sudo apt-get install doxygen graphviz<br />
</pre><br />
<br />
=== For Distributors ===<br />
<br />
If you want to build packages for distribution, you will also need the following tools and settings.<br />
<br />
<pre><br />
sudo apt-get install subversion-tools<br />
sudo echo 'deb-src ftp://ftp.at.debian.org/debian ../project/experimental main' > debian-experimental.list<br />
mv debian-experimental.list /etc/apt/sources.list.d/<br />
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 55BE302B<br />
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 8B8D7663<br />
sudo apt-get update<br />
sudo apt-get install devscripts<br />
</pre><br />
<br />
You will also need an OpenPGP key, and a Launchpad account. Follow the [[Hugin_Trackers#Launchpad_Account|instructions]] for Launchpad account creation, including the signing of the Ubuntu Code of Conduct.<br />
<br />
Moreover, it is likely that your environment is not clean enough for distribution builds. In that case, and to produce binaries for other Ubuntu series than the one you are running, you will want to set up a dchroot environment (to be documented later on).<br />
<br />
== Building Enblend ==<br />
<br />
Get the dependencies. If you are working with large images (300 megapixels and up), you should have a libtiff-devel compiled with large file support and libstdc++6.<br />
<br />
<pre><br />
sudo apt-get install pkg-config libtiff4-dev libboost-graph-dev libboost-thread-dev \<br />
libboost-filesystem-dev liblcms1-dev libglew1.5-dev libplot-dev libglut3-dev libopenexr-dev \<br />
libxi-dev libxmu-dev help2man libplot-dev liblcms1-dev libboost-system-dev<br />
</pre><br />
<br />
If you also want to build the documentation, add the following dependencies, and add "-DDOC=ON" to the cmake command below. (Be warned, however, that this will drag in over 700MB of additional dependencies. Unless you have a pressing need to build the documentation yourself, you can save yourself some time and disk space by downloading the PDF docs from http://enblend.sourceforge.net .)<br />
<br />
<pre><br />
sudo apt-get install texi2html texinfo fig2ps tidy gnuplot libxml-xpath-perl imagemagick<br />
</pre><br />
<br />
Once all dependencies are in place, get the code. The official repository has migrated from CVS to Mercurial:<br />
<br />
<pre><br />
mkdir -p ~/src/enblend<br />
cd ~/src/enblend<br />
hg clone http://enblend.hg.sourceforge.net:8000/hgroot/enblend/enblend enblend.hg<br />
</pre><br />
<br />
If you already have checked out enblend, to update the code to the latest version you need to run:<br />
<pre><br />
cd enblend.hg<br />
hg pull<br />
hg update<br />
cd ..<br />
</pre><br />
<br />
Then create a build directory and build in there. And install the Package.<br />
<br />
The options below are good for modern multi-core computers. For a single core, you may be better off setting ENABLE_OPENMP to OFF and ENABLE_IMAGECACHE to ON. The two options are mutually exclusive.<br />
<pre><br />
mkdir enblend.build<br />
cd enblend.build<br />
cmake ../enblend.hg -DENABLE_GPU:BOOL=ON -DENABLE_IMAGECACHE:BOOL=OFF -DENABLE_OPENMP:BOOL=ON \<br />
-DCPACK_BINARY_DEB:BOOL=ON -DCPACK_BINARY_NSIS:BOOL=OFF -DCPACK_BINARY_RPM:BOOL=OFF \<br />
-DCPACK_BINARY_STGZ:BOOL=OFF -DCPACK_BINARY_TBZ2:BOOL=OFF -DCPACK_BINARY_TGZ:BOOL=OFF \<br />
-DCPACK_BINARY_TZ:BOOL=OFF -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX:PATH=/usr/local<br />
make package<br />
sudo dpkg -i enblend-4.1.1-Linux.deb<br />
</pre><br />
<br />
If the install quits with an error, it is likely because of missing folders. Run the following commands and retry:<br />
<pre><br />
sudo mkdir -p /usr/local/share/man/man1<br />
sudo mkdir -p /usr/local/bin<br />
</pre><br />
<br />
===The old autotools way===<br />
We are then ready to compile. The CXXFLAGS <tt>--param inline-unit-growth=60</tt> is a workaround for x86_64 systems, Feb 2009, and apparently no longer needed (set by default). If you have an SMP machine and you're building a recent version, <tt>--disable-image-cache</tt> and <tt>--enable-openmp</tt> will speed up enblend/enfuse massively but may cause segmentation faults; in that case you will be better off with <tt>--enable-image-cache</tt> and <tt>--disable-openmp.</tt> <tt>-march=native</tt> is also beneficial and -O2 is better than -O3.<br />
<br />
<pre><br />
make --makefile=Makefile.scm<br />
mkdir BUILD<br />
cd BUILD<br />
CXXFLAGS="--param inline-unit-growth=60 -march=native -O2" ../configure --disable-image-cache \<br />
--enable-openmp<br />
make<br />
</pre><br />
<br />
The second make step can be very long and memory consuming. Make sure you have enough swap space, and go get a healthy snack while the computer is compiling.<br />
<br />
If you encounter problems at any of these stages, please report back to the hugin-ptx mailing list. Report what command in the sequence you were executing, what machine/operating system, the revision checked out from CVS, and all other relevant information.<br />
<br />
You are then ready to install with<br />
<pre><br />
sudo make install<br />
</pre><br />
<br />
== Building Libpano13 ==<br />
<br />
libpano13 is the new version of the PanoTools libraries. This is a necessary component for hugin, and we need to build it first.<br />
To build libpano13 we need some libraries and particularly their <code>dev</code> package:<br />
<br />
<pre>sudo apt-get install zlib1g zlib1g-dev libpng12-dev libjpeg62-dev libtiff4-dev cmake</pre><br />
<br />
On older distributions, zlib1g and zlib1g-dev may not be found. In that case, the same library may be available with the names lib64z1 and lib64z1-dev.<br />
<br />
We then need to download the source code from the central repository:<br />
<br />
<pre><br />
mkdir -p ~/src/libpano<br />
cd ~/src/libpano<br />
hg clone http://panotools.hg.sourceforge.net:8000/hgroot/panotools/libpano libpano.hg<br />
</pre><br />
<br />
If you're a contributor with write access, use the following clone command instead:<br />
<pre><br />
hg clone ssh://${USER}@panotools.hg.sourceforge.net/hgroot/panotools/panotools/libpano libpano.hg<br />
</pre><br />
<br />
In the future there is no need to get the whole source again. Just issue the following commands to bring your source up to date:<br />
<pre><br />
cd libpano.hg<br />
hg pull<br />
hg up<br />
cd ..<br />
</pre><br />
<br />
Now start the building process.<br />
<br />
<pre><br />
mkdir libpano.build<br />
cd libpano.build<br />
cmake ../libpano.hg -DCMAKE_INSTALL_PREFIX=/usr/local -DCPACK_BINARY_DEB:BOOL=ON \<br />
-DCPACK_BINARY_NSIS:BOOL=OFF -DCPACK_BINARY_RPM:BOOL=OFF -DCPACK_BINARY_STGZ:BOOL=OFF \<br />
-DCPACK_BINARY_TBZ2:BOOL=OFF -DCPACK_BINARY_TGZ:BOOL=OFF -DCPACK_BINARY_TZ:BOOL=OFF \<br />
-DCMAKE_BUILD_TYPE=RelWithDebInfo<br />
make package<br />
sudo dpkg -i libpano13-*-Linux.deb<br />
</pre><br />
<br />
Set -DCMAKE_BUILD_TYPE=Debug if you want to help investigate/debug a problem and capture even more debugging information.<br />
<br />
If the install quits with an error, it is likely because of missing folders. Run the following commands and retry:<br />
<pre><br />
sudo mkdir -p /usr/local/include/pano13/<br />
sudo mkdir -p /usr/local/include/pano13/doc<br />
sudo mkdir -p /usr/local/lib/pkgconfig<br />
sudo mkdir -p /usr/local/share/man/man1<br />
sudo mkdir -p /usr/local/bin<br />
</pre><br />
<br />
=== The old autotools way ===<br />
<br />
The above described building process uses CMake to build libpano which has many advantages. Amongst others it creates a clean package to install / deinstall and decreases the likelihood of wrecking the system. However CMake support is relatively new in libpano. The old autotools way is documented below for completeness. You should not need it. However if you do, make sure to run either the CMake build or the autotools build on fresh repository checkouts to avoid interferences.<br />
<br />
<pre><br />
./bootstrap<br />
</pre><br />
<br />
If any libraries are missing, the script will complain (or at least, let you know that some library hasn't been found). In that case you probably need to install the library. To find in what package is that library, a general rule is to run the command <code>apt-cache search ''missingfile''</code>, find the relevant library and install both the library and the related <code>-dev</code> package.<br />
Run the <code>./configure</code> script and repeat this process until you have met all the dependencies.<br />
<br />
Then we are ready to launch the make process with<br />
<pre>make</pre><br />
<br />
If the library successfully compiles, you have to install it with<br />
<pre>sudo make install<br />
sudo ldconfig</pre><br />
The last part is for the OS to be aware of the new library (that has been installed in <code>/usr/local/lib</code>).<br />
We can now go back up one folder level and get ready for hugin.<br />
<pre>cd ..</pre><br />
<br />
== Building Hugin ==<br />
<br />
=== Dependencies ===<br />
<br />
First we need to activate the <code>universe</code> repository (in adept package manager, or by editing the /etc/apt/sources.lst file for example) and get the dependencies.<br />
<br />
The following command will install on your system all build time dependencies except libpano13.<br />
<pre><br />
sudo apt-get install libwxgtk2.8-dev libtiff4-dev libpng12-dev \<br />
libopenexr-dev libexiv2-dev libglut3-dev libglew-dev libboost-dev \<br />
boost-build libboost-thread-dev libboost-graph-dev libboost-regex-dev \<br />
libboost-iostreams-dev libboost-filesystem-dev gettext liblapack-dev \<br />
libxi-dev libxmu-dev libboost-signals-dev libboost-system-dev \<br />
libtclap-dev<br />
</pre><br />
<br />
You could install libpano13 on your system with the command below. However it is likely to be a version of libpano13 that is too old for the current Hugin. It is recommended that you first build your own libpano13 (above). Alternatively, there may be a recent enough version of libpano13 in the Hugin PPA.<br />
<pre><br />
sudo apt-get install libpano13-dev<br />
</pre><br />
<br />
wxWidgets is a critical dependency for the Hugin GUI. In the official Ubuntu repositories it is usually at least a few releases behind the current release, and in some cases many releases behind. The wxWidgets project provides alternative [http://wiki.wxpython.org/InstallingOnUbuntuOrDebian repositories] with newer versions, as well as a [http://wiki.wxpython.org/BuildingDebianPackages instructions] to build binary packages of the most recent releases. Newer versions of wxWidgets are not (yet) absolutely necessary, but since eventually things evolve they are useful for development, testing, and in general should give a better user interface experience as wxWidgets improves over time.<br />
<br />
The following are run-time dependencies. Strictly speaking you don't need them to build Hugin, but you will need them to use it. You don't need this line if you follow the instructions on this page to build ExifTool, Enblend, Autopano-SIFT-C.<br />
<pre><br />
sudo apt-get install libimage-exiftool-perl enblend autopano-sift-c<br />
</pre><br />
<br />
If you want to use the Python scripting tools, you will also need the following dependencies at runtime.<br />
<br />
<pre><br />
sudo apt-get install python-argparse<br />
</pre><br />
<br />
=== Fetch the Source Code with Mercurial ===<br />
<br />
If you already have a repository clone, you only need to pull the latest changes and update the code with:<br />
<pre><br />
cd ~/src/hugin/hugin.hg<br />
hg pull<br />
hg update<br />
</pre><br />
<br />
Else, you need to clone the repository and decide which version/branch to build with:<br />
<pre><br />
mkdir -p ~/src/hugin<br />
cd ~/src/hugin<br />
hg clone http://hugin.hg.sourceforge.net:8000/hgroot/hugin/hugin hugin.hg<br />
cd hugin.hg<br />
hg branches<br />
</pre><br />
<br />
If you are a contributor with write access, you can use<br />
<pre><br />
hg clone ssh://${USER}@hugin.hg.sourceforge.net/hgroot/hugin/hugin hugin.hg<br />
</pre><br />
<br />
The `hg branches` command will list all available branches. If you decide, e.g., to build the 2010.0 branch, you will update to it with:<br />
<pre><br />
hg update -C 2010.0 <br />
</pre><br />
<br />
=== Advanced Use - Multiple Source Trees ===<br />
<br />
You may want to build multiple versions of Hugin on your machine at the same time, e.g. when you want to build side by side a stable version for your productivity and a development version to give feedback to the developers. In that case, you will clone the Mercurial repository that is already on your drive and update from it a source tree to a different branch. Mercurial takes care of details such as optimizing disk usage. The commands for this are:<br />
<br />
<pre><br />
cd ..<br />
hg clone hugin.hg another_hugin<br />
cd another_hugin<br />
hg update -C default<br />
</pre><br />
<br />
You can have as many "another_hugin" folders as you want. Just make sure, when pulling the latest updates from SourceForge, to first pull your main repository (the one you cloned from http://hugin.hg.sourceforge.net:8000/hgroot/hugin/hugin. Then pull all others:<br />
<pre><br />
cd ~/src/hugin/hugin.hg<br />
hg pull<br />
hg update<br />
cd ../another_hugin<br />
hg pull<br />
hg update<br />
</pre><br />
<br />
Reference: [http://groups.google.com/group/hugin-ptx/msg/1ce824dd1364e9be]<br />
<br />
=== Configure the Build Environment ===<br />
<br />
'''Rule:''' You always want to build outside of the source tree to keep the source tree clean. And to avoid confusion, if you have multiple source trees it is preferable to build for each of them in a separate build folder.<br />
<br />
Next we set up the build environment using cmake.<br />
<br />
If you compiled and installed libpano to a non standard location set the variables CMAKE_INCLUDE_PATH and CMAKE_LIBRARY_PATH to point to your install location's include and lib directories.<br />
<br />
If you are building for distribution, you want to set CMAKE_INSTALL_PREFIX=/usr<br />
<br />
<pre><br />
cd ~/src/hugin<br />
mkdir hugin.hg-build<br />
cd hugin.hg-build<br />
cmake ../hugin.hg -DENABLE_LAPACK=YES -DCPACK_BINARY_DEB:BOOL=ON -DCPACK_BINARY_NSIS:BOOL=OFF \<br />
-DCPACK_BINARY_RPM:BOOL=OFF -DCPACK_BINARY_STGZ:BOOL=OFF -DCPACK_BINARY_TBZ2:BOOL=OFF \<br />
-DCPACK_BINARY_TGZ:BOOL=OFF -DCPACK_BINARY_TZ:BOOL=OFF -DCMAKE_BUILD_TYPE=RelWithDebInfo<br />
</pre><br />
<br />
Set -DCMAKE_BUILD_TYPE=Debug if you want to help investigate/debug a problem and capture even more debugging information, however Hugin will be slower and may not work as expected. Don't use a Debug build for production.<br />
<br />
=== Build and Install ===<br />
<br />
Finally, we use make to build the code and package it, and dpkg to install it. Look for the version number in the .deb file created and edit the lines below accordingly: <br />
<br />
<pre><br />
make package<br />
sudo dpkg -i hugin-*-Linux.deb<br />
sudo ldconfig<br />
</pre><br />
<br />
If the install quits with an error, it is likely because of missing folders. Run the following commands and retry: <br />
<pre><br />
sudo mkdir -p /usr/local/share/pixmaps<br />
sudo mkdir -p /usr/local/share/mime/packages<br />
sudo mkdir -p /usr/local/share/applications/<br />
sudo mkdir -p /usr/local/share/icons/gnome/48x48/mimetypes/<br />
sudo mkdir -p /usr/local/share/locale/en_GB/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/es_la/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/fr/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/zh_TW/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/ru/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/ro/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/bg/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/de/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/ko/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/pt_BR/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/zh_CN/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/ja/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/it/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/sl/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/sk/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/sv/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/ca_ES/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/nl/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/fi/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/cs_CZ/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/uk/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/es/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/pl/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/hu/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/es_VE/LC_MESSAGES<br />
sudo mkdir -p /usr/local/share/hugin/xrc/data/help_it_IT<br />
sudo mkdir -p /usr/local/share/hugin/xrc/data/help_en_EN<br />
sudo mkdir -p /usr/local/share/hugin/data/<br />
sudo mkdir -p /usr/local/lib/hugin<br />
sudo mkdir -p /usr/local/share/man/man1<br />
</pre><br />
<br />
'''Important:''' the package does not track dependencies yet, so it likely to fail on machines others than yours.<br />
<br />
Reference: [http://theseblog.free.fr/2007/10/building-hugin-in-ubuntu-feisty-fawn.php]<br />
<br />
=== Dive into the Code ===<br />
<br />
From time to time the API reference is published on the Hugin website, however you are better off with a local copy. To generate it, issue the following commands:<br />
<pre><br />
cd ~/src/hugin/hugin.hg/src<br />
doxygen Doxyfile<br />
</pre><br />
<br />
The documentation is generated in ~/src/hugin/hugin.hg/src/hugin/html<br />
<br />
Point your browser to index.html inside that folder and you have access to all available information. If you find that a class, a function, or anything else is not properly documented; and if you delve into the source code to understand it, kindly add documentation to the code so that the next person in your situation can use your experience as a stepping stone. Thank you!<br />
<br />
== Automatic Control Point Detectors ==<br />
<br />
=== Autopano-sift-C ===<br />
<br />
Pre-Requisites:<br />
<pre><br />
sudo apt-get install libxml2-dev<br />
</pre><br />
<br />
To build<br />
<br />
(Note February 2011: The latest source code of autopano-sift-C has been unstable for a long time now and nobody is working to fix it. Use the 2.5.1 release tarball instead)<br />
<br />
<pre><br />
mkdir -p ~/src/apsc<br />
cd ~/src/apsc<br />
hg clone http://hugin.hg.sourceforge.net:8000/hgroot/hugin/autopano-sift-C apsc.hg<br />
cd apsc.hg<br />
hg branches<br />
hg update -C 2.5.1<br />
cd ..<br />
mkdir apsc.hg.build<br />
cd apsc.hg.build<br />
cmake ../apsc.hg -DCMAKE_INSTALL_PREFIX=/usr/local -DCPACK_BINARY_DEB:BOOL=ON \<br />
-DCPACK_BINARY_NSIS:BOOL=OFF -DCPACK_BINARY_RPM:BOOL=OFF -DCPACK_BINARY_STGZ:BOOL=OFF \<br />
-DCPACK_BINARY_TBZ2:BOOL=OFF -DCPACK_BINARY_TGZ:BOOL=OFF -DCPACK_BINARY_TZ:BOOL=OFF \<br />
-DCMAKE_BUILD_TYPE=Debug<br />
make package<br />
sudo dpkg -i autopano-sift-C-*-Linux.deb<br />
</pre><br />
<br />
=== Match-n-shift ===<br />
<br />
Match-n-shift is yet an other Autopano-SIFT replacement. It comes in a bundle with pto file manipulation perl libraries and a rich selection of other tools that use nona, enblend, ImageMagick among other things. To use match-n-shift, you need to install at least the [http://search.cpan.org/dist/Panotools-Script/ Panotools::Script] library and some other perl modules. It requires:<br />
<br />
* Image::Size 2.9<br />
* Storable 2.0<br />
* Image::ExifTool 6<br />
<br />
Chances are that you do not need to update Storable which is a standard perl module. To check the version of installed versions of these modules, write these lines to the command prompt:<br />
<br />
perl -MStorable -le 'print Storable->VERSION;'<br />
perl -MImage::Size -le 'print Image::Size->VERSION;'<br />
perl -MImage::ExifTool -le 'print Image::ExifTool->VERSION;'<br />
<br />
There are various ways to install or upgrade these modules. Ubuntu has binary packages for many perl modules, you can skip the CPAN installation below and type:<br />
<br />
sudo apt-get install libimage-size-perl libimage-exiftool-perl<br />
<br />
Alternatively, perl is an interpreted language and these modules are pure perl, so installing from source is an easy thing.<br />
<br />
The best place to install perl modules is directly from a CPAN archive. CPAN is short for Comprehensive Perl Archive Network. The program to interact with CPAN comes with all perl installations. Start it by running:<br />
<br />
sudo cpan<br />
<br />
If this is your first time running the program you will be asked a number of questions (you can safely accept the suggested values). Last question lets you select a number of CPAN mirrors nearest to you.<br />
<br />
When all is done, you can enter the install commands after the 'cpan>' prompt:<br />
<br />
install Image::Size Storable Image::ExifTool<br />
<br />
Answer 'y' to any question of dependencies and wait for install to complete. 'exit' leaves the cpan shell.<br />
<br />
Next, you need to retrieve and install the Panotools-Script collection<br />
of perl libraries (Panotools::Script) and programs that use them -<br />
including match-n-shift:<br />
<br />
svn co https://panotools.svn.sourceforge.net/svnroot/panotools/trunk/Panotools-Script Panotools-Script<br />
cd Panotools-Script<br />
perl Makefile.PL<br />
make<br />
make test<br />
sudo make install<br />
<br />
Just to confuse you, you can also ignore everything above and just install Panotools::Script and all its dependencies from CPAN. From command line, type:<br />
<br />
sudo cpan Panotools::Script<br />
<br />
You can run match-n-shift from command line using the same parameters as autopano-c-complete.sh or you can modify hugin to run it for you:<br />
<br />
* start Hugin<br />
* navigate the menu File to Preferences<br />
* In the Preferences window, open the Autopano tab<br />
* Select Autopano -> Autopano-SIFT<br />
* tick the checkbox for Use alternative Autopano-SIFT program<br />
* enter the full path to match-n-shift (/usr/local/bin/match-n-shift) in the Autopano-SIFT field<br />
* enter the following string in the Arguments field:<br />
-f %f -v %v -c -p %p -o %o %i<br />
<br />
=== MatchPoint ===<br />
<br />
MatchPoint is a next generation CP generator. The result of a GSoC2007 project, it is still very experimental. Experience reports needed. Read more [http://groups.google.com/group/hugin-ptx/browse_thread/thread/cba2b2ce94dd9054 here]<br />
<br />
Matchpoint is now located inside the main hugin source tree, no need to checkout separately. It is compiled together with hugin, but not installed by default.<br />
<br />
* copy the MatchPoint executable into /usr/local/bin manually<br />
<pre><br />
cd ~/src/hugin/hugin.hg-build<br />
sudo cp src/matchpoint/matchpoint /usr/local/bin/<br />
</pre><br />
* edit /usr/local/bin/autopano-c-complete.sh (do it with sudo to have the necessary permission)<br />
** line 79: replace the .key.gz extension with .key (not sure if matchpoint supports compression)<br />
** lines 83 and 88: replace '''generatekeys "$arg" $FILENAME $SIZE''' with '''matchpoint "$arg" $FILENAME''' (not sure if the size option or any other options of the original generatekeys are applicable)<br />
<br />
=== Pan-o-matic ===<br />
<br />
Yet another control point generator [http://aorlinsk2.free.fr/panomatic/?p=home Home Page]<br />
<br />
<pre>sudo apt-get install libboost-dev</pre><br />
<br />
Download [http://aorlinsk2.free.fr/panomatic/download.php?d=7&v=0.9.4 Panomatic 0.9.4 bz2] and if you're on Ubuntu 9.10 or newer also the [http://aorlinsk2.free.fr/panomatic/panomatic_gcc44.patch patch] for the gcc4.4 compiler.<br />
<br />
<pre><br />
mkdir -p ~/src/panomatic<br />
cd ~/src/panomatic<br />
wget "http://aorlinsk2.free.fr/panomatic/download.php?d=7&v=0.9.4" -O panomatic-0.9.4-src.tar.bz2<br />
wget http://aorlinsk2.free.fr/panomatic/panomatic_gcc44.patch patch<br />
tar xvfj panomatic-0.9.4-src.tar.bz2<br />
cd panomatic-0.9.4<br />
patch -p 1 < ../panomatic_gcc44.patch<br />
./configure<br />
make<br />
sudo make install<br />
</pre><br />
<br />
To use Pano-o-matic, open Hugin<br />
<br />
* In File > Preferences > Autopano :<br />
* Select Autopano-SIFT<br />
* Check "Use alternative autopano-SIFT program"<br />
* Choose the path to the binary ( /usr/local/bin )<br />
* In Arguments, put : -o %o %i<br />
<br />
==== Pablo's variation ====<br />
<br />
Around the end of the year 2009, Pablo integrated a [http://groups.google.com/group/hugin-ptx/browse_thread/thread/d9c0558c679cad52 new] experimental descriptor based on the geometric blur and DAISY papers. Also, Pablo said that the algorithm is not really based on a published approach, just on some ideas that are mentioned in a few of them, and its currently simpler than any of them:<br />
<br />
o geometric blur: [http://www.eecs.berkeley.edu/~aberg/gb.html]<br />
<br />
o daisy: [http://cvlab.epfl.ch/~tola/daisy.html]<br />
<br />
o descriptor learning: [http://cvlab.epfl.ch/~brown/learndesc/learndesc.html]<br />
<br />
To build that version of panomatic instead, follow these instructions:<br />
<br />
This is current the subject of a GSoC 2010 project and may be available in future versions of Hugin.<br />
<br />
<pre><br />
sudo aptitude install libboost-python-dev bzr cmake libvigraimpex-dev<br />
</pre><br />
<br />
<pre><br />
bzr branch lp:~pablo.dangelo/hugin/panomatic-lib<br />
mkdir build<br />
cd build<br />
cmake ../panomatic-lib<br />
make<br />
sudo make install<br />
</pre><br />
<br />
To use the new descriptor the arguments for Hugin are: '''--sieve1size 100 --sieve2size 2 -o %o %i'''<br />
<br />
== ExifTool ==<br />
<br />
ExifTool is no longer mandatory for Hugin to work. It is used to pass metadata from the input to the output images during the stitching process. <br />
<br />
[http://www.sno.phy.queensu.ca/~phil/exiftool/ ExifTool] is a platform-independent Perl library plus a command-line application for reading, writing and editing meta information in image, audio and video files.<br />
<br />
Usually the version distributed with Ubuntu (8.15 in Ubuntu 10.10; 7.89 in Ubuntu 10.4) is good enough and you don't need to bother with the following instructions. However there were situations in the past and there might be situations in the future where the latest versions offer better support. These issues will occur most likely with specific camera brands/models and the most recent models. The following instructions are for those cases.<br />
<br />
<pre><br />
sudo apt-get purge libimage-exiftool-perl<br />
</pre><br />
<br />
<pre><br />
wget http://www.sno.phy.queensu.ca/~phil/exiftool/Image-ExifTool-8.50.tar.gz<br />
tar -xzf Image-ExifTool-8.50.tar.gz<br />
cd Image-ExifTool-8.50<br />
perl Makefile.PL<br />
make test<br />
sudo make install<br />
</pre><br />
<br />
== Pano Viewers ==<br />
<br />
=== PanoGLView ===<br />
<br />
PanoGLView is an OpenGL hardware accelerated interactive immersive viewer for equirectangular images.<br />
<br />
Pre-Requisites:<br />
<pre>sudo apt-get install wx-common libwxgtk2.8-dev libglew-dev</pre><br />
<br />
To build and install:<br />
<pre><br />
mkdir -p ~/src/panoglview<br />
cd ~/src/panoglview<br />
hg clone http://hugin.hg.sourceforge.net:8000/hgroot/hugin/panoglview panoglview.hg<br />
cd panoglview.hg<br />
hg update<br />
./bootstrap<br />
./configure<br />
make<br />
sudo make install<br />
</pre><br />
<br />
=== FreePV - DEPENDENCIES ARE BROKEN - FAILS TO BUILD ===<br />
<br />
Pre-Requisites:<br />
<pre><br />
sudo apt-get install cmake make pkg-config g++ mozilla-devscripts freeglut3-dev zlib1g-dev \<br />
libjpeg-dev libxext-dev libxmu-dev x11proto-xf86vidmode-dev libxxf86vm-dev libnspr4-dev \<br />
libxml2-dev libpng12-dev<br />
</pre><br />
To build<br />
<pre><br />
svn co https://freepv.svn.sourceforge.net/svnroot/freepv/freepv/trunk/ freepv<br />
cd freepv<br />
cmake .<br />
make<br />
sudo make install<br />
</pre><br />
<br />
=== Panini Perspective Tool ===<br />
<br />
Strictly speaking, Panini is more than just a viewer. It's a powerful tool to extract/transform views and can also be easily used as a viewer.<br />
<br />
Get dependencies:<br />
<pre><br />
sudo apt-get install qt4-qmake libqt4-dev zlib1g-dev<br />
</pre><br />
<br />
Get code:<br />
<pre><br />
mkdir -p ~/src/pvqt<br />
cd ~/src/pvqt<br />
svn co https://pvqt.svn.sourceforge.net/svnroot/pvqt pvqt.svn<br />
</pre><br />
<br />
Build:<br />
<pre><br />
cd pvqt.svn<br />
qmake panini.pro<br />
make<br />
</pre><br />
<br />
Install (brute force):<br />
<pre><br />
sudo cp Panini /usr/local/bin/ <br />
</pre><br />
<br />
Menu Entry for Kubuntu:<br />
<pre><br />
kmenuedit<br />
</pre><br />
<br />
in kmenuedit<br />
* navigate to Graphics<br />
** click on New Item<br />
** Enter "Panini" as Name<br />
** Enter "Perspective Tool" as Description<br />
** click on the empty icon and look for an icon (I used the akonadi one)<br />
** Enter "Panini" as Command<br />
** Click on Save button<br />
<br />
== Notes for Packagers ==<br />
<br />
=== Tarballs ===<br />
<br />
* to get an updated ChangeLog in Mercurial repositories (Hugin has it also in the cmake invocation, use '''-DUPDATE_CHANGELOG=1''')<br />
<pre><br />
hg log --follow --style=changelog <br />
</pre><br />
* to update the ChangeLog in SVN repositories (Panotools)<br />
<pre><br />
svn up<br />
svn2cl<br />
svn ci<br />
</pre><br />
<br />
=== Deb Packages ===<br />
<br />
The deb packages built by CMake (2.8.2) are broken by Debian standard. Please do not distribute them. There are official updated recent packages at the Hugin PPA mentioned above which include nightlies (produced every 24 hours) and stables (produced out of released tarballs). If you miss binaries for your series of Ubuntu and you have built them for yourself following the instructions above, considering moving up one level and contributing to the [[Hugin PPA]].<br />
<br />
[[Category:Software:Hugin]]<br />
[[Category:Software:Platform:Linux]]</div>Onomouhttps://wiki.panotools.org/index.php?title=Hugin_Compiling_Ubuntu&diff=13425Hugin Compiling Ubuntu2011-05-02T18:23:40Z<p>Onomou: /* Building Enblend */ Rearranged steps for updating existing code</p>
<hr />
<div>== Who Is This Page For ==<br />
<br />
These instructions contain the collective wisdom of Hugin contributors that are using Ubuntu or any of its variations (Ku/Xu/Lu/Edu/...buntu). They are work in progress and updated when newer versions of Ubuntu are released or when Hugin introduces new dependencies. They have worked, at the time of release or soon thereafter, with all 'buntu versions up until 10.10. They are intended to help contributors on the learning curve. If you are not here to contribute, spare yourself the effort and see the [[#Shortcut]] section below.<br />
<br />
They are likely to work only for the latest 'buntu release, but you can check this page's history at the time that the older 'buntu version was the most recent one to find the specifics for that version.<br />
<br />
If you are new here, read the whole page. It is recommended that you go sequentially through it.<br />
<br />
If you're familiar with the process and have run it a few time, look at the what's new section for important news.<br />
<br />
Apart from the odd change in package name, nothing should be substantially different (and if does not work, please leave a comment on the [http://groups.google.com/group/hugin-ptx hugin-ptx mailing list]). Don't worry if the same package appears twice in an apt-get install line - apt-get will update existing packages if there is a newer version, and ignore duplicates if the latest version is already installed. On the other hand, if apt-get says that it can't find a package, it might be the odd change in package name. You can find a replacement package by using apt-cache search with a substring of the package required, e.g.<br />
<pre>apt-cache search wxW<br />
</pre><br />
<br />
The goal is to build hugin and the whole set of helper applications required, and start understanding the building process. You will need deeper understanding of the building process if you want to:<br />
* develop code<br />
* translate the latest strings<br />
* document the latest features with manuals and tutorials<br />
* package for distribution<br />
That knowledge is out of scope for this document. This document ends with a binary that is fit for installation on your machine. It is not fit for any other purpose, particularly not for distribution. CMake is [http://groups.google.com/group/hugin-ptx/msg/3f29b207c562fd63 known] to build broken deb packages. Please do not distribute these binaries.<br />
<br />
== What's New ==<br />
<br />
'''5-March-2010''': Foreign library libtclap removed from source tree. This introduces a new dependency on libtclap-dev<br />
<br />
'''February 2010''': Libpano has migrated from SVN to Mercurial.<br />
<br />
'''CMake 2.8.2''', as packaged in Ubuntu 10.10, contains a bug (http://public.kitware.com/Bug/view.php?id=11020) the prevents the created debs to install successfully, due to it not storing needed directories in the deb package.<br />
Installing the resulting debs will fail with a message error saying something like<br />
<br />
<pre><br />
unable to create `/usr/local/share/hugin/xrc/data/redo.png.dpkg-new' (while processing `./usr/local/share/hugin/xrc/data/redo.png'): No such file or directory<br />
</pre><br />
<br />
Commands to create the necessary folders have been documented below and may be added to the CMake build in the repository of Hugin, Libpano, Enblend. However it is possible that the lists are incomplete. If you bump in the above message, the solution is to create the full missing path and run dpkg -i again, recursively adding folders until the install succeed.<br />
<br />
<pre><br />
sudo mkdir -p /usr/local/share/hugin/xrc/data/<br />
</pre><br />
<br />
Another workaround is, to partially rebuild the deb package by hand:<br />
<br />
<pre><br />
mkdir unpacked<br />
cd unpacked/<br />
ar x ../hugin.build/hugin-2010.2.0-Linux.deb<br />
mkdir untarred<br />
cd untarred<br />
tar xzf ../data.tar.gz<br />
tar czf ../data.tar.gz .<br />
cd ..<br />
ar r ../hugin-2010.2.0-Linux.deb debian-binary control.tar.gz data.tar.gz<br />
</pre><br />
<br />
== Shortcut ==<br />
<br />
Hugin evolves fast and the official 'buntu distributions carry versions that are usually 3-6 months older than the 'buntu distribution date. Moreover, they do not backport Hugin and related tools.<br />
<br />
Even if you follow religiously the 'buntu six months update cycle, you may be using a version of Hugin that is one or two release cycles in our past. If your sole objective is to use the new features of Hugin, the instructions in this section are for you. Start a command line terminal, type the three commands and you're done.<br />
<br />
If for some reason that's not enough for you - if you want to actually learn and become a contributor; or if you're just curious about getting even closer to the bleeding edge and trade stability for features and excitement, the rest of this document is for you.<br />
<br />
=== Stable ===<br />
<br />
This will install you the latest stable version of the tools:<br />
<pre><br />
sudo add-apt-repository ppa:hugin/hugin-builds<br />
sudo apt-get update<br />
sudo apt-get install hugin enblend autopano-sift-c panini<br />
</pre><br />
<br />
=== Unstable ===<br />
<br />
This will install you the latest unstable version of the tools that has been built as a binary. While they are likely to work in most cases, there is no guarantee and they are not recommended for production environment. Use at your own risk, and please report (and if possible fix) bugs. Most of the time these unstable builds are closer to the bleeding edge than to the stable builds. If you want the really really really bleeding edge, you'll have to work through the instructions in the next sections, though.<br />
<br />
<pre><br />
sudo add-apt-repository ppa:hugin/hugin-builds<br />
sudo add-apt-repository ppa:hugin/nightly<br />
sudo apt-get update<br />
sudo apt-get install hugin enblend autopano-sift-c panini<br />
</pre><br />
<br />
== Building Environment ==<br />
Since we are going to build hugin, libpano13 and enblend we need to download and install all the development packages. This is very easy with apt-get.<br />
In a terminal window (K menu -> System -> Konsole or Applications -> Accessories -> Terminal (in Kubuntu), Applications -> Accessories -> Terminal (in Ubuntu))<br />
<br />
<pre>sudo apt-get install build-essential autoconf automake1.9 libtool flex bison gdb libc6-dev libgcc1 \<br />
cmake<br />
</pre><br />
<br />
To get the bleeding edge we'll need access to the SVN and Mercurial repositories, and for this we need the correct tools:<br />
<br />
<pre><br />
sudo apt-get install subversion mercurial<br />
</pre><br />
<br />
Not necessary, but useful if you want to revisit configuration sets in ccmake<br />
<pre><br />
sudo apt-get install cmake-curses-gui<br />
</pre><br />
<br />
To get on the same page as far as file system layout is concerned, we'll create a folder to contain all source code in your home folder:<br />
<pre><br />
cd<br />
mkdir -p src<br />
</pre><br />
<br />
=== For Coders ===<br />
<br />
If you want to start to navigate, understand and modify the code, the doxygen generated documentation will be helpful to you.<br />
<br />
<pre><br />
sudo apt-get install doxygen graphviz<br />
</pre><br />
<br />
=== For Distributors ===<br />
<br />
If you want to build packages for distribution, you will also need the following tools and settings.<br />
<br />
<pre><br />
sudo apt-get install subversion-tools<br />
sudo echo 'deb-src ftp://ftp.at.debian.org/debian ../project/experimental main' > debian-experimental.list<br />
mv debian-experimental.list /etc/apt/sources.list.d/<br />
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 55BE302B<br />
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 8B8D7663<br />
sudo apt-get update<br />
sudo apt-get install devscripts<br />
</pre><br />
<br />
You will also need an OpenPGP key, and a Launchpad account. Follow the [[Hugin_Trackers#Launchpad_Account|instructions]] for Launchpad account creation, including the signing of the Ubuntu Code of Conduct.<br />
<br />
Moreover, it is likely that your environment is not clean enough for distribution builds. In that case, and to produce binaries for other Ubuntu series than the one you are running, you will want to set up a dchroot environment (to be documented later on).<br />
<br />
== Building Enblend ==<br />
<br />
Get the dependencies. If you are working with large images (300 megapixels and up), you should have a libtiff-devel compiled with large file support and libstdc++6.<br />
<br />
<pre><br />
sudo apt-get install pkg-config libtiff4-dev libboost-graph-dev libboost-thread-dev \<br />
libboost-filesystem-dev liblcms1-dev libglew1.5-dev libplot-dev libglut3-dev libopenexr-dev \<br />
libxi-dev libxmu-dev help2man libplot-dev liblcms1-dev libboost-system-dev<br />
</pre><br />
<br />
If you also want to build the documentation, add the following dependencies, and add "-DDOC=ON" to the cmake command below. (Be warned, however, that this will drag in over 700MB of additional dependencies. Unless you have a pressing need to build the documentation yourself, you can save yourself some time and disk space by downloading the PDF docs from http://enblend.sourceforge.net .)<br />
<br />
<pre><br />
sudo apt-get install texi2html texinfo fig2ps tidy gnuplot libxml-xpath-perl imagemagick<br />
</pre><br />
<br />
Once all dependencies are in place, get the code. The official repository has migrated from CVS to Mercurial:<br />
<br />
<pre><br />
mkdir -p ~/src/enblend<br />
cd ~/src/enblend<br />
hg clone http://enblend.hg.sourceforge.net:8000/hgroot/enblend/enblend enblend.hg<br />
</pre><br />
<br />
If you already have checked out enblend, to update the code to the latest version you need to run:<br />
<pre><br />
cd enblend.hg<br />
hg pull<br />
hg update<br />
cd ..<br />
</pre><br />
<br />
Then create a build directory and build in there. And install the Package.<br />
<br />
The options below are good for modern multi-core computers. For a single core, you may be better off setting ENABLE_OPENMP to OFF and ENABLE_IMAGECACHE to ON. The two options are mutually exclusive.<br />
<pre><br />
mkdir enblend.build<br />
cd enblend.build<br />
cmake ../enblend.hg -DENABLE_GPU:BOOL=ON -DENABLE_IMAGECACHE:BOOL=OFF -DENABLE_OPENMP:BOOL=ON \<br />
-DCPACK_BINARY_DEB:BOOL=ON -DCPACK_BINARY_NSIS:BOOL=OFF -DCPACK_BINARY_RPM:BOOL=OFF \<br />
-DCPACK_BINARY_STGZ:BOOL=OFF -DCPACK_BINARY_TBZ2:BOOL=OFF -DCPACK_BINARY_TGZ:BOOL=OFF \<br />
-DCPACK_BINARY_TZ:BOOL=OFF -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX:PATH=/usr/local<br />
make package<br />
sudo dpkg -i enblend-4.1.1-Linux.deb<br />
</pre><br />
<br />
If the install quits with an error, it is likely because of missing folders. Run the following commands and retry:<br />
<pre><br />
sudo mkdir -p /usr/local/share/man/man1<br />
sudo mkdir -p /usr/local/bin<br />
</pre><br />
<br />
===The old autotools way===<br />
We are then ready to compile. The CXXFLAGS <tt>--param inline-unit-growth=60</tt> is a workaround for x86_64 systems, Feb 2009, and apparently no longer needed (set by default). If you have an SMP machine and you're building a recent version, <tt>--disable-image-cache</tt> and <tt>--enable-openmp</tt> will speed up enblend/enfuse massively but may cause segmentation faults; in that case you will be better off with <tt>--enable-image-cache</tt> and <tt>--disable-openmp.</tt> <tt>-march=native</tt> is also beneficial and -O2 is better than -O3.<br />
<br />
<pre><br />
make --makefile=Makefile.scm<br />
mkdir BUILD<br />
cd BUILD<br />
CXXFLAGS="--param inline-unit-growth=60 -march=native -O2" ../configure --disable-image-cache \<br />
--enable-openmp<br />
make<br />
</pre><br />
<br />
The second make step can be very long and memory consuming. Make sure you have enough swap space, and go get a healthy snack while the computer is compiling.<br />
<br />
If you encounter problems at any of these stages, please report back to the hugin-ptx mailing list. Report what command in the sequence you were executing, what machine/operating system, the revision checked out from CVS, and all other relevant information.<br />
<br />
You are then ready to install with<br />
<pre><br />
sudo make install<br />
</pre><br />
<br />
== Building Libpano13 ==<br />
<br />
libpano13 is the new version of the PanoTools libraries. This is a necessary component for hugin, and we need to build it first.<br />
To build libpano13 we need some libraries and particularly their <code>dev</code> package:<br />
<br />
<pre>sudo apt-get install zlib1g zlib1g-dev libpng12-dev libjpeg62-dev libtiff4-dev cmake</pre><br />
<br />
On older distributions, zlib1g and zlib1g-dev may not be found. In that case, the same library may be available with the names lib64z1 and lib64z1-dev.<br />
<br />
We then need to download the source code from the central repository:<br />
<br />
<pre><br />
mkdir -p ~/src/libpano<br />
cd ~/src/libpano<br />
hg clone http://panotools.hg.sourceforge.net:8000/hgroot/panotools/libpano libpano.hg<br />
cd libpano.hg<br />
</pre><br />
<br />
If you're a contributor with write access, use the following clone command instead:<br />
<pre><br />
hg clone ssh://${USER}@panotools.hg.sourceforge.net/hgroot/panotools/panotools/libpano libpano.hg<br />
</pre><br />
<br />
In the future there is no need to get the whole source again. Just issue the following commands to bring your source up to date:<br />
<pre><br />
cd ~/src/libpano/libpano.hg<br />
hg pull<br />
hg up<br />
</pre><br />
<br />
Now start the building process.<br />
<br />
<pre><br />
cd ..<br />
mkdir libpano.build<br />
cd libpano.build<br />
cmake ../libpano.hg -DCMAKE_INSTALL_PREFIX=/usr/local -DCPACK_BINARY_DEB:BOOL=ON \<br />
-DCPACK_BINARY_NSIS:BOOL=OFF -DCPACK_BINARY_RPM:BOOL=OFF -DCPACK_BINARY_STGZ:BOOL=OFF \<br />
-DCPACK_BINARY_TBZ2:BOOL=OFF -DCPACK_BINARY_TGZ:BOOL=OFF -DCPACK_BINARY_TZ:BOOL=OFF \<br />
-DCMAKE_BUILD_TYPE=RelWithDebInfo<br />
make package<br />
sudo dpkg -i libpano13-*-Linux.deb<br />
</pre><br />
<br />
Set -DCMAKE_BUILD_TYPE=Debug if you want to help investigate/debug a problem and capture even more debugging information.<br />
<br />
If the install quits with an error, it is likely because of missing folders. Run the following commands and retry:<br />
<pre><br />
sudo mkdir -p /usr/local/include/pano13/<br />
sudo mkdir -p /usr/local/include/pano13/doc<br />
sudo mkdir -p /usr/local/lib/pkgconfig<br />
sudo mkdir -p /usr/local/share/man/man1<br />
sudo mkdir -p /usr/local/bin<br />
</pre><br />
<br />
=== The old autotools way ===<br />
<br />
The above described building process uses CMake to build libpano which has many advantages. Amongst others it creates a clean package to install / deinstall and decreases the likelihood of wrecking the system. However CMake support is relatively new in libpano. The old autotools way is documented below for completeness. You should not need it. However if you do, make sure to run either the CMake build or the autotools build on fresh repository checkouts to avoid interferences.<br />
<br />
<pre><br />
./bootstrap<br />
</pre><br />
<br />
If any libraries are missing, the script will complain (or at least, let you know that some library hasn't been found). In that case you probably need to install the library. To find in what package is that library, a general rule is to run the command <code>apt-cache search ''missingfile''</code>, find the relevant library and install both the library and the related <code>-dev</code> package.<br />
Run the <code>./configure</code> script and repeat this process until you have met all the dependencies.<br />
<br />
Then we are ready to launch the make process with<br />
<pre>make</pre><br />
<br />
If the library successfully compiles, you have to install it with<br />
<pre>sudo make install<br />
sudo ldconfig</pre><br />
The last part is for the OS to be aware of the new library (that has been installed in <code>/usr/local/lib</code>).<br />
We can now go back up one folder level and get ready for hugin.<br />
<pre>cd ..</pre><br />
<br />
== Building Hugin ==<br />
<br />
=== Dependencies ===<br />
<br />
First we need to activate the <code>universe</code> repository (in adept package manager, or by editing the /etc/apt/sources.lst file for example) and get the dependencies.<br />
<br />
The following command will install on your system all build time dependencies except libpano13.<br />
<pre><br />
sudo apt-get install libwxgtk2.8-dev libtiff4-dev libpng12-dev \<br />
libopenexr-dev libexiv2-dev libglut3-dev libglew-dev libboost-dev \<br />
boost-build libboost-thread-dev libboost-graph-dev libboost-regex-dev \<br />
libboost-iostreams-dev libboost-filesystem-dev gettext liblapack-dev \<br />
libxi-dev libxmu-dev libboost-signals-dev libboost-system-dev \<br />
libtclap-dev<br />
</pre><br />
<br />
You could install libpano13 on your system with the command below. However it is likely to be a version of libpano13 that is too old for the current Hugin. It is recommended that you first build your own libpano13 (above). Alternatively, there may be a recent enough version of libpano13 in the Hugin PPA.<br />
<pre><br />
sudo apt-get install libpano13-dev<br />
</pre><br />
<br />
wxWidgets is a critical dependency for the Hugin GUI. In the official Ubuntu repositories it is usually at least a few releases behind the current release, and in some cases many releases behind. The wxWidgets project provides alternative [http://wiki.wxpython.org/InstallingOnUbuntuOrDebian repositories] with newer versions, as well as a [http://wiki.wxpython.org/BuildingDebianPackages instructions] to build binary packages of the most recent releases. Newer versions of wxWidgets are not (yet) absolutely necessary, but since eventually things evolve they are useful for development, testing, and in general should give a better user interface experience as wxWidgets improves over time.<br />
<br />
The following are run-time dependencies. Strictly speaking you don't need them to build Hugin, but you will need them to use it. You don't need this line if you follow the instructions on this page to build ExifTool, Enblend, Autopano-SIFT-C.<br />
<pre><br />
sudo apt-get install libimage-exiftool-perl enblend autopano-sift-c<br />
</pre><br />
<br />
If you want to use the Python scripting tools, you will also need the following dependencies at runtime.<br />
<br />
<pre><br />
sudo apt-get install python-argparse<br />
</pre><br />
<br />
=== Fetch the Source Code with Mercurial ===<br />
<br />
If you already have a repository clone, you only need to pull the latest changes and update the code with:<br />
<pre><br />
cd ~/src/hugin/hugin.hg<br />
hg pull<br />
hg update<br />
</pre><br />
<br />
Else, you need to clone the repository and decide which version/branch to build with:<br />
<pre><br />
mkdir -p ~/src/hugin<br />
cd ~/src/hugin<br />
hg clone http://hugin.hg.sourceforge.net:8000/hgroot/hugin/hugin hugin.hg<br />
cd hugin.hg<br />
hg branches<br />
</pre><br />
<br />
If you are a contributor with write access, you can use<br />
<pre><br />
hg clone ssh://${USER}@hugin.hg.sourceforge.net/hgroot/hugin/hugin hugin.hg<br />
</pre><br />
<br />
The `hg branches` command will list all available branches. If you decide, e.g., to build the 2010.0 branch, you will update to it with:<br />
<pre><br />
hg update -C 2010.0 <br />
</pre><br />
<br />
=== Advanced Use - Multiple Source Trees ===<br />
<br />
You may want to build multiple versions of Hugin on your machine at the same time, e.g. when you want to build side by side a stable version for your productivity and a development version to give feedback to the developers. In that case, you will clone the Mercurial repository that is already on your drive and update from it a source tree to a different branch. Mercurial takes care of details such as optimizing disk usage. The commands for this are:<br />
<br />
<pre><br />
cd ..<br />
hg clone hugin.hg another_hugin<br />
cd another_hugin<br />
hg update -C default<br />
</pre><br />
<br />
You can have as many "another_hugin" folders as you want. Just make sure, when pulling the latest updates from SourceForge, to first pull your main repository (the one you cloned from http://hugin.hg.sourceforge.net:8000/hgroot/hugin/hugin. Then pull all others:<br />
<pre><br />
cd ~/src/hugin/hugin.hg<br />
hg pull<br />
hg update<br />
cd ../another_hugin<br />
hg pull<br />
hg update<br />
</pre><br />
<br />
Reference: [http://groups.google.com/group/hugin-ptx/msg/1ce824dd1364e9be]<br />
<br />
=== Configure the Build Environment ===<br />
<br />
'''Rule:''' You always want to build outside of the source tree to keep the source tree clean. And to avoid confusion, if you have multiple source trees it is preferable to build for each of them in a separate build folder.<br />
<br />
Next we set up the build environment using cmake.<br />
<br />
If you compiled and installed libpano to a non standard location set the variables CMAKE_INCLUDE_PATH and CMAKE_LIBRARY_PATH to point to your install location's include and lib directories.<br />
<br />
If you are building for distribution, you want to set CMAKE_INSTALL_PREFIX=/usr<br />
<br />
<pre><br />
cd ~/src/hugin<br />
mkdir hugin.hg-build<br />
cd hugin.hg-build<br />
cmake ../hugin.hg -DENABLE_LAPACK=YES -DCPACK_BINARY_DEB:BOOL=ON -DCPACK_BINARY_NSIS:BOOL=OFF \<br />
-DCPACK_BINARY_RPM:BOOL=OFF -DCPACK_BINARY_STGZ:BOOL=OFF -DCPACK_BINARY_TBZ2:BOOL=OFF \<br />
-DCPACK_BINARY_TGZ:BOOL=OFF -DCPACK_BINARY_TZ:BOOL=OFF -DCMAKE_BUILD_TYPE=RelWithDebInfo<br />
</pre><br />
<br />
Set -DCMAKE_BUILD_TYPE=Debug if you want to help investigate/debug a problem and capture even more debugging information, however Hugin will be slower and may not work as expected. Don't use a Debug build for production.<br />
<br />
=== Build and Install ===<br />
<br />
Finally, we use make to build the code and package it, and dpkg to install it. Look for the version number in the .deb file created and edit the lines below accordingly: <br />
<br />
<pre><br />
make package<br />
sudo dpkg -i hugin-*-Linux.deb<br />
sudo ldconfig<br />
</pre><br />
<br />
If the install quits with an error, it is likely because of missing folders. Run the following commands and retry: <br />
<pre><br />
sudo mkdir -p /usr/local/share/pixmaps<br />
sudo mkdir -p /usr/local/share/mime/packages<br />
sudo mkdir -p /usr/local/share/applications/<br />
sudo mkdir -p /usr/local/share/icons/gnome/48x48/mimetypes/<br />
sudo mkdir -p /usr/local/share/locale/en_GB/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/es_la/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/fr/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/zh_TW/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/ru/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/ro/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/bg/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/de/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/ko/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/pt_BR/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/zh_CN/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/ja/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/it/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/sl/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/sk/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/sv/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/ca_ES/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/nl/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/fi/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/cs_CZ/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/uk/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/es/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/pl/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/hu/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/es_VE/LC_MESSAGES<br />
sudo mkdir -p /usr/local/share/hugin/xrc/data/help_it_IT<br />
sudo mkdir -p /usr/local/share/hugin/xrc/data/help_en_EN<br />
sudo mkdir -p /usr/local/share/hugin/data/<br />
sudo mkdir -p /usr/local/lib/hugin<br />
sudo mkdir -p /usr/local/share/man/man1<br />
</pre><br />
<br />
'''Important:''' the package does not track dependencies yet, so it likely to fail on machines others than yours.<br />
<br />
Reference: [http://theseblog.free.fr/2007/10/building-hugin-in-ubuntu-feisty-fawn.php]<br />
<br />
=== Dive into the Code ===<br />
<br />
From time to time the API reference is published on the Hugin website, however you are better off with a local copy. To generate it, issue the following commands:<br />
<pre><br />
cd ~/src/hugin/hugin.hg/src<br />
doxygen Doxyfile<br />
</pre><br />
<br />
The documentation is generated in ~/src/hugin/hugin.hg/src/hugin/html<br />
<br />
Point your browser to index.html inside that folder and you have access to all available information. If you find that a class, a function, or anything else is not properly documented; and if you delve into the source code to understand it, kindly add documentation to the code so that the next person in your situation can use your experience as a stepping stone. Thank you!<br />
<br />
== Automatic Control Point Detectors ==<br />
<br />
=== Autopano-sift-C ===<br />
<br />
Pre-Requisites:<br />
<pre><br />
sudo apt-get install libxml2-dev<br />
</pre><br />
<br />
To build<br />
<br />
(Note February 2011: The latest source code of autopano-sift-C has been unstable for a long time now and nobody is working to fix it. Use the 2.5.1 release tarball instead)<br />
<br />
<pre><br />
mkdir -p ~/src/apsc<br />
cd ~/src/apsc<br />
hg clone http://hugin.hg.sourceforge.net:8000/hgroot/hugin/autopano-sift-C apsc.hg<br />
cd apsc.hg<br />
hg branches<br />
hg update -C 2.5.1<br />
cd ..<br />
mkdir apsc.hg.build<br />
cd apsc.hg.build<br />
cmake ../apsc.hg -DCMAKE_INSTALL_PREFIX=/usr/local -DCPACK_BINARY_DEB:BOOL=ON \<br />
-DCPACK_BINARY_NSIS:BOOL=OFF -DCPACK_BINARY_RPM:BOOL=OFF -DCPACK_BINARY_STGZ:BOOL=OFF \<br />
-DCPACK_BINARY_TBZ2:BOOL=OFF -DCPACK_BINARY_TGZ:BOOL=OFF -DCPACK_BINARY_TZ:BOOL=OFF \<br />
-DCMAKE_BUILD_TYPE=Debug<br />
make package<br />
sudo dpkg -i autopano-sift-C-*-Linux.deb<br />
</pre><br />
<br />
=== Match-n-shift ===<br />
<br />
Match-n-shift is yet an other Autopano-SIFT replacement. It comes in a bundle with pto file manipulation perl libraries and a rich selection of other tools that use nona, enblend, ImageMagick among other things. To use match-n-shift, you need to install at least the [http://search.cpan.org/dist/Panotools-Script/ Panotools::Script] library and some other perl modules. It requires:<br />
<br />
* Image::Size 2.9<br />
* Storable 2.0<br />
* Image::ExifTool 6<br />
<br />
Chances are that you do not need to update Storable which is a standard perl module. To check the version of installed versions of these modules, write these lines to the command prompt:<br />
<br />
perl -MStorable -le 'print Storable->VERSION;'<br />
perl -MImage::Size -le 'print Image::Size->VERSION;'<br />
perl -MImage::ExifTool -le 'print Image::ExifTool->VERSION;'<br />
<br />
There are various ways to install or upgrade these modules. Ubuntu has binary packages for many perl modules, you can skip the CPAN installation below and type:<br />
<br />
sudo apt-get install libimage-size-perl libimage-exiftool-perl<br />
<br />
Alternatively, perl is an interpreted language and these modules are pure perl, so installing from source is an easy thing.<br />
<br />
The best place to install perl modules is directly from a CPAN archive. CPAN is short for Comprehensive Perl Archive Network. The program to interact with CPAN comes with all perl installations. Start it by running:<br />
<br />
sudo cpan<br />
<br />
If this is your first time running the program you will be asked a number of questions (you can safely accept the suggested values). Last question lets you select a number of CPAN mirrors nearest to you.<br />
<br />
When all is done, you can enter the install commands after the 'cpan>' prompt:<br />
<br />
install Image::Size Storable Image::ExifTool<br />
<br />
Answer 'y' to any question of dependencies and wait for install to complete. 'exit' leaves the cpan shell.<br />
<br />
Next, you need to retrieve and install the Panotools-Script collection<br />
of perl libraries (Panotools::Script) and programs that use them -<br />
including match-n-shift:<br />
<br />
svn co https://panotools.svn.sourceforge.net/svnroot/panotools/trunk/Panotools-Script Panotools-Script<br />
cd Panotools-Script<br />
perl Makefile.PL<br />
make<br />
make test<br />
sudo make install<br />
<br />
Just to confuse you, you can also ignore everything above and just install Panotools::Script and all its dependencies from CPAN. From command line, type:<br />
<br />
sudo cpan Panotools::Script<br />
<br />
You can run match-n-shift from command line using the same parameters as autopano-c-complete.sh or you can modify hugin to run it for you:<br />
<br />
* start Hugin<br />
* navigate the menu File to Preferences<br />
* In the Preferences window, open the Autopano tab<br />
* Select Autopano -> Autopano-SIFT<br />
* tick the checkbox for Use alternative Autopano-SIFT program<br />
* enter the full path to match-n-shift (/usr/local/bin/match-n-shift) in the Autopano-SIFT field<br />
* enter the following string in the Arguments field:<br />
-f %f -v %v -c -p %p -o %o %i<br />
<br />
=== MatchPoint ===<br />
<br />
MatchPoint is a next generation CP generator. The result of a GSoC2007 project, it is still very experimental. Experience reports needed. Read more [http://groups.google.com/group/hugin-ptx/browse_thread/thread/cba2b2ce94dd9054 here]<br />
<br />
Matchpoint is now located inside the main hugin source tree, no need to checkout separately. It is compiled together with hugin, but not installed by default.<br />
<br />
* copy the MatchPoint executable into /usr/local/bin manually<br />
<pre><br />
cd ~/src/hugin/hugin.hg-build<br />
sudo cp src/matchpoint/matchpoint /usr/local/bin/<br />
</pre><br />
* edit /usr/local/bin/autopano-c-complete.sh (do it with sudo to have the necessary permission)<br />
** line 79: replace the .key.gz extension with .key (not sure if matchpoint supports compression)<br />
** lines 83 and 88: replace '''generatekeys "$arg" $FILENAME $SIZE''' with '''matchpoint "$arg" $FILENAME''' (not sure if the size option or any other options of the original generatekeys are applicable)<br />
<br />
=== Pan-o-matic ===<br />
<br />
Yet another control point generator [http://aorlinsk2.free.fr/panomatic/?p=home Home Page]<br />
<br />
<pre>sudo apt-get install libboost-dev</pre><br />
<br />
Download [http://aorlinsk2.free.fr/panomatic/download.php?d=7&v=0.9.4 Panomatic 0.9.4 bz2] and if you're on Ubuntu 9.10 or newer also the [http://aorlinsk2.free.fr/panomatic/panomatic_gcc44.patch patch] for the gcc4.4 compiler.<br />
<br />
<pre><br />
mkdir -p ~/src/panomatic<br />
cd ~/src/panomatic<br />
wget "http://aorlinsk2.free.fr/panomatic/download.php?d=7&v=0.9.4" -O panomatic-0.9.4-src.tar.bz2<br />
wget http://aorlinsk2.free.fr/panomatic/panomatic_gcc44.patch patch<br />
tar xvfj panomatic-0.9.4-src.tar.bz2<br />
cd panomatic-0.9.4<br />
patch -p 1 < ../panomatic_gcc44.patch<br />
./configure<br />
make<br />
sudo make install<br />
</pre><br />
<br />
To use Pano-o-matic, open Hugin<br />
<br />
* In File > Preferences > Autopano :<br />
* Select Autopano-SIFT<br />
* Check "Use alternative autopano-SIFT program"<br />
* Choose the path to the binary ( /usr/local/bin )<br />
* In Arguments, put : -o %o %i<br />
<br />
==== Pablo's variation ====<br />
<br />
Around the end of the year 2009, Pablo integrated a [http://groups.google.com/group/hugin-ptx/browse_thread/thread/d9c0558c679cad52 new] experimental descriptor based on the geometric blur and DAISY papers. Also, Pablo said that the algorithm is not really based on a published approach, just on some ideas that are mentioned in a few of them, and its currently simpler than any of them:<br />
<br />
o geometric blur: [http://www.eecs.berkeley.edu/~aberg/gb.html]<br />
<br />
o daisy: [http://cvlab.epfl.ch/~tola/daisy.html]<br />
<br />
o descriptor learning: [http://cvlab.epfl.ch/~brown/learndesc/learndesc.html]<br />
<br />
To build that version of panomatic instead, follow these instructions:<br />
<br />
This is current the subject of a GSoC 2010 project and may be available in future versions of Hugin.<br />
<br />
<pre><br />
sudo aptitude install libboost-python-dev bzr cmake libvigraimpex-dev<br />
</pre><br />
<br />
<pre><br />
bzr branch lp:~pablo.dangelo/hugin/panomatic-lib<br />
mkdir build<br />
cd build<br />
cmake ../panomatic-lib<br />
make<br />
sudo make install<br />
</pre><br />
<br />
To use the new descriptor the arguments for Hugin are: '''--sieve1size 100 --sieve2size 2 -o %o %i'''<br />
<br />
== ExifTool ==<br />
<br />
ExifTool is no longer mandatory for Hugin to work. It is used to pass metadata from the input to the output images during the stitching process. <br />
<br />
[http://www.sno.phy.queensu.ca/~phil/exiftool/ ExifTool] is a platform-independent Perl library plus a command-line application for reading, writing and editing meta information in image, audio and video files.<br />
<br />
Usually the version distributed with Ubuntu (8.15 in Ubuntu 10.10; 7.89 in Ubuntu 10.4) is good enough and you don't need to bother with the following instructions. However there were situations in the past and there might be situations in the future where the latest versions offer better support. These issues will occur most likely with specific camera brands/models and the most recent models. The following instructions are for those cases.<br />
<br />
<pre><br />
sudo apt-get purge libimage-exiftool-perl<br />
</pre><br />
<br />
<pre><br />
wget http://www.sno.phy.queensu.ca/~phil/exiftool/Image-ExifTool-8.50.tar.gz<br />
tar -xzf Image-ExifTool-8.50.tar.gz<br />
cd Image-ExifTool-8.50<br />
perl Makefile.PL<br />
make test<br />
sudo make install<br />
</pre><br />
<br />
== Pano Viewers ==<br />
<br />
=== PanoGLView ===<br />
<br />
PanoGLView is an OpenGL hardware accelerated interactive immersive viewer for equirectangular images.<br />
<br />
Pre-Requisites:<br />
<pre>sudo apt-get install wx-common libwxgtk2.8-dev libglew-dev</pre><br />
<br />
To build and install:<br />
<pre><br />
mkdir -p ~/src/panoglview<br />
cd ~/src/panoglview<br />
hg clone http://hugin.hg.sourceforge.net:8000/hgroot/hugin/panoglview panoglview.hg<br />
cd panoglview.hg<br />
hg update<br />
./bootstrap<br />
./configure<br />
make<br />
sudo make install<br />
</pre><br />
<br />
=== FreePV - DEPENDENCIES ARE BROKEN - FAILS TO BUILD ===<br />
<br />
Pre-Requisites:<br />
<pre><br />
sudo apt-get install cmake make pkg-config g++ mozilla-devscripts freeglut3-dev zlib1g-dev \<br />
libjpeg-dev libxext-dev libxmu-dev x11proto-xf86vidmode-dev libxxf86vm-dev libnspr4-dev \<br />
libxml2-dev libpng12-dev<br />
</pre><br />
To build<br />
<pre><br />
svn co https://freepv.svn.sourceforge.net/svnroot/freepv/freepv/trunk/ freepv<br />
cd freepv<br />
cmake .<br />
make<br />
sudo make install<br />
</pre><br />
<br />
=== Panini Perspective Tool ===<br />
<br />
Strictly speaking, Panini is more than just a viewer. It's a powerful tool to extract/transform views and can also be easily used as a viewer.<br />
<br />
Get dependencies:<br />
<pre><br />
sudo apt-get install qt4-qmake libqt4-dev zlib1g-dev<br />
</pre><br />
<br />
Get code:<br />
<pre><br />
mkdir -p ~/src/pvqt<br />
cd ~/src/pvqt<br />
svn co https://pvqt.svn.sourceforge.net/svnroot/pvqt pvqt.svn<br />
</pre><br />
<br />
Build:<br />
<pre><br />
cd pvqt.svn<br />
qmake panini.pro<br />
make<br />
</pre><br />
<br />
Install (brute force):<br />
<pre><br />
sudo cp Panini /usr/local/bin/ <br />
</pre><br />
<br />
Menu Entry for Kubuntu:<br />
<pre><br />
kmenuedit<br />
</pre><br />
<br />
in kmenuedit<br />
* navigate to Graphics<br />
** click on New Item<br />
** Enter "Panini" as Name<br />
** Enter "Perspective Tool" as Description<br />
** click on the empty icon and look for an icon (I used the akonadi one)<br />
** Enter "Panini" as Command<br />
** Click on Save button<br />
<br />
== Notes for Packagers ==<br />
<br />
=== Tarballs ===<br />
<br />
* to get an updated ChangeLog in Mercurial repositories (Hugin has it also in the cmake invocation, use '''-DUPDATE_CHANGELOG=1''')<br />
<pre><br />
hg log --follow --style=changelog <br />
</pre><br />
* to update the ChangeLog in SVN repositories (Panotools)<br />
<pre><br />
svn up<br />
svn2cl<br />
svn ci<br />
</pre><br />
<br />
=== Deb Packages ===<br />
<br />
The deb packages built by CMake (2.8.2) are broken by Debian standard. Please do not distribute them. There are official updated recent packages at the Hugin PPA mentioned above which include nightlies (produced every 24 hours) and stables (produced out of released tarballs). If you miss binaries for your series of Ubuntu and you have built them for yourself following the instructions above, considering moving up one level and contributing to the [[Hugin PPA]].<br />
<br />
[[Category:Software:Hugin]]<br />
[[Category:Software:Platform:Linux]]</div>Onomouhttps://wiki.panotools.org/index.php?title=User:Onomou&diff=13419User:Onomou2011-04-22T04:26:13Z<p>Onomou: Words...</p>
<hr />
<div>Hi, this is my page. I have a [[/Sandbox]].<br />
<br />
<br />
== '''2011 GSoC Proposal''' ==<br />
<br />
'''Short Description'''<br />
Currently, control points between pairs of photographs must be added by users manually or "guessed" using a sifting algorithm. This project aims at a sort of hybrid for straight lines. The user draws straight lines on a pair of images, and the computer then automatically adds and refines control points along the given path. Such a method will allow quick and simple alignment of photographs with straight lines in them.<br />
<br />
'''About Me'''<br />
<br />
My name is Steven Williams and I am in my fourth year studying undergraduate mathematics at Walla Walla University. I have taken classes in data structures using C++. I have been an amateur photographer for about six years and own a Canon Powershot A620 and Canon Digital Rebel XTi. The only special equipment I have is a Manfrotto ball head tripod, but I shoot mostly handheld. Some of my photographs, including panoramas I have made using Hugin, can be found on Flickr[http://www.flickr.com/photos/onomou/] and Panoramio[http://www.panoramio.com/user/619377]. I also use Hugin to align images for exposure blending using qtpfsgui or enblend/enfuse.<br />
<br />
'''Coding Skills'''<br />
<br />
I have been writing in C++ for three years. I became interested in programming in high school, and wrote a Mastermind clone in TI-Basic on my TI-89. I have a little experience with C# and recently Processing. My current primary computer is a homebuilt quad-core desktop running Windows 7 with Ubuntu in a virtual machine.<br />
<br />
Recently I wrote a program to visualise and interact with 2D IFS fractals as part of a senior seminar project. It is on Git here [https://github.com/onomou/ifsFractalGen].<br />
<br />
I have patched [https://bugs.launchpad.net/bugs/749669 Bug #749669], which addresses crashing when trying to load an image as a .pto project.<br />
<br />
'''Proposal'''<br />
<br />
My only previous interaction with the Hugin project is as a user. I have been using Hugin for several years to stitch panoramas. (UPDATE: see [https://bugs.launchpad.net/bugs/749669] for a patch I did for the program)<br />
<br />
For this project I would like to take up the Straight Line UI proposal from here [http://wiki.panotools.org/Straight_Line_UI_proposal]. This is also a blueprint [https://blueprints.launchpad.net/hugin/+spec/straight-line-ui] on Launchpad. I have had some experience from my IFS program working with user input and object manipulation and am excited to develop a new tool for Hugin that will enable users to match their photographs quickly and easily.<br />
<br />
I propose a system that will take a line drawn by the user in the quick preview window, and using a corner detection algorithm "snap" it to the nearest edge detected for more precise straight line input. Once this is done for the same line in matching images, the program will scan points along this line and automatically match control points in each image.<br />
<br />
I plan on spending at least 40 hours per week on this project. University graduation happens around June 10, so I may not be able to spend as much time during the two or three days around that weekend. Here is a (very) tentative schedule:<br />
<br />
'''May 24-June 3''' Finalize inputs/outputs for new straight line tool, get<br />
<br />
'''June 6-17''' Write line input methods for user interaction and rough algorithm for guessing/sifting control points on the given lines.<br />
<br />
'''June 20-July 1''' Implement edge detection for given lines, test on lots of images<br />
<br />
'''July 4-8''' Clean up and test for mid-term evaluation<br />
<br />
'''July 18-29''' Refine control point guessing procedure<br />
<br />
'''August 1-12''' Extra week for bugs/slow progress/etc.<br />
<br />
'''August 15-19''' Finalize/improve documentation</div>Onomouhttps://wiki.panotools.org/index.php?title=User:Onomou&diff=13418User:Onomou2011-04-22T04:25:43Z<p>Onomou: /* 2011 GSoC Proposal */ Add info on patch</p>
<hr />
<div>Hi, this is my page. Not much here except a [[/Sandbox]].<br />
<br />
<br />
== '''2011 GSoC Proposal''' ==<br />
<br />
'''Short Description'''<br />
Currently, control points between pairs of photographs must be added by users manually or "guessed" using a sifting algorithm. This project aims at a sort of hybrid for straight lines. The user draws straight lines on a pair of images, and the computer then automatically adds and refines control points along the given path. Such a method will allow quick and simple alignment of photographs with straight lines in them.<br />
<br />
'''About Me'''<br />
<br />
My name is Steven Williams and I am in my fourth year studying undergraduate mathematics at Walla Walla University. I have taken classes in data structures using C++. I have been an amateur photographer for about six years and own a Canon Powershot A620 and Canon Digital Rebel XTi. The only special equipment I have is a Manfrotto ball head tripod, but I shoot mostly handheld. Some of my photographs, including panoramas I have made using Hugin, can be found on Flickr[http://www.flickr.com/photos/onomou/] and Panoramio[http://www.panoramio.com/user/619377]. I also use Hugin to align images for exposure blending using qtpfsgui or enblend/enfuse.<br />
<br />
'''Coding Skills'''<br />
<br />
I have been writing in C++ for three years. I became interested in programming in high school, and wrote a Mastermind clone in TI-Basic on my TI-89. I have a little experience with C# and recently Processing. My current primary computer is a homebuilt quad-core desktop running Windows 7 with Ubuntu in a virtual machine.<br />
<br />
Recently I wrote a program to visualise and interact with 2D IFS fractals as part of a senior seminar project. It is on Git here [https://github.com/onomou/ifsFractalGen].<br />
<br />
I have patched [https://bugs.launchpad.net/bugs/749669 Bug #749669], which addresses crashing when trying to load an image as a .pto project.<br />
<br />
'''Proposal'''<br />
<br />
My only previous interaction with the Hugin project is as a user. I have been using Hugin for several years to stitch panoramas. (UPDATE: see [https://bugs.launchpad.net/bugs/749669] for a patch I did for the program)<br />
<br />
For this project I would like to take up the Straight Line UI proposal from here [http://wiki.panotools.org/Straight_Line_UI_proposal]. This is also a blueprint [https://blueprints.launchpad.net/hugin/+spec/straight-line-ui] on Launchpad. I have had some experience from my IFS program working with user input and object manipulation and am excited to develop a new tool for Hugin that will enable users to match their photographs quickly and easily.<br />
<br />
I propose a system that will take a line drawn by the user in the quick preview window, and using a corner detection algorithm "snap" it to the nearest edge detected for more precise straight line input. Once this is done for the same line in matching images, the program will scan points along this line and automatically match control points in each image.<br />
<br />
I plan on spending at least 40 hours per week on this project. University graduation happens around June 10, so I may not be able to spend as much time during the two or three days around that weekend. Here is a (very) tentative schedule:<br />
<br />
'''May 24-June 3''' Finalize inputs/outputs for new straight line tool, get<br />
<br />
'''June 6-17''' Write line input methods for user interaction and rough algorithm for guessing/sifting control points on the given lines.<br />
<br />
'''June 20-July 1''' Implement edge detection for given lines, test on lots of images<br />
<br />
'''July 4-8''' Clean up and test for mid-term evaluation<br />
<br />
'''July 18-29''' Refine control point guessing procedure<br />
<br />
'''August 1-12''' Extra week for bugs/slow progress/etc.<br />
<br />
'''August 15-19''' Finalize/improve documentation</div>Onomouhttps://wiki.panotools.org/index.php?title=Historical:Straight_Line_UI_proposal&diff=13416Historical:Straight Line UI proposal2011-04-21T23:23:10Z<p>Onomou: /* Prerequisite */ More information...</p>
<hr />
<div>=A New Tool For Straight Line Definition=<br />
<br />
==Preface==<br />
<br />
Currently the only one way to specify lines in a panorama is to manually create pairs of control points. This approach has multiple disadvantages. This is not intuitive, and defining multiple lines can be tedious work. Also the lines are a part of output space and thus defining them in output space seems to be more appropriate.<br />
<br />
This straight line tool could make it possible for the user to draw lines on buildings, fences, horizons, and other objects to quickly align sets of images without even adding single points manually. It would make the program more ergonomic for the user and greatly speed up the process of aligning images.<br />
<br />
==Proposal==<br />
<br />
This may involve moving the straight line definition into the Fast Preview, but it could be implemented (probably with less work) in the control point tab, where adding lines would be another option alongside the current point adding.<br />
<br />
The line can be drawn by having the user click two points on the line, with the line being shown as the user draws it to aid accuracy. Then using either the lens_calibrate tool or a new edge detection algorithm, Hugin will check (if the user wants) if there is a better fit for the line (inaccurate clicking could make the line less accurate). Control points would then be added either at regular intervals along the line (between the endpoints the user clicked), and then revised or thrown out if there is not a strong correlation between pairs of images.<br />
<br />
The line being drawn by the user should either take into account lens data given (eg. fisheye lenses generally obliterate straight lines) or there should be an option to define the line using three points or as a Bezier curve or spline.<br />
<br />
The user may specify the type of line – whether it's horizontal, vertical or just a straight line. It might be handy if there was an option to run optimizer as the lines are added so the user would have an immediate feedback how the lines change the panorama. Note that optimizer shouldn't be run by default, because optimization may take a lot of time, rendering proposed tool unusable.<br />
<br />
One problem that needs to be resolved is how the line should be specified when multiple images overlap as noted by kfj in [1].<br />
<br />
The idea is based on the idea from RawTherapee forum [2].<br />
<br />
==Prerequisite==<br />
<br />
Were this to be implemented in the fast preview window, it would need a zooming function to set exactly the points. This is already at least partially done in the control point tab. Also, it is necessary to identify the image in which the line should be created in case the point is setting in an overlapping area or using the function for HDR panoramas. See other blueprint [3]. This is already implemented in the control point tab.<br />
<br />
For the reasons listed above, this should probably be first done in the control point tab, then moved to the fast preview window only if there is good reason. The CP tab would need to have a few new buttons added to switch between adding lines and points, and we would need to determine whether it is feasible to define the horizon in that tab as well. This may enable the user to watch the fast preview window while adding straight lines to see changes live. However, the problem of how editing the panorama in the fast preview window affects those horizon control points in the CP tab would have to addressed.<br />
<br />
==References==<br />
<br />
[1] http://groups.google.com/group/hugin-ptx/browse_thread/thread/dbb85dad10715586<br />
<br />
[2] http://rawtherapee.com/forum/viewtopic.php?p=17063#17063<br />
<br />
[3] https://blueprints.launchpad.net/hugin/+spec/extendedpreview<br />
<br />
[[Category:Software:Platform:Windows]]<br />
[[Category:Software:Platform:Mac OS X]]<br />
[[Category:Software:Platform:Linux]]<br />
[[Category:Software:Hugin]]<br />
[[Category:Community:Project]]</div>Onomouhttps://wiki.panotools.org/index.php?title=Historical:Straight_Line_UI_proposal&diff=13415Historical:Straight Line UI proposal2011-04-21T23:16:47Z<p>Onomou: /* Proposal */</p>
<hr />
<div>=A New Tool For Straight Line Definition=<br />
<br />
==Preface==<br />
<br />
Currently the only one way to specify lines in a panorama is to manually create pairs of control points. This approach has multiple disadvantages. This is not intuitive, and defining multiple lines can be tedious work. Also the lines are a part of output space and thus defining them in output space seems to be more appropriate.<br />
<br />
This straight line tool could make it possible for the user to draw lines on buildings, fences, horizons, and other objects to quickly align sets of images without even adding single points manually. It would make the program more ergonomic for the user and greatly speed up the process of aligning images.<br />
<br />
==Proposal==<br />
<br />
This may involve moving the straight line definition into the Fast Preview, but it could be implemented (probably with less work) in the control point tab, where adding lines would be another option alongside the current point adding.<br />
<br />
The line can be drawn by having the user click two points on the line, with the line being shown as the user draws it to aid accuracy. Then using either the lens_calibrate tool or a new edge detection algorithm, Hugin will check (if the user wants) if there is a better fit for the line (inaccurate clicking could make the line less accurate). Control points would then be added either at regular intervals along the line (between the endpoints the user clicked), and then revised or thrown out if there is not a strong correlation between pairs of images.<br />
<br />
The line being drawn by the user should either take into account lens data given (eg. fisheye lenses generally obliterate straight lines) or there should be an option to define the line using three points or as a Bezier curve or spline.<br />
<br />
The user may specify the type of line – whether it's horizontal, vertical or just a straight line. It might be handy if there was an option to run optimizer as the lines are added so the user would have an immediate feedback how the lines change the panorama. Note that optimizer shouldn't be run by default, because optimization may take a lot of time, rendering proposed tool unusable.<br />
<br />
One problem that needs to be resolved is how the line should be specified when multiple images overlap as noted by kfj in [1].<br />
<br />
The idea is based on the idea from RawTherapee forum [2].<br />
<br />
==Prerequisite==<br />
<br />
Before this works the fast preview needs some zooming function to set exactly the points. Also it is necessary to identify the image in which the line should be created in case the point is setting in an overlapping area or using the function for HDR panoramas. See other blueprint [3].<br />
<br />
==References==<br />
<br />
[1] http://groups.google.com/group/hugin-ptx/browse_thread/thread/dbb85dad10715586<br />
<br />
[2] http://rawtherapee.com/forum/viewtopic.php?p=17063#17063<br />
<br />
[3] https://blueprints.launchpad.net/hugin/+spec/extendedpreview<br />
<br />
[[Category:Software:Platform:Windows]]<br />
[[Category:Software:Platform:Mac OS X]]<br />
[[Category:Software:Platform:Linux]]<br />
[[Category:Software:Hugin]]<br />
[[Category:Community:Project]]</div>Onomouhttps://wiki.panotools.org/index.php?title=Historical:Straight_Line_UI_proposal&diff=13414Historical:Straight Line UI proposal2011-04-21T23:13:58Z<p>Onomou: /* Preface */ More revision</p>
<hr />
<div>=A New Tool For Straight Line Definition=<br />
<br />
==Preface==<br />
<br />
Currently the only one way to specify lines in a panorama is to manually create pairs of control points. This approach has multiple disadvantages. This is not intuitive, and defining multiple lines can be tedious work. Also the lines are a part of output space and thus defining them in output space seems to be more appropriate.<br />
<br />
This straight line tool could make it possible for the user to draw lines on buildings, fences, horizons, and other objects to quickly align sets of images without even adding single points manually. It would make the program more ergonomic for the user and greatly speed up the process of aligning images.<br />
<br />
==Proposal==<br />
<br />
Move the straight line definition into the Fast Preview. The line can be drawn by having the user click two points on the line, with the line being shown as the user draws it to aid accuracy. Then using either the lens_calibrate tool or a new edge detection algorithm, Hugin will check (if the user wants) if there is a better fit for the line (inaccurate clicking could make the line less accurate). Control points would then be added either at regular intervals along the line (between the endpoints the user clicked), and then revised or thrown out if there is not a strong correlation between pairs of images.<br />
<br />
The line being drawn by the user should either take into account lens data given (eg. fisheye lenses generally obliterate straight lines) or there should be an option to define the line using three points or as a Bezier curve or spline.<br />
<br />
The user may specify the type of line – whether it's horizontal, vertical or just a straight line. It might be handy if there was an option to run optimizer as the lines are added so the user would have an immediate feedback how the lines change the panorama. Note that optimizer shouldn't be run by default, because optimization may take a lot of time, rendering proposed tool unusable.<br />
<br />
One problem that needs to be resolved is how the line should be specified when multiple images overlap as noted by kfj in [1].<br />
<br />
The idea is based on the idea from RawTherapee forum [2].<br />
<br />
==Prerequisite==<br />
<br />
Before this works the fast preview needs some zooming function to set exactly the points. Also it is necessary to identify the image in which the line should be created in case the point is setting in an overlapping area or using the function for HDR panoramas. See other blueprint [3].<br />
<br />
==References==<br />
<br />
[1] http://groups.google.com/group/hugin-ptx/browse_thread/thread/dbb85dad10715586<br />
<br />
[2] http://rawtherapee.com/forum/viewtopic.php?p=17063#17063<br />
<br />
[3] https://blueprints.launchpad.net/hugin/+spec/extendedpreview<br />
<br />
[[Category:Software:Platform:Windows]]<br />
[[Category:Software:Platform:Mac OS X]]<br />
[[Category:Software:Platform:Linux]]<br />
[[Category:Software:Hugin]]<br />
[[Category:Community:Project]]</div>Onomouhttps://wiki.panotools.org/index.php?title=Historical:Straight_Line_UI_proposal&diff=13413Historical:Straight Line UI proposal2011-04-21T23:10:42Z<p>Onomou: /* Proposal */ Rework proposal for GSoC</p>
<hr />
<div>=A New Tool For Straight Line Definition=<br />
<br />
==Preface==<br />
<br />
Currently the only one way to specify lines in a panorama is to manually create pairs of control points. This approach has multiple disadvantages. From user perspective it's not very intuitive and defining multiple lines can be a pretty tedious work. Also the lines are a part of output space and thus defining them in output space seems to be more appropriate.<br />
<br />
==Proposal==<br />
<br />
Move the straight line definition into the Fast Preview. The line can be drawn by having the user click two points on the line, with the line being shown as the user draws it to aid accuracy. Then using either the lens_calibrate tool or a new edge detection algorithm, Hugin will check (if the user wants) if there is a better fit for the line (inaccurate clicking could make the line less accurate). Control points would then be added either at regular intervals along the line (between the endpoints the user clicked), and then revised or thrown out if there is not a strong correlation between pairs of images.<br />
<br />
The line being drawn by the user should either take into account lens data given (eg. fisheye lenses generally obliterate straight lines) or there should be an option to define the line using three points or as a Bezier curve or spline.<br />
<br />
The user may specify the type of line – whether it's horizontal, vertical or just a straight line. It might be handy if there was an option to run optimizer as the lines are added so the user would have an immediate feedback how the lines change the panorama. Note that optimizer shouldn't be run by default, because optimization may take a lot of time, rendering proposed tool unusable.<br />
<br />
One problem that needs to be resolved is how the line should be specified when multiple images overlap as noted by kfj in [1].<br />
<br />
The idea is based on the idea from RawTherapee forum [2].<br />
<br />
==Prerequisite==<br />
<br />
Before this works the fast preview needs some zooming function to set exactly the points. Also it is necessary to identify the image in which the line should be created in case the point is setting in an overlapping area or using the function for HDR panoramas. See other blueprint [3].<br />
<br />
==References==<br />
<br />
[1] http://groups.google.com/group/hugin-ptx/browse_thread/thread/dbb85dad10715586<br />
<br />
[2] http://rawtherapee.com/forum/viewtopic.php?p=17063#17063<br />
<br />
[3] https://blueprints.launchpad.net/hugin/+spec/extendedpreview<br />
<br />
[[Category:Software:Platform:Windows]]<br />
[[Category:Software:Platform:Mac OS X]]<br />
[[Category:Software:Platform:Linux]]<br />
[[Category:Software:Hugin]]<br />
[[Category:Community:Project]]</div>Onomouhttps://wiki.panotools.org/index.php?title=Hugin_Compiling_Ubuntu&diff=13372Hugin Compiling Ubuntu2011-04-08T10:40:29Z<p>Onomou: Spelling correction</p>
<hr />
<div>== Who Is This Page For ==<br />
<br />
These instructions contain the collective wisdom of Hugin contributors that are using Ubuntu or any of its variations (Ku/Xu/Lu/Edu/...buntu). They are work in progress and updated when newer versions of Ubuntu are released or when Hugin introduces new dependencies. They have worked, at the time of release or soon thereafter, with all 'buntu versions up until 10.10. They are intended to help contributors on the learning curve. If you are not here to contribute, spare yourself the effort and see the [[#Shortcut]] section below.<br />
<br />
They are likely to work only for the latest 'buntu release, but you can check this page's history at the time that the older 'buntu version was the most recent one to find the specifics for that version.<br />
<br />
If you are new here, read the whole page. It is recommended that you go sequentially through it.<br />
<br />
If you're familiar with the process and have run it a few time, look at the what's new section for important news.<br />
<br />
Apart from the odd change in package name, nothing should be substantially different (and if does not work, please leave a comment on the [http://groups.google.com/group/hugin-ptx hugin-ptx mailing list]). Don't worry if the same package appears twice in an apt-get install line - apt-get will update existing packages if there is a newer version, and ignore duplicates if the latest version is already installed. On the other hand, if apt-get says that it can't find a package, it might be the odd change in package name. You can find a replacement package by using apt-cache search with a substring of the package required, e.g.<br />
<pre>apt-cache search wxW<br />
</pre><br />
<br />
The goal is to build hugin and the whole set of helper applications required, and start understanding the building process. You will need deeper understanding of the building process if you want to:<br />
* develop code<br />
* translate the latest strings<br />
* document the latest features with manuals and tutorials<br />
* package for distribution<br />
That knowledge is out of scope for this document. This document ends with a binary that is fit for installation on your machine. It is not fit for any other purpose, particularly not for distribution. CMake is [http://groups.google.com/group/hugin-ptx/msg/3f29b207c562fd63 known] to build broken deb packages. Please do not distribute these binaries.<br />
<br />
== What's New ==<br />
<br />
'''5-March-2010''': Foreign library libtclap removed from source tree. This introduces a new dependency on libtclap-dev<br />
<br />
'''February 2010''': Libpano has migrated from SVN to Mercurial.<br />
<br />
'''CMake 2.8.2''', as packaged in Ubuntu 10.10, contains a bug (http://public.kitware.com/Bug/view.php?id=11020) the prevents the created debs to install successfully, due to it not storing needed directories in the deb package.<br />
Installing the resulting debs will fail with a message error saying something like<br />
<br />
<pre><br />
unable to create `/usr/local/share/hugin/xrc/data/redo.png.dpkg-new' (while processing `./usr/local/share/hugin/xrc/data/redo.png'): No such file or directory<br />
</pre><br />
<br />
Commands to create the necessary folders have been documented below and may be added to the CMake build in the repository of Hugin, Libpano, Enblend. However it is possible that the lists are incomplete. If you bump in the above message, the solution is to create the full missing path and run dpkg -i again, recursively adding folders until the install succeed.<br />
<br />
<pre><br />
sudo mkdir -p /usr/local/share/hugin/xrc/data/<br />
</pre><br />
<br />
Another workaround is, to partially rebuild the deb package by hand:<br />
<br />
<pre><br />
mkdir unpacked<br />
cd unpacked/<br />
ar x ../hugin.build/hugin-2010.2.0-Linux.deb<br />
mkdir untarred<br />
cd untarred<br />
tar xzf ../data.tar.gz<br />
tar czf ../data.tar.gz .<br />
cd ..<br />
ar r ../hugin-2010.2.0-Linux.deb debian-binary control.tar.gz data.tar.gz<br />
</pre><br />
<br />
== Shortcut ==<br />
<br />
Hugin evolves fast and the official 'buntu distributions carry versions that are usually 3-6 months older than the 'buntu distribution date. Moreover, they do not backport Hugin and related tools.<br />
<br />
Even if you follow religiously the 'buntu six months update cycle, you may be using a version of Hugin that is one or two release cycles in our past. If your sole objective is to use the new features of Hugin, the instructions in this section are for you. Start a command line terminal, type the three commands and you're done.<br />
<br />
If for some reason that's not enough for you - if you want to actually learn and become a contributor; or if you're just curious about getting even closer to the bleeding edge and trade stability for features and excitement, the rest of this document is for you.<br />
<br />
=== Stable ===<br />
<br />
This will install you the latest stable version of the tools:<br />
<pre><br />
sudo add-apt-repository ppa:hugin/hugin-builds<br />
sudo apt-get update<br />
sudo apt-get install hugin enblend autopano-sift-c panini<br />
</pre><br />
<br />
=== Unstable ===<br />
<br />
This will install you the latest unstable version of the tools that has been built as a binary. While they are likely to work in most cases, there is no guarantee and they are not recommended for production environment. Use at your own risk, and please report (and if possible fix) bugs. Most of the time these unstable builds are closer to the bleeding edge than to the stable builds. If you want the really really really bleeding edge, you'll have to work through the instructions in the next sections, though.<br />
<br />
<pre><br />
sudo add-apt-repository ppa:hugin/hugin-builds<br />
sudo add-apt-repository ppa:hugin/nightly<br />
sudo apt-get update<br />
sudo apt-get install hugin enblend autopano-sift-c panini<br />
</pre><br />
<br />
== Building Environment ==<br />
Since we are going to build hugin, libpano13 and enblend we need to download and install all the development packages. This is very easy with apt-get.<br />
In a terminal window (K menu -> System -> Konsole or Applications -> Accessories -> Terminal (in Kubuntu), Applications -> Accessories -> Terminal (in Ubuntu))<br />
<br />
<pre>sudo apt-get install build-essential autoconf automake1.9 libtool flex bison gdb libc6-dev libgcc1 \<br />
cmake<br />
</pre><br />
<br />
To get the bleeding edge we'll need access to the SVN and Mercurial repositories, and for this we need the correct tools:<br />
<br />
<pre><br />
sudo apt-get install subversion mercurial<br />
</pre><br />
<br />
Not necessary, but useful if you want to revisit configuration sets in ccmake<br />
<pre><br />
sudo apt-get install cmake-curses-gui<br />
</pre><br />
<br />
To get on the same page as far as file system layout is concerned, we'll create a folder to contain all source code in your home folder:<br />
<pre><br />
cd<br />
mkdir -p src<br />
</pre><br />
<br />
=== For Coders ===<br />
<br />
If you want to start to navigate, understand and modify the code, the doxygen generated documentation will be helpful to you.<br />
<br />
<pre><br />
sudo apt-get install doxygen graphviz<br />
</pre><br />
<br />
=== For Distributors ===<br />
<br />
If you want to build packages for distribution, you will also need the following tools and settings.<br />
<br />
<pre><br />
sudo apt-get install subversion-tools<br />
sudo echo 'deb-src ftp://ftp.at.debian.org/debian ../project/experimental main' > debian-experimental.list<br />
mv debian-experimental.list /etc/apt/sources.list.d/<br />
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 55BE302B<br />
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 8B8D7663<br />
sudo apt-get update<br />
sudo apt-get install devscripts<br />
</pre><br />
<br />
You will also need an OpenPGP key, and a Launchpad account. Follow the [[Hugin_Trackers#Launchpad_Account|instructions]] for Launchpad account creation, including the signing of the Ubuntu Code of Conduct.<br />
<br />
Moreover, it is likely that your environment is not clean enough for distribution builds. In that case, and to produce binaries for other Ubuntu series than the one you are running, you will want to set up a dchroot environment (to be documented later on).<br />
<br />
== Building Enblend ==<br />
<br />
Get the dependencies. If you are working with large images (300 megapixels and up), you should have a libtiff-devel compiled with large file support and libstdc++6.<br />
<br />
<pre><br />
sudo apt-get install pkg-config libtiff4-dev libboost-graph-dev libboost-thread-dev \<br />
libboost-filesystem-dev liblcms1-dev libglew1.5-dev libplot-dev libglut3-dev libopenexr-dev \<br />
libxi-dev libxmu-dev help2man libplot-dev liblcms1-dev libboost-system-dev<br />
</pre><br />
<br />
If you also want to build the documentation, add the following dependencies, and add "-DDOC=ON" to the cmake command below. (Be warned, however, that this will drag in over 700MB of additional dependencies. Unless you have a pressing need to build the documentation yourself, you can save yourself some time and disk space by downloading the PDF docs from http://enblend.sourceforge.net .)<br />
<br />
<pre><br />
sudo apt-get install texi2html texinfo fig2ps tidy gnuplot libxml-xpath-perl imagemagick<br />
</pre><br />
<br />
Once all dependencies are in place, get the code. The official repository has migrated from CVS to Mercurial:<br />
<br />
<pre><br />
mkdir -p ~/src/enblend<br />
cd ~/src/enblend<br />
hg clone http://enblend.hg.sourceforge.net:8000/hgroot/enblend/enblend enblend.hg<br />
cd enblend.hg<br />
</pre><br />
<br />
If you already have checked out enblend, to update the code to the latest version you need to run:<br />
<pre><br />
hg pull<br />
hg update<br />
</pre><br />
<br />
Then create a build directory and build in there. And install the Package.<br />
<br />
The options below are good for modern multi-core computers. For a single core, you may be better off setting ENABLE_OPENMP to OFF and ENABLE_IMAGECACHE to ON. The two options are mutually exclusive.<br />
<pre><br />
cd ..<br />
mkdir enblend.build<br />
cd enblend.build<br />
cmake ../enblend.hg -DENABLE_GPU:BOOL=ON -DENABLE_IMAGECACHE:BOOL=OFF -DENABLE_OPENMP:BOOL=ON \<br />
-DCPACK_BINARY_DEB:BOOL=ON -DCPACK_BINARY_NSIS:BOOL=OFF -DCPACK_BINARY_RPM:BOOL=OFF \<br />
-DCPACK_BINARY_STGZ:BOOL=OFF -DCPACK_BINARY_TBZ2:BOOL=OFF -DCPACK_BINARY_TGZ:BOOL=OFF \<br />
-DCPACK_BINARY_TZ:BOOL=OFF -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX:PATH=/usr/local<br />
make package<br />
sudo dpkg -i enblend-4.1.1-Linux.deb<br />
</pre><br />
<br />
If the install quits with an error, it is likely because of missing folders. Run the following commands and retry:<br />
<pre><br />
sudo mkdir -p /usr/local/share/man/man1<br />
sudo mkdir -p /usr/local/bin<br />
</pre><br />
<br />
===The old autotools way===<br />
We are then ready to compile. The CXXFLAGS <tt>--param inline-unit-growth=60</tt> is a workaround for x86_64 systems, Feb 2009, and apparently no longer needed (set by default). If you have an SMP machine and you're building a recent version, <tt>--disable-image-cache</tt> and <tt>--enable-openmp</tt> will speed up enblend/enfuse massively but may cause segmentation faults; in that case you will be better off with <tt>--enable-image-cache</tt> and <tt>--disable-openmp.</tt> <tt>-march=native</tt> is also beneficial and -O2 is better than -O3.<br />
<br />
<pre><br />
make --makefile=Makefile.scm<br />
mkdir BUILD<br />
cd BUILD<br />
CXXFLAGS="--param inline-unit-growth=60 -march=native -O2" ../configure --disable-image-cache \<br />
--enable-openmp<br />
make<br />
</pre><br />
<br />
The second make step can be very long and memory consuming. Make sure you have enough swap space, and go get a healthy snack while the computer is compiling.<br />
<br />
If you encounter problems at any of these stages, please report back to the hugin-ptx mailing list. Report what command in the sequence you were executing, what machine/operating system, the revision checked out from CVS, and all other relevant information.<br />
<br />
You are then ready to install with<br />
<pre><br />
sudo make install<br />
</pre><br />
<br />
== Building Libpano13 ==<br />
<br />
libpano13 is the new version of the PanoTools libraries. This is a necessary component for hugin, and we need to build it first.<br />
To build libpano13 we need some libraries and particularly their <code>dev</code> package:<br />
<br />
<pre>sudo apt-get install zlib1g zlib1g-dev libpng12-dev libjpeg62-dev libtiff4-dev cmake</pre><br />
<br />
On older distributions, zlib1g and zlib1g-dev may not be found. In that case, the same library may be available with the names lib64z1 and lib64z1-dev.<br />
<br />
We then need to download the source code from the central repository:<br />
<br />
<pre><br />
mkdir -p ~/src/libpano<br />
cd ~/src/libpano<br />
hg clone http://panotools.hg.sourceforge.net:8000/hgroot/panotools/libpano libpano.hg<br />
cd libpano.hg<br />
</pre><br />
<br />
If you're a contributor with write access, use the following clone command instead:<br />
<pre><br />
hg clone ssh://${USER}@panotools.hg.sourceforge.net/hgroot/panotools/panotools/libpano libpano.hg<br />
</pre><br />
<br />
In the future there is no need to get the whole source again. Just issue the following commands to bring your source up to date:<br />
<pre><br />
cd ~/src/libpano/libpano.hg<br />
hg pull<br />
hg up<br />
</pre><br />
<br />
Now start the building process.<br />
<br />
<pre><br />
cd ..<br />
mkdir libpano.build<br />
cd libpano.build<br />
cmake ../libpano.hg -DCMAKE_INSTALL_PREFIX=/usr/local -DCPACK_BINARY_DEB:BOOL=ON \<br />
-DCPACK_BINARY_NSIS:BOOL=OFF -DCPACK_BINARY_RPM:BOOL=OFF -DCPACK_BINARY_STGZ:BOOL=OFF \<br />
-DCPACK_BINARY_TBZ2:BOOL=OFF -DCPACK_BINARY_TGZ:BOOL=OFF -DCPACK_BINARY_TZ:BOOL=OFF \<br />
-DCMAKE_BUILD_TYPE=RelWithDebInfo<br />
make package<br />
sudo dpkg -i libpano13-*-Linux.deb<br />
</pre><br />
<br />
Set -DCMAKE_BUILD_TYPE=Debug if you want to help investigate/debug a problem and capture even more debugging information.<br />
<br />
If the install quits with an error, it is likely because of missing folders. Run the following commands and retry:<br />
<pre><br />
sudo mkdir -p /usr/local/include/pano13/<br />
sudo mkdir -p /usr/local/include/pano13/doc<br />
sudo mkdir -p /usr/local/lib/pkgconfig<br />
sudo mkdir -p /usr/local/share/man/man1<br />
sudo mkdir -p /usr/local/bin<br />
</pre><br />
<br />
=== The old autotools way ===<br />
<br />
The above described building process uses CMake to build libpano which has many advantages. Amongst others it creates a clean package to install / deinstall and decreases the likelihood of wrecking the system. However CMake support is relatively new in libpano. The old autotools way is documented below for completeness. You should not need it. However if you do, make sure to run either the CMake build or the autotools build on fresh repository checkouts to avoid interferences.<br />
<br />
<pre><br />
./bootstrap<br />
</pre><br />
<br />
If any libraries are missing, the script will complain (or at least, let you know that some library hasn't been found). In that case you probably need to install the library. To find in what package is that library, a general rule is to run the command <code>apt-cache search ''missingfile''</code>, find the relevant library and install both the library and the related <code>-dev</code> package.<br />
Run the <code>./configure</code> script and repeat this process until you have met all the dependencies.<br />
<br />
Then we are ready to launch the make process with<br />
<pre>make</pre><br />
<br />
If the library successfully compiles, you have to install it with<br />
<pre>sudo make install<br />
sudo ldconfig</pre><br />
The last part is for the OS to be aware of the new library (that has been installed in <code>/usr/local/lib</code>).<br />
We can now go back up one folder level and get ready for hugin.<br />
<pre>cd ..</pre><br />
<br />
== Building Hugin ==<br />
<br />
=== Dependencies ===<br />
<br />
First we need to activate the <code>universe</code> repository (in adept package manager, or by editing the /etc/apt/sources.lst file for example) and get the dependencies.<br />
<br />
The following command will install on your system all build time dependencies except libpano13.<br />
<pre><br />
sudo apt-get install libwxgtk2.8-dev libtiff4-dev libpng12-dev \<br />
libopenexr-dev libexiv2-dev libglut3-dev libglew-dev libboost-dev \<br />
boost-build libboost-thread-dev libboost-graph-dev libboost-regex-dev \<br />
libboost-iostreams-dev libboost-filesystem-dev gettext liblapack-dev \<br />
libxi-dev libxmu-dev libboost-signals-dev libboost-system-dev \<br />
libtclap-dev<br />
</pre><br />
<br />
You could install libpano13 on your system with the command below. However it is likely to be a version of libpano13 that is too old for the current Hugin. It is recommended that you first build your own libpano13 (above). Alternatively, there may be a recent enough version of libpano13 in the Hugin PPA.<br />
<pre><br />
sudo apt-get install libpano13-dev<br />
</pre><br />
<br />
wxWidgets is a critical dependency for the Hugin GUI. In the official Ubuntu repositories it is usually at least a few releases behind the current release, and in some cases many releases behind. The wxWidgets project provides alternative [http://wiki.wxpython.org/InstallingOnUbuntuOrDebian repositories] with newer versions, as well as a [http://wiki.wxpython.org/BuildingDebianPackages instructions] to build binary packages of the most recent releases. Newer versions of wxWidgets are not (yet) absolutely necessary, but since eventually things evolve they are useful for development, testing, and in general should give a better user interface experience as wxWidgets improves over time.<br />
<br />
The following are run-time dependencies. Strictly speaking you don't need them to build Hugin, but you will need them to use it. You don't need this line if you follow the instructions on this page to build ExifTool, Enblend, Autopano-SIFT-C.<br />
<pre><br />
sudo apt-get install libimage-exiftool-perl enblend autopano-sift-c<br />
</pre><br />
<br />
If you want to use the Python scripting tools, you will also need the following dependencies at runtime.<br />
<br />
<pre><br />
sudo apt-get install python-argparse<br />
</pre><br />
<br />
=== Fetch the Source Code with Mercurial ===<br />
<br />
If you already have a repository clone, you only need to pull the latest changes and update the code with:<br />
<pre><br />
cd ~/src/hugin/hugin.hg<br />
hg pull<br />
hg update<br />
</pre><br />
<br />
Else, you need to clone the repository and decide which version/branch to build with:<br />
<pre><br />
mkdir -p ~/src/hugin<br />
cd ~/src/hugin<br />
hg clone http://hugin.hg.sourceforge.net:8000/hgroot/hugin/hugin hugin.hg<br />
cd hugin.hg<br />
hg branches<br />
</pre><br />
<br />
If you are a contributor with write access, you can use<br />
<pre><br />
hg clone ssh://${USER}@hugin.hg.sourceforge.net/hgroot/hugin/hugin hugin.hg<br />
</pre><br />
<br />
The `hg branches` command will list all available branches. If you decide, e.g., to build the 2010.0 branch, you will update to it with:<br />
<pre><br />
hg update -C 2010.0 <br />
</pre><br />
<br />
=== Advanced Use - Multiple Source Trees ===<br />
<br />
You may want to build multiple versions of Hugin on your machine at the same time, e.g. when you want to build side by side a stable version for your productivity and a development version to give feedback to the developers. In that case, you will clone the Mercurial repository that is already on your drive and update from it a source tree to a different branch. Mercurial takes care of details such as optimizing disk usage. The commands for this are:<br />
<br />
<pre><br />
cd ..<br />
hg clone hugin.hg another_hugin<br />
cd another_hugin<br />
hg update -C default<br />
</pre><br />
<br />
You can have as many "another_hugin" folders as you want. Just make sure, when pulling the latest updates from SourceForge, to first pull your main repository (the one you cloned from http://hugin.hg.sourceforge.net:8000/hgroot/hugin/hugin. Then pull all others:<br />
<pre><br />
cd ~/src/hugin/hugin.hg<br />
hg pull<br />
hg update<br />
cd ../another_hugin<br />
hg pull<br />
hg update<br />
</pre><br />
<br />
Reference: [http://groups.google.com/group/hugin-ptx/msg/1ce824dd1364e9be]<br />
<br />
=== Configure the Build Environment ===<br />
<br />
'''Rule:''' You always want to build outside of the source tree to keep the source tree clean. And to avoid confusion, if you have multiple source trees it is preferable to build for each of them in a separate build folder.<br />
<br />
Next we set up the build environment using cmake.<br />
<br />
If you compiled and installed libpano to a non standard location set the variables CMAKE_INCLUDE_PATH and CMAKE_LIBRARY_PATH to point to your install location's include and lib directories.<br />
<br />
If you are building for distribution, you want to set CMAKE_INSTALL_PREFIX=/usr<br />
<br />
<pre><br />
cd ~/src/hugin<br />
mkdir hugin.hg-build<br />
cd hugin.hg-build<br />
cmake ../hugin.hg -DENABLE_LAPACK=YES -DCPACK_BINARY_DEB:BOOL=ON -DCPACK_BINARY_NSIS:BOOL=OFF \<br />
-DCPACK_BINARY_RPM:BOOL=OFF -DCPACK_BINARY_STGZ:BOOL=OFF -DCPACK_BINARY_TBZ2:BOOL=OFF \<br />
-DCPACK_BINARY_TGZ:BOOL=OFF -DCPACK_BINARY_TZ:BOOL=OFF -DCMAKE_BUILD_TYPE=RelWithDebInfo<br />
</pre><br />
<br />
Set -DCMAKE_BUILD_TYPE=Debug if you want to help investigate/debug a problem and capture even more debugging information, however Hugin will be slower and may not work as expected. Don't use a Debug build for production.<br />
<br />
=== Build and Install ===<br />
<br />
Finally, we use make to build the code and package it, and dpkg to install it. Look for the version number in the .deb file created and edit the lines below accordingly: <br />
<br />
<pre><br />
make package<br />
sudo dpkg -i hugin-*-Linux.deb<br />
sudo ldconfig<br />
</pre><br />
<br />
If the install quits with an error, it is likely because of missing folders. Run the following commands and retry: <br />
<pre><br />
sudo mkdir -p /usr/local/share/pixmaps<br />
sudo mkdir -p /usr/local/share/mime/packages<br />
sudo mkdir -p /usr/local/share/applications/<br />
sudo mkdir -p /usr/local/share/icons/gnome/48x48/mimetypes/<br />
sudo mkdir -p /usr/local/share/locale/en_GB/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/es_la/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/fr/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/zh_TW/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/ru/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/ro/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/bg/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/de/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/ko/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/pt_BR/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/zh_CN/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/ja/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/it/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/sl/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/sk/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/sv/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/ca_ES/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/nl/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/fi/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/cs_CZ/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/uk/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/es/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/pl/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/hu/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/es_VE/LC_MESSAGES<br />
sudo mkdir -p /usr/local/share/hugin/xrc/data/help_it_IT<br />
sudo mkdir -p /usr/local/share/hugin/xrc/data/help_en_EN<br />
sudo mkdir -p /usr/local/share/hugin/data/<br />
sudo mkdir -p /usr/local/lib/hugin<br />
sudo mkdir -p /usr/local/share/man/man1<br />
</pre><br />
<br />
'''Important:''' the package does not track dependencies yet, so it likely to fail on machines others than yours.<br />
<br />
Reference: [http://theseblog.free.fr/2007/10/building-hugin-in-ubuntu-feisty-fawn.php]<br />
<br />
=== Dive into the Code ===<br />
<br />
From time to time the API reference is published on the Hugin website, however you are better off with a local copy. To generate it, issue the following commands:<br />
<pre><br />
cd ~/src/hugin/hugin.hg/src<br />
doxygen Doxyfile<br />
</pre><br />
<br />
The documentation is generated in ~/src/hugin/hugin.hg/src/hugin/html<br />
<br />
Point your browser to index.html inside that folder and you have access to all available information. If you find that a class, a function, or anything else is not properly documented; and if you delve into the source code to understand it, kindly add documentation to the code so that the next person in your situation can use your experience as a stepping stone. Thank you!<br />
<br />
== Automatic Control Point Detectors ==<br />
<br />
=== Autopano-sift-C ===<br />
<br />
Pre-Requisites:<br />
<pre><br />
sudo apt-get install libxml2-dev<br />
</pre><br />
<br />
To build<br />
<br />
(Note February 2011: The latest source code of autopano-sift-C has been unstable for a long time now and nobody is working to fix it. Use the 2.5.1 release tarball instead)<br />
<br />
<pre><br />
mkdir -p ~/src/apsc<br />
cd ~/src/apsc<br />
hg clone http://hugin.hg.sourceforge.net:8000/hgroot/hugin/autopano-sift-C apsc.hg<br />
cd apsc.hg<br />
hg branches<br />
hg update -C 2.5.1<br />
cd ..<br />
mkdir apsc.hg.build<br />
cd apsc.hg.build<br />
cmake ../apsc.hg -DCMAKE_INSTALL_PREFIX=/usr/local -DCPACK_BINARY_DEB:BOOL=ON \<br />
-DCPACK_BINARY_NSIS:BOOL=OFF -DCPACK_BINARY_RPM:BOOL=OFF -DCPACK_BINARY_STGZ:BOOL=OFF \<br />
-DCPACK_BINARY_TBZ2:BOOL=OFF -DCPACK_BINARY_TGZ:BOOL=OFF -DCPACK_BINARY_TZ:BOOL=OFF \<br />
-DCMAKE_BUILD_TYPE=Debug<br />
make package<br />
sudo dpkg -i autopano-sift-C-*-Linux.deb<br />
</pre><br />
<br />
=== Match-n-shift ===<br />
<br />
Match-n-shift is yet an other Autopano-SIFT replacement. It comes in a bundle with pto file manipulation perl libraries and a rich selection of other tools that use nona, enblend, ImageMagick among other things. To use match-n-shift, you need to install at least the [http://search.cpan.org/dist/Panotools-Script/ Panotools::Script] library and some other perl modules. It requires:<br />
<br />
* Image::Size 2.9<br />
* Storable 2.0<br />
* Image::ExifTool 6<br />
<br />
Chances are that you do not need to update Storable which is a standard perl module. To check the version of installed versions of these modules, write these lines to the command prompt:<br />
<br />
perl -MStorable -le 'print Storable->VERSION;'<br />
perl -MImage::Size -le 'print Image::Size->VERSION;'<br />
perl -MImage::ExifTool -le 'print Image::ExifTool->VERSION;'<br />
<br />
There are various ways to install or upgrade these modules. Ubuntu has binary packages for many perl modules, you can skip the CPAN installation below and type:<br />
<br />
sudo apt-get install libimage-size-perl libimage-exiftool-perl<br />
<br />
Alternatively, perl is an interpreted language and these modules are pure perl, so installing from source is an easy thing.<br />
<br />
The best place to install perl modules is directly from a CPAN archive. CPAN is short for Comprehensive Perl Archive Network. The program to interact with CPAN comes with all perl installations. Start it by running:<br />
<br />
sudo cpan<br />
<br />
If this is your first time running the program you will be asked a number of questions (you can safely accept the suggested values). Last question lets you select a number of CPAN mirrors nearest to you.<br />
<br />
When all is done, you can enter the install commands after the 'cpan>' prompt:<br />
<br />
install Image::Size Storable Image::ExifTool<br />
<br />
Answer 'y' to any question of dependencies and wait for install to complete. 'exit' leaves the cpan shell.<br />
<br />
Next, you need to retrieve and install the Panotools-Script collection<br />
of perl libraries (Panotools::Script) and programs that use them -<br />
including match-n-shift:<br />
<br />
svn co https://panotools.svn.sourceforge.net/svnroot/panotools/trunk/Panotools-Script Panotools-Script<br />
cd Panotools-Script<br />
perl Makefile.PL<br />
make<br />
make test<br />
sudo make install<br />
<br />
Just to confuse you, you can also ignore everything above and just install Panotools::Script and all its dependencies from CPAN. From command line, type:<br />
<br />
sudo cpan Panotools::Script<br />
<br />
You can run match-n-shift from command line using the same parameters as autopano-c-complete.sh or you can modify hugin to run it for you:<br />
<br />
* start Hugin<br />
* navigate the menu File to Preferences<br />
* In the Preferences window, open the Autopano tab<br />
* Select Autopano -> Autopano-SIFT<br />
* tick the checkbox for Use alternative Autopano-SIFT program<br />
* enter the full path to match-n-shift (/usr/local/bin/match-n-shift) in the Autopano-SIFT field<br />
* enter the following string in the Arguments field:<br />
-f %f -v %v -c -p %p -o %o %i<br />
<br />
=== MatchPoint ===<br />
<br />
MatchPoint is a next generation CP generator. The result of a GSoC2007 project, it is still very experimental. Experience reports needed. Read more [http://groups.google.com/group/hugin-ptx/browse_thread/thread/cba2b2ce94dd9054 here]<br />
<br />
Matchpoint is now located inside the main hugin source tree, no need to checkout separately. It is compiled together with hugin, but not installed by default.<br />
<br />
* copy the MatchPoint executable into /usr/local/bin manually<br />
<pre><br />
cd ~/src/hugin/hugin.hg-build<br />
sudo cp src/matchpoint/matchpoint /usr/local/bin/<br />
</pre><br />
* edit /usr/local/bin/autopano-c-complete.sh (do it with sudo to have the necessary permission)<br />
** line 79: replace the .key.gz extension with .key (not sure if matchpoint supports compression)<br />
** lines 83 and 88: replace '''generatekeys "$arg" $FILENAME $SIZE''' with '''matchpoint "$arg" $FILENAME''' (not sure if the size option or any other options of the original generatekeys are applicable)<br />
<br />
=== Pan-o-matic ===<br />
<br />
Yet another control point generator [http://aorlinsk2.free.fr/panomatic/?p=home Home Page]<br />
<br />
<pre>sudo apt-get install libboost-dev</pre><br />
<br />
Download [http://aorlinsk2.free.fr/panomatic/download.php?d=7&v=0.9.4 Panomatic 0.9.4 bz2] and if you're on Ubuntu 9.10 or newer also the [http://aorlinsk2.free.fr/panomatic/panomatic_gcc44.patch patch] for the gcc4.4 compiler.<br />
<br />
<pre><br />
mkdir -p ~/src/panomatic<br />
cd ~/src/panomatic<br />
wget "http://aorlinsk2.free.fr/panomatic/download.php?d=7&v=0.9.4" -O panomatic-0.9.4-src.tar.bz2<br />
wget http://aorlinsk2.free.fr/panomatic/panomatic_gcc44.patch patch<br />
tar xvfj panomatic-0.9.4-src.tar.bz2<br />
cd panomatic-0.9.4<br />
patch -p 1 < ../panomatic_gcc44.patch<br />
./configure<br />
make<br />
sudo make install<br />
</pre><br />
<br />
To use Pano-o-matic, open Hugin<br />
<br />
* In File > Preferences > Autopano :<br />
* Select Autopano-SIFT<br />
* Check "Use alternative autopano-SIFT program"<br />
* Choose the path to the binary ( /usr/local/bin )<br />
* In Arguments, put : -o %o %i<br />
<br />
==== Pablo's variation ====<br />
<br />
Around the end of the year 2009, Pablo integrated a [http://groups.google.com/group/hugin-ptx/browse_thread/thread/d9c0558c679cad52 new] experimental descriptor based on the geometric blur and DAISY papers. Also, Pablo said that the algorithm is not really based on a published approach, just on some ideas that are mentioned in a few of them, and its currently simpler than any of them:<br />
<br />
o geometric blur: [http://www.eecs.berkeley.edu/~aberg/gb.html]<br />
<br />
o daisy: [http://cvlab.epfl.ch/~tola/daisy.html]<br />
<br />
o descriptor learning: [http://cvlab.epfl.ch/~brown/learndesc/learndesc.html]<br />
<br />
To build that version of panomatic instead, follow these instructions:<br />
<br />
This is current the subject of a GSoC 2010 project and may be available in future versions of Hugin.<br />
<br />
<pre><br />
sudo aptitude install libboost-python-dev bzr cmake libvigraimpex-dev<br />
</pre><br />
<br />
<pre><br />
bzr branch lp:~pablo.dangelo/hugin/panomatic-lib<br />
mkdir build<br />
cd build<br />
cmake ../panomatic-lib<br />
make<br />
sudo make install<br />
</pre><br />
<br />
To use the new descriptor the arguments for Hugin are: '''--sieve1size 100 --sieve2size 2 -o %o %i'''<br />
<br />
== ExifTool ==<br />
<br />
ExifTool is no longer mandatory for Hugin to work. It is used to pass metadata from the input to the output images during the stitching process. <br />
<br />
[http://www.sno.phy.queensu.ca/~phil/exiftool/ ExifTool] is a platform-independent Perl library plus a command-line application for reading, writing and editing meta information in image, audio and video files.<br />
<br />
Usually the version distributed with Ubuntu (8.15 in Ubuntu 10.10; 7.89 in Ubuntu 10.4) is good enough and you don't need to bother with the following instructions. However there were situations in the past and there might be situations in the future where the latest versions offer better support. These issues will occur most likely with specific camera brands/models and the most recent models. The following instructions are for those cases.<br />
<br />
<pre><br />
sudo apt-get purge libimage-exiftool-perl<br />
</pre><br />
<br />
<pre><br />
wget http://www.sno.phy.queensu.ca/~phil/exiftool/Image-ExifTool-8.50.tar.gz<br />
tar -xzf Image-ExifTool-8.50.tar.gz<br />
cd Image-ExifTool-8.50<br />
perl Makefile.PL<br />
make test<br />
sudo make install<br />
</pre><br />
<br />
== Pano Viewers ==<br />
<br />
=== PanoGLView ===<br />
<br />
PanoGLView is an OpenGL hardware accelerated interactive immersive viewer for equirectangular images.<br />
<br />
Pre-Requisites:<br />
<pre>sudo apt-get install wx-common libwxgtk2.8-dev libglew-dev</pre><br />
<br />
To build and install:<br />
<pre><br />
mkdir -p ~/src/panoglview<br />
cd ~/src/panoglview<br />
hg clone http://hugin.hg.sourceforge.net:8000/hgroot/hugin/panoglview panoglview.hg<br />
cd panoglview.hg<br />
hg update<br />
./bootstrap<br />
./configure<br />
make<br />
sudo make install<br />
</pre><br />
<br />
=== FreePV - DEPENDENCIES ARE BROKEN - FAILS TO BUILD ===<br />
<br />
Pre-Requisites:<br />
<pre><br />
sudo apt-get install cmake make pkg-config g++ mozilla-devscripts freeglut3-dev zlib1g-dev \<br />
libjpeg-dev libxext-dev libxmu-dev x11proto-xf86vidmode-dev libxxf86vm-dev libnspr4-dev \<br />
libxml2-dev libpng12-dev<br />
</pre><br />
To build<br />
<pre><br />
svn co https://freepv.svn.sourceforge.net/svnroot/freepv/freepv/trunk/ freepv<br />
cd freepv<br />
cmake .<br />
make<br />
sudo make install<br />
</pre><br />
<br />
=== Panini Perspective Tool ===<br />
<br />
Strictly speaking, Panini is more than just a viewer. It's a powerful tool to extract/transform views and can also be easily used as a viewer.<br />
<br />
Get dependencies:<br />
<pre><br />
sudo apt-get install qt4-qmake libqt4-dev zlib1g-dev<br />
</pre><br />
<br />
Get code:<br />
<pre><br />
mkdir -p ~/src/pvqt<br />
cd ~/src/pvqt<br />
svn co https://pvqt.svn.sourceforge.net/svnroot/pvqt pvqt.svn<br />
</pre><br />
<br />
Build:<br />
<pre><br />
cd pvqt.svn<br />
qmake panini.pro<br />
make<br />
</pre><br />
<br />
Install (brute force):<br />
<pre><br />
sudo cp Panini /usr/local/bin/ <br />
</pre><br />
<br />
Menu Entry for Kubuntu:<br />
<pre><br />
kmenuedit<br />
</pre><br />
<br />
in kmenuedit<br />
* navigate to Graphics<br />
** click on New Item<br />
** Enter "Panini" as Name<br />
** Enter "Perspective Tool" as Description<br />
** click on the empty icon and look for an icon (I used the akonadi one)<br />
** Enter "Panini" as Command<br />
** Click on Save button<br />
<br />
== Notes for Packagers ==<br />
<br />
=== Tarballs ===<br />
<br />
* to get an updated ChangeLog in Mercurial repositories (Hugin has it also in the cmake invocation, use '''-DUPDATE_CHANGELOG=1''')<br />
<pre><br />
hg log --follow --style=changelog <br />
</pre><br />
* to update the ChangeLog in SVN repositories (Panotools)<br />
<pre><br />
svn up<br />
svn2cl<br />
svn ci<br />
</pre><br />
<br />
=== Deb Packages ===<br />
<br />
The deb packages built by CMake (2.8.2) are broken by Debian standard. Please do not distribute them. There are official updated recent packages at the Hugin PPA mentioned above which include nightlies (produced every 24 hours) and stables (produced out of released tarballs). If you miss binaries for your series of Ubuntu and you have built them for yourself following the instructions above, considering moving up one level and contributing to the [[Hugin PPA]].<br />
<br />
[[Category:Software:Hugin]]<br />
[[Category:Software:Platform:Linux]]</div>Onomouhttps://wiki.panotools.org/index.php?title=User:Onomou&diff=13371User:Onomou2011-04-08T06:04:27Z<p>Onomou: Added links</p>
<hr />
<div>Hi, this is my page. Not much here except a [[/Sandbox]].<br />
<br />
<br />
== '''2011 GSoC Proposal''' ==<br />
<br />
'''Short Description'''<br />
Currently, control points between pairs of photographs must be added by users manually or "guessed" using a sifting algorithm. This project aims at a sort of hybrid for straight lines. The user draws straight lines on a pair of images, and the computer then automatically adds and refines control points along the given path. Such a method will allow quick and simple alignment of photographs with straight lines in them.<br />
<br />
'''About Me'''<br />
<br />
My name is Steven Williams and I am in my fourth year studying undergraduate mathematics at Walla Walla University. I have taken classes in data structures using C++. I have been an amateur photographer for about six years and own a Canon Powershot A620 and Canon Digital Rebel XTi. The only special equipment I have is a Manfrotto ball head tripod, but I shoot mostly handheld. Some of my photographs, including panoramas I have made using Hugin, can be found on Flickr[http://www.flickr.com/photos/onomou/] and Panoramio[http://www.panoramio.com/user/619377]. I also use Hugin to align images for exposure blending using qtpfsgui or enblend/enfuse.<br />
<br />
'''Coding Skills'''<br />
<br />
I have been writing in C++ for three years. I became interested in programming in high school, and wrote a Mastermind clone in TI-Basic on my TI-89. I have a little experience with C# and recently Processing. My current primary computer is a homebuilt quad-core desktop running Windows 7 with Ubuntu in a virtual machine.<br />
<br />
Recently I wrote a program to visualise and interact with 2D IFS fractals as part of a senior seminar project. It is on Git here [https://github.com/onomou/ifsFractalGen].<br />
<br />
'''Proposal'''<br />
<br />
My only previous interaction with the Hugin project is as a user. I have been using Hugin for several years to stitch panoramas.<br />
<br />
For this project I would like to take up the Straight Line UI proposal from here [http://wiki.panotools.org/Straight_Line_UI_proposal]. This is also a blueprint [https://blueprints.launchpad.net/hugin/+spec/straight-line-ui] on Launchpad. I have had some experience from my IFS program working with user input and object manipulation and am excited to develop a new tool for Hugin that will enable users to match their photographs quickly and easily.<br />
<br />
I propose a system that will take a line drawn by the user in the quick preview window, and using a corner detection algorithm "snap" it to the nearest edge detected for more precise straight line input. Once this is done for the same line in matching images, the program will scan points along this line and automatically match control points in each image.<br />
<br />
I plan on spending at least 40 hours per week on this project. University graduation happens around June 10, so I may not be able to spend as much time during the two or three days around that weekend. Here is a (very) tentative schedule:<br />
<br />
'''May 24-June 3''' Finalize inputs/outputs for new straight line tool, get<br />
<br />
'''June 6-17''' Write line input methods for user interaction and rough algorithm for guessing/sifting control points on the given lines.<br />
<br />
'''June 20-July 1''' Implement edge detection for given lines, test on lots of images<br />
<br />
'''July 4-8''' Clean up and test for mid-term evaluation<br />
<br />
'''July 18-29''' Refine control point guessing procedure<br />
<br />
'''August 1-12''' Extra week for bugs/slow progress/etc.<br />
<br />
'''August 15-19''' Finalize/improve documentation</div>Onomouhttps://wiki.panotools.org/index.php?title=User:Onomou&diff=13370User:Onomou2011-04-08T05:57:32Z<p>Onomou: Added short description</p>
<hr />
<div>Hi, this is my page. Not much here except a [[/Sandbox]].<br />
<br />
<br />
== '''2011 GSoC Proposal''' ==<br />
<br />
'''Short Description'''<br />
Currently, control points between pairs of photographs must be added by users manually or "guessed" using a sifting algorithm. This project aims at a sort of hybrid for straight lines. The user draws straight lines on a pair of images, and the computer then automatically adds and refines control points along the given path. Such a method will allow quick and simple alignment of photographs with straight lines in them.<br />
<br />
'''About Me'''<br />
<br />
My name is Steven Williams and I am in my fourth year studying undergraduate mathematics at Walla Walla University. I have taken classes in data structures using C++. I have been an amateur photographer for about six years and own a Canon Powershot A620 and Canon Digital Rebel XTi. The only special equipment I have is a Manfrotto ball head tripod, but I shoot mostly handheld. Some of my photographs, including panoramas I have made using Hugin, can be found on Flickr and Panoramio. I also use Hugin to align images for exposure blending using qtpfsgui or enblend/enfuse.<br />
<br />
'''Coding Skills'''<br />
<br />
I have been writing in C++ for three years. I became interested in programming in high school, and wrote a Mastermind clone in TI-Basic on my TI-89. I have a little experience with C# and recently Processing. My current primary computer is a homebuilt quad-core desktop running Windows 7 with Ubuntu in a virtual machine.<br />
<br />
Recently I wrote a program to visualise and interact with 2D IFS fractals as part of a senior seminar project. It is on Git here.<br />
<br />
'''Proposal'''<br />
<br />
My only previous interaction with the Hugin project is as a user. I have been using Hugin for several years to stitch panoramas.<br />
<br />
For this project I would like to take up the Straight Line UI proposal from here. This is also blueprint on Launchpad. I have had some experience from my IFS program working with user input and object manipulation and am excited to develop a new tool for Hugin that will enable users to match their photographs quickly and easily.<br />
<br />
I propose a system that will take a line drawn by the user in the quick preview window, and using a corner detection algorithm "snap" it to the nearest edge detected for more precise straight line input. Once this is done for the same line in matching images, the program will scan points along this line and automatically match control points in each image.<br />
<br />
I plan on spending at least 40 hours per week on this project. University graduation happens around June 10, so I may not be able to spend as much time during the two or three days around that weekend. Here is a (very) tentative schedule:<br />
<br />
'''May 24-June 3''' Finalize inputs/outputs for new straight line tool, get<br />
<br />
'''June 6-17''' Write line input methods for user interaction and rough algorithm for guessing/sifting control points on the given lines.<br />
<br />
'''June 20-July 1''' Implement edge detection for given lines, test on lots of images<br />
<br />
'''July 4-8''' Clean up and test for mid-term evaluation<br />
<br />
'''July 18-29''' Refine control point guessing procedure<br />
<br />
'''August 1-12''' Extra week for bugs/slow progress/etc.<br />
<br />
'''August 15-19''' Finalize/improve documentation</div>Onomouhttps://wiki.panotools.org/index.php?title=User:Onomou&diff=13369User:Onomou2011-04-08T05:55:34Z<p>Onomou: GSoC Entry</p>
<hr />
<div>Hi, this is my page. Not much here except a [[/Sandbox]].<br />
<br />
<br />
== '''2011 GSoC Proposal''' ==<br />
<br />
'''About Me'''<br />
<br />
My name is Steven Williams and I am in my fourth year studying undergraduate mathematics at Walla Walla University. I have taken classes in data structures using C++. I have been an amateur photographer for about six years and own a Canon Powershot A620 and Canon Digital Rebel XTi. The only special equipment I have is a Manfrotto ball head tripod, but I shoot mostly handheld. Some of my photographs, including panoramas I have made using Hugin, can be found on Flickr and Panoramio. I also use Hugin to align images for exposure blending using qtpfsgui or enblend/enfuse.<br />
<br />
'''Coding Skills'''<br />
<br />
I have been writing in C++ for three years. I became interested in programming in high school, and wrote a Mastermind clone in TI-Basic on my TI-89. I have a little experience with C# and recently Processing. My current primary computer is a homebuilt quad-core desktop running Windows 7 with Ubuntu in a virtual machine.<br />
<br />
Recently I wrote a program to visualise and interact with 2D IFS fractals as part of a senior seminar project. It is on Git here.<br />
<br />
'''Proposal'''<br />
<br />
My only previous interaction with the Hugin project is as a user. I have been using Hugin for several years to stitch panoramas.<br />
<br />
For this project I would like to take up the Straight Line UI proposal from here. This is also blueprint on Launchpad. I have had some experience from my IFS program working with user input and object manipulation and am excited to develop a new tool for Hugin that will enable users to match their photographs quickly and easily.<br />
<br />
I propose a system that will take a line drawn by the user in the quick preview window, and using a corner detection algorithm "snap" it to the nearest edge detected for more precise straight line input. Once this is done for the same line in matching images, the program will scan points along this line and automatically match control points in each image.<br />
<br />
I plan on spending at least 40 hours per week on this project. University graduation happens around June 10, so I may not be able to spend as much time during the two or three days around that weekend. Here is a (very) tentative schedule:<br />
<br />
'''May 24-June 3''' Finalize inputs/outputs for new straight line tool, get<br />
<br />
'''June 6-17''' Write line input methods for user interaction and rough algorithm for guessing/sifting control points on the given lines.<br />
<br />
'''June 20-July 1''' Implement edge detection for given lines, test on lots of images<br />
<br />
'''July 4-8''' Clean up and test for mid-term evaluation<br />
<br />
'''July 18-29''' Refine control point guessing procedure<br />
<br />
'''August 1-12''' Extra week for bugs/slow progress/etc.<br />
<br />
'''August 15-19''' Finalize/improve documentation</div>Onomouhttps://wiki.panotools.org/index.php?title=Historical:GSOC_2011_Student_Application&diff=13368Historical:GSOC 2011 Student Application2011-04-08T03:55:48Z<p>Onomou: /* Set yourself up */ Spelling "Of" -> "If"</p>
<hr />
<div>'''The application deadline is April 8 19:00 UTC.'''<br />
== You ==<br />
Tell us who you are and at which University you're studying what at the moment. Please give us some background on yourself with a short bio and introduce yourself to the [http://groups.google.com/group/hugin-ptx hugin-ptx Google Group] we're looking forward to read your email. Then you should get yourself an account on this wiki and add your project proposal.<br />
<br />
It's optional but nice if you also tell us about your photography skills in your introduction. What kind of photographic gear do you use, do you photograph panoramas? Show us some of your examples, preferably somewhere online, not attached to the email (i.e., show us your flickr, deviantart or some other online gallery of yours). If you make other use of hugin/panotools than for stitching panoramas we'd also like to hear about it. Such ideas are almost always very interesting.<br />
<br />
== Your Coding Skills ==<br />
If you're adding a project proposal, make sure to let us know what platform you use to code. Tell us about your hardware and operating system. Then we'd like to know a bit more about your coding experience: Did you ever code in C or C++, or are you a guru in some other language?<br />
<br />
Tell us more about your involvement with hugin/panotools in your introduction (not optional): Have you done some work in the past? What did you contribute to hugin/panotools? If you were involved with other OpenSource projects we are definitely interested to know more about this. Which project did you support, when and in what role?<br />
<br />
== Set yourself up ==<br />
Get up and running with your system to build Hugin, Panotools and Enblend-Enfuse from our [http://sourceforge.net/scm/?type=hg&group_id=77506 repository]. Informations for several OSses can be found here: [[Hugin_Compiling_Fedora|Fedora]], [[Hugin_Compiling_OSX|OS X]], [[Hugin_Compiling_Windows|Windows]], [[Hugin_Compiling_ubuntu|Ubuntu]] and [[Hugin_Compiling_Gentoo|Gentoo]].<br />
<br />
If you need help on compiling, ask on the mailing list. If you're successful, we'd like to hear it too. If you find an error/omission on the wiki page, do correct it, it's a wiki!<br />
<br />
To show proficiency of the toolchain, we ask you to produce a patch against Hugin's repository. This helps us to assess your coding style. You can find ideas in our tracker, either bug reports or feature requests. Optimize your time, you don't have to impress us. Then talk about your your patch for peer review on our mailing list. We do not consider applications without patches.<br />
<br />
== Get going ==<br />
* First you probably need to familiarize yourself with how the past Summers of Code went; so you might want to read up the necessary pages in the [[Summer of Code overview]] first.<br />
* Add yourself/your project with a short synopsis to the list of projects on the wiki, don't forget to put <pre>[[Category:Community:Project]]</pre> to the bottom of the page you make, so it will show up in the overview. In the page of your proposal, make clear 1) what you want to achieve and 2) what do you expect from your implementation. If you chose an idea from the [https://blueprints.launchpad.net/hugin Blueprints over at Launchpad] tell us why and what you'd exactly like to do with it. If you're having an idea of your own, tell us more about it. We want to know what's great about and why it would be of benefit for hugin. On your proposal page, tell us why you're suited to carry out the project.<br />
* Be prepared to tell us how much time do you plan to invest in the project before, during and after the Summer of Code? We expected full time 40h/week during GSoC, would that be doable for you?<br />
* Please provide a schedule of how this time will be spent on subtasks of the project. While this is only preliminary, you will be required to provide a detailed plan latest at the beginning of GSoC and during the project you will issue weekly progress reports against that plan.<br />
<br />
[[Category:Community:Project]]</div>Onomou