Bug 954978 - Fix packaging of license files, and include the Apple Bonjour and the GPL licenses in about:license, r=clokep.
authorFlorian Quèze <florian@instantbird.org>
Thu, 02 Aug 2012 01:41:00 +0200
changeset 16856 fe6f8f6a7ac5dce9222de97902703032e511ef05
parent 16855 de498fd05d65b96a2dafc9e0359017378764686f
child 16857 35ff9f98f00e0af0bf9f50d2332eb0c23aebcfae
push id1151
push userbugzilla@standard8.plus.com
push dateMon, 03 Feb 2014 22:50:32 +0000
treeherdercomm-aurora@267d8e9143d5 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersclokep
bugs954978
Bug 954978 - Fix packaging of license files, and include the Apple Bonjour and the GPL licenses in about:license, r=clokep.
im/LICENSE.txt
im/app/Makefile.in
im/content/Makefile.in
im/content/credits.xhtml
im/content/jar.mn
im/installer/package-manifest.in
--- a/im/LICENSE.txt
+++ b/im/LICENSE.txt
@@ -1,19 +1,16 @@
 Official *binaries* of this product released by the Instantbird team
 (http://www.instantbird.com/) are made available under the GNU General
 Public License GPL version 2.0 or later.
 
 All of the *source code* for this product is available under licenses
 which are both free and open source.
 
-Most is available under any one of the following:
- - the Mozilla Public License (MPL) 1.1,
+Most is available under one of the following:
+ - the Mozilla Public License (MPL) 2.0,
  - the GNU General Public License (GPL) 2.0 or later,
  - the GNU Lesser General Public License (LGPL) 2.1 or later.
-That is, you may copy and distribute such software according to the
-terms of any one of those three licenses.
 
-The remainder of the software which is not under the MPL/LGPL/GPL
-tri-license is available under a subset of it or one of a variety of
-more permissive licenses.
+The remainder of the software is available under a variety of more permissive
+licenses.
 
-See license.html for details.
+See about:license for details.
--- a/im/app/Makefile.in
+++ b/im/app/Makefile.in
@@ -9,27 +9,23 @@ VPATH		= @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 AB_CD = $(MOZ_UI_LOCALE)
 
 GRE_MILESTONE = $(shell $(PYTHON) $(MOZILLA_SRCDIR)/config/printconfigsetting.py $(LIBXUL_DIST)/bin/platform.ini Build Milestone)
 GRE_BUILDID = $(shell $(PYTHON) $(MOZILLA_SRCDIR)/config/printconfigsetting.py $(LIBXUL_DIST)/bin/platform.ini Build BuildID)
 
-PLATFORM_LICENSE_FILE = $(MOZILLA_SRCDIR)/toolkit/content/license.html
-MAIL_LICENSE_HTML_FILE = ../license.html
-MAIL_LICENSE_TXT_FILE = $(topsrcdir)/instantbird/LICENSE.txt
-MAIL_APP_LICENSE_FILE = $(srcdir)/app-license.html
+LICENSE_TXT_FILE = $(topsrcdir)/instantbird/LICENSE.txt
 
 DEFINES += \
   -DINSTANTBIRD_ICO=\"$(DIST)/branding/instantbird.ico\" \
   -DAB_CD=$(AB_CD) \
   -DGRE_MILESTONE=$(GRE_MILESTONE) \
   -DGRE_BUILDID=$(GRE_BUILDID) \
-  -DAPP_LICENSE_BLOCK=$(MAIL_APP_LICENSE_FILE) \
    $(NULL)
 
 MOZ_SOURCE_STAMP = $(firstword $(shell hg -R $(topsrcdir) parent --template="{node|short}\n" 2>/dev/null))
 ifdef MOZ_SOURCE_STAMP
 DEFINES += -DMOZ_SOURCE_STAMP="$(MOZ_SOURCE_STAMP)"
 endif
 
 SOURCE_REPO := $(shell hg -R $(topsrcdir) showconfig paths.default 2>/dev/null | sed -e "s/^ssh:/http:/")
@@ -38,21 +34,16 @@ DEFINES += -DMOZ_SOURCE_REPO="$(SOURCE_R
 endif
 
 ifdef MOZILLA_OFFICIAL
 DEFINES += -DOFFICIAL_BUILD=1
 endif
 
 DIRS		= profile
 
-GARBAGE += \
-	$(MAIL_LICENSE_HTML_FILE) \
-	$(FINAL_TARGET)/license.html \
-	$(NULL)
-
 PREF_JS_EXPORTS = \
     $(srcdir)/profile/all-instantbird.js \
     $(srcdir)/profile/channel-prefs.js \
     $(NULL)
 
 ifndef LIBXUL_SDK
 
 ifneq (,$(filter OS2 WINCE WINNT,$(OS_ARCH)))
@@ -277,22 +268,17 @@ libs::
         fi
 endif
 endif
 
 ifeq ($(MOZ_WIDGET_TOOLKIT),photon)
 LIBS += -lphexlib
 endif
 
-$(MAIL_LICENSE_HTML_FILE): $(PLATFORM_LICENSE_FILE) $(MAIL_APP_LICENSE_FILE)
-	$(PYTHON) $(MOZILLA_DIR)/config/Preprocessor.py $(DEFINES) $< | \
-	sed -e "s/about:license\#/\#/" | \
-	sed -e "s/available under one/available under a subset of it or one/" > $@
-
-libs:: $(MAIL_LICENSE_TXT_FILE) $(MAIL_LICENSE_HTML_FILE)
+libs:: $(LICENSE_TXT_FILE)
 ifeq ($(OS_ARCH),WINNT)
 	$(EXIT_ON_ERROR) \
 	for file in $^; do \
 	$(PERL) -pe 's/(?<!\r)\n/\r\n/g;' < $$file > $(FINAL_TARGET)/`basename $$file`; \
 	done
 else
 	$(SYSINSTALL) $(IFLAGS1) $^ $(FINAL_TARGET)
 endif
--- a/im/content/Makefile.in
+++ b/im/content/Makefile.in
@@ -23,8 +23,12 @@ DEFINES += \
 
 # ifneq (,$(filter windows gtk2 mac cocoa, $(MOZ_WIDGET_TOOLKIT)))
 # DEFINES += -DHAVE_SHELL_SERVICE=1
 # endif
 
 ifdef MOZ_UPDATER
 DEFINES += -DMOZ_UPDATER=1
 endif
+
+abs_app_license_path = $(shell cd $(srcdir)/../app && pwd)/app-license.html
+CHROME_DEPS += $(abs_app_license_path)
+DEFINES += -DAPP_LICENSE_BLOCK=$(abs_app_license_path)
--- a/im/content/credits.xhtml
+++ b/im/content/credits.xhtml
@@ -153,41 +153,23 @@
         cb.scrollTop = newtop;
         if (cb.scrollTop != newtop) {
           // we're at the bottom
           clearInterval(gCreditsInterval);
           setTimeout(function() { cb.scrollTop = 0 }, 10000);
         }
       }
 
