What this document is: A guide to building the Mozilla application. This includes:
If you're looking for documentation on developing features or fixing bugs, the Mozilla Technical Documents or Library are probably what you're looking for.
Hardware/OS
Create a folder named "Include Scanners". Place the file "#include" into the Include Scanners folder. Move the Include Scanners folder to the CodeWarrior Plugins folder. Create a folder named "ToolFrontEnd". Place the files "ToolFrontEnd" and "ToolFrontEnd Panel" into the ToolFrontEnd folder. Place this folder in the CodeWarrior Plugins folder.
Choose "Start ToolServer" from the ToolServer menu (this is the icon menu between "Window" and "Help" in the menubar above). You will now see a window with no close box. This is your ToolServer Worksheet where you will type (or cut & paste) the commands for the following steps.
In case you have never used MPW/ToolServer before, the following is very important. Pressing "return" does not execute commands like you might think. It just inserts a newline into the worksheet like a normal text editor. To actually get ToolServer to execute the command, you must press "Enter" (lower right of numeric keypad). This executes the line that the cursor is on, and only that line. If you want to execute multiple lines at once, select them all and hit Enter.
Set IDE "Develop:Source331 Build Environment:CW Pro 2:Metrowerks CodeWarrior:" Set Source "Source:FreeSource:"
directory "{IDE}MacOS Support:PowerPlant:_In Progress:_Table Classes:" patch LDropFlag.cp "{Source}mozilla:lib:mac:patches:LDropFlag.patch" duplicate -y "{Source}mozilla:lib:mac:patches:DropFlag Icons.rsrc" "{IDE}MacOS Support:PowerPlant:PowerPlant Resources:"
directory "{IDE}MacOS Support:Menu Sharing Toolkit 4.1:" patch menusharing.c "{Source}mozilla:lib:mac:patches:menusharing.patch"
directory "{IDE}MacOS Support:Headers:Rez Headers:" patch AppleEvents.r "{Source}mozilla:lib:mac:patches:AppleEvents.r.patch"
directory "{IDE}Metrowerks Standard Library:MSL C:MSL Mac:Public Includes" patch stat.mac.h "{Source}mozilla:lib:mac:patches:stat.mac.h.patch"
In the folder mozilla:build:mac:, there are several Perl scripts with names of the form BuildMozillaXXX.pl, where XXX is "Optimized", "Debug", "Tinderbox", et al. Each script builds the corresponding version of Mozilla. If you configured the MacPerl application to execute scripts that are opened from the finder, all you have to do is double click on the appropriate one; otherwise, launch MacPerl, and run the appropriate script from the "Run Script..." menu item.
These `configured build' scripts are simple, and you might want to make your own to force your build to StopForErrors(), or alternatively DontStopForErrors(), et al. You can set up certain build-script variables and (soon) compile-time flags. Compare the supplied scripts to figure out what you might want. Note that CodeWarriorLib, Moz.pm, and BuildList.pm, are AppleScript libraries and Perl modules meant to be used by a `configured build'. Use your favorite POD viewer (Shuck comes with MacPerl) to view the documentation in the Perl scripts.
If there were any errors in any of the projects along the way, the script will stop at that point and the IDE will tell you the errors. You can fix them and make sure they current project builds, but to continue the automation, you have to start from the beginning by double-clicking the script again. This isn't quite as bad as it sounds because the previous projects are already built (unless you changed some major header file). Please note that stopping the script once it has started is difficult. We are working to address this issue.
After the build is complete, you can find aliases to the built libraries and the final Mozilla application. Debug builds are built to Mozilla:dist:client_debug, while optimized builds are built to Mozilla:dist:client.
Don't worry too much about the numerous warnings generated during the build. We try our best to get the XP teams to use real compilers, but alas, they continue to write warning-laden code. There is also some generated code (Java is one example) that has a lot of warnings that we can't help either. If you write any new code, please help us in our quest to get zero warnings.