Bug 1387524 - Back out removal of MOZ_PRETTY to build Thunderbird 56 beta draft
authorPhilipp Kewisch <philipp@bugzilla.kewis.ch>
Fri, 04 Aug 2017 11:19:41 -0600
changeset 621317 4924dbec954f04060dad6e58ec1c8b6189c36b72
parent 620862 32083f24a1bb2c33050b4c972783f066432194eb
child 640973 982477bed6472be212df20e3c1e5c0a38c68dae8
push id72334
push userbmo:mozilla@hocat.ca
push dateFri, 04 Aug 2017 17:25:35 +0000
bugs1387524, 1329355
milestone57.0a1
Bug 1387524 - Back out removal of MOZ_PRETTY to build Thunderbird 56 beta Backout most of changeset 318f1bcd336e from bug 1329355 to support building releases on buildbot. MozReview-Commit-ID: K4QAA8IIpVX
toolkit/locales/l10n.mk
toolkit/mozapps/installer/package-name.mk
--- a/toolkit/locales/l10n.mk
+++ b/toolkit/locales/l10n.mk
@@ -145,16 +145,17 @@ ifdef MOZ_CRASHREPORTER
 endif
 endif
 
 	$(NSINSTALL) -D $(DIST)/l10n-stage/$(PKG_PATH)
 	cd $(DIST)/l10n-stage; \
 	  $(MAKE_PACKAGE)
 ifdef MAKE_COMPLETE_MAR
 	$(MAKE) -C $(MOZDEPTH)/tools/update-packaging full-update AB_CD=$(AB_CD) \
+	  MOZ_PKG_PRETTYNAMES=$(MOZ_PKG_PRETTYNAMES) \
 	  PACKAGE_BASE_DIR='$(ABS_DIST)/l10n-stage'
 endif
 # packaging done, undo l10n stuff
 ifneq (en,$(LPROJ_ROOT))
 ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
 	mv $(STAGEDIST)/$(LPROJ_ROOT).lproj $(STAGEDIST)/en.lproj
 endif
 endif
--- a/toolkit/mozapps/installer/package-name.mk
+++ b/toolkit/mozapps/installer/package-name.mk
@@ -1,16 +1,17 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 # assemble package names, see convention at
 # http://developer.mozilla.org/index.php?title=En/Package_Filename_Convention
-# Note that release packages are named during the post-build release
-# automation, so they aren't part of this file.
+# for (at least Firefox) releases we use a different format with directories,
+# e.g. win32/de/Firefox Setup 3.0.1.exe
+# the latter format is triggered with MOZ_PKG_PRETTYNAMES=1
 
 ifndef PACKAGE_NAME_MK_INCLUDED
 PACKAGE_NAME_MK_INCLUDED := 1
 
 ifndef MOZ_PKG_VERSION
 MOZ_PKG_VERSION = $(MOZ_APP_VERSION)
 endif
 
@@ -38,16 +39,18 @@ endif
 endif #MOZ_PKG_PLATFORM
 
 ifdef MOZ_PKG_SPECIAL
 MOZ_PKG_PLATFORM := $(MOZ_PKG_PLATFORM)-$(MOZ_PKG_SPECIAL)
 endif
 
 MOZ_PKG_DIR ?= $(MOZ_APP_NAME)
 
+ifndef MOZ_PKG_PRETTYNAMES # standard package names
+
 ifndef MOZ_PKG_APPNAME
 MOZ_PKG_APPNAME = $(MOZ_APP_NAME)
 endif
 
 ifdef MOZ_SIMPLE_PACKAGE_NAME
 PKG_BASENAME := $(MOZ_SIMPLE_PACKAGE_NAME)
 else
 PKG_BASENAME = $(MOZ_PKG_APPNAME)-$(MOZ_PKG_VERSION).$(AB_CD).$(MOZ_PKG_PLATFORM)
@@ -71,16 +74,59 @@ else
 PKG_LANGPACK_BASENAME = $(MOZ_PKG_APPNAME)-$(MOZ_PKG_VERSION).$(AB_CD).langpack
 PKG_LANGPACK_PATH = $(MOZ_PKG_PLATFORM)/xpi/
 endif
 LANGPACK = $(PKG_LANGPACK_PATH)$(PKG_LANGPACK_BASENAME).xpi
 PKG_SRCPACK_BASENAME = $(MOZ_PKG_APPNAME)-$(MOZ_PKG_VERSION).source
 PKG_BUNDLE_BASENAME = $(MOZ_PKG_APPNAME)-$(MOZ_PKG_VERSION)
 PKG_SRCPACK_PATH =
 