-      function loadExternalURI(aURI)
-      {
-        Components.classes["@mozilla.org/uriloader/external-protocol-service;1"]
-                  .getService(Components.interfaces.nsIExternalProtocolService)
-                  .loadUrl(aURI);
-      }
-
       function openContributors(aEvent)
       {
         var ioService = Components.classes["@mozilla.org/network/io-service;1"].
                         getService(Components.interfaces.nsIIOService);
-        loadExternalURI(ioService.newURI(aEvent.target.href, null, null));
-        aEvent.preventDefault();
-      }
-
-      function openLicense(aEvent)
-      {
-        var fileLocator =
-            Components.classes["@mozilla.org/file/directory_service;1"].
-            getService(Components.interfaces.nsIProperties);
-        var appDir = fileLocator.get("XCurProcD", Components.interfaces.nsIFile);
-        appDir.append("license.html");
-        var ioService = Components.classes["@mozilla.org/network/io-service;1"].
-                        getService(Components.interfaces.nsIIOService);
-        loadExternalURI(ioService.newFileURI(appDir));
+        Components.classes["@mozilla.org/uriloader/external-protocol-service;1"]
+                  .getService(Components.interfaces.nsIExternalProtocolService)
+                  .loadUrl(ioService.newURI(aEvent.target.href, null, null));
         aEvent.preventDefault();
       }
 
     ]]>
     </script>
   </head>
   <body onload="init();" onunload="uninit();">
     <div id="titleBox">
@@ -230,19 +212,18 @@
         </div>
 
         <p id="gecko" class="center">&credit.poweredByGecko;</p>
 
         <p class="footnote">
           &brandFullName; &license.part0; &copy;2007-2012 &license.part1;
           <a href="http://www.instantbird.com/thanks.html" onclick="openContributors(event);">&license.contrib;</a>,
           &license.part2;
-          <a href="" onclick="openLicense(event);">&credit.license;</a>
+          <a onclick="openDialog('about:license');">&credit.license;</a>
           &license.part3;</p>
 
     </div>
 
     <div id="footerBox">
       <img src="chrome://branding/content/about-footer.png"/>
     </div>
   </body>
 </html>
-
--- a/im/content/jar.mn
+++ b/im/content/jar.mn
@@ -83,16 +83,19 @@ instantbird.jar:
 *	content/instantbird/preferences/themes.xul              (preferences/themes.xul)
 	content/instantbird/preferences/themes.js               (preferences/themes.js)
 *	content/instantbird/preferences/tabs.xul                (preferences/tabs.xul)
 	content/instantbird/preferences/tabs.js                 (preferences/tabs.js)
 	content/instantbird/preferences/messagestyle.js	        (preferences/messagestyle.js)
 	content/instantbird/preferences/smileys.js		(preferences/smileys.js)
 	content/instantbird/preferences/smiley.css		(preferences/smiley.css)
 	content/instantbird/preferences/smiley.xml		(preferences/smiley.xml)
+# override the toolkit license.html file
+*+	content/instantbird/license.html			(/mozilla/toolkit/content/license.html)
+% override chrome://global/content/license.html chrome://instantbird/content/license.html
 
 #ifdef DEBUG
 debug.jar:
 % content debug %content/debug/
 % overlay chrome://instantbird/content/menus.xul chrome://debug/content/debug.xul
 % overlay chrome://instantbird/content/instantbird.xul chrome://debug/content/viewselectionsource.xul
 	content/debug/debug.js	(debug/debug.js)
 	content/debug/debug.xul	(debug/debug.xul)
--- a/im/installer/package-manifest.in
+++ b/im/installer/package-manifest.in
@@ -120,16 +120,17 @@
 #ifndef XP_MACOSX
 @BINPATH@/run-mozilla.sh
 @BINPATH@/mozilla-xremote-client
 #endif
 #endif
 #ifdef MOZ_SPLASHSCREEN
 @BINPATH@/splash.bmp
 #endif
+@BINPATH@/LICENSE.txt
 
 ; [Components]
 @BINPATH@/components/components.manifest
 @BINPATH@/components/alerts.xpt
 #ifdef ACCESSIBILITY
 #ifdef XP_WIN32
 @BINPATH@/AccessibleMarshal.dll
 @BINPATH@/components/accessibility-msaa.xpt