bug 453840 - make it possible to create files in the final place for releases, r=ted

This commit is contained in:
Robert Kaiser 2008-09-17 22:53:09 +02:00
Родитель 63ec6fdb74
Коммит 1829fc30dc
8 изменённых файлов: 81 добавлений и 28 удалений

Просмотреть файл

@ -69,6 +69,7 @@ BRANDING_FILES = \
DEFINES += \
-DAB_CD=$(AB_CD) \
-DPKG_BASENAME=$(PKG_BASENAME) \
-DPKG_INST_BASENAME=$(PKG_INST_BASENAME) \
-DMOZ_APP_VERSION=$(MOZ_APP_VERSION) \
-DMOZ_APP_NAME=$(MOZ_APP_NAME) \
-DMOZ_APP_DISPLAYNAME=${MOZ_APP_DISPLAYNAME} \

Просмотреть файл

@ -2,8 +2,8 @@
!define AppVersion "@MOZ_APP_VERSION@"
!define GREVersion @MOZILLA_VERSION@
!define AB_CD "@AB_CD@"
!define FileInstallerEXE "@PKG_BASENAME@.installer.exe"
!define FileInstallerMSI "@PKG_BASENAME@.installer.msi"
!define FileInstallerEXE "@PKG_INST_BASENAME@.exe"
!define FileInstallerMSI "@PKG_INST_BASENAME@.msi"
!define FileInstallerNETRoot "@PKG_BASENAME@.net-installer"
!define FileMainEXE "@MOZ_APP_NAME@.exe"

Просмотреть файл

