-
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 and all its dependencies on Windows using Microsoft Visual Studio 2012 (internally version 11.0).
Important: if you are using a newer version of Visual Studio, make sure to adapt the commands to match that version.
Important: when asked to open a Visual Studio command prompt, make sure to open an x64 command prompt.
Important: appleseed will not build using Qt 5.x or later, you do need a 4.x version of Qt.
- Download the source code for Qt libraries 4.8.x from qt-project.org/downloads:
- Unzip the source code in the directory of your choice.
- 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.
- Download the latest stable version of the Boost libraries from www.boost.org/users/download/:
- Unzip the libraries in the directory of your choice.
- Open a Visual Studio command prompt in that directory and type:
bootstrap
b2 address-model=64 toolset=msvc-11.0
- Locate the latest release of the dependency package in https://github.com/appleseedhq/appleseed-deps/releases.
- Download the sources:
- Extract the
3rdparty
directory (not its contents!) of the source archive into your appleseed source directory.
Your appleseed directory should look like that:
<root>
3rdparty
alembic
hdf5
libpng
openexr
xerces-c
zlib
resources
sandbox
scripts
src
- Open the solution file in
3rdparty\zlib\contrib\vstudio\vc11.appleseed\
. - Go to Build → Batch Build...
- Check all the project configurations for the
x64
platform then click Rebuild.
- Open the solution file in
3rdparty\libpng\projects\vstudio11.appleseed\
. - Go to Build → Batch Build...
- Check all the project configurations for the
x64
platform then click Rebuild.
- Open the solution file in
3rdparty\openexr\vc\vc11.appleseed\
. - Go to Build → Batch Build...
- Check all the project configurations for the
x64
platform then click Rebuild.
- Open a command prompt and navigate to the
3rdparty\hdf5\
directory of your appleseed installation. - Type
mkdir build
followed bycd build
. - Type
cmake -G "Visual Studio 11 Win64"
-DHDF5_BUILD_HL_LIB=1
-DCMAKE_ARCHIVE_OUTPUT_DIRECTORY=..\..\..\build\win-vs110\hdf5
..
- Open the solution file
3rdparty\hdf5\build\HDF5.sln
. - Go to Build → Batch Build...
- Click Select All then uncheck all the configurations for the
INSTALL
andPACKAGE
projects. - Click Rebuild.
- Open a command prompt and navigate to the
3rdparty\alembic\
directory of your appleseed installation. - Type
mkdir build
followed bycd build
. - Type
cmake -G "Visual Studio 11 Win64" -DBOOST_ROOT=<absolute-path-to-boost> ..
- Open the solution file
3rdparty\alembic\build\alembic.sln
. - Go to Build → Batch Build...
- Click Select All then Rebuild.
- Open the solution file in
3rdparty\xerces-c\Projects\Win32\VC11.appleseed\xerces-all\
. - Go to Build → Batch Build...
- Check the following two configurations for the
x64
platform:- Project
All
, ConfigurationStatic Debug
- Project
All
, ConfigurationStatic Release
- Project
- 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 in the solution, right-click on it and select Compile.
- Open a command prompt and navigate to the
build\
directory of your appleseed installation. - Type
cmake -G "Visual Studio 11 Win64"
-DBOOST_ROOT=<absolute-path-to-boost>
-DQT_QMAKE_EXECUTABLE=<absolute-path-to-qmake-executable>
..
- Open the solution file
build\appleseed.sln
. - Go to Build and select Rebuild Solution.
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\
. You should have something like this: - 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.