From 74cd5acc2ed79918fbc9d35a250720598af184a1 Mon Sep 17 00:00:00 2001 From: Jonathan Griffin Date: Wed, 22 Aug 2012 11:17:22 -0700 Subject: [PATCH] Bug 779984 - replace --enable-marionette with ENABLE_MARIONETTE and make it consistent, r=ted --- b2g/app/Makefile.in | 4 ++++ b2g/app/b2g.js | 2 ++ b2g/config/mozconfigs/gb_armv7a_gecko/debug | 2 +- b2g/config/mozconfigs/gb_armv7a_gecko/nightly | 2 +- b2g/config/mozconfigs/ics_armv7a_gecko/debug | 2 +- b2g/config/mozconfigs/ics_armv7a_gecko/nightly | 2 +- b2g/config/mozconfigs/linux32_gecko/nightly | 2 +- b2g/config/mozconfigs/linux64_gecko/nightly | 2 +- b2g/config/mozconfigs/macosx64_gecko/nightly | 2 +- b2g/config/mozconfigs/win32_gecko/nightly | 2 +- b2g/confvars.sh | 1 - b2g/installer/Makefile.in | 4 ++++ b2g/installer/package-manifest.in | 2 ++ browser/app/Makefile.in | 4 ++++ browser/app/profile/firefox.js | 6 ++++++ 15 files changed, 30 insertions(+), 9 deletions(-) diff --git a/b2g/app/Makefile.in b/b2g/app/Makefile.in index c7b26e6a55a..c565c065453 100644 --- a/b2g/app/Makefile.in +++ b/b2g/app/Makefile.in @@ -11,6 +11,10 @@ include $(DEPTH)/config/autoconf.mk PREF_JS_EXPORTS = $(srcdir)/b2g.js +ifdef ENABLE_MARIONETTE +DEFINES += -DENABLE_MARIONETTE=1 +endif + ifndef LIBXUL_SDK PROGRAM=$(MOZ_APP_NAME)$(BIN_SUFFIX) diff --git a/b2g/app/b2g.js b/b2g/app/b2g.js index f4605c0ee9b..f3b39ccf46a 100644 --- a/b2g/app/b2g.js +++ b/b2g/app/b2g.js @@ -432,9 +432,11 @@ pref("full-screen-api.ignore-widgets", true); pref("media.volume.steps", 10); +#ifdef ENABLE_MARIONETTE //Enable/disable marionette server, set listening port pref("marionette.defaultPrefs.enabled", true); pref("marionette.defaultPrefs.port", 2828); +#endif #ifdef MOZ_UPDATER pref("app.update.enabled", true); diff --git a/b2g/config/mozconfigs/gb_armv7a_gecko/debug b/b2g/config/mozconfigs/gb_armv7a_gecko/debug index 2f2fc761a52..5f14adf3c18 100644 --- a/b2g/config/mozconfigs/gb_armv7a_gecko/debug +++ b/b2g/config/mozconfigs/gb_armv7a_gecko/debug @@ -11,7 +11,7 @@ ac_add_options --disable-elf-hack ac_add_options --enable-debug-symbols ac_add_options --enable-debug ac_add_options --with-ccache -ac_add_options --enable-marionette +ENABLE_MARIONETTE=1 # Enable dump() from JS. export CXXFLAGS=-DMOZ_ENABLE_JS_DUMP diff --git a/b2g/config/mozconfigs/gb_armv7a_gecko/nightly b/b2g/config/mozconfigs/gb_armv7a_gecko/nightly index 5ae933314dd..31cd349250b 100644 --- a/b2g/config/mozconfigs/gb_armv7a_gecko/nightly +++ b/b2g/config/mozconfigs/gb_armv7a_gecko/nightly @@ -11,7 +11,7 @@ ac_add_options --disable-elf-hack ac_add_options --enable-debug-symbols ac_add_options --enable-profiling ac_add_options --with-ccache -ac_add_options --enable-marionette +ENABLE_MARIONETTE=1 # Enable dump() from JS. export CXXFLAGS=-DMOZ_ENABLE_JS_DUMP diff --git a/b2g/config/mozconfigs/ics_armv7a_gecko/debug b/b2g/config/mozconfigs/ics_armv7a_gecko/debug index 73e866a1202..64e0fa88a3f 100644 --- a/b2g/config/mozconfigs/ics_armv7a_gecko/debug +++ b/b2g/config/mozconfigs/ics_armv7a_gecko/debug @@ -14,7 +14,7 @@ ac_add_options --disable-elf-hack ac_add_options --enable-debug-symbols ac_add_options --enable-debug #ac_add_options --with-ccache -ac_add_options --enable-marionette +ENABLE_MARIONETTE=1 # Enable dump() from JS. export CXXFLAGS="-DMOZ_ENABLE_JS_DUMP -include $topsrcdir/gonk-toolchain/gonk-misc/Unicode.h -include $topsrcdir/gonk-toolchain/system/vold/ResponseCode.h" diff --git a/b2g/config/mozconfigs/ics_armv7a_gecko/nightly b/b2g/config/mozconfigs/ics_armv7a_gecko/nightly index 6bf1ba700af..583b3a94d36 100644 --- a/b2g/config/mozconfigs/ics_armv7a_gecko/nightly +++ b/b2g/config/mozconfigs/ics_armv7a_gecko/nightly @@ -14,7 +14,7 @@ ac_add_options --disable-elf-hack ac_add_options --enable-debug-symbols ac_add_options --enable-profiling #ac_add_options --with-ccache -ac_add_options --enable-marionette +ENABLE_MARIONETTE=1 # Enable dump() from JS. export CXXFLAGS="-DMOZ_ENABLE_JS_DUMP -include $topsrcdir/gonk-toolchain/gonk-misc/Unicode.h -include $topsrcdir/gonk-toolchain/system/vold/ResponseCode.h" diff --git a/b2g/config/mozconfigs/linux32_gecko/nightly b/b2g/config/mozconfigs/linux32_gecko/nightly index aaa7464b166..3b7a2e833d5 100644 --- a/b2g/config/mozconfigs/linux32_gecko/nightly +++ b/b2g/config/mozconfigs/linux32_gecko/nightly @@ -33,6 +33,6 @@ ac_add_options --with-ccache=/usr/bin/ccache #B2G options ac_add_options --enable-application=b2g -ac_add_options --enable-marionette +ENABLE_MARIONETTE=1 ac_add_options --disable-elf-hack export CXXFLAGS=-DMOZ_ENABLE_JS_DUMP diff --git a/b2g/config/mozconfigs/linux64_gecko/nightly b/b2g/config/mozconfigs/linux64_gecko/nightly index 305d4087634..fd23729b96d 100644 --- a/b2g/config/mozconfigs/linux64_gecko/nightly +++ b/b2g/config/mozconfigs/linux64_gecko/nightly @@ -35,6 +35,6 @@ ac_add_options --with-ccache=/usr/bin/ccache #B2G options ac_add_options --enable-application=b2g -ac_add_options --enable-marionette +ENABLE_MARIONETTE=1 ac_add_options --disable-elf-hack export CXXFLAGS=-DMOZ_ENABLE_JS_DUMP diff --git a/b2g/config/mozconfigs/macosx64_gecko/nightly b/b2g/config/mozconfigs/macosx64_gecko/nightly index 62aabf06074..348edf23180 100644 --- a/b2g/config/mozconfigs/macosx64_gecko/nightly +++ b/b2g/config/mozconfigs/macosx64_gecko/nightly @@ -23,6 +23,6 @@ ac_add_options --enable-warnings-as-errors ac_add_options --enable-application=b2g ac_add_options --enable-debug-symbols ac_add_options --with-ccache -ac_add_options --enable-marionette +ENABLE_MARIONETTE=1 export CXXFLAGS=-DMOZ_ENABLE_JS_DUMP diff --git a/b2g/config/mozconfigs/win32_gecko/nightly b/b2g/config/mozconfigs/win32_gecko/nightly index 56d8dc7c9a8..affb7f1b198 100644 --- a/b2g/config/mozconfigs/win32_gecko/nightly +++ b/b2g/config/mozconfigs/win32_gecko/nightly @@ -24,6 +24,6 @@ fi # B2G Options ac_add_options --enable-application=b2g -ac_add_options --enable-marionette +ENABLE_MARIONETTE=1 export CXXFLAGS=-DMOZ_ENABLE_JS_DUMP diff --git a/b2g/confvars.sh b/b2g/confvars.sh index aa9c25e98d3..82d20985842 100755 --- a/b2g/confvars.sh +++ b/b2g/confvars.sh @@ -38,6 +38,5 @@ fi MOZ_APP_ID={3c2e2abc-06d4-11e1-ac3b-374f68613e61} MOZ_EXTENSION_MANAGER=1 -ENABLE_MARIONETTE=1 MOZ_SYS_MSG=1 diff --git a/b2g/installer/Makefile.in b/b2g/installer/Makefile.in index 9bb1de88f52..ecd50bc58d4 100644 --- a/b2g/installer/Makefile.in +++ b/b2g/installer/Makefile.in @@ -38,6 +38,10 @@ DEFINES += -DJAREXT=$(JAREXT) include $(topsrcdir)/ipc/app/defs.mk DEFINES += -DMOZ_CHILD_PROCESS_NAME=$(MOZ_CHILD_PROCESS_NAME) +ifdef ENABLE_MARIONETTE +DEFINES += -DENABLE_MARIONETTE=1 +endif + ifdef MOZ_PKG_MANIFEST_P MOZ_PKG_MANIFEST = package-manifest endif diff --git a/b2g/installer/package-manifest.in b/b2g/installer/package-manifest.in index b9f21164ac4..5de776e9f37 100644 --- a/b2g/installer/package-manifest.in +++ b/b2g/installer/package-manifest.in @@ -675,10 +675,12 @@ bin/components/@DLL_PREFIX@nkgnomevfs@DLL_SUFFIX@ @BINPATH@/components/B2GComponents.xpt @BINPATH@/components/CameraContent.js @BINPATH@/@DLL_PREFIX@omxplugin@DLL_SUFFIX@ +#ifdef ENABLE_MARIONETTE @BINPATH@/chrome/marionette@JAREXT@ @BINPATH@/chrome/marionette.manifest @BINPATH@/components/MarionetteComponents.manifest @BINPATH@/components/marionettecomponent.js +#endif @BINPATH@/components/AlertsService.js @BINPATH@/components/ContentPermissionPrompt.js #ifdef MOZ_UPDATER diff --git a/browser/app/Makefile.in b/browser/app/Makefile.in index 0d3ab5e4af2..5f891caa359 100644 --- a/browser/app/Makefile.in +++ b/browser/app/Makefile.in @@ -12,6 +12,10 @@ include $(DEPTH)/config/autoconf.mk DIRS = profile/extensions dist_dest = $(DIST)/$(MOZ_MACBUNDLE_NAME) +ifdef ENABLE_MARIONETTE +DEFINES += -DENABLE_MARIONETTE=1 +endif + PREF_JS_EXPORTS = $(srcdir)/profile/firefox.js \ $(NULL) diff --git a/browser/app/profile/firefox.js b/browser/app/profile/firefox.js index 7b75287af8a..74410bb0b71 100644 --- a/browser/app/profile/firefox.js +++ b/browser/app/profile/firefox.js @@ -1164,6 +1164,12 @@ pref("pdfjs.previousHandler.alwaysAskBeforeHandling", false); // (This is intentionally on the high side; see bug 746055.) pref("image.mem.max_decoded_image_kb", 256000); +//Enable/disable marionette server, set listening port +#ifdef ENABLE_MARIONETTE +pref("marionette.defaultPrefs.enabled", true); +pref("marionette.defaultPrefs.port", 2828); +#endif + // Example social provider pref("social.manifest.motown", "{\"origin\":\"https://motown-dev.mozillalabs.com\",\"name\":\"MoTown\",\"workerURL\":\"https://motown-dev.mozillalabs.com/social/worker.js\",\"iconURL\":\"https://motown-dev.mozillalabs.com/images/motown-icon.png\",\"sidebarURL\":\"https://motown-dev.mozillalabs.com/social/sidebar\"}"); // Comma-separated list of nsIURI::prePaths that are allowed to activate