Skip to content

Building appleseed on Windows

François Beaune edited this page Feb 11, 2014 · 29 revisions

This page will guide you through the steps required to build appleseed on Windows using Microsoft Visual Studio 2012 (internally version 11.0).

Installing/Building Qt (4.8 or later)

You need to have a working Qt development environment installed on your machine.

  1. Download the source code for Qt libraries 4.8.x from qt-project.org/downloads.
  2. Unzip the source code in the directory of your choice.
  3. Open a Visual Studio command prompt in that directory and type: configure -platform win32-msvc2012 -opensource nmake

Note about building Qt for 64-bit Windows: out of the box, some early versions of Qt 4.8 (such as 4.8.0, Qt 4.8.1 and possibly even newer versions) fail to build properly on 64-bit Windows. This blog post explains how to fix this.

Installing/Building Boost C++ Libraries (1.47.0 or later)

32-bit Binaries

The easiest way to get the Boost libraries is to download them from boostpro computing. Choose BoostPro 1.47.0 Installer or later, and run the installation program. When prompted which variants to download, choose the Visual Studio 2010 multithreaded static libraries:

Alternatively, if you want to build Boost yourself, download Boost's sources from here, then open a command prompt in the directory where you unpacked them and type:

bootstrap
bjam

64-bit Binaries

boostpro computing does not provide 64-bit binaries so you will need to build Boost yourself. Download Boost's sources from here, then open a command prompt in the directory where you unpacked them and type:

bootstrap
bjam address-model=64

Building zlib

zlib sources are included in the appleseed repository in src\zlib\.

  1. Open the solution file in src\zlib\contrib\vstudio\vc10.appleseed\.
  2. Go to BuildBatch Build...
  3. Check all the project configurations corresponding to the target platform (Win32 or x64) then click Rebuild.

Building libpng

libpng sources are included in the appleseed repository in src\libpng\.

  1. Open the solution file in src\libpng\projects\vstudio.appleseed\.
  2. Go to BuildBatch Build...
  3. Check all the project configurations corresponding to the target platform (Win32 or x64) then click Rebuild.

Building OpenEXR

OpenEXR sources are included in the appleseed repository in src\openexr\.

  1. Open the solution file in src\openexr\vc\vc10.appleseed\.
  2. Go to BuildBatch Build...
  3. Check all the project configurations corresponding to the target platform (Win32 or x64) then click Rebuild.

Building HDF5

HDF5 sources are included in the appleseed repository in src\hdf5\.

  1. Open a command prompt and navigate to the src\hdf5\ directory of your appleseed installation.
  2. Type mkdir build followed by cd build.
  3. For a 32-bit build, type cmake -DHDF5_BUILD_HL_LIB=1 -DCMAKE_ARCHIVE_OUTPUT_DIRECTORY=..\..\..\build\win-vs100\hdf5 .. For a 64-bit build, type cmake -G "Visual Studio 10 Win64" -DHDF5_BUILD_HL_LIB=1 -DCMAKE_ARCHIVE_OUTPUT_DIRECTORY=..\..\..\build\win-vs100\hdf5 ..
  4. Open the solution file src\hdf5\build\HDF5.sln.
  5. Go to BuildBatch Build...
  6. Click Select All then uncheck all the configurations for the INSTALL and PACKAGE projects.
  7. Click Rebuild.

Building Alembic

Alembic sources are included in the appleseed repository in src\alembic\.

  1. Open a command prompt and navigate to the src\alembic\ directory of your appleseed installation.
  2. Type mkdir build followed by cd build.
  3. For a 32-bit build, type cmake -DBOOST_ROOT=<absolute-path-to-boost> .. For a 64-bit build, type cmake -G "Visual Studio 10 Win64" -DBOOST_ROOT=<absolute-path-to-boost> ..
  4. Open the solution file src\alembic\build\alembic.sln.
  5. Go to BuildBatch Build...
  6. Click Select All then Rebuild.

Building Xerces-C++

Xerces-C++ sources are included in the appleseed repository in src\xerces-c\.

  1. Open the solution file in src\xerces-c\projects\Win32\VC10.appleseed\xerces-all\.
  2. Go to BuildBatch Build...
  3. Check the following two configurations for the target platform (Win32 or x64): Project All, Configuration Static Debug Project All, Configuration Static Release
  4. Click Build, not Rebuild. If you accidentally clicked Rebuild or Clean, you'll first need to regenerate the Xerces_autoconf_config.hpp file. To do this, in the XercesLib project, locate the util/Win32/Xerces_autoconf_config.msvc.hpp file, right-click on it and select Compile.

Building appleseed

  1. Open a command prompt and navigate to the build\ directory of your appleseed installation.
  2. For a 32-bit build, type cmake -DBOOST_ROOT=<absolute-path-to-boost> ..\src For a 64-bit build, type cmake -G "Visual Studio 10 Win64" -DBOOST_ROOT=<absolute-path-to-boost> ..\src
  3. Open the solution file build\appleseed.sln.
  4. Go to BuildBatch Build...
  5. Click Select All then Rebuild.

In case you want to use a specific version of Qt, replace the first line with

cmake -DBOOST_ROOT=<absolute-path-to-boost>
      -DQT_QMAKE_EXECUTABLE=<absolute-path-to-qmake-executable> ..\src

Configuring the Visual Studio solution

In order to run appleseed.cli or appleseed.studio from within the Visual Studio solution, some things need to be adjusted:

  1. Select both the appleseed.cli and appleseed.studio projects in the Solution Explorer.
  2. Right-click on one of them, and select Properties.
  3. Select All Configurations.
  4. In Configuration Properties -> Debugging: set Command to $(SolutionDir)..\sandbox\bin\$(Configuration)\$(TargetFileName) set Working Directory to $(SolutionDir)..\sandbox\
  5. Click Ok to close the Property Pages window.
  6. Select appleseed.studio as the startup project (right-click on appleseed.studio in the Solution Explorer and select Set as StartUp Project).
  7. Press F5 to start appleseed.studio.