@ -74,6 +74,7 @@ DEFINES += \
-DMOZ_APP_VERSION=$(MOZ_APP_VERSION) \
-DLOCALE_SRCDIR=$(call core_abspath,$(LOCALE_SRCDIR)) \
-DPKG_BASENAME=$(PKG_BASENAME) \
-DPKG_INST_BASENAME=$(PKG_INST_BASENAME) \
$(NULL)
ifndef MOZ_BRANDING_DIRECTORY
@ -192,7 +193,7 @@ PACKAGER_NO_LIBS = 1
include $(topsrcdir)/toolkit/mozapps/installer/packager.mk
include $(call EXPAND_LOCALE_SRCDIR,toolkit/locales)/installer/windows/charset.mk
repackage-win32-installer: WIN32_INSTALLER_OUT=$(_ABS_DIST)/install/sea/$(PKG_BASENAME).installer.exe
repackage-win32-installer: WIN32_INSTALLER_OUT=$(_ABS_DIST)/$(PKG_INST_PATH)$(PKG_INST_BASENAME).exe
repackage-win32-installer: $(WIN32_INSTALLER_IN) $(SUBMAKEFILES)
ifneq (en-US,$(AB_CD))
@echo "Verifying $(AB_CD) installer variable usage"
@ -227,7 +228,7 @@ endif
app.7z > $(WIN32_INSTALLER_OUT)
chmod 0755 $(WIN32_INSTALLER_OUT)
repackage-win32-installer-%: WIN32_INSTALLER_IN=$(_ABS_DIST)/install/sea/$(PKG_BASENAME).installer.exe
repackage-win32-installer-%: WIN32_INSTALLER_IN=$(_ABS_DIST)/$(PKG_INST_PATH)$(PKG_INST_BASENAME).exe
repackage-win32-installer-%: $(WIN32_INSTALLER_IN)
@$(MAKE) repackage-win32-installer AB_CD=$* WIN32_INSTALLER_IN=$(WIN32_INSTALLER_IN)
@ -267,20 +268,22 @@ ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
mv $(_ABS_DIST)/l10n-stage/$(MOZ_PKG_APPNAME)/$(_APPNAME)/Contents/Resources/en.lproj $(_ABS_DIST)/l10n-stage/$(MOZ_PKG_APPNAME)/$(_APPNAME)/Contents/Resources/$(AB).lproj
endif
endif
$(NSINSTALL) -D $(DIST)/l10n-stage/$(PKG_PATH)
cd $(DIST)/l10n-stage; \
$(MAKE_PACKAGE)
mv -f $(DIST)/l10n-stage/$(PACKAGE) $(DIST)
$(NSINSTALL) -D $(DIST)/$(PKG_PATH)
mv -f $(DIST)/l10n-stage/$(PACKAGE) $(DIST)/$(PACKAGE)
repackage-zip-%: ZIP_IN=$(_ABS_DIST)/$(PACKAGE)
repackage-zip-%: $(ZIP_IN)
@$(MAKE) repackage-zip AB_CD=$* ZIP_IN=$(ZIP_IN)
langpack-%: LANGPACK_FILE=$(_ABS_DIST)/install/firefox-$(MOZ_APP_VERSION).$(AB_CD).langpack.xpi
langpack-%: LANGPACK_FILE=$(_ABS_DIST)/$(PKG_LANGPACK_PATH)$(PKG_LANGPACK_BASENAME).xpi
langpack-%: AB_CD=$*
langpack-%: XPI_NAME=locale-$*
langpack-%:
@echo "Making langpack $(LANGPACK_FILE)"
$(NSINSTALL) -D $(DIST)/install
$(NSINSTALL) -D $(DIST)/$(PKG_LANGPACK_PATH)
@$(RM) -rf $(DIST)/xpi-stage/locale-$(AB_CD)
@$(MAKE) libs-$(AB_CD) USE_EXTENSION_MANIFEST=1
$(PERL) $(topsrcdir)/config/preprocessor.pl $(DEFINES) $(ACDEFINES) -I$(call EXPAND_LOCALE_SRCDIR,toolkit/locales)/defines.inc -I$(LOCALE_SRCDIR)/defines.inc $(srcdir)/generic/install.rdf > $(FINAL_TARGET)/install.rdf
@ -335,7 +338,7 @@ endif
@$(WGET) -nv --output-document $(_ABS_DIST)/$(PACKAGE) $(EN_US_BINARY_URL)/$(PACKAGE)
@echo "Downloaded $(EN_US_BINARY_URL)/$(PACKAGE) to $(_ABS_DIST)/$(PACKAGE)"
ifeq ($(OS_ARCH), WINNT)
$(NSINSTALL) -D $(_ABS_DIST)/install/sea
@$(WGET) -nv --output-document $(_ABS_DIST)/install/sea/$(PKG_BASENAME).installer.exe $(EN_US_BINARY_URL)/$(PKG_BASENAME).installer.exe
@echo "Downloaded $(EN_US_BINARY_URL)/$(PKG_BASENAME).installer.exe to $(_ABS_DIST)/install/sea/$(PKG_BASENAME)"
$(NSINSTALL) -D $(_ABS_DIST)/$(PKG_INST_PATH)
@$(WGET) -nv --output-document $(_ABS_DIST)/$(PKG_INST_PATH)$(PKG_INST_BASENAME).exe $(EN_US_BINARY_URL)/$(PKG_PATH)$(PKG_INST_BASENAME).exe
@echo "Downloaded $(EN_US_BINARY_URL)/$(PKG_PATH)$(PKG_INST_BASENAME).exe to $(_ABS_DIST)/$(PKG_INST_PATH)$(PKG_INST_BASENAME)"
endif

Просмотреть файл

