Changes

Jump to: navigation, search

User:Jamesboston

606 bytes added, 16:55, 2 March 2010
m
Building Firefox
[http://jamesboston.ca jamesboston.ca]
ContactEmail: <br />Email james mozilla [at the domain that has my name or look for me on irc] jamesboston [dot] ca<br /> IRC:<br />
'''jboston''' on irc://irc.mozilla.org/seneca
Project page: [[Canvas3D_JS_Library | C3DL]]
C3DL is a javascript JavaScript library that will make it easier to write 3D applications using <del>canvas 3d</del> WebGL. (''Mozilla's Canvas 3D project has been superseded by the new WebGL standard that will also by used by WebKit.'') It will provide a set of math, scene, and 3d object classes to make the canvas more accessible for developers that want to develop 3D content in browser.
=== Mozilla Developer Resource Kit ===
Creating a package that contains everything a developer needs, including documentation, to get started with Firefox. The plan is to make it available as a live Fedora DVD for developers in countries where bandwidth is scarce.
 
'''This project is of uncertain status. It's a multi-semester project that is worked on by a new student group each semester, but it doesn't appear to be under development at this time.'''
=== Portable DXR ===
This is closely related to the MDRK. The aim is to package the Mozilla developer documentation and the DXR source browsing tool in an extension that can be easily distributed/installed mostly likely as a XUL/Prism application. As an added bonus, this is a group project where the team members are experimenting with using traditional project planning tools and open source development methods.
 
'''This project is defunct. It was a group project for school and some members have graduated. Plus, the nominal client in not interested in completion.'''
= Software =
= Building Firefox =
== Building on Install prerequisites == === Windows Vista or XP ===
Install Visual Studio:
''(The express Visual C++ 2008 Express version will work.)'' http://msdn2www.microsoft.com/express/download/ If you paid for the Professional version of Visual Studio you can skip this step. But if you are using an express version, you need to install the Windows Server 2003 Platform SDK in order to get some headers (atlbase.h to be specific) included in the Professional version: http://www.microsoft.com/downloads/details.aspx?FamilyId=0BAF2B35-C656-4969-ACE8-E4C0C0716ADB&displaylang=en :''On the above page, DO NOT click the web install link. Scroll further down the page to see a list of download options. You probably want PDSK-usx86.exe for a 32-bit machine.'':[[Image:Windowsserversdkchoices.GIF]] Install the Microsoft Windows Software Development Kit Update for Windows 7 (even if you are using Vista or Visual Studio Professional): http://www.microsoft.com/vstudiodownloads/aa700736details.aspx?familyid=C17BA869-9671-4330-A63E-1FD44E0E2505&displaylang=en
Get Microsoft Windows Software Development Kit Update for Windows If you had a previous version of the SDK installed (such as the Vista SDK) open the CMD shell (even if you are using XPStart-> All Programs-> Microsoft SDK v7.0-> CMD)and make sure the new version is set as default by entering: httpWindowsSdkVer.exe -version://wwwv7.microsoft.com/downloads/details.aspx?FamilyID=4377f86d-c913-4b5c-b87e-ef72e5b4e065&DisplayLang=en 0
Download and install Mozilla Build, a package of software prerequisites:
''(If you get a message saying this application did not install properly then you should see a windows dialog giving you the option to re-install with the 'correct settings'. After that all should be well.)''
http://ftp.mozilla.org/pub/mozilla.org/mozilla/libraries/win32/MozillaBuildSetup-1.34.exe
Open To open a shell window (on Vista right click and using admin privileges): c:\mozilla-build\start-msvc9.bat
''(The example here is for Visual Studio 2005. The name of the bat file If everything worked correctly, you use should match see a list of the directory that Visual Studio is installed in.)''required headers: c[[Image:\mozilla-build\start-msvc8Mozilla_sdk_shell_Capture.batGIF]]
If you are attempting to build Firefox 3.1 you can checkout the source using mercurial as described below. When creating a working directory and checking out the source it doesn't really matter where you put it, but avoid paths that contain spaces'(The example above is for Visual C++ 2008 Express. If your user The name doesn't have space of the bat file you can checkout use should match the source to your home directory like this: cd mkdir mozilla cd mozilla hg clone http://hgthat Visual Studio is installed in.mozillaFor instance, VS2005 uses start-msvc8.org/mozilla-central/ srcbat)''
It is still possible to checkout older versions of Firefox using cvs as described below but Mercurial is preferred''Special note: cd cvs -d :pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot co mozilla/clientYou might get an error saying you are targeting the wrong SDK.mk cd ~/mozilla make Try deleting your obj-f clientff directory if you have one.mk checkout MOZ_CO_PROJECT=browser''
Create and open a hidden file called .mozconfig in your home directory=== Linux ======= Fedora ====Install build pre-requisites for Fedora: notepad.exe ~/.mozconfigsu -c "yum groupinstall 'Development Tools' 'Development Libraries' 'GNOME Software Development'" su -c "yum install mercurial autoconf213"
Add the following lines to .mozconfig # My first mozilla config . $topsrcdir/browser/config/mozconfig mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj-@CONFIG_GUESS@ ac_add_options --disable-optimize ac_add_options --enableAdditional Fedora 11 pre-debugrequisites: ac_add_options --disable-static -su -enablec 'yum install libnotify-shareddevel'
If you are using a multiAdditional Fedora 10 pre-core computer for building, you can try adding a flag to speed up compile times. Use a value of ''((# of cores)*2)+1'' (ie. five for two cores)requisites: mk_add_options MOZ_MAKE_FLAGS=su -j5c 'yum install libXt-devel'
Visual Studio 2008 users may also need to add one or more of the following to .mozconfig==== Ubuntu ==== ac_add_options Install Firefox 3 build pre--disable-xpconnect-idispatchrequisites for Ubuntu 8.10 and 9.04: ac_add_options -sudo apt-disableget install build-activexessential ac_add_options --disablesudo apt-activexget build-scriptingdep firefox ac_add_options sudo apt-get install mercurial libasound2 libasound2-disable-accessibility ac_add_options -dev curl libcurl4-disablegnutls-parentaldev libnotify-controlsdev
Start the build: cd ~/mozilla/src make -f client.mk build=== OS X ===
Once the build is finished You should have [http://developer.apple.com/TOOLS/Xcode/ Xcode] installed. You don't need to use Xcode for editing source files, but you should set will need the following environment variable to turn-off assertion dialogs: export XPCOM_DEBUG_BREAK=warndeveloper SDK that comes with it.
When In order to build Firefox you run Firefox for the first time, create and select a new profile will need something called "development" (or any name of your choice) to avoid corrupting your current profile. You MacPorts which can do this while running your current version of Firefox using these command line optionsbe downloaded from here: ~http:/mozilla/srcwww.macports.org/obj*/dist/bin/firefox -Profilemanager -no-remoteinstall.php
The finished build After downloading and installing MacPorts you can be found in then install the ~/mozilla/src/obj*/dist/bin directory.pre-requisites: sudo port sync sudo port install mercurial libidl autoconf213
Run the file "mozilla" or "firefox"=== autoconf notes ===The build system should know to use autoconf 2.13 instead of later versions automatically, not the binary "mozilla-bin" or "firefox-bin".but on some *nix systems it may be necessary to specify it manually: export AUTOCONF=autoconf213
Or on some systems you may need to set AUTOCONF this way instead: export AUTOCONF== Windows notes ==autoconf2.13
The instructions are the same as for Windows Vista and XP. For Firefox 3, the Vista SDK is also required. However, for XP it may be necessary to add the following additional line to your .mozconfig file: ac_add_options --disable-vista-sdk-requirements== Configuration ==
For more info about Visual Studio 2008 problems see [http://crashopensource.blogspot.com/2008/05/vista-building-with-vc9.html Lukas Blakk's blog]You need to create a hidden file for the build system that contains instructions on how you want your build completed.
Another problem is that you may not be able to use your home directory because the path almost certainly has spaces. If that is the case, just put the mozilla directory in your root (ie. C:\mozilla) Create and put the open a hidden file called .mozconfig file in that your home directoryusing notepad or gedit or vim: notepad. Spaces in the path name will cause the build to failexe ~/.mozconfig
For more detailed info about Add the windows build requirements visit [http://developerfollowing lines to .mozconfig # My first mozillaconfig .org$topsrcdir/browser/enconfig/docsmozconfig mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/Windows_Build_Prerequisitesobj-@CONFIG_GUESS@ #Microsoft_Visual_C.2B.2B_and_Windows_SDK Mozilla Developer Center].Comment the next 2 lines for non-debug builds ac_add_options --disable-optimize ac_add_options --enable-debug
For more information on If you are using Mercurial a multi-core computer for building, you can try adding a flag to checkout Mozilla code see [http://developerspeed up compile times.mozilla.org/en/Mozilla_Source_Code_Use a value of ''((Mercurial# of cores) Mozilla Source Code]*2)+1'' (ie.five for two cores): mk_add_options MOZ_MAKE_FLAGS=-j5
For more detailed information about Mozilla building visit [httpOS X (Leopard) add: ac_add_options --with-macos-sdk=/Developer/zenit.senecac.on.caSDKs/wiki/indexMacOSX10.php/Real_World_Mozilla_Build_Mozilla_Lab Real World Mozilla Build Lab]5.sdk
== Building on Ubuntu and Fedora Getting the source ==
Install If you are attempting to build pre-requisites for Fedora 10 Firefox 3.1 or greater you can checkout the source using mercurial as described below. When creating a working directory and checking out the source it doesn't really matter where you put it, but avoid paths that contain spaces. Spaces in the path name will cause the build to fail. For Windows XP users, your home directory path almost certainly has spaces. If that is the case, just put the mozilla directory in your root (ie. C:\mozilla) and put the .mozconfig file in that directory. If your user name doesn't have space you can checkout the source to your home directory like this: su -c "yum groupinstall 'Development Tools' 'Development Libraries' 'GNOME Software Development'"cd mkdir mozilla cd mozilla su -c "yum install mercurial autoconf213 libXthg clone http://hg.mozilla.org/mozilla-devel"central/ src
Install It is still possible to checkout older versions of Firefox 3 build re-requisites for Ubuntu 8.10 usersusing cvs: sudo apt-get install build-essentialcd sudo aptcvs -get buildd :pserver:anonymous@cvs-dep firefox sudo apt-get install mercurial libasound2 libasound2-dev curl libcurl4-gnutls-dev Checkout the sourcemirror.mozilla.org: mkdir ~/cvsroot co mozilla/client.mk
cd ~/mozilla
hg clone http://hgmake -f client.mozilla.org/mozilla-central/ srcmk checkout MOZ_CO_PROJECT=browser
Create and open a hidden file called .mozconfig in your home directory: gedit ~/.mozconfig== Starting the build ==
Add You need to change to the directory that contains the source code and then run the following lines to .mozconfigmake command: # My first cd ~/mozilla config . $topsrcdir/browser/config/mozconfigsrc mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/objtime make -@CONFIG_GUESS@ ac_add_options --disable-optimize ac_add_options --enable-debug ac_add_options --disable-static --enable-sharedf client.mk build
If you are using a multi-core computer for building, you can try adding a flag to speed up compile times. Use a value of ((# of cores)*2)+1 (ie. five for two cores):=== Special Fedora 11 note ===
mk_add_options MOZ_MAKE_FLAGS=-j5You may need to patch the source before building because of a bug in Breakpad that shows up with the latest version of gcc (which F11 uses).
Start the buildPatch and details here: cd ~https://bugzilla.mozilla.org/src make -f clientshow_bug.mk buildcgi?id=485019
Here is a log of == Running the output from building Firefox 3.1 on Ubuntu 8.04: http://zenit.senecac.on.ca/wiki/imgs/Build_output.txt.zipbuild ==
Once the build is finished you should set the following environment variable to turn-off assertion dialogs:
export XPCOM_DEBUG_BREAK=warn
When you run Firefox your build for the first time, create and select a new profile called "development" (or any name of your choice) to avoid corrupting your current profile. You can do this while running your current version of Firefox using these command line options Windows and Linux: ~/mozilla/src/obj*/dist/bin/firefox -Profilemanager -no-remoteprofilemanager OS X: ~/mozilla/src/obj*/dist/MinefieldDebug.app/Contents/MacOS/firefox == Updating a build ==
The finished build can be found in If you need to refresh the source code: cd ~/mozilla/src/obj*/dist/bin directory. hg pull -u
Run == Rebuilding the file "mozilla" or "firefox", not the binary "mozilla-bin" or "firefox-bin"browser ==
For more detailed information visit [[Real_World_Mozilla_Build_Mozilla_Lab|Real World Mozilla Build Lab]]If you want to rebuild the entire browser just repeat the instructions for starting the build above. However, it is possible to do incremental builds where only the source code you have changed is compiled.
== Building on OS X ==For instance, to rebuild after a change in the xpcom module try: make -C ~/mozilla/src/obj*/xpcom
Build preOr as a more general form: make -requisites and instructions for OS X can also be found at C [the [http://developer.mozilla.org/en/docs/Mac_OS_X_Build_Prerequisites#Firefox_Quick_Start Mozilla Developer Center.object directory corresponding to the source directory that has changed]
If In most cases this will relink the changes and create a new browser binary. But there's no hard and fast rule about when you can successfully do an incremental build. Sometimes you have built Firefox in your home directory can burrow a few levels into the object tree and are trying sometime you need to start it build from the command line try these steps: cd ~/mozilla/src/obj*/dist/MinefieldDebugvery top.app/Contents/MacOS It may take a bit of trial and error to discover what works./firefox -Profilemanager
= Tunneling a VNC session =
[[Tunnel_VNC_through_SSH|Instruction page]]
One Some of the Mac minis in the ORI area is at Seneca are configured to accept VNC connections, but without an SSH tunnel it's are too slow to be useful. These instructions will help you get setup.

Navigation menu