Skip to content

Commit

Permalink
Bug 1223573 - Part 4. Build system changes for Loop as a system add-o…
Browse files Browse the repository at this point in the history
…n. r=mikedeboer,r=glandium
  • Loading branch information
Standard8 committed Nov 29, 2015
1 parent e400bfb commit beed8bd
Show file tree
Hide file tree
Showing 15 changed files with 215 additions and 188 deletions.
10 changes: 8 additions & 2 deletions .hgignore
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,15 @@ GRTAGS
GSYMS
GPATH

# Unit tests for Loop
# Various items for Loop
^browser/components/loop/standalone/content/config\.js$
^browser/components/loop/standalone/node_modules/
^browser/extensions/loop/.*/node_modules/
^browser/extensions/loop/.*\.module-cache
^browser/extensions/loop/test/coverage/desktop
^browser/extensions/loop/test/coverage/shared_standalone
^browser/extensions/loop/test/visual-regression/diff
^browser/extensions/loop/test/visual-regression/new
^browser/extensions/loop/test/visual-regression/refs

# Git clone directory for updating web-platform-tests
^testing/web-platform/sync/
Expand Down
1 change: 0 additions & 1 deletion browser/components/moz.build
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ DIRS += [
'downloads',
'extensions',
'feeds',
'loop',
'migration',
'newtab',
'places',
Expand Down
22 changes: 13 additions & 9 deletions browser/extensions/loop/.eslintignore
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
# This file currently uses a non-standard (and not on a standards track)
# if statement within catch.
modules/MozLoopWorker.js
content/modules/MozLoopWorker.js
# This file currently uses es7 features eslint issue:
# https://github.com/eslint/espree/issues/125
modules/MozLoopAPI.jsm
content/modules/MozLoopAPI.jsm
# Need to fix the configuration for this.
bootstrap.js
# Need to drop the preprocessing (bug 1212428)
content/preferences/prefs.js
# Libs we don't need to check
content/libs
content/shared/libs
content/panels/vendor
content/shared/vendor
standalone/content/libs
standalone/node_modules
# Libs we don't need to check
Expand All @@ -15,11 +19,11 @@ test/shared/vendor
test/coverage
test/node_modules
# These are generated react files that we don't need to check
content/js/conversation.js
content/js/conversationViews.js
content/js/panel.js
content/js/roomViews.js
content/js/feedbackViews.js
content/panels/js/conversation.js
content/panels/js/conversationViews.js
content/panels/js/panel.js
content/panels/js/roomViews.js
content/panels/js/feedbackViews.js
content/shared/js/textChatView.js
content/shared/js/linkifiedTextView.js
content/shared/js/views.js
Expand Down
3 changes: 2 additions & 1 deletion browser/extensions/loop/.eslintrc-gecko
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@
"blockBindings": true,
"destructuring": true,
"generators": true,
"objectLiteralShorthandMethods": true,
"restParams": true,
"spread": true,
"objectLiteralShorthandMethods": true,
"templateStrings": true,
},
"globals": {
// Gecko + Loop Globals.
Expand Down
2 changes: 1 addition & 1 deletion browser/extensions/loop/content/modules/.eslintrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"extends": "../.eslintrc-gecko"
"extends": "../../.eslintrc-gecko"
}
39 changes: 39 additions & 0 deletions browser/extensions/loop/install.rdf.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- 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/. -->

#filter substitution

<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:em="http://www.mozilla.org/2004/em-rdf#">
<Description about="urn:mozilla:install-manifest">
<em:id>[email protected]</em:id>
<em:bootstrap>true</em:bootstrap>
<em:version>0.1</em:version>
<em:type>2</em:type>

<!-- Target Application this extension can install into,
with minimum and maximum supported versions. -->
<em:targetApplication>
<Description>
<em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id>
<em:minVersion>45.0a1</em:minVersion>
<em:maxVersion>@FIREFOX_VERSION@</em:maxVersion>
</Description>
</em:targetApplication>

<!-- Used for unit tests only. -->
<em:targetApplication>
<Description>
<em:id>[email protected]</em:id>
<em:minVersion>0</em:minVersion>
<em:maxVersion>10</em:maxVersion>
</Description>
</em:targetApplication>

