Open main menu

CDOT Wiki β

Changes

User:Jamesboston

3,070 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
= Projects =
 === Fixing nsIProcess === Project page: [http[User:Jamesboston/nsIProcess|Fixing nsIProcess]] The API in Firefox for managing external processes has never been fully implemented. This project aims to implement the existing API and extend the API to include inter-process communication. === The Canvas 3D JS Libary (C3DL) === Project page: [[Canvas3D_JS_Library | C3DL]] C3DL is a JavaScript library that will make it easier to write 3D applications using <del>canvas 3d</zenitdel> WebGL.senecac(''Mozilla's Canvas 3D project has been superseded by the new WebGL standard that will also by used by WebKit.on'') 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.ca/wiki/index.php/ === Mozilla Developer Resource Kit === Project page: [[Mozilla_Developer_Resource_Kit |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.<br />''' === Portable DXR === Project page: [http:[Portable_DXR|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/zenitPrism application.senecacAs 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.on '''This project is defunct. It was a group project for school and some members have graduated.ca/wiki/indexPlus, the nominal client in not interested in completion.php/User:Jamesboston/nsIProcess nsIProcess]'''
= Software =
=== Process Manager Extension ===
A binary XPCOM extension that allows processes external to Firefox to be started and stopped. Currently only Win32 is supported. It is used in the SHTTPD extension.
Download: http://jamesboston.ca/extensions/processmanager.xpi
Source: http://jamesboston.ca/extensions/processmanager.zip === SHTTPD Extension ===
This is a proof of concept. Installing this extension will start a tiny webserver that runs locally. The purpose of this is to eventually provide a way to distribute web application as extensions so they can be run locally/offline. At present, when the browser starts the server also starts and installs an icon to the system tray. It only runs on Win32 machines.
(The server is licensed as beerware and is available on its own at http://shttpd.sourceforge.net/).
=== Open in Editor Extension ===
This extension will open source code files from http://mxr.mozilla.org in an editor on the users machine. Simply right click on the loaded page and select the Open in Editor option from the pop up context menu. The user may choose any editor through preference settings. If no preferences are selected the extension defaults to gedit on Linux, notepad on Windows, and (currently) nothing on OS X.
Download: http://zenit.senecac.on.ca/wiki/imgs/Openineditor.xpi
 
=== Ubiquity commands ===
 
[http://matrix.senecac.on.ca/~jwboston/ubiquity/ Subscribe to all my commands]
 
[[Learning_Collaborative_Development_Lab_Fall_2008_Results#Seneca_Library_Search|Search Seneca Library]]
 
[[Learning_Collaborative_Development_Lab_Fall_2008_Results#Paste_to_pastebin|Paste to pastebin]]
= Building Firefox =
''Note: These instructions are good for Firefox 3.0.*. However, for Firefox 3.1.*, cvs has been replaced with Mercurial. These notes are not yet updated to reflect this.''== Install prerequisites ==
== Building on = Windows Vista ===
Install Visual Studio:
(The express version will work.)
http://msdn2.microsoft.com/en-us/vstudio/aa700736.aspx
 
Get Microsoft Windows Software Development Kit Update for Windows Vista:
http://www.microsoft.com/downloads/details.aspx?FamilyID=4377f86d-c913-4b5c-b87e-ef72e5b4e065&DisplayLang=en
Download and install Mozilla Build, a package of software prereqs:(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-installwith the 'correct settings'. After that all should be well(The Visual C++ 2008 Express version will work.)'' http://ftp.mozillawww.org/pub/mozillamicrosoft.orgcom/mozillaexpress/librariesdownload/win32/MozillaBuildSetup-1.2.exe
Open a shell window by right clicking and using admin privileges:(The example here is If you paid for the Professional version of Visual Studio 2005you can skip this step. The name of the bat file But if you are using an express version, you use should match need to install the directory that Visual Studio is installed Windows Server 2003 Platform SDK inorder to get some headers (atlbase.h to be specific)included in the Professional version: chttp:\mozilla//www.microsoft.com/downloads/details.aspx?FamilyId=0BAF2B35-C656-build\start4969-msvc8.batACE8-E4C0C0716ADB&displaylang=en
Get :''On the makefile instructions above page, DO NOT click the web install link. Scroll further down the page to pull the source tree and put it in a directory called mozilla in your home directory:(This will create see a mozilla directory in your root ilist of download options.e C:\Users\YourName or whateverYou probably want PDSK-x86.If exe for a directory called mozilla already exits, even if it32-bit machine.''s empty, it will cause an error.) cd cvs -d :pserver:anonymous@cvs-mirror.mozilla.org[[Image:/cvsroot co mozilla/clientWindowsserversdkchoices.mkGIF]]
Checkout Install the sourceMicrosoft Windows Software Development Kit Update for Windows 7 (even if you are using Vista or Visual Studio Professional): cd ~http://mozilla make www.microsoft.com/downloads/details.aspx?familyid=C17BA869-9671-4330-A63E-f client.mk checkout MOZ_CO_PROJECT1FD44E0E2505&displaylang=browseren
Create and If you had a previous version of the SDK installed (such as the Vista SDK) open a hidden file called the CMD shell (Start-> All Programs-> Microsoft SDK v7.mozconfig in your home directory0-> CMD) and make sure the new version is set as default by entering: notepadWindowsSdkVer.exe ~/-version:v7.mozconfig0
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 --enable-debug ac_add_options --disable-static --enable-sharedDownload and install Mozilla Build, a package of software prerequisites:
Visual Studio 2008 users may also need ''(If you get a message saying this application did not install properly then you should see a windows dialog giving you the option to add re-install with the following to 'correct settings'. After that all should be well.mozconfig)'' ac_add_options http://ftp.mozilla.org/pub/mozilla.org/mozilla/libraries/win32/MozillaBuildSetup--disable-xpconnect-idispatch ac_add_options --disable-activex ac_add_options --disable-activex-scripting ac_add_options --disable-accessibility1.4.exe
Start the build (which will take AT LEAST one hour)To open a shell window click: cd ~/c:\mozilla make -f clientbuild\start-msvc9.mk buildbat
Once the build is finished If everything worked correctly, you should set see a list of the following environment variable to turn-off assertion dialogsrequired headers: export XPCOM_DEBUG_BREAK=warn[[Image:Mozilla_sdk_shell_Capture.GIF]]
When you run Firefox ''(The example above is for the first time, create and select a new profile called "development" (or any Visual C++ 2008 Express. The name of your choice) to avoid corrupting your current profilethe bat file you use should match the directory that Visual Studio is installed in. You can do this while running your current version of Firefox using these command line options: ~/mozilla/obj*/dist/bin/firefox For instance, VS2005 uses start-Profilemanager -no-remotemsvc8.bat)''
The finished build can be found in ''Special note: You might get an error saying you are targeting the ~/mozilla/wrong SDK. Try deleting your obj*/dist/bin -ff directoryif you have one.''
Run the file "mozilla=== Linux ======= Fedora ====Install build pre-requisites for Fedora: su -c " or yum groupinstall 'Development Tools' 'Development Libraries' 'GNOME Software Development'"firefox", not the binary "mozilla su -binc " or "firefox-binyum install mercurial autoconf213".
For more detailed info about the windows build requirements visit [httpAdditional Fedora 11 pre-requisites://developer.mozilla.org/en/docs/Windows_Build_Prerequisites#Microsoft_Visual_C.2B.2B_and_Windows_SDK Mozilla Developer Center]. su -c 'yum install libnotify-devel'
For more detailed information about Mozilla building visit [httpAdditional Fedora 10 pre-requisites://zenit.senecac.on.ca/wiki/index.php/Real_World_Mozilla_Build_Mozilla_Lab Real World Mozilla Build Lab]. su -c 'yum install libXt-devel'
For more info about Visual Studio 2008 problems see [http://crashopensource==== Ubuntu ====Install Firefox 3 build pre-requisites for Ubuntu 8.blogspot10 and 9.com/2008/05/vista04: sudo apt-get install build-buildingessential sudo apt-withget build-vc9.html Lukas Blakk's blog.]dep firefox sudo apt-get install mercurial libasound2 libasound2-dev curl libcurl4-gnutls-dev libnotify-dev
== Building on Windows XP = OS X ===
The instructions are the same as You should have [http://developer.apple.com/TOOLS/Xcode/ Xcode] installed. You don't need to use Xcode for Windows Vista. For Firefox 3editing source files, but you will need the Vista developer SDK is also required. However, try adding the following additional line to your that comes with it.mozconfig file first: ac_add_options --disable-vista-sdk-requirements
Another problem is that In order to build Firefox you may not will need something called MacPorts which can be able to use your home directory because the path may have spacesdownloaded from here: http://www. If that is the case, just put the mozilla directory in your root (ie. C:\mozilla) and put the macports.mozconfig file in that directoryorg/install.php
== Building on Ubuntu After downloading and Fedora ==installing MacPorts you can then install the pre-requisites: sudo port sync sudo port install mercurial libidl autoconf213
Install === autoconf notes ===The build pre-requisites for Fedora userssystem should know to use autoconf 2.13 instead of later versions automatically, but on some *nix systems it may be necessary to specify it manually: su -c "yum groupinstall 'Development Tools' 'Development Libraries' 'GNOME Software Development'"export AUTOCONF=autoconf213
Install build pre-requisites for Ubuntu usersOr on some systems you may need to set AUTOCONF this way instead: sudo apt-get install build-essential sudo apt-get build-dep mozilla-firefoxexport AUTOCONF=autoconf2.13
Get the makefile instructions to pull the source tree and put it in a directory called mozilla in your home directory: cd cvs -d :pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot co mozilla/client.mk== Configuration ==
Checkout You need to create a hidden file for the source: cd ~/mozilla make -f clientbuild system that contains instructions on how you want your build completed.mk checkout MOZ_CO_PROJECT=browser
Create and open a hidden file called .mozconfig in your home directoryusing notepad or gedit or vim: gedit notepad.exe ~/.mozconfig
Add the following lines to .mozconfig
. $topsrcdir/browser/config/mozconfig
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj-@CONFIG_GUESS@
# Comment the next 2 lines for non-debug builds
ac_add_options --disable-optimize
ac_add_options --enable-debug
ac_add_options --disable-static --enable-shared
Start 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): mk_add_options MOZ_MAKE_FLAGS=-j5 For OS X (Leopard) add: ac_add_options --with-macos-sdk=/Developer/SDKs/MacOSX10.5.sdk == Getting the source == If you are attempting to build 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 (which will take AT LEAST one hourie. 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: cd mkdir mozilla cd mozilla hg clone http://hg.mozilla.org/mozilla-central/ src It is still possible to checkout older versions of Firefox using cvs: cd cvs -d :pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot co mozilla/client.mk
cd ~/mozilla
make -f client.mk checkout MOZ_CO_PROJECT=browser == Starting the build== You need to change to the directory that contains the source code and then run the make command: cd ~/mozilla/src time make -f client.mk build === Special Fedora 11 note === You 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). Patch and details here:https://bugzilla.mozilla.org/show_bug.cgi?id=485019 == Running the build ==
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 profilemanager OS X: ~/mozilla/src/obj*/dist/MinefieldDebug.app/Contents/MacOS/firefox == Updating a build == If you need to refresh the source code: cd ~/mozilla/src hg pull -no-remoteu == Rebuilding the browser == 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.
The finished build can be found For instance, to rebuild after a change in the xpcom module try: make -C ~/mozilla/src/obj*/dist/bin directory.xpcom
Run Or as a more general form: make -C [the file "mozilla" or "firefox", not object directory corresponding to the binary "mozilla-bin" or "firefox-bin".source directory that has changed]
For more detailed information visit [http://zenitIn most cases this will relink the changes and create a new browser binary.senecacBut there's no hard and fast rule about when you can successfully do an incremental build.onSometimes you can burrow a few levels into the object tree and sometime you need to build from the very top.ca/wiki/index.php/Real_World_Mozilla_Build_Mozilla_Lab Real World Mozilla Build Lab]It may take a bit of trial and error to discover what works.
=Tunneling a VNC session = Building on OS X ==Build pre-requisites and instructions for OS X can be found at the [http://developer.mozilla.org/en/docs/Mac_OS_X_Build_Prerequisites#Firefox_Quick_Start Mozilla Developer Center.]
Although the instructions are good, it may be necessary to take a few extra steps. For instance, the build may have trouble finding the glib dependency. If this happens, try adding this to your path: export PATH=$PATH:/sw/bin;/sw/sbin[[Tunnel_VNC_through_SSH|Instruction page]]
If you have built Firefox Some of the Mac minis in your home directory and the ORI area at Seneca are trying configured to start it from the command line try these steps: cd ~/mozilla/dist/Minefieldaccept VNC connections, but without an SSH tunnel are too slow to be useful.app/Contents/MacOS These instructions will help you get setup./firefox -Profilemanager -no-remote