Bug 439453: add --enable-official-branding support to Fennec, r=mfinkle
authorGavin Sharp <gavin@mozilla.com>
Sun, 06 Sep 2009 14:53:04 -0400
changeset 836 8d1034cb1a0caad44c94c84b4102bd9cde494605
parent 835 732abc08a4347a712a944f282c7310451137562b
child 837 53bc425ee331f1a32b406534b4da23fb8e280996
push id722
push usergsharp@mozilla.com
push dateMon, 07 Sep 2009 03:55:39 +0000
reviewersmfinkle
bugs439453
Bug 439453: add --enable-official-branding support to Fennec, r=mfinkle
branding/nightly/Makefile.in
branding/nightly/configure.sh
branding/nightly/locales/Makefile.in
branding/nightly/locales/en-US/brand.dtd
branding/nightly/locales/en-US/brand.properties
branding/nightly/locales/jar.mn
branding/official/Makefile.in
branding/official/configure.sh
branding/official/locales/Makefile.in
branding/official/locales/en-US/brand.dtd
branding/official/locales/en-US/brand.properties
branding/official/locales/jar.mn
build.mk
confvars.sh
locales/Makefile.in
locales/en-US/chrome/brand/brand.dtd
locales/en-US/chrome/brand/brand.properties
locales/jar.mn
makefiles.sh
new file mode 100644
--- /dev/null
+++ b/branding/nightly/Makefile.in
@@ -0,0 +1,63 @@
+# ***** 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 mozilla.org code.
+#
+# The Initial Developer of the Original Code is Mozilla Corporation.
+# Portions created by the Initial Developer are Copyright (C) 2009
+# the Initial Developer. All Rights Reserved.
+#
+# Contributor(s):
+#   Justin Dolske <dolske@mozilla.com> (original author)
+#
+# 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 *****
+
+DEPTH = ../../..
+topsrcdir = @top_srcdir@
+srcdir = @srcdir@
+VPATH = @srcdir@
+
+include $(DEPTH)/config/autoconf.mk
+
+DIRS = \
+	locales \
+	$(NULL)
+
+include $(topsrcdir)/config/rules.mk
+
+#LINUX_BRANDING_FILES = \
+#	default16.png \
+#	default32.png \
+#	default48.png \
+#	document.png \
+#	mozicon128.png \
+#	$(NULL)
+#
+#export::
+#	$(NSINSTALL) -D $(DIST)/branding
+#ifeq ($(MOZ_WIDGET_TOOLKIT),gtk2)
+#	cp $(addprefix $(srcdir)/, $(LINUX_BRANDING_FILES)) $(DIST)/branding/
+#	$(NSINSTALL) -D $(DIST)/install
+#endif
new file mode 100644
--- /dev/null
+++ b/branding/nightly/configure.sh
@@ -0,0 +1,1 @@
+MOZ_APP_DISPLAYNAME=Fennec
new file mode 100644
--- /dev/null
+++ b/branding/nightly/locales/Makefile.in
@@ -0,0 +1,47 @@
+# ***** 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 the Mozilla Browser code.
+#
+# The Initial Developer of the Original Code is
+# Benjamin Smedberg <benjamin@smedbergs.us>
+# Portions created by the Initial Developer are Copyright (C) 2004
+# the Initial Developer. All Rights Reserved.
+#
+# Contributor(s):
+#
+# 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 *****
+
+DEPTH          = ../../../..
+topsrcdir      = @top_srcdir@
+srcdir         = @srcdir@
+VPATH          = @srcdir@
+relativesrcdir = mobile/branding/nightly/locales
+
+include $(DEPTH)/config/autoconf.mk
+
+DEFINES += -DAB_CD=$(AB_CD)
+
+include $(topsrcdir)/config/rules.mk
rename from locales/en-US/chrome/brand/brand.dtd
rename to branding/nightly/locales/en-US/brand.dtd
--- a/locales/en-US/chrome/brand/brand.dtd
+++ b/branding/nightly/locales/en-US/brand.dtd
@@ -1,3 +1,4 @@
 <!ENTITY  brandShortName  "Fennec">
-<!ENTITY  brandFullName   "Fennec">
+<!ENTITY  brandFullName   "Mozilla Fennec">
+<!ENTITY  vendorShortName "Mozilla">
 <!ENTITY  logoCopyright   "">