<!-- Front End MetaData -->
<em:name>Firefox Hello</em:name>
<em:description>Web sharing for Firefox</em:description>
<em:creator>Mozilla</em:creator>
</Description>
</RDF>
246 changes: 137 additions & 109 deletions browser/extensions/loop/jar.mn

Large diffs are not rendered by default.

21 changes: 10 additions & 11 deletions browser/extensions/loop/moz.build
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,16 @@
# 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/.

FINAL_TARGET = 'dist/bin/browser/features/[email protected]'

FINAL_TARGET_FILES += [
'bootstrap.js'
]

DIST_FILES += [
'install.rdf.in'
]

JAR_MANIFESTS += ['jar.mn']

XPCSHELL_TESTS_MANIFESTS += ['test/xpcshell/xpcshell.ini']
Expand All @@ -12,16 +22,5 @@ BROWSER_CHROME_MANIFESTS += [
'test/mochitest/browser.ini',
]

EXTRA_JS_MODULES.loop += [
'content/shared/js/crypto.js',
'content/shared/js/utils.js',
'modules/LoopRooms.jsm',
'modules/LoopRoomsCache.jsm',
'modules/MozLoopAPI.jsm',
'modules/MozLoopPushHandler.jsm',
'modules/MozLoopService.jsm',
'modules/MozLoopWorker.js',
]

with Files('**'):
BUG_COMPONENT = ('Loop', 'Client')
4 changes: 2 additions & 2 deletions browser/extensions/loop/run-all-loop-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ set -e

# Main tests

LOOPDIR=browser/components/loop
LOOPDIR=browser/extensions/loop
ESLINT=standalone/node_modules/.bin/eslint
if [ -x "${LOOPDIR}/${ESLINT}" ]; then
echo 'running eslint; see http://eslint.org/docs/rules/ for error info'
Expand All @@ -25,7 +25,7 @@ fi

