Bluish Coder

Programming Languages, Martials Arts and Computers. The Weblog of Chris Double.


2007-07-07

Building a Video element enabled Firefox

I've had a few comments and emails about problems encountered building Firefox with the video element patch, or from the git repository.

Once you've applied the patch, or retrieved the git repository, you'll need to add a .mozconfig file in the 'mozilla' directory. The Mozilla Build Documentation has the details on what can go in this file. A simple .mozconfig which will get a debug build working is:

. $topsrcdir/browser/config/mozconfig

mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj-@CONFIG_GUESS@
mk_add_options MOZ_CO_PROJECT=browser
ac_add_options --disable-tests
ac_add_options --enable-debug
ac_add_options --with-macosx-sdk=/Developer/SDKs/MacOSX10.4u.sdk

The last line is only needed for Mac OS X builds.

There was a problem with the patch in that this default build on some platforms would give a link error due to not finding the Alsa sound libraries. This is fixed in the git repository. The problem only occurred in 'libxul' enabled builds, which is now the default. You can disable libxul in the build process by adding this line to .mozconfig:

ac_add_options --disable-libxul

Disabling this is quite useful for development as the builds are faster and you can selectively build portions to cut down compile times. Once you have a .mozconfig file you can start the build using make:

make -f client.mk build

Note the use of the 'client.mk' makefile with the 'build' target.

In the .mozconfig we specified a MOZ_OBJDIR. This is a directory that will contain the build files and the final executable. When the build completes you can run Firefox with something like:

obj-a-b-c-d/dist/bin/firefox -ProfileManager

Change 'obj-a-b-c-d' with the name of the object directory that was created. On Mac OS X a '.App' is created and you will need to run Firefox with:

obj-a-b-d/dist/MinefieldDebug.app/Contents/MacOS/firefox -ProfileManager

The .app will be called 'Minefield' in an optimized build and 'MinefieldDebug' in a debug build.

To build something you can install on another system (a .dmg file on Mac OS X, tar file on Linux, etc) you must have a 'libxul' enabled build and run the following after a successfull build:

make -C obj-a-b-c-d/browser/installer

The packaged installer will be in the obj-a-b-c-d/dist directory.

Tags


This site is accessable over tor as hidden service 6vp5u25g4izec5c37wv52skvecikld6kysvsivnl6sdg6q7wy25lixad.onion, or Freenet using key:
USK@1ORdIvjL2H1bZblJcP8hu2LjjKtVB-rVzp8mLty~5N4,8hL85otZBbq0geDsSKkBK4sKESL2SrNVecFZz9NxGVQ,AQACAAE/bluishcoder/-61/


Tags

Archives
Links