rename from locales/en-US/chrome/brand/brand.properties
rename to branding/nightly/locales/en-US/brand.properties
new file mode 100644
--- /dev/null
+++ b/branding/nightly/locales/jar.mn
@@ -0,0 +1,7 @@
+#filter substitution
+
+@AB_CD@.jar:
+% locale branding @AB_CD@ %locale/branding/
+# Nightly branding only exists in en-US
+  locale/branding/brand.dtd        (en-US/brand.dtd)
+* locale/branding/brand.properties (en-US/brand.properties)
new file mode 100644
--- /dev/null
+++ b/branding/official/Makefile.in
@@ -0,0 +1,63 @@
+# ***** 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 mozilla.org code.
+#
+# The Initial Developer of the Original Code is Mozilla Corporation.
+# Portions created by the Initial Developer are Copyright (C) 2009
+# the Initial Developer. All Rights Reserved.
+#
+# Contributor(s):
+#   Justin Dolske <dolske@mozilla.com> (original author)
+#
+# 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 *****
+
+DEPTH = ../../..
+topsrcdir = @top_srcdir@
+srcdir = @srcdir@
+VPATH = @srcdir@
+
+include $(DEPTH)/config/autoconf.mk
+
+DIRS = \
+	locales \
+	$(NULL)
+
+include $(topsrcdir)/config/rules.mk
+
+#LINUX_BRANDING_FILES = \
+#	default16.png \
+#	default32.png \
+#	default48.png \
+#	document.png \
+#	mozicon128.png \
+#	$(NULL)
+#
+#export::
+#	$(NSINSTALL) -D $(DIST)/branding
+#ifeq ($(MOZ_WIDGET_TOOLKIT),gtk2)
+#	cp $(addprefix $(srcdir)/, $(LINUX_BRANDING_FILES)) $(DIST)/branding/
+#	$(NSINSTALL) -D $(DIST)/install
+#endif
new file mode 100644
--- /dev/null
+++ b/branding/official/configure.sh
@@ -0,0 +1,1 @@
+MOZ_APP_DISPLAYNAME=Fennec
new file mode 100644
--- /dev/null
+++ b/branding/official/locales/Makefile.in
@@ -0,0 +1,47 @@
+# ***** 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 the Mozilla Browser code.
+#
+# The Initial Developer of the Original Code is
+# Benjamin Smedberg <benjamin@smedbergs.us>
+# Portions created by the Initial Developer are Copyright (C) 2004
+# the Initial Developer. All Rights Reserved.
+#
+# Contributor(s):
+#
+# 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 *****
+
+DEPTH          = ../../../..
+topsrcdir      = @top_srcdir@
+srcdir         = @srcdir@
+VPATH          = @srcdir@
+relativesrcdir = mobile/branding/official/locales
+
+include $(DEPTH)/config/autoconf.mk
+
+DEFINES += -DAB_CD=$(AB_CD)
+
+include $(topsrcdir)/config/rules.mk
new file mode 100644
--- /dev/null
+++ b/branding/official/locales/en-US/brand.dtd
@@ -0,0 +1,4 @@
+<!ENTITY  brandShortName  "Firefox">
+<!ENTITY  brandFullName   "Mozilla Firefox">
+<!ENTITY  vendorShortName "Mozilla">
+<!ENTITY  logoCopyright   "Firefox and the Firefox logos are trademarks of the Mozilla Foundation. All rights reserved.">
new file mode 100644
--- /dev/null
+++ b/branding/official/locales/en-US/brand.properties
@@ -0,0 +1,2 @@
+brandShortName=Firefox
+brandFullName=Firefox
new file mode 100644
--- /dev/null
+++ b/branding/official/locales/jar.mn
@@ -0,0 +1,6 @@
+#filter substitution
+
+@AB_CD@.jar:
+% locale branding @AB_CD@ %locale/branding/
+  locale/branding/brand.dtd        (%brand.dtd)
+* locale/branding/brand.properties (%brand.properties)
--- a/build.mk
+++ b/build.mk
@@ -37,16 +37,17 @@
 
 TIERS += app
 
 ifdef MOZ_EXTENSIONS
 tier_app_dirs += extensions
 endif
 
 tier_app_dirs += \
+  $(MOZ_BRANDING_DIRECTORY) \
   mobile \
   $(NULL)
 
 ifdef ENABLE_TESTS
 tier_testharness_dirs += \
   testing/mochitest \
   $(NULL)
 endif
--- a/confvars.sh
+++ b/confvars.sh
@@ -31,17 +31,20 @@
 # 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 *****
 
 MOZ_APP_NAME=fennec
-MOZ_APP_DISPLAYNAME=Fennec
+MOZ_BRANDING_DIRECTORY=mobile/branding/nightly
+MOZ_OFFICIAL_BRANDING_DIRECTORY=mobile/branding/official
+# MOZ_APP_DISPLAYNAME is set by branding/configure.sh
+
 case "$target" in
 *-wince)
     MOZ_APP_VERSION=1.0a3
     ;;
 *)
     MOZ_APP_VERSION=1.0b4pre
     ;;
 esac
