Bug 730803 - Don't ship unnecessary files with test pilot. r=irving
authorMark Banner <bugzilla@standard8.plus.com>
Fri, 02 Mar 2012 09:01:14 +0000
changeset 10979 bdeddfcc3da34f65d36f7c07e71ee8b8ac710018
parent 10978 c04a8a9ed0f3c24299fe73fb4f00b25c0cff3e54
child 10980 949f8b97b25517db9b4c508064150a8253c49047
push id463
push userbugzilla@standard8.plus.com
push dateTue, 24 Apr 2012 17:34:51 +0000
treeherdercomm-beta@e53588e8f7b0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersirving
bugs730803
Bug 730803 - Don't ship unnecessary files with test pilot. r=irving
mail/app/profile/extensions/Makefile.in
mail/app/profile/extensions/tbtestpilot@labs.mozilla.com/bootstrap.js
mail/app/profile/extensions/tbtestpilot@labs.mozilla.com/content/status_mobile.html
--- a/mail/app/profile/extensions/Makefile.in
+++ b/mail/app/profile/extensions/Makefile.in
@@ -41,27 +41,34 @@ srcdir		= @srcdir@
 VPATH		= @srcdir@
 
 DISTROEXT = $(call core_abspath,$(DIST))/bin/distribution/extensions
 
 include $(DEPTH)/config/autoconf.mk
 
 include $(topsrcdir)/config/rules.mk
 
+# If adding extra extensions here, check that EXTRA_ARGS defined below won't
+# affect them unintentionally.
 EXTENSIONS = \
   tbtestpilot@labs.mozilla.com \
   $(NULL)
 
+# We are in release mode, we don't want to ship the debug file.
+ifndef MOZ_DEBUG
+EXTRA_ARGS = -x content/debug.html
+endif
+
 DEFINES += -DTHUNDERBIRD_VERSION=$(THUNDERBIRD_VERSION)
 
 define _INSTALL_EXTENSION
 $(NSINSTALL) -D $(dir) && \
   $(PYTHON) $(MOZILLA_DIR)/config/Preprocessor.py $(DEFINES) $(ACDEFINES) $(srcdir)/$(dir)/install.rdf.in > $(dir)/install.rdf && \
   cd $(dir) && \
   $(ZIP) -r9XD $(DISTROEXT)/$(dir).xpi install.rdf && \
   cd $(call core_abspath,$(srcdir)/$(dir)) && \
-  $(ZIP) -r9XD $(DISTROEXT)/$(dir).xpi * -x install.rdf.in
+  $(ZIP) -r9XD $(DISTROEXT)/$(dir).xpi * -x install.rdf.in $(EXTRA_ARGS)
 
 endef # do not remove the blank line!
 
 libs::
 	$(NSINSTALL) -D $(DISTROEXT)
 	$(foreach dir,$(EXTENSIONS),$(_INSTALL_EXTENSION))
