Bug 1369801 - DevTools as system add-on;r=jdescottes draft
authorAlexandre Poirot <poirot.alex@gmail.com>
Tue, 30 May 2017 17:34:38 +0200
changeset 658587 28097f647967eec3a94c9dd7b806874465c33dd7
parent 658586 9cf256881e0a60b607312f7dc1bfb0de86d99a7c
child 658588 6f6e9754187899d1949e9467217f677396ac8e55
push id77820
push userjdescottes@mozilla.com
push dateMon, 04 Sep 2017 11:44:42 +0000
reviewersjdescottes
bugs1369801
milestone57.0a1
Bug 1369801 - DevTools as system add-on;r=jdescottes MozReview-Commit-ID: EUjkQtEUy4V
browser/installer/allowed-dupes.mn
browser/installer/package-manifest.in
devtools/client/jar.mn
devtools/client/locales/jar.mn
devtools/client/moz.build
devtools/client/preferences/moz.build
devtools/client/webide/moz.build
devtools/moz.build
devtools/server/shims/moz.build
devtools/shared/jar.mn
devtools/shared/shims/fronts/moz.build
devtools/templates.mozbuild
--- a/browser/installer/allowed-dupes.mn
+++ b/browser/installer/allowed-dupes.mn
@@ -19,67 +19,23 @@ browser/chrome/browser/content/browser/d
 browser/chrome/browser/content/browser/extension.svg
 browser/chrome/browser/content/browser/places/bookmarkProperties.xul
 browser/chrome/browser/content/browser/places/bookmarkProperties2.xul
 browser/chrome/browser/skin/classic/browser/addons/addon-install-confirm.svg
 browser/chrome/browser/skin/classic/browser/connection-secure.svg
 browser/chrome/browser/skin/classic/browser/controlcenter/warning-gray.svg
 browser/chrome/browser/skin/classic/browser/newtab/close.png
 # devtools reduction is bug 1311178
-browser/chrome/devtools/content/dom/content/dom-view.css
-browser/chrome/devtools/content/dom/dom.html
-browser/chrome/devtools/content/dom/main.js
-browser/chrome/devtools/content/framework/toolbox-options.js
-browser/chrome/devtools/content/inspector/fonts/fonts.js
-browser/chrome/devtools/content/inspector/inspector.xhtml
-browser/chrome/devtools/content/memory/initializer.js
-browser/chrome/devtools/content/projecteditor/lib/helpers/readdir.js
-browser/chrome/devtools/content/shared/frame-script-utils.js
-browser/chrome/devtools/content/shared/theme-switching.js
-browser/chrome/devtools/modules/devtools/client/dom/content/dom-view.css
-browser/chrome/devtools/modules/devtools/client/dom/dom.html
-browser/chrome/devtools/modules/devtools/client/dom/main.js
-browser/chrome/devtools/modules/devtools/client/framework/toolbox-options.js
-browser/chrome/devtools/modules/devtools/client/inspector/fonts/fonts.js
-browser/chrome/devtools/modules/devtools/client/inspector/inspector.xhtml
-browser/chrome/devtools/modules/devtools/client/jsonview/css/controls.png
-browser/chrome/devtools/modules/devtools/client/jsonview/css/controls@2x.png
-browser/chrome/devtools/modules/devtools/client/memory/initializer.js
-browser/chrome/devtools/modules/devtools/client/projecteditor/lib/helpers/readdir.js
-browser/chrome/devtools/modules/devtools/client/shared/frame-script-utils.js
-browser/chrome/devtools/modules/devtools/client/shared/theme-switching.js
-browser/chrome/devtools/modules/devtools/client/themes/common.css
-browser/chrome/devtools/modules/devtools/client/themes/toolbars.css
-browser/chrome/devtools/modules/devtools/client/themes/variables.css
-browser/chrome/devtools/skin/common.css
-browser/chrome/devtools/skin/toolbars.css
-browser/chrome/devtools/skin/images/command-scratchpad.svg
-browser/chrome/devtools/skin/images/controls.png
-browser/chrome/devtools/skin/images/controls@2x.png
-browser/chrome/devtools/skin/images/debugger-blackbox.svg
-browser/chrome/devtools/skin/images/debugger-prettyprint.svg
-browser/chrome/devtools/skin/images/filetypes/store.svg
-browser/chrome/devtools/skin/images/itemToggle.svg
-browser/chrome/devtools/skin/images/security-state-broken.svg
-browser/chrome/devtools/skin/images/security-state-local.svg
-browser/chrome/devtools/skin/images/security-state-secure.svg
-browser/chrome/devtools/skin/images/tabs-icon.svg
-browser/chrome/devtools/skin/images/tool-scratchpad.svg
-browser/chrome/devtools/skin/images/tool-storage.svg
-browser/chrome/devtools/skin/images/tool-styleeditor.svg
-browser/chrome/devtools/skin/promisedebugger.css
-browser/chrome/devtools/skin/variables.css
-modules/devtools/Console.jsm
+browser/features/devtools@mozilla.org/chrome/skin/images/security-state-broken.svg
+browser/features/devtools@mozilla.org/chrome/skin/images/security-state-secure.svg
+browser/features/devtools@mozilla.org/chrome/skin/toolbars.css
+browser/features/devtools@mozilla.org/chrome/modules/client/themes/toolbars.css
 modules/devtools/Loader.jsm
