NGLayout Windows Build Instructions
This document explains how to build NGLayout for the Windows platform. It was last updated on October 21, 1998.
Required Tools:
-
Microsoft Visual C++ version 4.2 or later
-
The same set of tools for building Mozilla
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. These
numbers are approximations.
- 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.
We use VC 4.2, 5.0, and 6.0 successfully. You need VC 5 or 6 to build Adam's
ActiveX control, because it requires ATL.
-
Download and install GNU tools. Put them in your path.
Change the name of date.exe (GNU tool) to unix_date.exe
-
If you're on Windows, you'll need to download our
Windows build tools.
-
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.
Note: There is an additional variable for building NGLayout!
Use this list carefully!
You can download a batch file that sets
all these variables properly; you'll need to tweak it a bit for your environment.
The 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_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 "mozilla")
-
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)
-
if you are running VC++ 5.0 or higher: set _MSC_VER=1100; if you are running
VC++ 4.2 then set MOZ_VCVER=42
-
set STANDALONE_IMAGE_LIB=1
Building:
- Go to your MOZ_SRC directory and check out the following: (this is how you get your source code)
cvs co mozilla/nglayout.mak
cvs co mozilla/config
- Go to mozilla and check out everything
cd mozilla
nmake -f nglayout.mak pull_all
- If this is the 1st time doing step 2 then skip step 3, otherwise clobber as follows:
nmake -f nglayout.mak clobber_all
- Build everything
nmake -f nglayout.mak all
Run It!
You will end up with a viewer.exe and an xpviewer.exe at the end. These binaries will be in
your dist\win32_[OD].obj\bin directory (O will be used when you don't set
MOZ_DEBUG; D will be used when you set MOZ_DEBUG). The xpviewer is the current state of Navigator
using XPFE and Raptor with nice looking chrome, etc.
The viewer.exe binary is a simple test harness for the NGLayout engine useful for debugging purposes.
Subsequent Builds
Assumming that the above has been done at least once and the various other systems it uses have not
changed, the latest NGLayout can be built as follows:
Run the script mentioned above (to set your environment variables), and go to your MOZ_SRC directory.
cd base
cvs update -d
nmake -f makefile.win clobber
nmake -f makefile.win
cd ..
nmake -f nglayout.mak pull_all_nglayout
nmake -f nglayout.mak clobber_nglayout
nmake -f nglayout.mak all_nglayout
Notes:
-
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. Once you have built a viewer.exe do this to
run it under the debugger:
-
cd mozilla\dist\win32_[OD].obj\bin
-
msdev viewer.exe