--- a/locales/Makefile.in
+++ b/locales/Makefile.in
@@ -42,16 +42,21 @@ VPATH     = @srcdir@
 relativesrcdir = mobile/locales
 
 include $(DEPTH)/config/autoconf.mk
 include $(topsrcdir)/config/config.mk
 
 vpath %.xml @srcdir@/en-US/searchplugins
 vpath %.xml $(LOCALE_SRCDIR)/searchplugins
 
+SUBMAKEFILES += \
+        $(DEPTH)/$(MOZ_BRANDING_DIRECTORY)/Makefile \
+        $(DEPTH)/$(MOZ_BRANDING_DIRECTORY)/locales/Makefile \
+        $(NULL)
+
 MOZ_LANGPACK_EID=langpack-$(AB_CD)@firefox-mobile.mozilla.org
 PREF_JS_EXPORTS = $(firstword $(wildcard $(LOCALE_SRCDIR)/mobile-l10n.js) \
                        @srcdir@/en-US/mobile-l10n.js )
 
 SEARCH_PLUGINS = $(shell cat \
   $(firstword $(wildcard $(LOCALE_SRCDIR)/searchplugins/list.txt) \
        @srcdir@/en-US/searchplugins/list.txt ) )
 
@@ -70,16 +75,17 @@ clobber-zip:
 	  $(STAGEDIST)/dictionaries \
 	  $(STAGEDIST)/defaults/profile \
 	  $(STAGEDIST)/chrome/$(AB_CD)
 
 libs-%:
 	$(NSINSTALL) -D $(DIST)/install
 	@$(MAKE) -C ../../toolkit/locales libs-$* BOTH_MANIFESTS=1
 	@$(MAKE) libs AB_CD=$* XPI_NAME=locale-$* PREF_DIR=defaults/preferences BOTH_MANIFESTS=1
+	@$(MAKE) -C $(DEPTH)/$(MOZ_BRANDING_DIRECTORY)/locales AB_CD=$* XPI_NAME=locale-$* BOTH_MANIFESTS=1
 
 # This is a generic target that will make a langpack and repack tarball
 # builds. It is called from the tinderbox scripts. Alter it with caution.
 
 installers-%: clobber-% langpack-% repackage-zip-%
 	@echo "repackaging done"
 
 ifdef MOZ_UPDATER
--- a/locales/jar.mn
+++ b/locales/jar.mn
@@ -7,14 +7,10 @@
   locale/@AB_CD@/browser/browser.properties       (%chrome/browser.properties)
   locale/@AB_CD@/browser/firstrun.dtd             (%chrome/firstrun.dtd)
   locale/@AB_CD@/browser/search.properties        (%chrome/search.properties)
   locale/@AB_CD@/browser/region.properties        (%chrome/region.properties)
   locale/@AB_CD@/browser/preferences.dtd          (%chrome/preferences.dtd)
   locale/@AB_CD@/browser/checkbox.dtd             (%chrome/checkbox.dtd)
   locale/@AB_CD@/browser/notification.dtd         (%chrome/notification.dtd)
   locale/@AB_CD@/browser/prompt.dtd               (%chrome/prompt.dtd)
-# Fennec-specific overrides of generic strings
 * locale/@AB_CD@/browser/netError.dtd             (%chrome/overrides/netError.dtd)
 % override chrome://global/locale/netErrorApp.dtd chrome://browser/locale/netError.dtd
-% locale branding @AB_CD@ %locale/@AB_CD@/branding/
-  locale/@AB_CD@/branding/brand.dtd               (%chrome/brand/brand.dtd)
-  locale/@AB_CD@/branding/brand.properties        (%chrome/brand/brand.properties)
--- a/makefiles.sh
+++ b/makefiles.sh
@@ -31,23 +31,30 @@
 # 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 *****
 
 add_makefiles "
-mobile/Makefile
 mobile/app/Makefile
-mobile/locales/Makefile
+$MOZ_BRANDING_DIRECTORY/Makefile
+$MOZ_BRANDING_DIRECTORY/locales/Makefile
 mobile/chrome/Makefile
-mobile/chrome/branding/Makefile
-mobile/chrome/content/Makefile
+mobile/chrome/tests/Makefile
+mobile/components/Makefile
+mobile/components/phone/Makefile
+mobile/components/protocols/Makefile
 mobile/installer/Makefile
+mobile/locales/Makefile
+mobile/Makefile
+mobile/themes/hildon/Makefile
+mobile/themes/Makefile
+mobile/themes/wince/Makefile
 mobile/installer/debian/changelog
 mobile/installer/debian/compat
 mobile/installer/debian/fennec.desktop
 mobile/installer/debian/fennec.links
 mobile/installer/debian/fennec.service
 mobile/installer/debian/files
 mobile/installer/debian/icon_base64
 mobile/installer/debian/menu