WSL2 Debian/Ubuntu
sudo apt update
sudo apt install imagemagick python3-pip build-essential
pip3 install mozphab
Build Firefox
Artifact Mode
If you are not working on the C/C++ files you can also opt for Artifact Builds which are much faster. To enable artifact build set up a
.mozconfig
file with the following options:# Automatically download and use compiled C++ components: # This option will disable C/C++ compilation ac_add_options --enable-artifact-builds # Write build artifacts to (not mandatory): mk_add_options MOZ_OBJDIR=./objdir-frontend
If you plan to walk through code with a debugger, set up a
.mozconfig
file with the following options:ac_add_options --disable-optimize ac_add_options --enable-debug
Perftest Notebook
Test
- Linter:
./mach lint --warnings --outgoing
- Unit Test::
./mach perftest-test
or./mach perftest-test -s
- Debug Run:
./mach perftest python/mozperftest/mozperftest/tests/example.js
Version Contral by Mercurial
- Pull:
hg pull --verbose https://hg.mozilla.org/mozilla-central/
- Commit: Using VSCode Extension.
- Changes: Using VSCode Extension.
- Amend:
hg commit --amend
- Check the current and latest revisions:
hg head
orhg heads
- Update:
hg up -r <revision>
- Rebase:
hg rebase -r <current_revision> --dest <latest_revision>
- Submit:
moz-phab
(Make sureMozPhab
is installed bypip3
)