Bug 504953 - Clean up firefox branding in the build system. r=benjamin
authorJustin Dolske <dolske@mozilla.com>
Thu, 23 Jul 2009 17:35:49 -0700
changeset 30627 af248748c7ea7635d4997504a487199d0c0d3296
parent 30626 6004e947157b74c28287a17027693913b8790479
child 30628 b6be3fee64d073dae1c9ee74b9a367aeb7a8be07
push id1
push userroot
push dateTue, 26 Apr 2011 22:38:44 +0000
treeherdermozilla-beta@bfdb6e623a36 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbenjamin
bugs504953
milestone1.9.2a1pre
Bug 504953 - Clean up firefox branding in the build system. r=benjamin
browser/Makefile.in
browser/app/Makefile.in
browser/app/default16.png
browser/app/default32.png
browser/app/default48.png
browser/app/document-os2.ico
browser/app/document.ico
browser/app/document.png
browser/app/firefox-branding.js
browser/app/firefox-os2.ico
browser/app/firefox.ico
browser/app/macbuild/background.png
browser/app/macbuild/disk.icns
browser/app/macbuild/document.icns
browser/app/macbuild/dsstore
browser/app/macbuild/firefox.icns
browser/app/mozicon128.png
browser/app/splash.bmp
browser/base/Makefile.in
browser/base/branding/about.png
browser/base/branding/aboutCredits.png
browser/base/branding/aboutFooter.png
browser/base/branding/icon48.png
browser/base/branding/icon64.png
browser/base/content/browserconfig.properties
browser/base/content/old-homepage-default.properties
browser/base/jar.mn
browser/branding/nightly/Makefile.in
browser/branding/nightly/background.png
browser/branding/nightly/branding.nsi
browser/branding/nightly/configure.sh
browser/branding/nightly/content/Makefile.in
browser/branding/nightly/content/about.png
browser/branding/nightly/content/aboutCredits.png
browser/branding/nightly/content/aboutFooter.png
browser/branding/nightly/content/icon48.png
browser/branding/nightly/content/icon64.png
browser/branding/nightly/content/jar.mn
browser/branding/nightly/default16.png
browser/branding/nightly/default32.png
browser/branding/nightly/default48.png
browser/branding/nightly/disk.icns
browser/branding/nightly/document-os2.ico
browser/branding/nightly/document.icns
browser/branding/nightly/document.ico
browser/branding/nightly/document.png
browser/branding/nightly/dsstore
browser/branding/nightly/firefox-os2.ico
browser/branding/nightly/firefox.icns
browser/branding/nightly/firefox.ico
browser/branding/nightly/locales/Makefile.in
browser/branding/nightly/locales/browserconfig.properties
browser/branding/nightly/locales/en-US/brand.dtd
browser/branding/nightly/locales/en-US/brand.properties
browser/branding/nightly/locales/jar.mn
browser/branding/nightly/mozicon128.png
browser/branding/nightly/pref/firefox-branding.js
browser/branding/nightly/splash.bmp
browser/branding/nightly/wizHeader.bmp
browser/branding/nightly/wizHeaderRTL.bmp
browser/branding/nightly/wizWatermark.bmp
browser/branding/unofficial/Makefile.in
browser/branding/unofficial/configure.sh
browser/branding/unofficial/dsstore
browser/branding/unofficial/locales/jar.mn
browser/build.mk
browser/installer/unix/packages-static
browser/installer/windows/Makefile.in
browser/installer/windows/nsis/branding.nsi
browser/installer/windows/packages-static
browser/installer/windows/wizHeader.bmp
browser/installer/windows/wizHeaderRTL.bmp
browser/installer/windows/wizWatermark.bmp
browser/locales/Makefile.in
browser/locales/en-US/chrome/branding/brand.dtd
browser/locales/en-US/chrome/branding/brand.properties
browser/locales/jar.mn
browser/makefiles.sh
configure.in
other-licenses/branding/firefox/Makefile.in
other-licenses/branding/firefox/branding.nsi
other-licenses/branding/firefox/configure.sh
other-licenses/branding/firefox/dsstore
other-licenses/branding/firefox/locales/Makefile.in
other-licenses/branding/firefox/locales/old-homepage-default.properties
--- a/browser/Makefile.in
+++ b/browser/Makefile.in
@@ -49,19 +49,16 @@ ifdef MOZ_INSTALLER
 DIRS += installer/windows
 endif
 endif
 
 include $(topsrcdir)/config/rules.mk
 
 ifeq ($(OS_ARCH),WINNT)
 ifdef MOZ_INSTALLER
-ifdef MOZ_BRANDING_DIRECTORY
-DEFINES += -DOFFICIAL_BRANDING=1
-endif
 
 # For Windows build the uninstaller during the application build since the
 # uninstaller is included with the application for mar file generation.
 libs::
 	$(MAKE) -C installer/windows uninstaller
 
 endif
 endif
--- a/browser/app/Makefile.in
+++ b/browser/app/Makefile.in
@@ -46,19 +46,16 @@ VPATH		= @srcdir@
 include $(DEPTH)/config/autoconf.mk
 
 DIRS		= profile/extensions
 
 PREF_JS_EXPORTS = $(srcdir)/profile/firefox.js \
 		  $(srcdir)/profile/channel-prefs.js \
 		  $(NULL)
 
-ifndef MOZ_BRANDING_DIRECTORY
-PREF_JS_EXPORTS += $(srcdir)/firefox-branding.js
-endif
 
 # hardcode en-US for the moment
 AB_CD = en-US
 
 DEFINES += -DAB_CD=$(AB_CD)
 
 APP_VERSION = $(shell cat $(srcdir)/../config/version.txt)
 DEFINES += -DAPP_VERSION="$(APP_VERSION)"