# Build tests coverage.
MISSINGDEPSMSG="\nMake sure all dependencies are up to date by running
'npm install' inside the 'browser/components/loop/test/' directory.\n"
'npm install' inside the 'browser/extensions/loop/test/' directory.\n"
(
cd ${LOOPDIR}/test
if ! npm run-script build-coverage ; then
Expand Down
1 change: 1 addition & 0 deletions browser/extensions/moz.build
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

DIRS += [
'loop',
'pdfjs',
'shumway',
]
1 change: 1 addition & 0 deletions browser/installer/package-manifest.in
Original file line number Diff line number Diff line change
Expand Up @@ -676,6 +676,7 @@
@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@
Expand Down
6 changes: 0 additions & 6 deletions browser/themes/linux/jar.mn
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,6 @@ browser.jar:
skin/classic/browser/Toolbar-inverted.png
skin/classic/browser/Toolbar-small.png
skin/classic/browser/webRTC-indicator.css
skin/classic/browser/loop/menuPanel.png (loop/menuPanel.png)
skin/classic/browser/loop/[email protected] (loop/[email protected])
skin/classic/browser/loop/toolbar.png (loop/toolbar.png)
skin/classic/browser/loop/[email protected] (loop/[email protected])
skin/classic/browser/loop/toolbar-inverted.png (loop/toolbar-inverted.png)
skin/classic/browser/loop/[email protected] (loop/[email protected])
* skin/classic/browser/controlcenter/panel.css (controlcenter/panel.css)
skin/classic/browser/customizableui/background-noise-toolbar.png (customizableui/background-noise-toolbar.png)
skin/classic/browser/customizableui/customizeMode-gridTexture.png (customizableui/customizeMode-gridTexture.png)
Expand Down
14 changes: 0 additions & 14 deletions browser/themes/osx/jar.mn
Original file line number Diff line number Diff line change
Expand Up @@ -73,16 +73,6 @@ browser.jar:
skin/classic/browser/webRTC-sharingScreen-menubar.png
skin/classic/browser/[email protected]
skin/classic/browser/webRTC-indicator.css
skin/classic/browser/loop/menuPanel.png (loop/menuPanel.png)
skin/classic/browser/loop/[email protected] (loop/[email protected])
skin/classic/browser/loop/toolbar.png (loop/toolbar.png)
skin/classic/browser/loop/[email protected] (loop/[email protected])
skin/classic/browser/loop/toolbar-inverted.png (loop/toolbar-inverted.png)
skin/classic/browser/loop/[email protected] (loop/[email protected])
skin/classic/browser/yosemite/loop/menuPanel.png (loop/menuPanel-yosemite.png)
skin/classic/browser/yosemite/loop/[email protected] (loop/[email protected])
skin/classic/browser/yosemite/loop/toolbar.png (loop/toolbar-yosemite.png)
skin/classic/browser/yosemite/loop/[email protected] (loop/[email protected])
* skin/classic/browser/controlcenter/panel.css (controlcenter/panel.css)
skin/classic/browser/customizableui/background-noise-toolbar.png (customizableui/background-noise-toolbar.png)
skin/classic/browser/customizableui/customize-titleBar-toggle.png (customizableui/customize-titleBar-toggle.png)
Expand Down Expand Up @@ -280,10 +270,6 @@ browser.jar:
% override chrome://browser/skin/[email protected] chrome://browser/skin/yosemite/[email protected] os=Darwin osversion>=10.10
% override chrome://browser/skin/menuPanel.png chrome://browser/skin/yosemite/menuPanel.png os=Darwin osversion>=10.10
% override chrome://browser/skin/[email protected] chrome://browser/skin/yosemite/[email protected] os=Darwin osversion>=10.10
% override chrome://browser/skin/loop/menuPanel.png chrome://browser/skin/yosemite/loop/menuPanel.png os=Darwin osversion>=10.10
% override chrome://browser/skin/loop/[email protected] chrome://browser/skin/yosemite/loop/[email protected] os=Darwin osversion>=10.10
% override chrome://browser/skin/loop/toolbar.png chrome://browser/skin/yosemite/loop/toolbar.png os=Darwin osversion>=10.10
% override chrome://browser/skin/loop/[email protected] chrome://browser/skin/yosemite/loop/[email protected] os=Darwin osversion>=10.10
% override chrome://browser/skin/menuPanel-customize.png chrome://browser/skin/yosemite/menuPanel-customize.png os=Darwin osversion>=10.10
% override chrome://browser/skin/[email protected] chrome://browser/skin/yosemite/[email protected] os=Darwin osversion>=10.10
% override chrome://browser/skin/menuPanel-exit.png chrome://browser/skin/yosemite/menuPanel-exit.png os=Darwin osversion>=10.10
Expand Down
31 changes: 0 additions & 31 deletions browser/themes/windows/jar.mn
Original file line number Diff line number Diff line change
Expand Up @@ -83,22 +83,6 @@ browser.jar:
skin/classic/browser/urlbar-history-dropmarker-XPVista7.png
skin/classic/browser/[email protected]
skin/classic/browser/webRTC-indicator.css
skin/classic/browser/loop/menuPanel.png (loop/menuPanel.png)
skin/classic/browser/loop/[email protected] (loop/[email protected])
skin/classic/browser/loop/menuPanel-aero.png (loop/menuPanel-aero.png)
skin/classic/browser/loop/[email protected] (loop/[email protected])
skin/classic/browser/loop/toolbar.png (loop/toolbar.png)
skin/classic/browser/loop/[email protected] (loop/[email protected])
skin/classic/browser/loop/toolbar-aero.png (loop/toolbar-aero.png)
skin/classic/browser/loop/[email protected] (loop/[email protected])
skin/classic/browser/loop/toolbar-inverted.png (loop/toolbar-inverted.png)
skin/classic/browser/loop/[email protected] (loop/[email protected])
skin/classic/browser/loop/toolbar-lunaSilver.png (loop/toolbar-lunaSilver.png)
skin/classic/browser/loop/[email protected] (loop/[email protected])
skin/classic/browser/loop/toolbar-win8.png (loop/toolbar-win8.png)
skin/classic/browser/loop/[email protected] (loop/[email protected])
skin/classic/browser/loop/toolbar-XP.png (loop/toolbar-XP.png)
skin/classic/browser/loop/[email protected] (loop/[email protected])
* skin/classic/browser/controlcenter/panel.css (controlcenter/panel.css)
skin/classic/browser/customizableui/background-noise-toolbar.png (customizableui/background-noise-toolbar.png)
skin/classic/browser/customizableui/customize-titleBar-toggle.png (customizableui/customize-titleBar-toggle.png)
Expand Down Expand Up @@ -325,26 +309,11 @@ browser.jar:
% override chrome://browser/skin/[email protected] chrome://browser/skin/[email protected] os=WINNT osversion=6.1
% override chrome://browser/skin/[email protected] chrome://browser/skin/[email protected] os=WINNT osversion=6.2
% override chrome://browser/skin/[email protected] chrome://browser/skin/[email protected] os=WINNT osversion=6.3
% override chrome://browser/skin/loop/menuPanel.png chrome://browser/skin/loop/menuPanel-aero.png os=WINNT osversion=6
% override chrome://browser/skin/loop/menuPanel.png chrome://browser/skin/loop/menuPanel-aero.png os=WINNT osversion=6.1
% override chrome://browser/skin/loop/[email protected] chrome://browser/skin/loop/[email protected] os=WINNT osversion=6
% override chrome://browser/skin/loop/[email protected] chrome://browser/skin/loop/[email protected] os=WINNT osversion=6.1

% override chrome://browser/skin/Toolbar.png chrome://browser/skin/Toolbar-XP.png os=WINNT osversion<6
% override chrome://browser/skin/Toolbar.png chrome://browser/skin/Toolbar-aero.png os=WINNT osversion=6
% override chrome://browser/skin/Toolbar.png chrome://browser/skin/Toolbar-aero.png os=WINNT osversion=6.1
% override chrome://browser/skin/Toolbar.png chrome://browser/skin/Toolbar-win8.png os=WINNT osversion=6.2
% override chrome://browser/skin/Toolbar.png chrome://browser/skin/Toolbar-win8.png os=WINNT osversion=6.3
% override chrome://browser/skin/loop/toolbar.png chrome://browser/skin/loop/toolbar-XP.png os=WINNT osversion<6
% override chrome://browser/skin/loop/toolbar.png chrome://browser/skin/loop/toolbar-aero.png os=WINNT osversion=6
% override chrome://browser/skin/loop/toolbar.png chrome://browser/skin/loop/toolbar-aero.png os=WINNT osversion=6.1
% override chrome://browser/skin/loop/toolbar.png chrome://browser/skin/loop/toolbar-win8.png os=WINNT osversion=6.2
% override chrome://browser/skin/loop/toolbar.png chrome://browser/skin/loop/toolbar-win8.png os=WINNT osversion=6.3
% override chrome://browser/skin/loop/[email protected] chrome://browser/skin/loop/[email protected] os=WINNT osversion<6
% override chrome://browser/skin/loop/[email protected] chrome://browser/skin/loop/[email protected] os=WINNT osversion=6
% override chrome://browser/skin/loop/[email protected] chrome://browser/skin/loop/[email protected] os=WINNT osversion=6.1
% override chrome://browser/skin/loop/[email protected] chrome://browser/skin/loop/[email protected] os=WINNT osversion=6.2
% override chrome://browser/skin/loop/[email protected] chrome://browser/skin/loop/[email protected] os=WINNT osversion=6.3
% override chrome://browser/skin/preferences/checkbox.png chrome://browser/skin/preferences/checkbox-aero.png os=WINNT osversion=6
% override chrome://browser/skin/preferences/checkbox.png chrome://browser/skin/preferences/checkbox-aero.png os=WINNT osversion=6.1
% override chrome://browser/skin/preferences/checkbox.png chrome://browser/skin/preferences/checkbox-xp.png os=WINNT osversion<6
Expand Down
2 changes: 1 addition & 1 deletion testing/marionette/client/marionette/tests/unit-tests.ini
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ test_container = true
[include:../../../../../layout/base/tests/marionette/manifest.ini]

; loop tests
[include:../../../../../browser/components/loop/manifest.ini]
[include:../../../../../browser/extensions/loop/manifest.ini]

0 comments on commit beed8bd

Please sign in to comment.