-
Notifications
You must be signed in to change notification settings - Fork 0
Building appleseed on Windows
This page will guide you through the steps required to build appleseed on Windows using Microsoft Visual Studio 2010 (internally version 10.0).
You need to have a working Qt development environment installed on your machine. You can download the Qt development environment from qt-project.org/downloads. Scroll down and download the binary package called "Qt libraries <version> for Windows (VS 2010)".
Alternatively, you can download the Qt libraries source code and compile it yourself. Assuming that Qt resides in the default location C:\Qt\2010.05\
:
-
IMPORTANT: delete all
tmp
subdirectories inC:\Qt\2010.05\qt\src\
, even before the first build, otherwise you'll get build or link errors. - Open a Visual Studio prompt.
- Go to
C:\Qt\2010.05\qt\
and typeconfigure -opensource
nmake
Note about building Qt for 64-bit Windows: out of the box, Qt 4.8.0, Qt 4.8.1 and probably many other versions as well fail to build properly on 64-bit Windows. This blog post explains how to fix this.
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
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
zlib sources are included in the appleseed repository in src\zlib\
.
- Open the solution file in
src\zlib\contrib\vstudio\vc10.appleseed\
. - Go to Build → Batch Build...
- Check all the project configurations corresponding to the target platform (
Win32
orx64
) then click Rebuild.
libpng sources are included in the appleseed repository in src\libpng\
.
- Open the solution file in
src\libpng\projects\vstudio.appleseed\
. - Go to Build → Batch Build...
- Check all the project configurations corresponding to the target platform (
Win32
orx64
) then click Rebuild.
OpenEXR sources are included in the appleseed repository in src\openexr\
.
- Open the solution file in
src\openexr\vc\vc10.appleseed\
. - Go to Build → Batch Build...
- Check all the project configurations corresponding to the target platform (
Win32
orx64
) then click Rebuild.
HDF5 sources are included in the appleseed repository in src\hdf5\
.
- Open a command prompt and navigate to the
src\hdf5\
directory of your appleseed installation. - Type
mkdir build
followed bycd build
. - 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, typecmake -G "Visual Studio 10 Win64" -DHDF5_BUILD_HL_LIB=1 -DCMAKE_ARCHIVE_OUTPUT_DIRECTORY=..\..\..\build\win-vs100\hdf5 ..
- Open the solution file
src\hdf5\build\HDF5.sln
. - Go to Build → Batch Build...
- Click Select All then uncheck all the configurations for the
INSTALL
andPACKAGE
projects. - Click Rebuild.
Alembic sources are included in the appleseed repository in src\alembic\
.
- Open a command prompt and navigate to the
src\alembic\
directory of your appleseed installation. - Type
mkdir build
followed bycd build
. - For a 32-bit build, type
cmake -DBOOST_ROOT=<absolute-path-to-boost> ..
For a 64-bit build, typecmake -G "Visual Studio 10 Win64" -DBOOST_ROOT=<absolute-path-to-boost> ..
- Open the solution file
src\alembic\build\alembic.sln
. - Go to Build → Batch Build...
- Click Select All then Rebuild.
Xerces-C++ sources are included in the appleseed repository in src\xerces-c\
.
- Open the solution file in
src\xerces-c\projects\Win32\VC10.appleseed\xerces-all\
. - Go to Build → Batch Build...
- Check the following two configurations for the target platform (
Win32
orx64
): ProjectAll
, ConfigurationStatic Debug
ProjectAll
, ConfigurationStatic Release
- 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 theXercesLib
project, locate theutil/Win32/Xerces_autoconf_config.msvc.hpp
file, right-click on it and select Compile.
- Open a command prompt and navigate to the
build\
directory of your appleseed installation. - For a 32-bit build, type
cmake -DBOOST_ROOT=<absolute-path-to-boost> ..\src
For a 64-bit build, typecmake -G "Visual Studio 10 Win64" -DBOOST_ROOT=<absolute-path-to-boost> ..\src
- Open the solution file
build\appleseed.sln
. - Go to Build → Batch Build...
- 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
In order to run appleseed.cli or appleseed.studio from within the Visual Studio solution, some things need to be adjusted:
- Select both the
appleseed.cli
andappleseed.studio
projects in the Solution Explorer. - Right-click on one of them, and select Properties.
- Select All Configurations.
- In Configuration Properties -> Debugging:
set Command to
$(SolutionDir)..\sandbox\bin\$(Configuration)\$(TargetFileName)
set Working Directory to$(SolutionDir)..\sandbox\
- Click Ok to close the Property Pages window.
- Select appleseed.studio as the startup project (right-click on
appleseed.studio
in the Solution Explorer and select Set as StartUp Project). - Press F5 to start appleseed.studio.