From 773a91bb80218b7cc1f53854d9ac9bb63ac5d84d Mon Sep 17 00:00:00 2001 From: Gavin Sharp Date: Sun, 6 Sep 2009 14:53:04 -0400 Subject: [PATCH] Bug 439453: add --enable-official-branding support to Fennec, r=mfinkle --HG-- rename : mobile/locales/en-US/chrome/brand/brand.dtd => mobile/branding/nightly/locales/en-US/brand.dtd rename : mobile/locales/en-US/chrome/brand/brand.properties => mobile/branding/nightly/locales/en-US/brand.properties extra : rebase_source : 90adf10b406a3f5da3d9e7d8c66baf01ce4c9c31 --- mobile/branding/nightly/Makefile.in | 63 +++++++++++++++++++ mobile/branding/nightly/configure.sh | 1 + mobile/branding/nightly/locales/Makefile.in | 47 ++++++++++++++ .../branding/nightly/locales/en-US/brand.dtd | 4 ++ .../nightly/locales/en-US}/brand.properties | 0 mobile/branding/nightly/locales/jar.mn | 7 +++ mobile/branding/official/Makefile.in | 63 +++++++++++++++++++ mobile/branding/official/configure.sh | 1 + mobile/branding/official/locales/Makefile.in | 47 ++++++++++++++ .../branding/official/locales/en-US/brand.dtd | 4 ++ .../official/locales/en-US/brand.properties | 2 + mobile/branding/official/locales/jar.mn | 6 ++ mobile/build.mk | 1 + mobile/confvars.sh | 5 +- mobile/locales/Makefile.in | 6 ++ mobile/locales/en-US/chrome/brand/brand.dtd | 3 - mobile/locales/jar.mn | 4 -- mobile/makefiles.sh | 15 +++-- 18 files changed, 267 insertions(+), 12 deletions(-) create mode 100644 mobile/branding/nightly/Makefile.in create mode 100644 mobile/branding/nightly/configure.sh create mode 100644 mobile/branding/nightly/locales/Makefile.in create mode 100644 mobile/branding/nightly/locales/en-US/brand.dtd rename mobile/{locales/en-US/chrome/brand => branding/nightly/locales/en-US}/brand.properties (100%) create mode 100644 mobile/branding/nightly/locales/jar.mn create mode 100644 mobile/branding/official/Makefile.in create mode 100644 mobile/branding/official/configure.sh create mode 100644 mobile/branding/official/locales/Makefile.in create mode 100644 mobile/branding/official/locales/en-US/brand.dtd create mode 100644 mobile/branding/official/locales/en-US/brand.properties create mode 100644 mobile/branding/official/locales/jar.mn delete mode 100644 mobile/locales/en-US/chrome/brand/brand.dtd diff --git a/mobile/branding/nightly/Makefile.in b/mobile/branding/nightly/Makefile.in new file mode 100644 index 00000000000..860a11e189e --- /dev/null +++ b/mobile/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 (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 diff --git a/mobile/branding/nightly/configure.sh b/mobile/branding/nightly/configure.sh new file mode 100644 index 00000000000..dcc4f4a76ef --- /dev/null +++ b/mobile/branding/nightly/configure.sh @@ -0,0 +1 @@ +MOZ_APP_DISPLAYNAME=Fennec diff --git a/mobile/branding/nightly/locales/Makefile.in b/mobile/branding/nightly/locales/Makefile.in new file mode 100644 index 00000000000..fd37ba4097c --- /dev/null +++ b/mobile/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 +# 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 diff --git a/mobile/branding/nightly/locales/en-US/brand.dtd b/mobile/branding/nightly/locales/en-US/brand.dtd new file mode 100644 index 00000000000..09c0e59d01f --- /dev/null +++ b/mobile/branding/nightly/locales/en-US/brand.dtd @@ -0,0 +1,4 @@ + + + + diff --git a/mobile/locales/en-US/chrome/brand/brand.properties b/mobile/branding/nightly/locales/en-US/brand.properties similarity index 100% rename from mobile/locales/en-US/chrome/brand/brand.properties rename to mobile/branding/nightly/locales/en-US/brand.properties diff --git a/mobile/branding/nightly/locales/jar.mn b/mobile/branding/nightly/locales/jar.mn new file mode 100644 index 00000000000..de3d979b775 --- /dev/null +++ b/mobile/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) diff --git a/mobile/branding/official/Makefile.in b/mobile/branding/official/Makefile.in new file mode 100644 index 00000000000..860a11e189e --- /dev/null +++ b/mobile/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 (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 diff --git a/mobile/branding/official/configure.sh b/mobile/branding/official/configure.sh new file mode 100644 index 00000000000..dcc4f4a76ef --- /dev/null +++ b/mobile/branding/official/configure.sh @@ -0,0 +1 @@ +MOZ_APP_DISPLAYNAME=Fennec diff --git a/mobile/branding/official/locales/Makefile.in b/mobile/branding/official/locales/Makefile.in new file mode 100644 index 00000000000..6baeb636634 --- /dev/null +++ b/mobile/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 +# 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 diff --git a/mobile/branding/official/locales/en-US/brand.dtd b/mobile/branding/official/locales/en-US/brand.dtd new file mode 100644 index 00000000000..59e368d8862 --- /dev/null +++ b/mobile/branding/official/locales/en-US/brand.dtd @@ -0,0 +1,4 @@ + + + + diff --git a/mobile/branding/official/locales/en-US/brand.properties b/mobile/branding/official/locales/en-US/brand.properties new file mode 100644 index 00000000000..99c5bbbe846 --- /dev/null +++ b/mobile/branding/official/locales/en-US/brand.properties @@ -0,0 +1,2 @@ +brandShortName=Firefox +brandFullName=Firefox diff --git a/mobile/branding/official/locales/jar.mn b/mobile/branding/official/locales/jar.mn new file mode 100644 index 00000000000..0ba09759c1a --- /dev/null +++ b/mobile/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) diff --git a/mobile/build.mk b/mobile/build.mk index 340420f2843..e08f944e1d2 100644 --- a/mobile/build.mk +++ b/mobile/build.mk @@ -42,6 +42,7 @@ tier_app_dirs += extensions endif tier_app_dirs += \ + $(MOZ_BRANDING_DIRECTORY) \ mobile \ $(NULL) diff --git a/mobile/confvars.sh b/mobile/confvars.sh index f5da96a1afb..f84bf5e961e 100644 --- a/mobile/confvars.sh +++ b/mobile/confvars.sh @@ -36,7 +36,10 @@ # ***** 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 diff --git a/mobile/locales/Makefile.in b/mobile/locales/Makefile.in index f63c814229b..084b9988110 100644 --- a/mobile/locales/Makefile.in +++ b/mobile/locales/Makefile.in @@ -47,6 +47,11 @@ 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 ) @@ -75,6 +80,7 @@ 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. diff --git a/mobile/locales/en-US/chrome/brand/brand.dtd b/mobile/locales/en-US/chrome/brand/brand.dtd deleted file mode 100644 index d1349471600..00000000000 --- a/mobile/locales/en-US/chrome/brand/brand.dtd +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/mobile/locales/jar.mn b/mobile/locales/jar.mn index b82b48a1029..0b2fb64b44a 100644 --- a/mobile/locales/jar.mn +++ b/mobile/locales/jar.mn @@ -12,9 +12,5 @@ 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) diff --git a/mobile/makefiles.sh b/mobile/makefiles.sh index 2d211217877..1ad5fdd50b5 100644 --- a/mobile/makefiles.sh +++ b/mobile/makefiles.sh @@ -36,13 +36,20 @@ # ***** 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