bug 313956: expand installer .exe contents to make complete mar. r=ted
authorRail Aliiev <rail@mozilla.com>
Mon, 11 Apr 2011 12:23:26 -0400
changeset 67814 991132479b7a9c135e9b33b2adb61c926570329e
parent 67813 ac15602832bd31fcf4a2cace21f03497424081dd
child 67815 9a7c40dbd28822ee7c93d5035f03a33f48eb5a38
push id19433
push userbhearsum@mozilla.com
push dateMon, 11 Apr 2011 16:23:48 +0000
treeherdermozilla-central@991132479b7a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersted
bugs313956
milestone2.2a1pre
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
bug 313956: expand installer .exe contents to make complete mar. r=ted
toolkit/locales/l10n.mk
toolkit/mozapps/installer/packager.mk
tools/update-packaging/Makefile.in
--- a/toolkit/locales/l10n.mk
+++ b/toolkit/locales/l10n.mk
@@ -58,18 +58,16 @@
 #   language pack and zip package.
 #   Other targets like windows installers might be listed, too, and should
 #   be defined in the including makefile.
 # The including makefile should provide values for the variables
 #   MOZ_APP_VERSION and MOZ_LANGPACK_EID.
 
 
 run_for_effects := $(shell if test ! -d $(DIST); then $(NSINSTALL) -D $(DIST); fi)
-_ABS_DIST := $(shell cd $(DIST) && pwd)
-
 
 # This makefile uses variable overrides from the libs-% target to
 # build non-default locales to non-default dist/ locations. Be aware!
 
 AB = $(firstword $(subst -, ,$(AB_CD)))
 
 core_abspath = $(if $(findstring :,$(1)),$(1),$(if $(filter /%,$(1)),$(1),$(CURDIR)/$(1)))
 
@@ -125,16 +123,24 @@ endif
 
 unpack: $(STAGEDIST)
 	@echo done unpacking
 
 # The path to the object dir for the mozilla-central build system,
 # may be overridden if necessary.
 MOZDEPTH ?= $(DEPTH)
 
+ifdef MOZ_MAKE_COMPLETE_MAR
+MAKE_COMPLETE_MAR = 1
+ifeq ($(OS_ARCH), WINNT)
+ifneq ($(MOZ_PKG_FORMAT), SFX7Z)
+MAKE_COMPLETE_MAR =
+endif
+endif
+endif
 repackage-zip: UNPACKAGE="$(ZIP_IN)"
 repackage-zip:  libs-$(AB_CD)
 # Adjust jar logs with the new locale (can't use sed -i because of bug 373784)
 	-$(PERL) -pi -e "s/en-US/$(AB_CD)/g" $(_ABS_DIST)/jarlog/*.jar.log
 # call a hook for apps to put their uninstall helper.exe into the package
 	$(UNINSTALLER_PACKAGE_HOOK)
 # copy xpi-stage over, but not install.rdf and chrome.manifest,
 # those are just for language packs
@@ -148,17 +154,17 @@ endif
 endif
 	$(NSINSTALL) -D $(DIST)/l10n-stage/$(PKG_PATH)
 	cd $(DIST)/l10n-stage; \
 	  $(MAKE_PACKAGE)
 ifeq (WINCE,$(OS_ARCH))
 	cd $(DIST)/l10n-stage; \
 	  $(MAKE_CAB)
 endif
-ifdef MOZ_MAKE_COMPLETE_MAR
+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" \
 	  DIST="$(_ABS_DIST)"
 endif
 # packaging done, undo l10n stuff
 ifneq (en,$(AB))
 ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
--- a/toolkit/mozapps/installer/packager.mk
+++ b/toolkit/mozapps/installer/packager.mk
@@ -135,17 +135,17 @@ ifeq ($(MOZ_PKG_FORMAT),SFX7Z)
 PKG_SUFFIX	= .exe
 INNER_MAKE_PACKAGE	= rm -f app.7z && \
   mv $(MOZ_PKG_DIR) core && \
   $(CYGWIN_WRAPPER) 7z a -r -t7z app.7z -mx -m0=BCJ2 -m1=LZMA:d24 \
     -m2=LZMA:d19 -m3=LZMA:d19 -mb0:1 -mb0s1:2 -mb0s2:3 && \
   mv core $(MOZ_PKG_DIR) && \
   cat $(SFX_HEADER) app.7z > $(PACKAGE) && \
   chmod 0755 $(PACKAGE)
-INNER_UNMAKE_PACKAGE	= $(CYGWIN_WRAPPER) 7z x $(UNPACKAGE) && \
+INNER_UNMAKE_PACKAGE	= $(CYGWIN_WRAPPER) 7z x $(UNPACKAGE) core && \
   mv core $(MOZ_PKG_DIR)
 endif
 
 #Create an RPM file
 ifeq ($(MOZ_PKG_FORMAT),RPM)
 PKG_SUFFIX  = .rpm
 MOZ_NUMERIC_APP_VERSION = $(shell echo $(MOZ_PKG_VERSION) | sed "s/[^0-9.].*//" )
 MOZ_RPM_RELEASE = $(shell echo $(MOZ_PKG_VERSION) | sed "s/[0-9.]*//" )
--- a/tools/update-packaging/Makefile.in
+++ b/tools/update-packaging/Makefile.in
@@ -39,18 +39,16 @@
 
 DEPTH		= ../..
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 
 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)/$(PKG_UPDATE_PATH)
 
 ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
@@ -67,25 +65,39 @@ else
 PACKAGE_DIR	= $(PACKAGE_BASE_DIR)/$(MOZ_PKG_DIR)
 endif
 
 MAR_BIN	= $(LIBXUL_DIST)/host/bin/mar$(HOST_BIN_SUFFIX)
 MBSDIFF_BIN	= $(LIBXUL_DIST)/host/bin/mbsdiff$(HOST_BIN_SUFFIX)
 
 full-update:: complete-patch
 
+ifeq ($(OS_TARGET), WINNT)
+MOZ_PKG_FORMAT	:= SFX7Z
+UNPACKAGE	= "$(subst $(DIST),$(_ABS_DIST),$(INSTALLER_PACKAGE))"
+ifdef AB_CD
+UNPACKAGE	= "$(PACKAGE_BASE_DIR)/$(PACKAGE)"
+endif
+endif
+
 complete-patch::
+ifeq ($(OS_TARGET), WINNT)
+	test -f $(UNPACKAGE)
+	$(RM) -rf "$(PACKAGE_DIR)"
+	cd $(PACKAGE_BASE_DIR) && $(INNER_UNMAKE_PACKAGE)
+endif
 	mkdir -p $(STAGE_DIR)
 	MAR=$(MAR_BIN) \
 	  $(srcdir)/make_full_update.sh \
 	  "$(STAGE_DIR)/$(PKG_UPDATE_BASENAME).complete.mar" \
 	  "$(PACKAGE_DIR)"
 
 partial-patch::
 	mkdir -p $(STAGE_DIR)
 	MAR=$(MAR_BIN) \
 	MBSDIFF=$(MBSDIFF_BIN) \
 	  $(srcdir)/make_incremental_update.sh \
 	  "$(STAGE_DIR)/$(PKG_UPDATE_BASENAME).partial.$(SRC_BUILD_ID)-$(DST_BUILD_ID).mar" \
 	  "$(SRC_BUILD)" \
 	  "$(DST_BUILD)"
 
 include $(topsrcdir)/config/rules.mk
+include $(topsrcdir)/toolkit/mozapps/installer/packager.mk