Compiling the viewer libraries (MSVS 2003)

This page supplements Compiling the viewer (MSVS2003).

In the source directory, there are several empty placeholder folders for libraries which the Second Life viewer relies upon. This section describes how to acquire the code, and how to install it. It is a good idea to install in order, as some libraries will rely on previous installs (ie, libcurl needs openssl and zlib).

Boost

NOTE: the Boost Wiki says to use the Visual Studio command prompt instead of the regular command prompt.

Expat

ZLib

Apache Portable Runtime

Freetype

OpenSSL

cURL

XMLRPC-epi

$ tar xvzf xmlrpc-epi-0.51
$ cd xmlrpc-epi-0.51
$ patch -p1 < ../remove_iconv.patch
$ patch -p1 < ../excise_expat.patch
$ rm -rf expat
$ mkdir expat
$ cp $FOO expat
    Where $FOO is either
        /tmp/expat/include/* -- if you built expat recently
    or  ../../expat-1.95.8/src/lib/expat*.h -- if you haven't
    in this later case you'll need to have CVS gotten the expat
    lib, and expanded it's src.tar.gz file there
$ cp ../src/xmlrpcepi.* .

Vorbis & Ogg

JPEGlib

OpenJPEG

TUT

LLMozLib

These instructions describe how to build the Windows version of LLMozLib for use within the Second Life client. They have been tested using Microsoft Visual Studio 7.1 - apparently, things do work with other versions of the Microsoft compiler but they have not been tried or tested.

LLMozLib currently uses code from the 1.8.0 branch of the Mozilla codebase - similar to what is used in Firefox 1.5. At some point in the future we will switch to the 1.8.1 branch - the one used to build Firefox 2.0.

Get our snapshot llmozlib from the source downloads page.

The steps required to generate LLMozLib and associated run-time files are:

http://developer.mozilla.org/en/docs/Windows_Build_Prerequisites_on_the_1.7_and_1.8_Branches
 c:
 cd \
 export CVSROOT=:pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot
 cvs login (the password is 'anonymous')
 cvs checkout -r FIREFOX_1_5_0_9_RELEASE mozilla/client.mk
 cd c:\mozilla
 make -f client.mk checkout MOZ_CO_PROJECT=xulrunner
Note
the CVS tag will change as Mozilla release updates. Version 1.5.0.9 is current as of writing.
The patch can be found in the llmozlib build_mozilla directory.
Copy the patch into the directory where you are building Mozilla and apply the patch:
patch -p0 < linden_updates.patch
The build_mozilla directory contains 2 Mozilla configuration files - one for a debug build and one for an optimized build.
Copy both files into the directory where you are building Mozilla and then:
copy .mozconfig.debug .mozconfig
make -f client.mk build
copy .mozconfig.optimized .mozconfig
make -f client.mk build
There is a batch file in the LLMozLib directory to help you.
You may need to edit the paths at the top if your Mozilla source directory is different.
copy_products_windows.bat
Open the LLMozLib solution file llmozlib.sln.
Build the Debug and Release configurations in the normal fashion.
There is a batch file in the LLMozLib directory to help you.
You may need to edit the paths at the top if your Second Life client directory is different.
copy_llmozlib_to_branch.bat
Header file (llmozlib.h) in libraries\include\
Static library (llmozlib.lib) (debug) in libraries\i686-win32\lib_debug\
Static library (llmozlib.lib) (release) in libraries\i686-win32\lib_release\
Runtime DLLs (debug) in libraries\i686-win32\lib_debug\
Runtime DLLs (release) in libraries\i686-win32\lib_release\
Runtime misc files (debug) in indra\newview\app_settings\mozilla_debug\
Runtime misc files (release) in indra\newview\app_settings\mozilla_release\