Building Naali in Windows
From Rex community wiki
NOTE BEFORE READING
This wiki page is from around Naali 0.0.1 release date. The information here is outdated and the dependencies/links as the viewer-dependencies-VS2008.zip file unfortunately do not exist anymore. Please refer to Building Naali from source trunk for more up to date instructions.
Introduction
The Naali viewer codebase uses CMake as its build system, so to generate the project solution files for Microsoft Visual Studio 2008 to use, you need to install CMake from http://www.cmake.org/.
To be able to build the source repository, the first thing you need to do is to obtain (and possibly compile) the dependencies that are required by Naali. The second step is to configure
the CMake build script to locate those dependencies, and finally you can compile the viewer solution itself.
Microsoft Visual C++ 2005 or earlier versions are not officially supported (but might work).
Obtaining the dependencies
For getting the dependencies, you have two choices, depending on how much code you want to compile yourself. In the following, it is assumed that the viewer SVN trunk has been checked out to \viewerTrunk\.
Building using the precompiled dependency package
Use this option when you just need to get Naali compiled, and to focus on developing Naali itself.
- Download the precompiled dependency package from http://dev.realxtend.org/gf/project/viewerdeps/frs/
- Package name is viewer-dependencies-VS2008
- Extract it to a folder, for example \viewerDeps\
- Copy all the DLLs from the \viewerDeps\bin\ folder to \viewerTrunk\viewer\bin\
- Continue to #Building the Viewer
Building using the dependency repository
Use this option when you need to be able to generate custom builds of the dependency packages or if you want to have better debugging capabilities in VS (breakpoints, step through, trace, edit-and-continue inside dependency libraries).
This process is much more involved, but allows you to have a lot less boundaries when developing. Note that not all of the external dependencies are included in this repository, since the large size of the resulting codebase forbids that.
To build Naali using the dependency repository, perform the following:
- Get the viewer dependency repository by executing svn checkout http://dev.realxtend.org/svn/viewerDeps/trunk/. The following assumes that you checked out the dependencies into the folder \viewerDeps\.
- Download, install and build Boost from http://www.boost.org/. Version v1.36.0 or newer is required.
- Download, install and build Qt from http://www.qtsoftware.com/, or obtain Qt from the precompiled dependency package. Check that the environment variable QTDIR is correct. See \viewerTrunk\doc\qt.txt for more details.
- Download, install and build Ogre from http://www.ogre3d.org/. Alternatively complete this dependency using the precompiled dependency package. Ogre version v1.6.1 or newer is required. Check that OGRE_HOME environment variable points to the installation root folder.
- Download, install and build PoCo from http://pocoproject.org/. Version v1.3.4 or newer is required. It seems that Visual Studio 2008 Express cannot be used to compile PoCo, so in that case, you just have to get the precompiled version from the dependency package.
- See \viewerDeps\expat\ReadmeRex.txt. Build Expat from \viewerDeps\expat\expat.sln. Copy the outputted DLLs to \viewerTrunk\viewer\bin\.
- See \viewerDeps\GnuWin32\ReadmeRex.txt. LibIconv doesn't require building. Copy the DLLs in \viewerDeps\GnuWin32\bin\ to \viewerTrunk\viewer\bin\.
- See \viewerDeps\libcurl\ReadmeRex.txt. Build LibCurl from the file vc9curl.sln. Copy the resulting outputted DDLs to \viewerTrunk\viewer\bin\.
- Build OpenJPEG from \viewerDeps\OpenJPEG\LibOpenJPEG.sln. Copy the resulting outputted DLLs to \viewerTrunk\viewer\bin\.
- See \viewerDeps\xmlrpc-epi\ReadmeRex.txt. Build XMLRPC-EPI from \viewerDeps\xmlrpc-epi\xmlrpcepi.sln. Copy the resulting outputted DLLs to \viewerTrunk\viewer\bin\.
- Continue to #Building the Viewer
Building the Viewer
- Set the REX_DEP_PATH system environment variable to point to \viewerDeps\.
- Open up \viewerTrunk\viewer\CMakeLists.txt and configure the set of modules that you want to build by commenting out the unnecessary ones. For most people, the default set of modules works just fine.
- Make sure that cmake is in your PATH. Start up Visual Studio 2008 Command prompt, navigate to \viewerTrunk\viewer\bin\ and execute 'cmake.exe .'. If cmake has issues with finding your installation of MSVC9 toolchain, you can try forcing it with 'cmake.exe -G "Visual Studio 9 2008"'.
- Open up realXtend-viewer.sln and build the solution.
- When compiling for the first time, compile in debug mode and run the exe at least once. Some data files are created in debug mode which are needed when running in release mode. TODO: Clarify on this, sounds like a bug? -jj.
Running the Viewer
After the build has completed, you can find the outputted executable in the folder \viewerTrunk\viewer\bin\. This is also the directory that should be used as the current working directory when executing the application (if you're spawning the viewer from an external debugger or a profiler). All the system modules are located in the folder \viewerTrunk\viewer\bin\modules\ and other configuration and data files in \viewerTrunk\viewer\bin\data\
Finally, if there are any issues or questions, see the Community Portal page for how to contact the developers.
|