## NGLayout Windows Build Instructions

This document explains how to build NGLayout for the Windows platform.

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.
- Download and install GNU tools. Put them in your path.
- Install NGLayout source.

- cd <your-source-area>
- unzip -o -q win-19980415.zip

- 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!

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_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 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)
- set NO_SECURITY=1
- set NSPR20=1
- 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
- set MODULAR_NETLIB=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 mozilla\config
- nmake /f makefile.win

- Build the NGLayout: This will do a complete build of the source tree. You will end up with a viewer.exe at the end. The viewer.exe 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).

- cd mozilla
- nmake /f nglayout.mak

Running:

- Once you have built the system, do this to run the viewer program (the viewer program is a simple test program that uses the nsIWebWidget API to embed a web widget object). The viewer program has a few basic menu items, include "Samples" which load sample tests.

- cd mozilla\dist\win32_[OD].obj\bin
- .\viewer.exe

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

Copyright © 1998 Netscape Communications Corporation