deleted file mode 100644
--- a/mail/app/profile/extensions/tbtestpilot@labs.mozilla.com/bootstrap.js
+++ /dev/null
@@ -1,76 +0,0 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Test Pilot.
- *
- * The Initial Developer of the Original Code is Mozilla.
- * Portions created by the Initial Developer are Copyright (C) 2007
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *   Jono X <jono@mozilla.com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-const APP_STARTUP = 1; //The application is starting up.
-const APP_SHUTDOWN = 2; //The application is shutting down.
-const ADDON_ENABLE = 3;	//The add-on is being enabled.
-const ADDON_DISABLE = 4; //The add-on is being disabled.
-const ADDON_INSTALL = 5; //The add-on is being installed.
-const ADDON_UNINSTALL = 6; //The add-on is being uninstalled.
-const ADDON_UPGRADE = 7; //The add-on is being upgraded.
-const ADDON_DOWNGRADE = 8; //The add-on is being downgraded.
-
-
-function startup(data, reason) {
-   // called when the extension needs to start itself up -
-   // data tells us extension id, version, and installPath.
-   // reason is one of APP_STARTUP, ADDON_ENABLE, ADDON_INSTALL,
-   // ADDON_UPGRADE, or ADDON_DOWNGRADE.
-
-  /* TODO this will need to register a listener for new window opens,
-   * so tht it can apply the TestPilotWindowHandlers.onWindowLoad()
-   * currently defined in browser.js.  (Without an overlay, we have no
-   * other way of ensuring that the window load handler gets called for
-   * each window.)
-   *
-   * This will also need to manually insert CSS styles (which are otherwise
-   * included by the overlay.)   Look at the document.loadOverlay function.
-   * https://developer.mozilla.org/En/DOM/Document.loadOverlay
-   */
-}
-
-function shutdown(data, reason) {
-   // reason is one of APP_SHUTDOWN, ADDON_DISABLE, ADDON_UNINSTALL, ADDON_UPGRADE, or ADDON_DOWNGRADE.
-}
-
-function install(data, reason) {
-  // Optional.  Called before first call to startup() when
-  // extension first installed.
-}
-
-function uninstall(data, reason) {
-  // Optional.  Called after last call to shutdown() when uninstalled.
-}
deleted file mode 100644
--- a/mail/app/profile/extensions/tbtestpilot@labs.mozilla.com/content/status_mobile.html
+++ /dev/null
@@ -1,83 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
-	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
-<head>
-  <meta http-equiv="content-type" content="text/html; charset=utf-8" />
-  <title id="page-title"></title>
-  <link rel="stylesheet" type="text/css" media="all"
-    href="chrome://testpilot/skin/css/screen-standalone-mobile.css">
-  <script src="experiment-page.js"
-    type="application/javascript;version=1.8"></script>
-  <script src="flot/jquery.js" language="javascript"
-    type="text/javascript"></script>
-  <script src="flot/jquery.flot.js" language="javascript"
-    type="text/javascript"></script>
-</head>
-<body onload="onStatusPageLoad();">
-  <div id="container">
-    <div id="content-standalone">
-
-      <!-- main experiment explanation goes here; should be very short -->
-      <div id="main-experiment-ui">
-      <div id="experiment-specific-text"></div>
-        <!-- Split experiment-specific-text into the main stuff and the graph.
-             Graph goes in sliding div below; main stuff goes up here.  This will require
-             either modifying the API to do separate requests for main html and graph html; or else
-             the button to toggle the data display needs to be inside -->
-      
-        <!-- TODO all the hard coded strings in here need to become l10n friendly -->
-        <span id="recur-pref"></span>
-        <span id="recur-controls"></span>
-
-        <p><button id="data-graph-display-button"
-                    onclick="toggleSection('data-graph-display');">Hide</button>
-           <span class="section-title">Your Usage Data</span></p>
-        <div id="data-graph-display-text">
-          <div id="data-plot-div" style="width:480px;height:400px"></div>
-          <p><a id="raw-data-link" href="raw-data.html">Raw Data</a></p>
-        </div>
-        <hr/></p>
-
-        <p><button id="data-privacy-button"
-                    onclick="toggleSection('data-privacy');">Show</button>
-          <span class="section-title">Privacy Info</a>
-        <div id="data-privacy-text" class="initially-hidden">
-        </div>
-        <hr/></p>
-
-        <p><button id="contact-links-button"
-                    onclick="toggleSection('contact-links');">Show</button>
-          <span class="section-title">Contact Us</a>
-        <div id="contact-links-text" class="initially-hidden">
-           <ul>
-           <li><a id="propose-test-link" href="https://wiki.mozilla.org/Labs/Test_Pilot"></a></li>
-           <li><a href="http://groups.google.com/group/mozilla-labs-testpilot">Report a Bug</a></li>
-           <li><a id="testpilot-twitter-link" href="http://www.twitter.com/MozTestPilot"></a></li>
-           <li><a id="comments-and-discussions-link" href="http://groups.google.com/group/mozilla-labs-testpilot"></a></li>
-
-            </ul>
-        </div>
-        <hr/></p>
-
-        <p><a id="opt-out-link" onclick="showQuitUi();">
-            Quit This Study</a></p>
-        </div>
-        <div id="quit-ui" class="initially-hidden">
-          <h2 id="about-quit-title"></h2>
-	  <p id="optional-message"></p>
-          <p><span id="reason-text"></span>
-	    <textarea rows="6" cols="64" id="reason-for-quit"></textarea></p>
-          <p id="recur-options" style="display:none"></p><br/>
-	  <div id="recur-checkbox-container" style="display:none">
-          <input type="checkbox" id="opt-out-forever">
-          <span id="quit-forever-text"></span>
-          </div>
-          <div class="home_callout_continue" style="text-align:center">
-            <a id="quit-study-link" onclick="quitExperiment();"></a></div>
-          </div>
-        </div>       
-     </div>
-    </div>
-</body>
-</html>