![]() |
|
|
Building Mac MozillaIf you are a programmer on another platform, and you need information to make your changes Macintosh-friendly, there is a page just for you here. How it works nowThe build system is fully automated. You have to set up a build environment by assembling pieces from here or there, but after that, you can check out and build all the projects with a single perl script. The build system is still rapidly evolving, and is not idiot-proof, but should be usable. Recent changesTo find recently-added information quickly, click on the links below, and look for this symbol:
Future changesWe may be requiring an upgrade to CodeWarrior Pro 4.1 soon. If you want to do this now, you can. The upgrades have been posted by MetroWerks on the web, and are free. To find out how to do this, read this news postingThe perl scripts may be going away soon, in favor of a master "Cluster" project. It will be easier, faster, and better in oh, so many ways. How do I know these things? I read the newsgroup netscape.public.mozilla.mac daily. It's good for you, and tastes good, too.
Tools and resourcesTo build MacMoz, you'll need the MetroWerks CodeWarrior Pro 4 development environment. Choose the Full MacOS Install option when you install. This option requires about 250MB of free disk space. Next, you'll need to install some additonal tools.
Note: if you are thinking of integrating NGLayout into another product, you will not need all the 3rd party libraries Mozilla requires. Obtaining the source code and building itUsing the MacCVS client, create a new CVS session file. Set your preferences from Edit | Session Settings:
Next, check out the module
mozilla/build/mac.
If you've followed the instructions above, you
can
just select the menu
Once CVS is done checking out the build directory, go to your local tree directory and open it. Drill down to the :mozilla:build:mac: folder, and you should see several build scripts waiting for you. You should also see the RunTSScript MPW compiler. You'll need to place a copy of this in your CodeWarrior Pro 4 folder, in Metrowerks CodeWarrior:CodeWarrior Plugins:Compilers:. Use PullNGlayout.pl to download to rest of the source. Just drag that file onto MacPerl, or run it in MacPerl whatever other way you prefer. Some folks use BBEdit and BBEdit perl extensions as their build environment. This allows you to edit the build scripts inside BBEdit, and use the extensions to run it inside MacPerl. You can also use Alpha and its Perl mode to do the same thing. You can even try to run the build scripts from MPW, but some have reported that MPW perl tool often crashes. The first time you run PullNGlayout.pl, it will prompt you for the location of your CVS session file. This file will be used to check out the rest of the tree. Building Mac Mozilla the first timeWarning: You will be downloading tens of megabytes of source code. If you are using a 33.6 connection, be prepared for hours and hours of download time. Before pulling the source code, always make sure the Macintosh build column on tinderbox is green. Redness on tinderbox presages a pull that will not build. If the Macintosh build is showing red, You might as well go to a movie and try later. You should add this tinderbox link to your bookmarks, even to your personal toolbar. Run BuildNGLayoutDebug.pl from MacPerl. This script will build all the projects and create a Macintosh application directory in :mozilla:dist:viewer_debug: within your source tree. Note: by default it may pull the tree too. Open the file (it's just text) modify it, and set the "pull all" flag to 0 if it is 1. There is no reason why you cannot make minor modifications like this to the scripts, to suit your own nefarious purposes. Updating and Building Mac Mozilla on subsequent occasionsThe following steps are highly recommended:
More about the build systemThe build system uses MacPerl to drive various Mac applications with AppleScript and AppleEvents. It consists of 3 perl scripts:
Hack alert: To create NGLayout-specific #defines that span all the projects, the build scripts use a hack. All Mac projects we care about include mozilla/config/mac/MacConfigInclude.h. By default, an alias to this file is exported to :mozilla:dist:. The NGLayout build script replaces this alias with a new one, pointing to NGLayoutConfigInclude.h, but the alias is still named MacConfigInclude.h. FAQ about building MozillaSomething in this document is wrongPlease inform the MacFE project owners of the error, and (ideally) recommend a solution. Answers to additional problems not yet in the FAQ are also welcome. Where else can I go for answers?Point your newsreader at the Mozilla newsgroups or subscribe to the mailing lists: http://www.mozilla.org/community.h tml. Also, check out So you want to add something (and not break the build) ...", a guide to adding files and directories without breaking any of the three platforms. Can I build with older versions of CodeWarrior?Currently, the answer is, "No." We make use of several classes in PowerPlant which recently appeared in Pro4. Time to upgrade, I'm afraid. Don't even try opening the projects with Pro2 because you will get data loss and have to throw the project away (it won't even prompt you!). I can't build MemAllocatorStubsIt sounds as though your ToolServer environment is not set up correctly. Make sure you follow the directions to the letter. You could also be seeing this if you have multiple versions of ToolServer on your computer and the Finder lauches the wrong one. This is very common, as the Carbon Dater app from Apple DTS contains a copy of ToolServer. Either remove all the other versions of ToolServer or make sure you launch the appropriate version before you start building.
MacPerl is giving me grief.If you're seeing AppleEvents errors, you probably need to give MacPerl more RAM to play with. If you're still using the default RAM size, increase it by 1MB. If MacPerl appears to be freezing, patience is the first approach - especially if you're on a slow Mac. If you're sure that MacPerl is frozen, maybe the build script can't find or launch CodeWarrior. The CodeWarriorLib.pm tries its best to find CodeWarrior without bothering you, but sometimes this doesn't work. Try opening the CodeWarrior IDE before you run whatever Perl script you're trying to run. How can I stop a build in progress?The most reliable way is to quit the CW IDE. Just switch to CodeWarrior and press command-Q. CodeWarrior may ask you to confirm the action, and it may complete the current job before quitting. MacPerl should error out; sometimes, MacPerl will also relaunch CodeWarrior. How much RAM does CodeWarrior needThe IDE in CodeWarrior Pro 4 appears to use temprorary system memory as needed. So while you need to have about 35MB RAM free to compile the largest Mozilla projects, it needn't be contiguous. CodeWarrior itself starts with about 10MB, and that seems to be sufficient. In theory, running virtual memory will allow CodeWarrior to run with only 6MB RAM. However, virtual memory is known to slow down application launching, and will certainly slow down your build process in general, as well. Since building MozMac is slow enough already, and RAM is cheap, we do not recommend VM. If PowerPlant.mcp is failing to compile, you may have a memory shortage. Try quitting other applications, so the system can give that memory to CodeWarrior. Why won't JavaScript build?If JavaScriptPPC.mcp (mozilla/js/macbuild) is failing to compile, you may be building the wrong target. Make sure you're building the JavaScriptNoJSJ or JavaScriptNoJSJDebug target. This shouldn't happen if you're using the build scripts in mozilla/build/mac. Also, a bug in CodeWarrior seems to keep jsinterp.c from compiling properly in non-debug mode. If you're seeing this problem, try compiling jsinterp.c by itself: select the file in the JavaScriptPPC.mcp project window, and press command-K to compile it. Version History
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Copyright © 1998 The Mozilla Organization. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||