@@ -221,17 +218,17 @@ RESFILE=splashos2.res
 RCFLAGS += -DMOZ_PHOENIX
 ifdef BUILD_STATIC_LIBS
 EXE_DEF_FILE = browser.def
 RCFLAGS += -DMOZ_STATIC_BUILD -i $(DIST)/include/widget
 endif
 ifdef DEBUG
 RCFLAGS += -DDEBUG
 endif
-RCFLAGS += -DFIREFOX_ICO=\"$(DIST)/branding/firefox.ico\" -DDOCUMENT_ICO=\"$(DIST)/branding/document.ico\"
+RCFLAGS += -DFIREFOX_ICO=\"$(DIST)/branding/firefox-os2.ico\" -DDOCUMENT_ICO=\"$(DIST)/branding/document-os2.ico\"
 endif
 
 include $(topsrcdir)/config/rules.mk
 
 DEFINES += -DFIREFOX_ICO=\"$(DIST)/branding/firefox.ico\" -DDOCUMENT_ICO=\"$(DIST)/branding/document.ico\"
 
 ifdef MOZILLA_OFFICIAL
 DEFINES += -DMOZILLA_OFFICIAL
@@ -294,78 +291,32 @@ install:: $(MOZ_APP_NAME)
 
 GARBAGE += $(MOZ_APP_NAME)
 GARBAGE += $(addprefix $(DIST)/bin/defaults/pref/, firefox.js)
 
 endif
 
 endif # LIBXUL_SDK
 
-ifneq (,$(filter gtk2,$(MOZ_WIDGET_TOOLKIT)))
-
-ICON_FILES	= \
-		$(DIST)/branding/mozicon128.png \
-		$(DIST)/branding/document.png \
-		$(NULL)
-
-libs:: $(ICON_FILES)
-	$(INSTALL) $(IFLAGS1) $^ $(DIST)/bin/icons
-
-install::
-	$(SYSINSTALL) $(IFLAGS1) $(ICON_FILES) $(DESTDIR)$(mozappdir)/icons
+ifeq ($(MOZ_WIDGET_TOOLKIT),gtk2)
+libs::
+	$(INSTALL) $(IFLAGS1) $(DIST)/branding/mozicon128.png $(DIST)/bin/icons
+	$(INSTALL) $(IFLAGS1) $(DIST)/branding/document.png   $(DIST)/bin/icons
+	$(INSTALL) $(IFLAGS1) $(DIST)/branding/default16.png  $(DIST)/bin/chrome/icons/default
+	$(INSTALL) $(IFLAGS1) $(DIST)/branding/default32.png  $(DIST)/bin/chrome/icons/default
+	$(INSTALL) $(IFLAGS1) $(DIST)/branding/default48.png  $(DIST)/bin/chrome/icons/default
 endif
 
-ifeq ($(MOZ_WIDGET_TOOLKIT),gtk2)
-libs::
-	$(INSTALL) $(IFLAGS1) $(DIST)/branding/default16.png $(DIST)/bin/chrome/icons/default
-	$(INSTALL) $(IFLAGS1) $(DIST)/branding/default32.png $(DIST)/bin/chrome/icons/default
-	$(INSTALL) $(IFLAGS1) $(DIST)/branding/default48.png $(DIST)/bin/chrome/icons/default
-endif
-#ifdef MOZ_SPLASHSCREEN
+ifdef MOZ_SPLASHSCREEN
 ifeq ($(MOZ_WIDGET_TOOLKIT),windows)
 libs::
 	$(INSTALL) $(IFLAGS1) $(DIST)/branding/splash.bmp $(DIST)/bin
 endif
-#endif
+endif
 
-export::
-ifndef MOZ_BRANDING_DIRECTORY
-	$(NSINSTALL) -D $(DIST)/branding
-ifneq (,$(filter WINNT WINCE,$(OS_ARCH)))
-	cp $(srcdir)/firefox.ico   $(DIST)/branding/firefox.ico
-	cp $(srcdir)/firefox.ico   $(DIST)/branding/app.ico
-	cp $(srcdir)/document.ico  $(DIST)/branding/document.ico
-endif
-ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
-	cp $(srcdir)/macbuild/firefox.icns  $(DIST)/branding/firefox.icns
-	cp $(srcdir)/macbuild/document.icns  $(DIST)/branding/document.icns
-	cp $(srcdir)/macbuild/dsstore $(DIST)/branding/dsstore
-	cp $(srcdir)/macbuild/background.png $(DIST)/branding/background.png
-	cp $(srcdir)/macbuild/disk.icns $(DIST)/branding/disk.icns
-endif
-ifneq (,$(filter gtk2,$(MOZ_WIDGET_TOOLKIT)))
-	cp $(srcdir)/mozicon128.png $(DIST)/branding/mozicon128.png
-	cp $(srcdir)/document.png $(DIST)/branding/document.png
-endif
-ifeq ($(MOZ_WIDGET_TOOLKIT),gtk2)
-	cp $(srcdir)/default16.png   $(DIST)/branding/default16.png
-	cp $(srcdir)/default32.png   $(DIST)/branding/default32.png
-	cp $(srcdir)/default48.png   $(DIST)/branding/default48.png
-endif
-ifeq ($(OS_ARCH),OS2)
-	cp $(srcdir)/firefox-os2.ico   $(DIST)/branding/firefox.ico
-	cp $(srcdir)/firefox-os2.ico   $(DIST)/branding/app.ico
-	cp $(srcdir)/document-os2.ico  $(DIST)/branding/document.ico
-endif
-#ifdef MOZ_SPLASHSCREEN
-ifeq ($(MOZ_WIDGET_TOOLKIT),windows)
-	cp $(srcdir)/splash.bmp        $(DIST)/branding/splash.bmp
-endif
-#endif
-endif
 
 libs::
 	touch $(DIST)/bin/.autoreg
 
 libs:: $(srcdir)/profile/prefs.js
 	$(INSTALL) $(IFLAGS1) $^ $(DIST)/bin/defaults/profile
 
 libs:: $(srcdir)/blocklist.xml
