How to Build Aztec
This document outlines some important information required to build Aztec. The build processes isn't the easiest in the world, as a number of 3rd party libraries are used. We will be trying very hard to minimise the pain in the future by supplying reade to go libraries, but for the moment, downloading them is the only option.
For building on Microsoft Windows, Aztec requires Visual C version 6, with at least Service Pack 5 installed. Aztec makes use of some template functionality that wasn't fully implemented in earlier versions of Visual C. For building on other platforms any version of GCC 2.x or GCC 3.2 or ICC 6.0 should do.
The following libraries need to be downloaded and compiled if necessary.
Step 1: Required Libraries
This library is needed for all of Aztec. The Visual C 6 STL does not allow std::map and other structures to be used between DLL's, and this was becoming an issue. Moving to STL port was not an easy decision, but it makes development for Aztec that much easier.
See the installation instructions that come with STLPort for information on how to build and used STLPort.
Two environment variables are needed for this:
LIB3DS_INCLUDEDIR=<your location>\lib3ds-1.2.0
LIB3DS_LIBDIR=<your location>\lib3ds-1.2.0\msvc
Two environment variables are needed:
DEVIL_INCLUDEDIR=<your location>\DevIL-SDK-1.6.1\INCLUDE
DEVIL_LIBDIR=<your location>\DevIL-SDK-1.6.1\LIB
Or FTP
You need some environment variables for this as well:
JAVASCRIPT_LIBDIR - needs to be set to the directory that contains the 'debug' and 'release' directories. Something like <your location>\js-1.5-rc4a\js\src
JAVASCRIPT_INCLUDEDIR - needs to be set to the directory containing all the .h files for java script. Something like <your location>\js-1.5-rc4a\js\src
This adds particle system support to Aztec, and it is needed by the StdPrimitives project.
In order for this to work, two environment variables are needed.
PARTICLE_INCLUDEDIR - This needs to point to the directory containing the include files for the Particle API.
PARTICLE_LIBDIR - This needs to point to the directory containing the 'debug' and the 'release' directories created by the Particles API project.
This is needed for the AztecGUIPlugin project. It is just a small bunch of header files for the newest ATL/WTL library from Microsoft. When you download it, extract it somewhere, and set up your MSDev environment to have search the WTL7 include directory when compiling.
You need to set an environment variable called FLEX that points to the executable file flex.exe. For example, FLEX=c:\program files\flex\flex.exe
You need to download FreeType, and compile it. However if you are using the Windows platform
and the VC project that they supply, you need to change the run-time library that it uses.
Aztec uses the Multithreaded DLL, wheres the FreeType build only gives configurations for the
static Single and Multithreaded libraries. We have supplied a project file to achieve this, and
it's located in software/freetype/builds/win32/visualc/freetype.dsp
After this, you need to set the environment variable FREETYPE_DIR
to point to the directory where the objs
and include
directories live.
Step 2: Building Aztec
The next step is to actually build Aztec. After acquiring the source, load the workspace aztec/source/Aztec.dsw into Visual C.
This workspace should contain all the projects needed to build Aztec. The dependencies between the projects have already been setup. Click the Rebuild All option, and with a bit of luck, it should all build ok.
----------------------------------------------------------------------------------------------------------------
NOTE: The following instructions are for the wxWindows version of Aztec only!
(currently not usable for modelling jobs)
----------------------------------------------------------------------------------------------------------------
Step 3: Additional Required Libraries
For Windows you'll need wxMSW
For Linux you'll need wxGTK
Step 3a: Building Aztec for Windows
To build the new wxMain executable for MS Windows, you should do the following things first:
Make sure the WX environment variable exists and points to the root of your wxWindows installation
If you're getting errors with the 'cd' command and error 0x01 you didn't set your WX environment variable correctly, remember that you should restart the console if you add a new environment variable while a console is running (assuming you're running WinNT/2K/XP)
Modify include/wx/msw/setup.h (from wxWindows) and set wxUSE_GLCANVAS to 1
When building Aztec, try the following solution if you're getting errors about the new operator (these are the defaults in CVS versions of wx):
Edit setup.h and set wxUSE_DEBUG_NEW_ALWAYS and wxUSE_GLOBAL_MEMORY_OPERATORS both to 0 (this will make wxWindows use the CRT memory debugging functions instead of its own functions)
Please don't forget to rebuild wxWindows after modifying setup.h!
After this, you will need to build the fl dll libraries from the wxWindows/contrib/src/fl directories. This is needed for the advanced layout that this library provides.
Step 3b: Building Aztec for Linux
To build the new wxMain executable for GNU/Linux, you should do the following things first:
Configure wxWindows using "./configure --with-opengl" (without the quotes)
Make and install the wxWindows libraries
Make sure you have installed any of the previously mentioned libraries
Make sure you have installed any implementation (NVIDIA/ATi) of OpenGL or Mesa3D
When you are using the cvs version of Aztec, you should have installed the (preferably newest) autoconf, automake, libtool and m4 packages. Try installing newer versions of these packages when you get errors.
Go to the <aztec-root>/source directory
Type the following commands:
./autogen.sh
./configure (installed in /usr/local by default)
make
su -c make install
The previous instructions will build you a GTK+ 1.x version of Aztec. To create a GTK+ 2.0 version you should first download the current cvs version of wxWindows (2.2.9 and 2.3.2 will not work) and add the following commandline option to the ./configure script: "--enable-gtk2". Beware though, wxGTK2 is not very reliable yet and will probably not work correctly.