|
|
Building Mozilla on Microsoft Windows 32-bit platforms
$Id: win32.html,v 1.18 2000/02/10 07:44:26 endico%mozilla.org Exp $
How to build Mozilla on a Microsoft Windows 32-bit System.
What this document is: A guide to building the Mozilla application.
This includes:
- A listing of the development tools you will need to build
Mozilla.
- A list of environment variables you will need to set before
building.
If you're looking for documentation on developing features or fixing
bugs, the Mozilla
Hacking Documents
are probably what you're looking for.
Each of the following subsections describes, or gives references to
descriptions of, the steps necessary to build Mozilla.
The following need to be installed:
- Microsoft Visual C++ version 5.0 or later
(make sure you have set up the compiler using the
vcvars32.bat script that came with it)
- Service Pack 3
- GNU Tools for Microsoft Windows (the Cygnus toolkit):
Specifically, you'll need:
Set MOZ_TOOLS such that %MOZ_TOOLS%\bin
contains the executables listed above..
Netscape has internally modified versions of gmake,
shmsdos, and uname
that we use to get around some problems
we were having keeping in sync with the Unix version of gmake.
These versions can be found in the Windows Build Tools
package, which can be ftp'd from
ftp://ftp.mozilla.org/pub/mozilla/source/wintools.zip. Then,
unpack the zip file, and run the handy install script:
cd buildtools\windows
install.bat
This will overwrite the cygnus toolkit versions of three
files with the modified versions you get from mozilla.org. This
also installs required support libraries and dlls (such as libIDL
and glib).
- Perl5 for win32:
Hardware/OS
- Pentium 133 MHz or better
- 64 MB RAM, 128 MB recommended
- 250 MB NTFS or 500 MB FAT disk space
- NT 4.0 is preferred
- NT 3.51, Win95, and Win98 will also work.
The following environment variables need to be set:
set BUILD_XPIDL=1
(don't set this if you haven't installed the wintools.zip
package in a while)
set MOZ_BITS=32
set MOZ_DEBUG=1
(set this only if you want to build a debug build). to build
optimized, undefine the variable by doing "set MOZ_DEBUG="
set MOZ_NT=351
(if running NT3.51)
set MOZ_SRC=
(top of your tree, for example: set
MOZ_SRC=d:\mozilla_source
if this is the directory where you checked out or
unzipped the source into... don't end this line with a
'\'... you'll be sorry if you do)
set MOZ_TOOLS=
(the parent directory of the GNU tools 'bin'
directory. The build
looks for MOZ_TOOLS\bin\gmake.exe, so make sure that the
gmake.exe from the Windows Build Tools package resides there.)
OS_TARGET=WINNT
(or WIN95, or WIN98? Someone with one of these
systems needs to verify this)
set PATH=%PATH%;%MOZ_TOOLS%\bin
set _MSC_VER=1100
(if you are running VC++ 5.0) or 1200
(if you are running VC++ 6.0) - or -
set MOZ_VCVER=42 (for version 4.2, though no
reports of successful compilation have been reported with 4.2)
There are two principal ways of getting the code,
ftp and
CVS.
CVS will provide the most current code for building, but is
slower than ftp. Ftp drops are generally produced daily,
and are known to compile.
If you prefer to initially get the source via FTP then
copy the tarball to your MOZ_SRC directory and uncompress it.
Change to the directory that you set the variable MOZ_SRC to.
(for example,
cd d:\mozilla_source).
If you already copied the source there from a tarball,
there should be one directory here named
mozilla. Change to that directory and run
nmake with the build_all option
so that nmake doesn't use CVS to update your tree.
cd mozilla
nmake /f client.mak build_all
If you're checking out the source via CVS, then check out the
makefile, change to the new mozilla directory it creates,
and run nmake. The makefile checks out the source
and builds the tree in one step.
cvs co mozilla/client.mak
cd mozilla
nmake /f client.mak
- nmake has a 'fatal error', listing one of the GNU commands and a
hexadecimal return code.
This will happen as a result of not having the GNU tools and Windows Build
tools in your path. Add the directories with the appropriate binaries to your
path.
-
It fails with the message "'.\WIN32' unexpected":
You didn't properly
set the environment variables -- you must not include a
space at the end
of the set statements (be careful if you are cut'n'pasting).
-
It fails to build, with directory-related errors:
The full path
to the source must not include any spaces. Additionally,
the source must
be extracted with an intact directory structure by a utility
that understands
long filenames. If in doubt, grab Info-Zip at
ftp://ftp.cdrom.com/pub/infozip
-
It fails immediately with the message "Cannot find
specified directory":
You probably didn't properly set the environment
variable MOZ_TOOLS;
this needs to be set to the path up to, but not including,
the final \bin directory in the path to the gnu tools. So,
the path to the tool executables is '%MOZ_TOOLS%\bin\'.
-
I'm not running a 32-bit windows system, how do i build?
Currently, the build process depends on a 32-bit operating system.
Windows NT 4.0 is the recommended windows operating system.
-
I'm not using the standard cmd.exe, and my build fails...
Problems have been encounted using the 4nt command shell. 4nt
interprets charactes like ';' in the makefile.win files as
targets, and since there are no rules for the target ';', the
build fails.
-
I checked in something that builds on Windows, but it breaks other platforms ...
|