User:Dzonatas Sol/Compiling The Viewer
Overview
SCons and CMake together can make a very powerful builder and development environment utilities. They both have unique features that we need. This document focuses mainly on SCons to just get the viewer built.
Ideally, we need the builder to be very portable and to give the exact same results on every build. The SConstruct file as it has existed has been mainly for a Linux specific build. There are additional files, found in OSLCC, that can be used to make this work on Win32 environments.
There are two main ways to build the viewer, and that is with or without the pre-built libraries. The SCons script can compile the libraries, but that is not recommended for those that only want to compile and test the viewer.
Prerequisites
Microsoft Windows
If you don't already have these, then install:
- Visual Studio 2005 SP1 -or- Visual C++ 2005 Express SP1(Free)
- Microsoft Platform SDK
- DirectX 9.0 SDK (December 2006)
- Cygwin and include bison, flex, perl, gzip, tar, unzip, wget, and subversion
- Python 2.5
- SCons
Get the sources
The sources are currently on LL's extern svn and OSLCC.
- TODO: update paths
Get the source
Create your preferred workspace and use subversion to retrieve the source:
> md workspace > cd workspace > svn co http://oslcc.svn.sourceforge.net/svnroot/oslcc/sandbox/branches/llscons/1.18.6 linden
Install the pre-built libraries
This step will be automated, but this is an example of how to install them.
Install the libraries into the workspace:
> cd workspace > wget http://secondlife.com/developers/opensource/downloads/2007/12/slviewer-win32-libs-RC-1.18.6.0.zip > unzip slviewer-win32-libs-RC-1.18.6.0.zip
If you do not have 'wget' or 'unzip', you can use your web browser to download the libs from Source downloads and then use windows directory explorer to open the zip files. Once opened, copy and paste the linden folder into your workspace. (Reply 'yes' if it asks you to overwrite files.)
Also, install the GL headers. Follow the instructions for OpenGL in the section on OpenGL for VS2005
Compile
By default, the scripts assume you have the pre-built libraries installed in your workspace.
To compile, just run scons:
> cd workspace\linden\indra > scons
If there are no errors reported from that step, you will have a full build of the viewer.
Libraries
- TODO: update to compile with libraries