root/trunk/llmozlib2/README-win32.txt

Revision 11, 4.7 kB (checked in by callum.linden, 2 years ago)

Update of this branch with files from internal Linden version.
Addition of README for Windows developers
Internal Linden version is now deprecated and this branch becomes the canonical version.

Line 
1 Getting, patching, building and using LLMozLib2 on the Windows platform
2 =======================================================================
3
4 These instructions describe how to build the Windows version of LLMozLib2 for use within the Second Life client. They have been tested using Microsoft Visual Studio 2003 (v7.1) - other versions of the Microsoft compiler may also work but they have not been tried or tested.
5
6 LLMozLib2 currently uses code from the 1.8.1.x branch of the Mozilla codebase - somewhat similar to what is used in Firefox 2.0.
7
8 Here are the steps you need to take to set up your build environment, get the Mozilla source, patch it, build it and copy it to the right place in the LLMozLib2 source tree. After that, you can build LLMozLib2 normally using the Visual Studio solution file.
9
10 * Checkout llmozlib2 from the Second Life public SVN repository: https://svn.secondlife.com/svn/llmozlib/trunk/llmozlib2/
11
12 * Follow the instructions on the Mozilla Windows Build Prerequisites page - http://developer.mozilla.org/en/docs/Windows_Build_Prerequisites
13
14 * Typically this consists of downloading and installing the MozillaBuild package into C:\mozilla-build - refer to the Web page for details since it's likely this will change over time and that page will obviously always have the most recent version.
15
16 * Get to an MSYS command prompt as per instructions described in the aforementioned Web page.
17
18 * Change directory to the MSYS /c drive (the C: drive in Windows)
19
20    cd /c
21
22 * Checkout the Mozilla configuration file
23
24     export CVSROOT=':pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot'
25     cvs checkout -r FIREFOX_2_0_0_13_RELEASE mozilla/client.mk
26    
27     Notes:  * replace the FIREFOX_2_0_0_13_RELEASE tag with one that refers to the version you want
28             * the CVS password is 'anonymous'
29    
30 * Change to the directory you checked out in
31
32     cd mozilla
33
34 * Checkout the source code
35
36     make -f client.mk checkout MOZ_CO_PROJECT=xulrunner
37
38 * Copy the following files from the llmozlib2/build_mozilla directory into the C:\mozilla directory you just checked out
39
40     * .mozconfig.debug
41     * .mozconfig.optimized
42     * linden.patch
43
44 * Patch the Mozilla source with the Linden patch
45
46     patch -p0 < linden.patch
47
48 * Copy over the .mozconfig file for the optimized (release) build
49
50     cp .mozconfig.optimized .mozconfig
51
52 * Start a build:
53
54     make -f client.mk build
55
56 * Wait - takes about 20 minutes on a typical development system
57
58 * Copy over the .mozconfig file for the debug build
59
60     cp .mozconfig.debug .mozconfig
61
62 * Start a build:
63
64     make -f client.mk build
65
66 * Wait - takes about 40 minutes on a typical development system
67
68 * Unify the Mozilla runtime type libraries - convert the *.xpt files into a single, unified one - improves startup time considerably.
69
70     * Using the MSYS shell from the /c/mozilla/objdir-opt-xulrunner-small/dist/bin directory:
71
72         ./xpt_link all.tmp components/*.xpt
73         rm components/*.xpt
74         mv all.tmp components/all.xpt
75
76     * Using the MSYS shell from the /c/mozilla/objdir-debug-xulrunner-small/dist/bin directory:
77
78         ./xpt_link all.tmp components/*.xpt
79         rm components/*.xpt
80         mv all.tmp components/all.xpt
81
82 * Copy over the necessary Mozilla files into the LLMozLib2 directory
83
84     copy_products_windows.bat
85    
86     Note: (run from the LLMozLib2 directory)
87
88 * Build LLMozLib2 using Microsoft Visual Studio 2003 (v7.1)
89
90     Open the LLMozLib2 solution file llmozlib2.sln.
91
92 * Build the LLMozLib Debug and Release configurations in the normal fashion.
93
94 * Copy the LLMozLib2 files to the Second Life client branch
95
96     copy_llmozlib2_to_branch.bat
97    
98     Note1: (run from the LLMozLib2 directory)
99     Note2: (edit the batch file to reflect the branch you want to copy to)
100
101 * That completes the process - you should now have a new set of LLMozLib2/Mozilla runtime files in the branch you specified. The files that are copied are:
102     * Header file (llmozlib2.h) in libraries\include\
103     * Static library (llmozlib2.lib) (debug) in libraries\i686-win32\lib_debug\
104     * Static library (llmozlib2d.lib) (release) in libraries\i686-win32\lib_release\
105     * DLLs (debug) in libraries\i686-win32\lib_debug\
106     * DLLs (release) in libraries\i686-win32\lib_release\
107     * Runtime misc files (debug) in indra\newview\app_settings\mozilla_debug\
108     * Runtime misc files (release) in indra\newview\app_settings\mozilla_release\
109
110 * If you want to experiment with the test applications (uBrowser, testGL for example), you can change the startup project in Visual Studio and build the one you want. A separate document in this directory contains notes on using each test app.
111
112 ---- end of doc ----
Note: See TracBrowser for help on using the browser.