@ -20,6 +20,7 @@
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
# Robert Kaiser <kairo@kairo.at>
#
# 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
@ -35,9 +36,11 @@
#
# ***** END LICENSE BLOCK *****
ifndef MOZ_PKG_APPNAME
MOZ_PKG_APPNAME = $(MOZ_APP_NAME)
endif
# assemble package names, see convention at
# http://developer.mozilla.org/index.php?title=En/Package_Filename_Convention
# 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 MOZ_PKG_VERSION
MOZ_PKG_VERSION = $(MOZ_APP_VERSION)
@ -84,4 +87,45 @@ ifdef MOZ_PKG_SPECIAL
MOZ_PKG_PLATFORM := $(MOZ_PKG_PLATFORM)-$(MOZ_PKG_SPECIAL)
endif
ifndef MOZ_PKG_PRETTYNAMES # standard package names
ifndef MOZ_PKG_APPNAME
MOZ_PKG_APPNAME = $(MOZ_APP_NAME)
endif
PKG_BASENAME = $(MOZ_PKG_APPNAME)-$(MOZ_PKG_VERSION).$(AB_CD).$(MOZ_PKG_PLATFORM)
PKG_PATH =
PKG_INST_BASENAME = $(PKG_BASENAME).installer
PKG_INST_PATH = install/sea/
PKG_UPDATE_BASENAME = $(PKG_BASENAME)
PKG_UPDATE_PATH = update/
PKG_LANGPACK_BASENAME = $(MOZ_PKG_APPNAME)-$(MOZ_PKG_VERSION).$(AB_CD).langpack
PKG_LANGPACK_PATH = install/
else # "pretty" release package names
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 OS2 WINNT, $(OS_ARCH)))
PKG_BASENAME = $(MOZ_PKG_APPNAME) $(MOZ_PKG_LONGVERSION)
PKG_INST_BASENAME = $(MOZ_PKG_APPNAME) Setup $(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
PKG_PATH = $(MOZ_PKG_PLATFORM)/$(AB_CD)/
PKG_INST_PATH = $(PKG_PATH)
PKG_UPDATE_BASENAME = $(MOZ_PKG_APPNAME_LC)-$(MOZ_PKG_VERSION)
PKG_UPDATE_PATH = update/$(PKG_PATH)
PKG_LANGPACK_BASENAME = $(AB_CD)
PKG_LANGPACK_PATH = langpack/
endif # MOZ_PKG_PRETTYNAMES

Просмотреть файл

@ -72,12 +72,12 @@ endif
endif
endif # MOZ_PKG_FORMAT
PACKAGE = $(PKG_BASENAME)$(PKG_SUFFIX)
PACKAGE = $(PKG_PATH)$(PKG_BASENAME)$(PKG_SUFFIX)
# By default, the SDK uses the same packaging type as the main bundle,
# but on mac it is a .tar.bz2
SDK_SUFFIX = $(PKG_SUFFIX)
SDK = $(PKG_BASENAME).sdk$(SDK_SUFFIX)
SDK = $(PKG_PATH)$(PKG_BASENAME).sdk$(SDK_SUFFIX)
MAKE_PACKAGE = $(error What is a $(MOZ_PKG_FORMAT) package format?);
@ -337,7 +337,7 @@ endif
$(PERL) $(MOZILLA_DIR)/xpinstall/packager/xptlink.pl -s $(DIST) -d $(DIST)/xpt -f $(DEPTH)/installer-stage/nonlocalized/components -v -x "$(XPIDL_LINK)"
stage-package: $(MOZ_PKG_MANIFEST) $(MOZ_PKG_REMOVALS_GEN)
@rm -rf $(DIST)/$(MOZ_PKG_APPNAME) $(DIST)/$(PKG_BASENAME).tar $(DIST)/$(PKG_BASENAME).dmg $@ $(EXCLUDE_LIST)
@rm -rf $(DIST)/$(MOZ_PKG_APPNAME) $(DIST)/$(PKG_PATH)$(PKG_BASENAME).tar $(DIST)/$(PKG_PATH)$(PKG_BASENAME).dmg $@ $(EXCLUDE_LIST)
# NOTE: this must be a tar now that dist links into the tree so that we
# do not strip the binaries actually in the tree.
@echo "Creating package directory..."
@ -400,6 +400,7 @@ endif # MOZ_PKG_REMOVALS
make-package: stage-package
@echo "Compressing..."
$(NSINSTALL) -D $(DIST)/$(PKG_PATH)
cd $(DIST) && $(MAKE_PACKAGE)
# The install target will install the application to prefix/lib/appname-version

Просмотреть файл

@ -71,9 +71,9 @@ installer::
$(INSTALL) $(CONFIG_DIR)/removed-files.log $(CONFIG_DIR)/setup.exe $(DEPTH)/installer-stage
cd $(DEPTH)/installer-stage && $(CYGWIN_WRAPPER) 7z a -r -t7z $(ABS_CONFIG_DIR)/app.7z -mx -m0=BCJ2 -m1=LZMA:d24 -m2=LZMA:d19 -m3=LZMA:d19 -mb0:1 -mb0s1:2 -mb0s2:3
$(MAKE) $(CONFIG_DIR)/7zSD.sfx
$(NSINSTALL) -D $(DIST)/install/sea
cat $(CONFIG_DIR)/7zSD.sfx $(CONFIG_DIR)/app.tag $(CONFIG_DIR)/app.7z > $(DIST)/install/sea/$(PKG_BASENAME).installer.exe
chmod 0755 $(DIST)/install/sea/$(PKG_BASENAME).installer.exe
$(NSINSTALL) -D $(DIST)/$(PKG_INST_PATH)
cat $(CONFIG_DIR)/7zSD.sfx $(CONFIG_DIR)/app.tag $(CONFIG_DIR)/app.7z > $(DIST)/$(PKG_INST_PATH)$(PKG_INST_BASENAME).exe
chmod 0755 $(DIST)/$(PKG_INST_PATH)$(PKG_INST_BASENAME).exe
# For building the uninstaller during the application build so it can be
# included for mar file generation.

Просмотреть файл

@ -46,21 +46,25 @@ include $(DEPTH)/config/autoconf.mk
include $(topsrcdir)/toolkit/mozapps/installer/package-name.mk
# input location for the build, usually $(DIST)
# set this to $(DIST)/l10n-stage per override for L10n builds
PACKAGE_BASE_DIR = $(DIST)
# Default output location for update archive
STAGE_DIR = $(DIST)/update
STAGE_DIR = $(DIST)/$(PKG_UPDATE_PATH)
ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
ifdef UNIVERSAL_BINARY
ifneq (,$(filter %/l10n-stage,$(DIST)))
PACKAGE_DIR = $(DIST)/$(MOZ_PKG_APPNAME)/$(MOZ_APP_DISPLAYNAME).app
ifneq (,$(filter %/l10n-stage,$(PACKAGE_BASE_DIR)))
PACKAGE_DIR = $(PACKAGE_BASE_DIR)/$(MOZ_PKG_APPNAME)/$(MOZ_APP_DISPLAYNAME).app
else
PACKAGE_DIR = $(DIST)/universal/$(MOZ_PKG_APPNAME)/$(MOZ_APP_DISPLAYNAME).app
PACKAGE_DIR = $(PACKAGE_BASE_DIR)/universal/$(MOZ_PKG_APPNAME)/$(MOZ_APP_DISPLAYNAME).app
endif
else
PACKAGE_DIR = $(DIST)/$(MOZ_PKG_APPNAME)/$(MOZ_APP_DISPLAYNAME).app
PACKAGE_DIR = $(PACKAGE_BASE_DIR)/$(MOZ_PKG_APPNAME)/$(MOZ_APP_DISPLAYNAME).app
endif
else
PACKAGE_DIR = $(DIST)/$(MOZ_PKG_APPNAME)
PACKAGE_DIR = $(PACKAGE_BASE_DIR)/$(MOZ_PKG_APPNAME)
endif
MAR_BIN = $(DIST)/host/bin/mar$(HOST_BIN_SUFFIX)
@ -72,7 +76,7 @@ complete-patch::
mkdir -p $(STAGE_DIR)
MAR=$(MAR_BIN) \
$(srcdir)/make_full_update.sh \
"$(STAGE_DIR)/$(PKG_BASENAME).complete.mar" \
"$(STAGE_DIR)/$(PKG_UPDATE_BASENAME).complete.mar" \
"$(PACKAGE_DIR)"
partial-patch::
@ -80,7 +84,7 @@ partial-patch::
MAR=$(MAR_BIN) \
MBSDIFF=$(MBSDIFF_BIN) \
$(srcdir)/make_incremental_update.sh \
"$(STAGE_DIR)/$(PKG_BASENAME).partial.$(SRC_BUILD_ID)-$(DST_BUILD_ID).mar" \
"$(STAGE_DIR)/$(PKG_UPDATE_BASENAME).partial.$(SRC_BUILD_ID)-$(DST_BUILD_ID).mar" \
"$(SRC_BUILD)" \
"$(DST_BUILD)"

Просмотреть файл

@ -151,7 +151,7 @@ deb: debian/changelog
$(NSINSTALL) $(topsrcdir)/$(MOZ_BUILD_APP)/installer/debian .
rm -rf $(DEBDESTDIR)/usr/local/*
$(NSINSTALL) -D $(DEBDESTDIR)/usr/local
cd $(DEBDESTDIR)/usr/local; cat ../../../../$(DEPTH)/dist/$(PKG_BASENAME)$(PKG_SUFFIX) | $(UNMAKE_PACKAGE)
cd $(DEBDESTDIR)/usr/local; cat ../../../../$(DEPTH)/dist/$(PKG_PATH)$(PKG_BASENAME)$(PKG_SUFFIX) | $(UNMAKE_PACKAGE)
$(NSINSTALL) -D $(DEBDESTDIR)/usr/share/dbus-1/services/
cp debian/$(MOZ_BUILD_APP).service $(DEBDESTDIR)/usr/share/dbus-1/services/org.mozilla.$(MOZ_BUILD_APP).service
rm $(DEBDESTDIR)/usr/local/$(MOZ_BUILD_APP)/xpidl