Project

mozconfig

0.0
The project is in a healthy, maintained state
Switch between mozconfigs quickly and easily.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.54

Runtime

~> 3.1
~> 0.23
 Project Readme

mozconfig Switcher

A simple TUI utility to switch between different mozconfigs in the Mozilla source code.

Installation

gem install mozconfig

Usage

Your mozconfig should be formatted like this, for example:

mk_add_options AUTOCLOBBER=1

# Firefox
ac_add_options --with-branding=browser/branding/nightly
ac_add_options --with-ccache=sccache

# Firefox (artifact build)
# mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj-artifact-@CONFIG_GUESS@
# ac_add_options MOZ_TELEMETRY_REPORTING=1
# ac_add_options --with-branding=browser/branding/nightly
# ac_add_options --enable-artifact-builds

# Firefox for Android
# mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj-android-@CONFIG_GUESS@
# ac_add_options --enable-project=mobile/android

# SpiderMonkey (debug)
# mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj-js-debug-@CONFIG_GUESS@
# ac_add_options --enable-project=js
# ac_add_options --with-ccache=sccache
# ac_add_options --enable-debug
# ac_add_options --disable-optimize

# SpiderMonkey (optimized)
# mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj-js-opt-@CONFIG_GUESS@
# ac_add_options --enable-project=js
# ac_add_options --with-ccache=sccache
# ac_add_options --enable-optimize
# ac_add_options --disable-debug

# Thunderbird
# mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj-mail-@CONFIG_GUESS@
# ac_add_options --with-branding=comm/mail/branding/nightly
# ac_add_options --enable-project=comm/mail
# ac_add_options --with-ccache=sccache

# Thunderbird (artifact build)
# mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj-mail-@CONFIG_GUESS@
# ac_add_options --with-branding=comm/mail/branding/nightly
# ac_add_options --enable-project=comm/mail
# ac_add_options --enable-artifact-builds

The options are separated into "paragraphs", each one a separate configuration. This tool will comment out all of the inactive configurations. The comment above each paragraph will be the name displayed in the TUI. Any paragraph without a comment above it will remain active in all configurations.

Run mozconfig at the root of the source tree and you will be presented with a picker where you can select your configuration, e.g.:

Screenshot of TUI

Your current configuration will already be highlighted. You can use the up/down arrows (or k and j if you're a vim fan) to change the selection, then hit Enter to switch your configuration, or Escape to exit without changing anything.