--- a/browser/base/Makefile.in
+++ b/browser/base/Makefile.in
@@ -59,38 +59,24 @@ PRE_RELEASE_SUFFIX := $(shell $(PYTHON) 
                         $(shell cat $(srcdir)/../config/version.txt))
 
 DEFINES += \
 	-DMOZ_APP_VERSION=$(MOZ_APP_VERSION) \
 	-DAPP_LICENSE_BLOCK=$(abs_srcdir)/content/overrides/app-license.html \
 	-DPRE_RELEASE_SUFFIX="$(PRE_RELEASE_SUFFIX)" \
 	$(NULL)
 
-ifndef MOZ_BRANDING_DIRECTORY
-DEFINES += -DMOZ_USE_GENERIC_BRANDING
-endif
-
 ifneq (,$(filter windows gtk2 mac cocoa, $(MOZ_WIDGET_TOOLKIT)))
 DEFINES += -DHAVE_SHELL_SERVICE=1
 endif
 
 ifdef MOZ_UPDATER
 DEFINES += -DMOZ_UPDATER=1
 endif
 
-ifndef MOZ_BRANDING_DIRECTORY
-libs locale::
-	$(SYSINSTALL) $(IFLAGS1) $(srcdir)/content/browserconfig.properties $(DIST)/bin
-	$(SYSINSTALL) $(IFLAGS1) $(srcdir)/content/old-homepage-default.properties $(DIST)/bin
-
-install::
-	$(SYSINSTALL) $(IFLAGS1) $(srcdir)/content/browserconfig.properties $(DESTDIR)$(mozappdir)
-	$(SYSINSTALL) $(IFLAGS1) $(srcdir)/content/old-homepage-default.properties $(DESTDIR)$(mozappdir)
-endif
-
 ifneq (,$(filter windows mac cocoa gtk2, $(MOZ_WIDGET_TOOLKIT)))
 ifneq ($(OS_ARCH),WINCE)
 DEFINES += -DCONTEXT_COPY_IMAGE_CONTENTS=1
 endif
 endif
 
 ifdef MOZILLA_OFFICIAL
 DEFINES += -DOFFICIAL_BUILD=1
deleted file mode 100644
--- a/browser/base/content/old-homepage-default.properties
+++ /dev/null
@@ -1,2 +0,0 @@
-# Do NOT localize or otherwise change these values
-browser.startup.homepage=http://www.mozilla.org/projects/bonecho/
--- a/browser/base/jar.mn
+++ b/browser/base/jar.mn
@@ -55,19 +55,11 @@ browser.jar:
 #ifdef XP_MACOSX
 *       content/browser/macBrowserOverlay.xul         (content/macBrowserOverlay.xul)
 *       content/browser/downloadManagerOverlay.xul    (content/downloadManagerOverlay.xul)
 *       content/browser/extensionsManagerOverlay.xul  (content/extensionsManagerOverlay.xul)
 *       content/browser/jsConsoleOverlay.xul          (content/jsConsoleOverlay.xul)
 *       content/browser/softwareUpdateOverlay.xul  (content/softwareUpdateOverlay.xul)
 #endif
 *       content/browser/viewSourceOverlay.xul         (content/viewSourceOverlay.xul)
-#ifdef MOZ_USE_GENERIC_BRANDING
-% content branding %content/branding/ xpcnativewrappers=yes
-  content/branding/about.png                     (branding/about.png)
-  content/branding/aboutCredits.png              (branding/aboutCredits.png)
-  content/branding/aboutFooter.png               (branding/aboutFooter.png)
-  content/branding/icon48.png                    (branding/icon48.png)
-  content/branding/icon64.png                    (branding/icon64.png)
-#endif
 # the following files are browser-specific overrides
 *       content/browser/license.html                  (/toolkit/content/license.html)
 % override chrome://global/content/license.html chrome://browser/content/license.html
new file mode 100644
--- /dev/null
+++ b/browser/branding/nightly/Makefile.in
@@ -0,0 +1,101 @@
+# ***** 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 = \
+	content \
+	locales \
+	$(NULL)
+
+PREF_JS_EXPORTS = $(srcdir)/pref/firefox-branding.js
+
+include $(topsrcdir)/config/rules.mk
+
+WINDOWS_BRANDING_FILES = \
+	firefox.ico \
+	document.ico \
+	branding.nsi \
+	wizHeader.bmp \
+	wizHeaderRTL.bmp \
+	wizWatermark.bmp \
+	$(NULL)
+
+ifdef MOZ_SPLASHSCREEN
+WINDOWS_BRANDING_FILES += splash.bmp
+endif
+
+OSX_BRANDING_FILES = \
+	background.png \
+	firefox.icns \
+	disk.icns \
+	document.icns \
+	dsstore \
+	$(NULL)
+
+LINUX_BRANDING_FILES = \
+	default16.png \
+	default32.png \
+	default48.png \
+	document.png \
+	mozicon128.png \
+	$(NULL)
+
+OS2_BRANDING_FILES = \
+	firefox-os2.ico \
+	document-os2.ico \
+	$(NULL)
+
+export::
+	$(NSINSTALL) -D $(DIST)/branding
+ifeq ($(MOZ_WIDGET_TOOLKIT),windows)
+	cp $(addprefix $(srcdir)/, $(WINDOWS_BRANDING_FILES)) $(DIST)/branding/
+endif
+ifeq ($(MOZ_WIDGET_TOOLKIT),cocoa)
+	cp $(addprefix $(srcdir)/, $(OSX_BRANDING_FILES)) $(DIST)/branding/
+endif
+ifeq ($(MOZ_WIDGET_TOOLKIT),gtk2)
+	cp $(addprefix $(srcdir)/, $(LINUX_BRANDING_FILES)) $(DIST)/branding/
+	$(NSINSTALL) -D $(DIST)/install
+endif
+ifeq ($(OS_ARCH),OS2)
+	cp $(addprefix $(srcdir)/, $(OS2_BRANDING_FILES)) $(DIST)/branding/
+endif
rename from browser/app/macbuild/background.png
rename to browser/branding/nightly/background.png
rename from browser/installer/windows/nsis/branding.nsi
rename to browser/branding/nightly/branding.nsi
old mode 100755
new mode 100644
new file mode 100644
--- /dev/null
+++ b/browser/branding/nightly/content/Makefile.in
@@ -0,0 +1,11 @@
+# Branding Makefile
+#  - jars chrome artwork
+
+DEPTH = ../../../..
+topsrcdir = @top_srcdir@
+srcdir = @srcdir@
+VPATH = @srcdir@
+
+include $(DEPTH)/config/autoconf.mk
+
+include $(topsrcdir)/config/rules.mk
rename from browser/base/branding/about.png
rename to browser/branding/nightly/content/about.png
rename from browser/base/branding/aboutCredits.png
rename to browser/branding/nightly/content/aboutCredits.png
rename from browser/base/branding/aboutFooter.png
rename to browser/branding/nightly/content/aboutFooter.png
rename from browser/base/branding/icon48.png
rename to browser/branding/nightly/content/icon48.png
rename from browser/base/branding/icon64.png
rename to browser/branding/nightly/content/icon64.png
new file mode 100644
--- /dev/null
+++ b/browser/branding/nightly/content/jar.mn
@@ -0,0 +1,7 @@
+browser.jar:
+% content branding %content/branding/ xpcnativewrappers=yes
+  content/branding/about.png                     (about.png)
+  content/branding/aboutCredits.png              (aboutCredits.png)
+  content/branding/aboutFooter.png               (aboutFooter.png)
+  content/branding/icon48.png                    (icon48.png)
+  content/branding/icon64.png                    (icon64.png)
rename from browser/app/default16.png
rename to browser/branding/nightly/default16.png
rename from browser/app/default32.png
rename to browser/branding/nightly/default32.png
rename from browser/app/default48.png
rename to browser/branding/nightly/default48.png
rename from browser/app/macbuild/disk.icns
rename to browser/branding/nightly/disk.icns
rename from browser/app/document-os2.ico
rename to browser/branding/nightly/document-os2.ico
rename from browser/app/macbuild/document.icns
rename to browser/branding/nightly/document.icns
rename from browser/app/document.ico
rename to browser/branding/nightly/document.ico
rename from browser/app/document.png
rename to browser/branding/nightly/document.png
old mode 100755
new mode 100644
rename from browser/app/macbuild/dsstore
rename to browser/branding/nightly/dsstore
rename from browser/app/firefox-os2.ico
rename to browser/branding/nightly/firefox-os2.ico
rename from browser/app/macbuild/firefox.icns
rename to browser/branding/nightly/firefox.icns
rename from browser/app/firefox.ico
rename to browser/branding/nightly/firefox.ico
new file mode 100644
--- /dev/null
+++ b/browser/branding/nightly/locales/Makefile.in
@@ -0,0 +1,55 @@
+# ***** 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 = browser/branding/nightly/locales
+
+include $(DEPTH)/config/autoconf.mk
+
+DEFINES += -DAB_CD=$(AB_CD) -DMOZ_DISTRIBUTION_ID_UNQUOTED=$(MOZ_DISTRIBUTION_ID)
+
+include $(topsrcdir)/config/rules.mk
+
+libs::
+	@$(PYTHON) $(topsrcdir)/config/Preprocessor.py $(DEFINES) $(ACDEFINES) \
+	  $(srcdir)/browserconfig.properties > $(FINAL_TARGET)/browserconfig.properties
+
+install::
+	@$(PYTHON) $(topsrcdir)/config/Preprocessor.py $(DEFINES) $(ACDEFINES) \
+	  $(srcdir)/browserconfig.properties > $(DESTDIR)$(mozappdir)/browserconfig.properties
rename from browser/base/content/browserconfig.properties
rename to browser/branding/nightly/locales/browserconfig.properties
rename from browser/locales/en-US/chrome/branding/brand.dtd
rename to browser/branding/nightly/locales/en-US/brand.dtd
rename from browser/locales/en-US/chrome/branding/brand.properties
rename to browser/branding/nightly/locales/en-US/brand.properties
new file mode 100644
--- /dev/null
+++ b/browser/branding/nightly/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)
rename from browser/app/mozicon128.png
rename to browser/branding/nightly/mozicon128.png
rename from browser/app/firefox-branding.js
rename to browser/branding/nightly/pref/firefox-branding.js
rename from browser/app/splash.bmp
rename to browser/branding/nightly/splash.bmp
rename from browser/installer/windows/wizHeader.bmp
rename to browser/branding/nightly/wizHeader.bmp
rename from browser/installer/windows/wizHeaderRTL.bmp
rename to browser/branding/nightly/wizHeaderRTL.bmp
rename from browser/installer/windows/wizWatermark.bmp
rename to browser/branding/nightly/wizWatermark.bmp
--- a/browser/branding/unofficial/Makefile.in
+++ b/browser/branding/unofficial/Makefile.in
@@ -1,12 +1,43 @@
-# Branding Makefile
-#  - jars chrome artwork
-#  - copies artwork to appropriate places in objdir for bundling into app 
-#    resources
+# ***** 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
 
@@ -14,50 +45,57 @@ DIRS = \
 	content \
 	locales \
 	$(NULL)
 
 PREF_JS_EXPORTS = $(srcdir)/pref/firefox-branding.js
 
 include $(topsrcdir)/config/rules.mk
 
-BROWSER_APP_FILES = \
+WINDOWS_BRANDING_FILES = \
+	firefox.ico \
+	document.ico \
+	branding.nsi \
+	wizHeader.bmp \
+	wizHeaderRTL.bmp \
+	wizWatermark.bmp \
+	$(NULL)
+
+ifdef MOZ_SPLASHSCREEN
+WINDOWS_BRANDING_FILES += splash.bmp
+endif
+
+OSX_BRANDING_FILES = \
+	background.png \
+	firefox.icns \
+	disk.icns \
+	document.icns \
+	dsstore \
+	$(NULL)
+
+LINUX_BRANDING_FILES = \
 	default16.png \
 	default32.png \
 	default48.png \
+	document.png \
 	mozicon128.png \
-	firefox.ico \
-	document.ico \
+	$(NULL)
+
+OS2_BRANDING_FILES = \
+	firefox-os2.ico \
+	document-os2.ico \
 	$(NULL)
 
 export::
 	$(NSINSTALL) -D $(DIST)/branding
-	cp $(addprefix $(srcdir)/, $(BROWSER_APP_FILES)) $(DIST)/branding/
-ifneq (,$(filter gtk2,$(MOZ_WIDGET_TOOLKIT)))
-	cp $(srcdir)/document.png  $(DIST)/branding/document.png
+ifeq ($(MOZ_WIDGET_TOOLKIT),windows)
+	cp $(addprefix $(srcdir)/, $(WINDOWS_BRANDING_FILES)) $(DIST)/branding/
+endif
+ifeq ($(MOZ_WIDGET_TOOLKIT),cocoa)
+	cp $(addprefix $(srcdir)/, $(OSX_BRANDING_FILES)) $(DIST)/branding/
+endif
+ifeq ($(MOZ_WIDGET_TOOLKIT),gtk2)
+	cp $(addprefix $(srcdir)/, $(LINUX_BRANDING_FILES)) $(DIST)/branding/
 	$(NSINSTALL) -D $(DIST)/install
 endif
-ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
-	cp $(srcdir)/firefox.icns  $(DIST)/branding/firefox.icns
-	cp $(srcdir)/document.icns $(DIST)/branding/document.icns
-	cp $(srcdir)/dsstore $(DIST)/branding/dsstore
-	cp $(srcdir)/background.png $(DIST)/branding/background.png
-	cp $(srcdir)/disk.icns $(DIST)/branding/disk.icns
-endif
-ifneq (,$(filter WINNT WINCE,$(OS_ARCH)))
-	cp $(srcdir)/firefox.ico  $(DIST)/branding/app.ico
+ifeq ($(OS_ARCH),OS2)
+	cp $(addprefix $(srcdir)/, $(OS2_BRANDING_FILES)) $(DIST)/branding/
 endif
-ifeq ($(OS_ARCH),WINNT)
-	cp $(srcdir)/branding.nsi     $(DIST)/branding/branding.nsi
-	cp $(srcdir)/wizHeader.bmp    $(DIST)/branding/wizHeader.bmp
-	cp $(srcdir)/wizHeaderRTL.bmp $(DIST)/branding/wizHeaderRTL.bmp
-	cp $(srcdir)/wizWatermark.bmp $(DIST)/branding/wizWatermark.bmp
-endif
-ifeq ($(OS_ARCH),OS2)
-	cp $(srcdir)/firefox-os2.ico  $(DIST)/branding/firefox.ico
-	cp $(srcdir)/firefox-os2.ico  $(DIST)/branding/app.ico
-	cp $(srcdir)/document-os2.ico  $(DIST)/branding/document.ico
-endif
-#ifdef MOZ_SPLASHSCREEN
-ifeq ($(MOZ_WIDGET_TOOLKIT),windows)
-	cp $(srcdir)/splash.bmp       $(DIST)/branding/splash.bmp
-endif
-#endif
old mode 100755
new mode 100644
old mode 100755
new mode 100644
--- a/browser/branding/unofficial/locales/jar.mn
+++ b/browser/branding/unofficial/locales/jar.mn
@@ -1,7 +1,6 @@
 #filter substitution
 
 @AB_CD@.jar:
 % locale branding @AB_CD@ %locale/branding/
-# Unofficial branding only exists in en-US
-  locale/branding/brand.dtd        (en-US/brand.dtd)
-* locale/branding/brand.properties (en-US/brand.properties)
+  locale/branding/brand.dtd        (%brand.dtd)
+* locale/branding/brand.properties (%brand.properties)
--- a/browser/build.mk
+++ b/browser/build.mk
@@ -40,19 +40,17 @@ include $(topsrcdir)/toolkit/toolkit-tie
 endif
 
 TIERS += app
 
 ifdef MOZ_EXTENSIONS
 tier_app_dirs += extensions
 endif
 
-ifdef MOZ_BRANDING_DIRECTORY
 tier_app_dirs += $(MOZ_BRANDING_DIRECTORY)
-endif
 
 tier_app_dirs += browser
 
 installer:
 	@$(MAKE) -C browser/installer installer
 
 package:
 	@$(MAKE) -C browser/installer
--- a/browser/installer/unix/packages-static
+++ b/browser/installer/unix/packages-static
@@ -14,17 +14,16 @@ bin/.autoreg
 
 [@AB_CD@]
 bin/chrome/@AB_CD@.jar
 bin/chrome/@AB_CD@.manifest
 bin/@PREF_DIR@/firefox-l10n.js
 bin/defaults/existing-profile-defaults.js
 ; If you add a new directory you must explicitly call addDirectory in ab-CD.jst
 bin/browserconfig.properties
-bin/old-homepage-default.properties
 bin/searchplugins/*
 bin/defaults/profile/bookmarks.html
 bin/defaults/profile/localstore.rdf
 bin/defaults/profile/prefs.js
 bin/defaults/profile/mimeTypes.rdf
 bin/defaults/profile/chrome/*
 bin/update.locale
 bin/updater.ini
--- a/browser/installer/windows/Makefile.in
+++ b/browser/installer/windows/Makefile.in
@@ -150,17 +150,8 @@ endif
 	  cat $(MOZILLA_DIR)/toolkit/mozapps/installer/windows/nsis/utf16-le-bom.bin - > \
 	  $(CONFIG_DIR)/defines.nsi
 	$(PERL) $(topsrcdir)/toolkit/mozapps/installer/windows/nsis/preprocess-locale.pl \
 	  $(topsrcdir) $(call EXPAND_LOCALE_SRCDIR,browser/locales)/installer $(AB_CD) \
 	  $(CONFIG_DIR)
 
 include $(topsrcdir)/config/rules.mk
 include $(topsrcdir)/toolkit/mozapps/installer/windows/nsis/makensis.mk
-
-export::
-ifndef MOZ_BRANDING_DIRECTORY
-	$(NSINSTALL) -D $(DIST)/branding
-	cp $(srcdir)/nsis/branding.nsi $(DIST)/branding/branding.nsi
-	cp $(srcdir)/wizHeader.bmp     $(DIST)/branding/wizHeader.bmp
-	cp $(srcdir)/wizHeaderRTL.bmp  $(DIST)/branding/wizHeaderRTL.bmp
-	cp $(srcdir)/wizWatermark.bmp  $(DIST)/branding/wizWatermark.bmp
-endif
--- a/browser/installer/windows/packages-static
+++ b/browser/installer/windows/packages-static
@@ -13,17 +13,16 @@
 bin/.autoreg
 
 [@AB_CD@]
 bin\chrome\@AB_CD@.jar
 bin\chrome\@AB_CD@.manifest
 bin\defaults\pref\firefox-l10n.js
 bin\defaults\existing-profile-defaults.js
 bin\browserconfig.properties
-bin\old-homepage-default.properties
 bin\searchplugins\*
 bin\defaults\profile\bookmarks.html
 bin\defaults\profile\localstore.rdf
 bin\defaults\profile\prefs.js
 bin\defaults\profile\mimeTypes.rdf
 bin\defaults\profile\chrome\*
 bin\uninstall\helper.exe
 bin\update.locale
--- a/browser/locales/Makefile.in
+++ b/browser/locales/Makefile.in
@@ -59,22 +59,20 @@ ifdef LOCALE_MERGEDIR
 vpath book%.inc $(LOCALE_MERGEDIR)/browser/profile
 endif
 vpath book%.inc $(LOCALE_SRCDIR)/profile
 ifdef LOCALE_MERGEDIR
 vpath book%.inc @srcdir@/en-US/profile
 endif
 
 
-ifdef MOZ_BRANDING_DIRECTORY
 SUBMAKEFILES += \
 	$(DEPTH)/$(MOZ_BRANDING_DIRECTORY)/Makefile \
 	$(DEPTH)/$(MOZ_BRANDING_DIRECTORY)/locales/Makefile \
 	$(NULL)
-endif
 
 # This makefile uses variable overrides from the libs-% target to
 # build non-default locales to non-default dist/ locations. Be aware!
 
 APP_VERSION := $(shell cat $(srcdir)/../config/version.txt)
 
 PWD := $(CURDIR)
 
@@ -82,20 +80,16 @@ PWD := $(CURDIR)
 # pulls. You may override them if you provide your own files. You _must_
 # override them when MOZ_PKG_PRETTYNAMES is defined - the defaults will not
 # work in that case.
 ZIP_IN ?= $(_ABS_DIST)/$(PACKAGE)
 WIN32_INSTALLER_IN ?= $(_ABS_DIST)/$(PKG_INST_PATH)$(PKG_INST_BASENAME).exe
 
 MOZ_LANGPACK_EID=langpack-$(AB_CD)@firefox.mozilla.org
 
-ifndef MOZ_BRANDING_DIRECTORY
-DEFINES += -DMOZ_USE_GENERIC_BRANDING
-endif
-
 ifeq (,$(filter-out pref,$(MOZ_EXTENSIONS)))
 DEFINES += -DEXTENSION_PREF
 endif
 
 PREF_JS_EXPORTS = $(firstword $(wildcard $(LOCALE_SRCDIR)/firefox-l10n.js) \
                        $(srcdir)/en-US/firefox-l10n.js )
 
 include $(topsrcdir)/config/rules.mk
@@ -183,37 +177,31 @@ endif
 
 
 libs-%:
 	$(NSINSTALL) -D $(DIST)/install
 	@$(MAKE) -C ../../toolkit/locales libs-$* BOTH_MANIFESTS=1
 	@$(MAKE) -C ../../extensions/reporter/locales libs AB_CD=$* XPI_NAME=locale-$* BOTH_MANIFESTS=1
 	@$(MAKE) -C ../../extensions/spellcheck/locales AB_CD=$* XPI_NAME=locale-$* BOTH_MANIFESTS=1
 	@$(MAKE) libs AB_CD=$* XPI_NAME=locale-$* PREF_DIR=defaults/pref BOTH_MANIFESTS=1
-ifdef MOZ_BRANDING_DIRECTORY
 	@$(MAKE) -C $(DEPTH)/$(MOZ_BRANDING_DIRECTORY)/locales AB_CD=$* XPI_NAME=locale-$* BOTH_MANIFESTS=1
-endif
 	@$(MAKE) tests AB_CD=$*
 
 ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
 MOZ_PKG_MAC_DSSTORE=$(_ABS_DIST)/branding/dsstore
 MOZ_PKG_MAC_BACKGROUND=$(_ABS_DIST)/branding/background.png
 MOZ_PKG_MAC_ICON=$(_ABS_DIST)/branding/disk.icns
 MOZ_PKG_MAC_EXTRA=--symlink "/Applications:/ "
 endif
 
 
 repackage-win32-installer: WIN32_INSTALLER_OUT="$(_ABS_DIST)/$(PKG_INST_PATH)$(PKG_INST_BASENAME).exe"
 repackage-win32-installer: $(WIN32_INSTALLER_IN) $(SUBMAKEFILES)
 	@echo "Repackaging $(WIN32_INSTALLER_IN) into $(WIN32_INSTALLER_OUT)."
-ifdef MOZ_BRANDING_DIRECTORY
 	$(MAKE) -C $(DEPTH)/$(MOZ_BRANDING_DIRECTORY) export
-else
-	$(MAKE) -C ../installer/windows export
-endif
 	if test ! -d $(_ABS_DIST)/$(PKG_INST_PATH); then \
 	  $(NSINSTALL) -D $(_ABS_DIST)/$(PKG_INST_PATH); \
 	fi
 	$(RM) -rf l10n-stage
 	$(NSINSTALL) -D l10n-stage
 	$(CYGWIN_WRAPPER) 7z x -ol10n-stage $(WIN32_INSTALLER_IN)
 	$(RM) -r l10n-stage/localized
 	$(RM) l10n-stage/setup.exe
--- a/browser/locales/jar.mn
+++ b/browser/locales/jar.mn
@@ -70,13 +70,8 @@
     locale/browser-region/region.properties        (%chrome/browser-region/region.properties)
 # the following files are browser-specific overrides
 *   locale/browser/netError.dtd                (%chrome/overrides/netError.dtd)
 *   locale/browser/appstrings.properties       (%chrome/overrides/appstrings.properties)
 *   locale/browser/downloads/settingsChange.dtd  (%chrome/overrides/settingsChange.dtd)
 % override chrome://global/locale/netError.dtd chrome://browser/locale/netError.dtd
 % override chrome://global/locale/appstrings.properties chrome://browser/locale/appstrings.properties
 % override chrome://mozapps/locale/downloads/settingsChange.dtd chrome://browser/locale/downloads/settingsChange.dtd
-#ifdef MOZ_USE_GENERIC_BRANDING
-% locale branding @AB_CD@ %locale/branding/
-    locale/branding/brand.dtd         (%chrome/branding/brand.dtd)
-    locale/branding/brand.properties  (%chrome/branding/brand.properties)
-#endif
--- a/browser/makefiles.sh
+++ b/browser/makefiles.sh
@@ -77,26 +77,21 @@ browser/installer/windows/Makefile
 browser/locales/Makefile
 browser/themes/Makefile
 browser/themes/pinstripe/browser/Makefile
 browser/themes/pinstripe/communicator/Makefile
 browser/themes/pinstripe/Makefile
 browser/themes/winstripe/browser/Makefile
 browser/themes/winstripe/communicator/Makefile
 browser/themes/winstripe/Makefile
+$MOZ_BRANDING_DIRECTORY/Makefile
+$MOZ_BRANDING_DIRECTORY/content/Makefile
+$MOZ_BRANDING_DIRECTORY/locales/Makefile
 "
 
-if test -n "$MOZ_BRANDING_DIRECTORY"; then
-  add_makefiles "
-    $MOZ_BRANDING_DIRECTORY/Makefile
-    $MOZ_BRANDING_DIRECTORY/content/Makefile
-    $MOZ_BRANDING_DIRECTORY/locales/Makefile
-  "
-fi
-
 if [ "$ENABLE_TESTS" ]; then
   add_makefiles "
     browser/base/content/test/Makefile
     browser/components/certerror/test/Makefile
     browser/components/preferences/tests/Makefile
     browser/components/search/test/Makefile
     browser/components/sessionstore/test/Makefile
     browser/components/sessionstore/test/browser/Makefile
--- a/configure.in
+++ b/configure.in
@@ -5077,16 +5077,24 @@ browser)
     AC_MSG_ERROR([Official branding is only available for Firefox.])
 esac
 )
 
 MOZ_ARG_WITH_STRING(branding,
 [  --with-branding=dir    Use branding from the specified directory.],
     MOZ_BRANDING_DIRECTORY=$withval)
 
+dnl For Firefox, we always want MOZ_BRANDING_DIRECTORY to point somewhere, so
+dnl if it's not set make it point to the default branding location now. Other
+dnl products need MOZ_BRANDING_DIRECTORY to NOT be set, in order to use their
+dnl default branding (ie, only set it when using non-default branding).
+if test "$MOZ_BUILD_APP" = "browser" -a -z "$MOZ_BRANDING_DIRECTORY"; then
+  MOZ_BRANDING_DIRECTORY=${MOZ_BUILD_APP}/branding/nightly
+fi
+
 REAL_BRANDING_DIRECTORY="${MOZ_BRANDING_DIRECTORY}"
 if test -z "$REAL_BRANDING_DIRECTORY"; then
   REAL_BRANDING_DIRECTORY=${MOZ_BUILD_APP}/branding/nightly
 fi
 
 if test -f "$topsrcdir/$REAL_BRANDING_DIRECTORY/configure.sh"; then
   . "$topsrcdir/$REAL_BRANDING_DIRECTORY/configure.sh"
 fi
--- a/other-licenses/branding/firefox/Makefile.in
+++ b/other-licenses/branding/firefox/Makefile.in
@@ -1,12 +1,43 @@
-# Branding Makefile
-#  - jars chrome artwork
-#  - copies artwork to appropriate places in objdir for bundling into app 
-#    resources
+# ***** 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
 
@@ -14,50 +45,57 @@ DIRS = \
 	content \
 	locales \
 	$(NULL)
 
 PREF_JS_EXPORTS = $(srcdir)/pref/firefox-branding.js
 
 include $(topsrcdir)/config/rules.mk
 
-BROWSER_APP_FILES = \
+WINDOWS_BRANDING_FILES = \
+	firefox.ico \
+	document.ico \
+	branding.nsi \
+	wizHeader.bmp \
+	wizHeaderRTL.bmp \
+	wizWatermark.bmp \
+	$(NULL)
+
+ifdef MOZ_SPLASHSCREEN
+WINDOWS_BRANDING_FILES += splash.bmp
+endif
+
+OSX_BRANDING_FILES = \
+	background.png \
+	firefox.icns \
+	disk.icns \
+	document.icns \
+	dsstore \
+	$(NULL)
+
+LINUX_BRANDING_FILES = \
 	default16.png \
 	default32.png \
 	default48.png \
+	document.png \
 	mozicon128.png \
-	firefox.ico \
-	document.ico \
+	$(NULL)
+
+OS2_BRANDING_FILES = \
+	firefox-os2.ico \
+	document-os2.ico \
 	$(NULL)
 
 export::
 	$(NSINSTALL) -D $(DIST)/branding
-	cp $(addprefix $(srcdir)/, $(BROWSER_APP_FILES)) $(DIST)/branding/
-ifneq (,$(filter gtk2,$(MOZ_WIDGET_TOOLKIT)))
-	cp $(srcdir)/document.png  $(DIST)/branding/document.png
+ifeq ($(MOZ_WIDGET_TOOLKIT),windows)
+	cp $(addprefix $(srcdir)/, $(WINDOWS_BRANDING_FILES)) $(DIST)/branding/
+endif
+ifeq ($(MOZ_WIDGET_TOOLKIT),cocoa)
+	cp $(addprefix $(srcdir)/, $(OSX_BRANDING_FILES)) $(DIST)/branding/
+endif
+ifeq ($(MOZ_WIDGET_TOOLKIT),gtk2)
+	cp $(addprefix $(srcdir)/, $(LINUX_BRANDING_FILES)) $(DIST)/branding/
 	$(NSINSTALL) -D $(DIST)/install
 endif
-ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
-	cp $(srcdir)/firefox.icns  $(DIST)/branding/firefox.icns
-	cp $(srcdir)/document.icns $(DIST)/branding/document.icns
-	cp $(srcdir)/dsstore $(DIST)/branding/dsstore
-	cp $(srcdir)/background.png $(DIST)/branding/background.png
-	cp $(srcdir)/disk.icns $(DIST)/branding/disk.icns
-endif
-ifneq (,$(filter WINNT WINCE,$(OS_ARCH)))
-	cp $(srcdir)/firefox.ico  $(DIST)/branding/app.ico
+ifeq ($(OS_ARCH),OS2)
+	cp $(addprefix $(srcdir)/, $(OS2_BRANDING_FILES)) $(DIST)/branding/
 endif
-ifeq ($(OS_ARCH),WINNT)
-	cp $(srcdir)/branding.nsi     $(DIST)/branding/branding.nsi
-	cp $(srcdir)/wizHeader.bmp    $(DIST)/branding/wizHeader.bmp
-	cp $(srcdir)/wizHeaderRTL.bmp $(DIST)/branding/wizHeaderRTL.bmp
-	cp $(srcdir)/wizWatermark.bmp $(DIST)/branding/wizWatermark.bmp
-endif
-ifeq ($(OS_ARCH),OS2)
-	cp $(srcdir)/firefox-os2.ico  $(DIST)/branding/firefox.ico
-	cp $(srcdir)/firefox-os2.ico  $(DIST)/branding/app.ico
-	cp $(srcdir)/document-os2.ico  $(DIST)/branding/document.ico
-endif
-#ifdef MOZ_SPLASHSCREEN
-ifeq ($(MOZ_WIDGET_TOOLKIT),windows)
-	cp $(srcdir)/splash.bmp       $(DIST)/branding/splash.bmp
-endif
-#endif
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
--- a/other-licenses/branding/firefox/locales/Makefile.in
+++ b/other-licenses/branding/firefox/locales/Makefile.in
@@ -44,16 +44,12 @@ include $(DEPTH)/config/autoconf.mk
 
 DEFINES += -DAB_CD=$(AB_CD) -DMOZ_DISTRIBUTION_ID_UNQUOTED=$(MOZ_DISTRIBUTION_ID)
 
 include $(topsrcdir)/config/rules.mk
 
 libs::
 	@$(PYTHON) $(topsrcdir)/config/Preprocessor.py $(DEFINES) $(ACDEFINES) \
 	  $(srcdir)/browserconfig.properties > $(FINAL_TARGET)/browserconfig.properties
-	@$(PERL) $(topsrcdir)/config/preprocessor.pl $(DEFINES) $(ACDEFINES) \
-	  $(srcdir)/old-homepage-default.properties > $(FINAL_TARGET)/old-homepage-default.properties
 
 install::
 	@$(PYTHON) $(topsrcdir)/config/Preprocessor.py $(DEFINES) $(ACDEFINES) \
 	  $(srcdir)/browserconfig.properties > $(DESTDIR)$(mozappdir)/browserconfig.properties
-	@$(PERL) $(topsrcdir)/config/preprocessor.pl $(DEFINES) $(ACDEFINES) \
-	  $(srcdir)/old-homepage-default.properties > $(DESTDIR)$(mozappdir)/old-homepage-default.properties
deleted file mode 100644
--- a/other-licenses/branding/firefox/locales/old-homepage-default.properties
+++ /dev/null
@@ -1,2 +0,0 @@
-# Do NOT localize or otherwise change these values
-#expand browser.startup.homepage=http://__AB_CD__.start.mozilla.com/firefox?client=firefox-a&rls=__MOZ_DISTRIBUTION_ID_UNQUOTED__:__AB_CD__:official