-modules/devtools/Simulator.jsm
-modules/devtools/shared/Console.jsm
 modules/devtools/shared/Loader.jsm
-modules/devtools/shared/apps/Simulator.jsm
-browser/modules/devtools/client/framework/gDevTools.jsm
-browser/modules/devtools/gDevTools.jsm
+
 browser/chrome/icons/default/default16.png
 browser/chrome/icons/default/default32.png
 browser/chrome/icons/default/default48.png
 browser/chrome/pdfjs/content/web/images/findbarButton-next-rtl.png
 browser/chrome/pdfjs/content/web/images/findbarButton-next-rtl@2x.png
 browser/chrome/pdfjs/content/web/images/findbarButton-next.png
 browser/chrome/pdfjs/content/web/images/findbarButton-next@2x.png
 browser/chrome/pdfjs/content/web/images/findbarButton-previous-rtl.png
--- a/browser/installer/package-manifest.in
+++ b/browser/installer/package-manifest.in
@@ -623,32 +623,21 @@
 @RESPATH@/chrome/recording/*
 #ifdef MOZ_GTK
 @RESPATH@/browser/chrome/icons/default/default16.png
 @RESPATH@/browser/chrome/icons/default/default32.png
 @RESPATH@/browser/chrome/icons/default/default48.png
 #endif
 @RESPATH@/browser/features/*
 
-; [Webide Files]
-@RESPATH@/browser/chrome/webide@JAREXT@
-@RESPATH@/browser/chrome/webide.manifest
-@RESPATH@/browser/@PREF_DIR@/webide-prefs.js
-
 ; [DevTools Shim Files]
 @RESPATH@/browser/chrome/devtools-shim@JAREXT@
 @RESPATH@/browser/chrome/devtools-shim.manifest
 @RESPATH@/browser/@PREF_DIR@/devtools-startup-prefs.js
 
-; DevTools
-@RESPATH@/browser/chrome/devtools@JAREXT@
-@RESPATH@/browser/chrome/devtools.manifest
-@RESPATH@/browser/@PREF_DIR@/devtools.js
-@RESPATH@/browser/@PREF_DIR@/debugger.js
-
 ; shell icons
 #ifdef XP_UNIX
 #ifndef XP_MACOSX
 ; shell icons
 @RESPATH@/browser/icons/*.png
 #ifdef MOZ_UPDATER
 ; updater icon
 @RESPATH@/icons/updater.png
--- a/devtools/client/jar.mn
+++ b/devtools/client/jar.mn
@@ -1,14 +1,17 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
-devtools.jar:
+[features/devtools@mozilla.org] chrome.jar:
 %   content devtools %content/
+    content/preferences/debugger.js (preferences/debugger.js)
+    content/preferences/devtools.js (preferences/devtools.js)
+    content/webide/webide-prefs.js (webide/webide-prefs.js)
     content/shared/vendor/d3.js (shared/vendor/d3.js)
     content/shared/vendor/dagre-d3.js (shared/vendor/dagre-d3.js)
     content/shared/widgets/widgets.css (shared/widgets/widgets.css)
     content/netmonitor/src/assets/styles/netmonitor.css (netmonitor/src/assets/styles/netmonitor.css)
     content/shared/widgets/VariablesView.xul (shared/widgets/VariablesView.xul)
     content/netmonitor/index.html (netmonitor/index.html)
     content/webconsole/webconsole.xhtml (webconsole/webconsole.xhtml)
     content/webconsole/webconsole.xul (webconsole/webconsole.xul)
@@ -307,8 +310,11 @@ devtools.jar:
     skin/images/firebug/command-frames.svg (themes/images/firebug/command-frames.svg)
     skin/images/firebug/command-paintflashing.svg (themes/images/firebug/command-paintflashing.svg)
     skin/images/firebug/command-responsivemode.svg (themes/images/firebug/command-responsivemode.svg)
     skin/images/firebug/command-scratchpad.svg (themes/images/firebug/command-scratchpad.svg)
     skin/images/firebug/command-screenshot.svg (themes/images/firebug/command-screenshot.svg)
     skin/images/firebug/command-measure.svg (themes/images/firebug/command-measure.svg)
     skin/images/firebug/command-rulers.svg (themes/images/firebug/command-rulers.svg)
     skin/images/firebug/command-noautohide.svg (themes/images/firebug/command-noautohide.svg)
+
+% manifest devtools-startup.manifest
+% manifest webideComponents.manifest
--- a/devtools/client/locales/jar.mn
+++ b/devtools/client/locales/jar.mn
@@ -1,8 +1,8 @@
 #filter substitution
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
-@AB_CD@.jar:
-%   locale devtools @AB_CD@ %locale/@AB_CD@/devtools/client/
-    locale/@AB_CD@/devtools/client/ (%*)
+[features/devtools@mozilla.org] chrome.jar:
+% locale devtools @AB_CD@ %locale/@AB_CD@/
+  locale/@AB_CD@/ (en-US/*)
--- a/devtools/client/moz.build
+++ b/devtools/client/moz.build
@@ -15,17 +15,16 @@ DIRS += [
     'dom',
     'framework',
     'inspector',
     'jsonview',
     'locales',
     'memory',
     'netmonitor',
     'performance',
-    'preferences',
     'responsive.html',
     'responsivedesign',
     'scratchpad',
     'shadereditor',
     'shared',
     'shims',
     'sourceeditor',
     'storage',
deleted file mode 100644
--- a/devtools/client/preferences/moz.build
+++ /dev/null
@@ -1,13 +0,0 @@
-# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
-# vim: set filetype=python:
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
-JS_PREFERENCE_PP_FILES += [
-    'devtools.js'
-]
-
-JS_PREFERENCE_FILES += [
-    'debugger.js',
-]
--- a/devtools/client/webide/moz.build
+++ b/devtools/client/webide/moz.build
@@ -12,14 +12,10 @@ DIRS += [
 
 BROWSER_CHROME_MANIFESTS += [
     'test/browser.ini'
 ]
 MOCHITEST_CHROME_MANIFESTS += [
     'test/chrome.ini'
 ]
 
-JS_PREFERENCE_FILES += [
-    'webide-prefs.js',
-]
-
 with Files('**'):
     BUG_COMPONENT = ('Firefox', 'Developer Tools: WebIDE')
--- a/devtools/moz.build
+++ b/devtools/moz.build
@@ -21,16 +21,20 @@ DIRS += [
     'platform',
 ]
 
 if CONFIG['MOZ_DEVTOOLS'] != 'addon':
     DIRS += [
         'server',
         'shared',
     ]
+    FINAL_TARGET_FILES.features['devtools@mozilla.org'] += [
+        'bootstrap.js',
+        'install.rdf',
+    ]
 
 # /browser uses DIST_SUBDIR.  We opt-in to this treatment when building
 # DevTools for the browser to keep the root omni.ja slim for use by external XUL
 # apps.  Mulet also uses this since it includes /browser.
 if CONFIG['MOZ_BUILD_APP'] == 'browser':
     DIST_SUBDIR = 'browser'
     export('DIST_SUBDIR')
 
--- a/devtools/server/shims/moz.build
+++ b/devtools/server/shims/moz.build
@@ -8,11 +8,11 @@ DIRS += [
     'toolkit',
 ]
 
 # Unlike most DevTools build files, this file does not use DevToolsModules
 # because these files are here for add-on compatibility, and so they must be
 # installed to previously defined locations.
 
 # Extra compatibility layer for old path after relocation in bug 1270173
-FINAL_TARGET_FILES.chrome.devtools.modules.devtools.server += [
+FINAL_TARGET_FILES.features['devtools@mozilla.org'].chrome.modules.server += [
     'protocol.js',
 ]
--- a/devtools/shared/jar.mn
+++ b/devtools/shared/jar.mn
@@ -1,12 +1,12 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
-devtools.jar:
-%   resource devtools %modules/devtools/
+[features/devtools@mozilla.org] chrome.jar:
+%   resource devtools %modules/
 %   resource devtools-client-jsonview resource://devtools/client/jsonview/ contentaccessible=yes
 %   resource devtools-client-shared resource://devtools/client/shared/ contentaccessible=yes
 # The typical approach would be to list all the resource files in this manifest
 # for installation.  Instead of doing this, use the DevToolsModules syntax via
 # moz.build files to do the installation so that we can enforce correct paths
 # based on source tree location.
--- a/devtools/shared/shims/fronts/moz.build
+++ b/devtools/shared/shims/fronts/moz.build
@@ -1,9 +1,11 @@
 # -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
+DIST_SUBDIR = 'browser'
+
 DevToolsModules(
     'timeline.js',
 )
--- a/devtools/templates.mozbuild
+++ b/devtools/templates.mozbuild
@@ -24,12 +24,15 @@ def DevToolsModules(*modules):
         if '/' in m:
             error('DevToolsModules must be used from the same directory as ' +
                   'the files to be installed.')
 
     # jar.mn manifest files are typically used to install files to chrome
     # locations.  Instead of doing this, use this DevToolsModules syntax via
     # moz.build files to do the installation so that we can enforce correct
     # paths based on source tree location.
-    base = FINAL_TARGET_FILES.chrome.devtools.modules
-    for dir in RELATIVEDIR.split('/'):
+    base = FINAL_TARGET_FILES.features['devtools@mozilla.org'].chrome.modules
+    relative = RELATIVEDIR.split('/')
+    # Remove 'devtools' to got straight to client, shared or server folders
+    relative.pop(0)
+    for dir in relative:
         base = base[dir]
     base += [m for m in modules]