+else # "pretty" release package names; this is used by Thunderbird
+
+ifndef MOZ_PKG_APPNAME
+MOZ_PKG_APPNAME = $(MOZ_APP_DISPLAYNAME)
+endif
+MOZ_PKG_APPNAME_LC = $(shell echo $(MOZ_PKG_APPNAME) | tr '[A-Z]' '[a-z]')
+
+ifndef MOZ_PKG_LONGVERSION
+MOZ_PKG_LONGVERSION = $(MOZ_PKG_VERSION)
+endif
+
+ifeq (,$(filter-out Darwin, $(OS_ARCH))) # Mac
+PKG_BASENAME = $(MOZ_PKG_APPNAME) $(MOZ_PKG_LONGVERSION)
+PKG_INST_BASENAME = $(MOZ_PKG_APPNAME) Setup $(MOZ_PKG_LONGVERSION)
+else
+ifeq (,$(filter-out WINNT, $(OS_ARCH))) # Windows
+PKG_BASENAME = $(MOZ_PKG_APPNAME_LC)-$(MOZ_PKG_VERSION)
+PKG_INST_BASENAME = $(MOZ_PKG_APPNAME) Setup $(MOZ_PKG_LONGVERSION)
+PKG_STUB_BASENAME = $(MOZ_PKG_APPNAME) Setup Stub $(MOZ_PKG_LONGVERSION)
+else # unix (actually, not Windows, Mac or OS/2)
+PKG_BASENAME = $(MOZ_PKG_APPNAME_LC)-$(MOZ_PKG_VERSION)
+PKG_INST_BASENAME = $(MOZ_PKG_APPNAME_LC)-setup-$(MOZ_PKG_VERSION)
+endif
+endif
+PKG_PATH = $(MOZ_PKG_PLATFORM)/$(AB_CD)/
+SDK_PATH = $(PKG_PATH)/sdk/
+CHECKSUMS_FILE_BASENAME = $(MOZ_PKG_APPNAME_LC)-$(MOZ_PKG_VERSION)
+MOZ_INFO_BASENAME = $(MOZ_PKG_APPNAME_LC)-$(MOZ_PKG_VERSION)
+PKG_INST_PATH = $(PKG_PATH)
+PKG_UPDATE_BASENAME = $(MOZ_PKG_APPNAME_LC)-$(MOZ_PKG_VERSION)
+PKG_UPDATE_PATH = update/$(PKG_PATH)
+COMPLETE_MAR = $(PKG_UPDATE_PATH)$(PKG_UPDATE_BASENAME).complete.mar
+# PARTIAL_MAR needs to be processed by $(wildcard) before you use it.
+PARTIAL_MAR = $(PKG_UPDATE_PATH)$(PKG_UPDATE_BASENAME).partial.*.mar
+PKG_LANGPACK_BASENAME = $(AB_CD)
+PKG_LANGPACK_PATH = $(MOZ_PKG_PLATFORM)/xpi/
+LANGPACK = $(PKG_LANGPACK_PATH)$(PKG_LANGPACK_BASENAME).xpi
+PKG_SRCPACK_BASENAME = $(MOZ_PKG_APPNAME_LC)-$(MOZ_PKG_VERSION).source
+PKG_BUNDLE_BASENAME = $(MOZ_PKG_APPNAME_LC)-$(MOZ_PKG_VERSION)
+PKG_SRCPACK_PATH = source/
+
+endif # MOZ_PKG_PRETTYNAMES
+
 # Symbol package naming
 SYMBOL_FULL_ARCHIVE_BASENAME = $(PKG_BASENAME).crashreporter-symbols-full
 SYMBOL_ARCHIVE_BASENAME = $(PKG_BASENAME).crashreporter-symbols
 
 # Code coverage package naming
 CODE_COVERAGE_ARCHIVE_BASENAME = $(PKG_BASENAME).code-coverage-gcno
 
 # Mozharness naming