Skip to content

Instantly share code, notes, and snippets.

@jsantell
Forked from jryans/.mozconfig
Last active August 29, 2015 14:22
Show Gist options
  • Save jsantell/724a7961bf63306fb99b to your computer and use it in GitHub Desktop.
Save jsantell/724a7961bf63306fb99b to your computer and use it in GitHub Desktop.
export CC="clang"
export CXX="clang++"
export CFLAGS="-fcolor-diagnostics"
export CXXFLAGS="-fcolor-diagnostics"
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj-firefox-release-b2g-desktop
mk_add_options AUTOCONF=autoconf213
ac_add_options --enable-application=b2g
ac_add_options --disable-libjpeg-turbo
ac_add_options --disable-replace-malloc
ac_add_options --disable-debug
ac_add_options --enable-optimize
ac_add_options --with-ccache
ENABLE_MARIONETTE=1
ac_add_options --disable-strip
ac_add_options --disable-install-strip

Prep

  1. Create a new Git working directory so you can compile both Firefox and B2G desktop separately
  • You could just clone gecko-dev again... but instead use new-workdir to share files and save space
  1. In the new checkout, use the attached file as your .mozconfig
  2. Running a simulator requires a Gaia profile, so clone it
  3. In the Gaia checkout, place the attached custom-prefs.js and custom-settings.json in <GAIA_DIR>/build/config/
  4. Build a Gaia profile with P=1 NOFTU=1 GAIA_APP_TARGET=production make profile
  • This is a one time step, because Gaia does not contain DevTools server code

Development

  1. In your new Gecko checkout, switch to the branch you are working on / apply your changes in some way
  2. Run mach build
  • This creates a b2g desktop build, which includes DevTools server code such as the actors
  1. Run your b2g desktop build with mach run -profile <GAIA_DIR>/profile -start-debugger-server 6000
  • You must use an absolute path to the profile, as it will fail otherwise
  1. In WebIDE, connect via the Remote Runtime using localhost:6000
  2. As you make more changes, close the b2g desktop window, and repeat steps 2 - 4
user_pref("devtools.debugger.prompt-connection", false);
user_pref("devtools.debugger.forbid-certified-apps", false);
user_pref("browser.dom.window.dump.enabled", true);
user_pref("devtools.debugger.log", true);
{
"debugger.remote-mode": "adb-devtools",
"screen.timeout": 0,
"lockscreen.enabled": false,
"lockscreen.locked": false
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment