Hugin SDK (MSVC 2008) Patches

From PanoTools.org Wiki
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

The current SVN version of hugin depends not only on this SDK but also on glut, see this message for directions how to add glut to your installation of the SDK.

This is the list of changes from source distributions that need to be made to get the Hugin SDK compiled using Microsoft Visual Studio 2008 Express Edition, which is a precondition to compiling Hugin on Windows.

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.

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.

The most recent version of the files can be obtained at [1]

wxWidgets

  1. Open the file <SDKHOME>\wxWidgets-2.8.10\include\wx\msw\setup.h
  2. Search for following line
    #define wxUSE_GLCANVAS       0
    

    and replace it by

    #define wxUSE_GLCANVAS       1
    
  3. Save the file
  4. Open the file <SDKHOME>\wxWidgets-2.8.10\src\jpeg\jpeglib.h
  5. Search for following line
    #include "../src/jpeg/jconfig.h"
    

    and replace it by

    #include "jconfig.h"
    
  6. Save the file
  7. Open the file <SDKHOME>\wxWidgets-2.8.10\src\tiff\tiffconf.h
  8. Search for following line
    #ifndef COMPRESSION_SUPPORT
    

    and extend it to

    #define TIF_PLATFORM_CONSOLE 1
    #ifndef COMPRESSION_SUPPORT
    #define ZIP_SUPPORT
    
  9. Save the file

OpenEXR

  1. Open solution file <SDKHOME>\OpenEXR\ilmbase-1.0.1\vc\vc8\IlmBase\IlmBase.sln
    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
  2. 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:
    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.
    • Choose Configuration Properties > General. For Configuration Type property choose Static Library (.lib) if Dynamic Library (.dll) was selected.
    • Choose Configuration Properties > C/C++ > Preprocessor. In the Preprocessor Definitions entry remove defines OPENEXR_DLL, _USRDLL and *_EXPORTS (all with suffix _EXPORTS).
    • Choose Configuration Properties > C/C++ > Code Generation. For Runtime Library property choose Multithreaded-Debug (/MTd) in Debug configuration and Multithreaded (/MT) in Release configuration.
    • Choose Configuration Properties > C/C++ > Code Generation. For Enable Enhanced Instruction Set property choose Not Set.
    • Choose Configuration Properties > Build Events > Post-Build Event. In Command Line entry remove the createDLL command, but keep the install*.cmd command. For example in createDLL project only the statement "..\..\..\installCreateDLL.cmd $(IntDir)" should remain, in Half project only "..\..\..\installHalf.cmd $(IntDir)" etc.
  3. Close Property Pages dialog
  4. (64-bit) Add x64 Configuration
  5. Open solution file <SDKHOME>\OpenEXR\openexr-1.6.1\vc\vc8\OpenEXR\OpenEXR.sln
    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
  6. For project IlmImf do the same configuration property changes as in IlmBase solution described above
  7. Right-click IlmImf in Solution Explorer, and then choose Properties from shortcut menu
  8. In the Property Pages dialog do the following for Debug and Release configuration:
    Choose Configuration Properties > C/C++ > General. In Additional Include Directory entry enter following additional include directory:
    ..\..\..\..\..\..\wxWidgets-2.8.10\src\zlib
    
  9. (64-bit) Add x64 Configuration


Enblend/Enfuse/libxmi

  1. Open the file <SDKHOME>\enblend-enfuse-3.2\enblend_msvc2008.sln
  2. Add x64 Configuration
  3. Choose "File" > "New Project"
  4. For the path, give it <SDKHOME>\libxmi and the name of libxmi
  5. In the Solution Explorer, select the new libxmi project
  6. Choose "Project" > "Add Existing Item"
  7. Navigate to <SDKHOME>\libxmi and select all the .c and .h files
  8. Click OK
  9. Open <SDKHOME>\libxmi\sys-defines.h
  10. Change the line
    #include <config.h>
    

    to read

    #include "config.h"
    
  11. Close the file
  12. Open <SDKHOME>\libxmi\config.h
  13. Change the line
    #define HAVE_VALUES_H 1
    

    to read

    /* #undef HAVE_VALUES_H */
    #define HAVE_STRERROR 1
    
  14. Save and Close the file
Note
Pure ASM isn't supported when compiling x64, so an SSE4/SSE4.1 intrinsics replacement is used instead, which x64 machines will support.

expat

  1. Open the file <SDKHOME>\expat-2.0.1\Source\expat.dsw
    A Visual C++ Project conversion dialog appears. Click "Yes To All".
  2. (64-bit) Add x64 Configuration

exiv2

  1. Open solution file <SDKHOME>\exiv2-0.18.1\msvc\exiv2.sln
    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
  2. Right-click exiv2lib in Solution Explorer, and then choose Properties from the shortcut menu
  3. In the Property Pages dialog do the following for the Debug and Release Configuration, selecting All Platforms
    • Choose Configuration Properties > C/C++ > General. In Additional Include Directories entry replace
      ../../../zlib-1.2.3
      

      by

      ../../../wxWidgets-2.8.10/src/zlib
      
    • (64-bit) Add x64 Configuration
  4. Close Property Pages dialog

glew

  1. Open the file <SDKHOME>\glew\build\vc6\glew.dsw
    A Visual C++ Project conversion dialog appears. Click "Yes To All".
  2. (64-bit) Add x64 Configuration

Panorama Tools

  1. Open solution file <SDKHOME>\libpano\pano13\libpano.sln
    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