WinFE Build Instructions
This document explains how to build Mozilla for the Windows platform. WinFE
is the Windows front end module.
Required Tools:
-
Microsoft Visual C++ version 4.2 or later
-
GNU Tools for Windows:You can find these all over the web. Specifically,
you'll need:
cp.exe
rm.exe
Netscape has internally modified version of gmake, shmsdos and win32gnu
that we use to get around some problems we were having keeping in sync
with the Unix version of gmake. This version of gmake and it's source is
included in the Mozilla source distribution. The specific files pertaining
to this are:
gmake.exe
shmsdos.exe
uname.exe
These are located in the \tools\bin directory of the source package. All
of these tools need to be put in your path.
Additionally, there are Netscape-developed tools that need to be built
prior to your first compile. These are covered in the build section.
Setting up:
-
You need a Pentium with at least a 133 MHz processor and at least 250 megs
(NTFS partition) or 500 megs (FAT partition) of hard drive space. You need
to have a minimum of 64 megs of memory in order to build this tree. Having
at least 128 megs of memory will make your debugging experience noticeably
less agonizing
-
The preferred platform is NT 4.0. NT 3.51 will also work, and Win95 might
work if you're lucky. Maybe.
-
Install MSVC. If you don't choose to have the MSVC install modify your
environment variables for PATH, INCLUDE, and LIB information, be sure to
run VCVARS32.BAT out of the MSVC bin directory prior to attempting to build.
-
Download and install GNU tools. Put them in your path.
-
Install Mozilla source.
-
There are several environment variables you will need to set, either manually
or via a script within a command session, or by setting them in your system
environment located through the Control Panel | System icon. Those variables
are:
-
set MOZ_BITS=32
-
set MOZ_DEBUG=1 (don't set this if you want to build an optimized release
build)
-
set MOZ_GOLD=1
-
set MOZ_MEDIUM=1
-
set MOZ_NT=351 (if running NT 3.51, don't set otherwise)
-
set MOZ_OUT=(location of resulting executable and totally optional, see
Notes for more details)
-
set MOZ_SRC=(top of your tree, drive letter and path, i.e. set MOZ_SRC=d:\mozilla_src.
The topmost directory under this should be ns)
-
set MOZ_TOOLS=(location of the bin directory containing your GNU tools.
The build looks for MOZ_TOOLS\bin\gmake.exe, so make sure your MOZ_TOOLS
is figured appropriately)
-
set NO_SECURITY=1
-
set NSPR20=1
Building:
-
You need to be running a vanilla command prompt. Other shells may work,
but you might have to tweak makefiles.
-
Build the tools: This generates several tools that handle things
like dependency generation
-
cd ns\config
-
nmake /f makefile.win
-
Build the whole lizard: This will do a complete build of the source
tree. You will end up with a mozilla.exe at the end.
-
cd ns
-
nmake /f client.mak
-
If you want to build communicator a piece at a time, these are the steps
that client.mak steps through. If you successfully ran the client.mak step
above, you don't need to do this.
-
Build the back end: This builds cross platform components like NSPR
and the shared library modules. All of the interesting output from this
part of the build will end up in ns\dist, under public\ if it's a library
header, and under WIN32_D.OBJ\ (or WIN32_O.OBJ\ for an optimized build)
if it's a dynamic or static library. The exception is the NSPR public headers,
which live in WIN32_D.OBJ\include.
-
cd ns
-
nmake /f makefile.win
-
Build the front end: This builds and links into the final executable,
mozilla.exe.
-
cd ns\cmd\winfe\mkfiles32
-
nmake /f mozilla.mak DEPEND=1
-
nmake /f mozilla.mak
Notes:
-
MOZ_OUT: If you don't set this, mozilla.exe will be generated into ns\cmd\winfe\mkfiles32\x86dbg
(or x86rel for optimized builds)
-
This build process does not use Visual C++ generated project files for
several reasons having to do with (among other things) size, maintainability,
and the long term desire to start using more of tools like gmake, or plug
and play developer tools. This does not preclude you from using the Visual
C++ IDE, or it's debugger (somebody fill this out with more detail).
-
All of the DLLs that you need to run mozilla.exe get copied automagically
into your output directory as the last part of build, so all you need to
do is cd into x86dbg and run mozilla.exe to get a runnable browser.
-
On a Pentium II 266 MHz machine with 128 megs of memory, it takes approximately
30 minutes to build. Your mileage may vary.
Copyright © 1998 Netscape
Communications Corporation