Last active — forked from ednapiranha/ff.md

Embed URL

HTTPS clone URL

SSH clone URL

You can clone with HTTPS or SSH.

Download Gist

Hacking Firefox

View ff.md

More details here: https://developer.mozilla.org/en/docs/Simple_Firefox_build

Hacking Firefox

Get Firefox' source code:

git clone https://github.com/mozilla/gecko-dev.git
git checkout fx-team

Install dependencies:

./mach bootstrap
# doesn't work on Windows. See link above.

On osx (not needed for other platforms), create a mozconfig file in the source directory, with the following:

# adding .noindex will make sure spotlight
# won't index the objdir (slow).
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj.firefox.noindex

# Needed for osx 10.9 (fix a font issue):
ac_add_options --with-macos-sdk=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk

Run the following in the dir

./mach build

Wait a while...

./mach run -P dev

Firefox (frontend & devtools) code is located in:

browser/base/content
browser/themes
browser/devtools

Generate a patch:

In your ~/.gitconfig, add:

  [alias]
  hgp = "show --binary --format=\"# HG changeset patch%n# User %an <%ae>%n%B\" -U8"

Then:

git hgp HEAD > myFix.patch
# you can attach this patch to a bugzilla bug

Updated with changes? Run the following

./mach build browser
./mach run -P dev -jsconsole

Running tests for the entire suite

./mach mochitest-devtools browser/devtools

Running tests for a particular patch

./mach mochitest-devtools browser/devtools/path/to/the/test_you_want_to_run.js
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.