bug 484799 - make {package,installer} should rebase on windows. r=bsmedberg
authorTed Mielczarek <ted.mielczarek@gmail.com>
Tue, 20 Oct 2009 08:13:38 -0400
changeset 34892 228506b717f7ad84445ea647b540a86ef44c30ad
parent 34891 59c16df179cd4faa872fa7e11b503b2950abbb27
child 34893 ea520d552f8ccf04388ac95f619162e8d5bd6eaf
push id10326
push usertmielczarek@mozilla.com
push dateSun, 15 Nov 2009 20:25:37 +0000
treeherdermozilla-central@228506b717f7 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbsmedberg
bugs484799
milestone1.9.3a1pre
bug 484799 - make {package,installer} should rebase on windows. r=bsmedberg
Makefile.in
toolkit/mozapps/installer/packager.mk
--- a/Makefile.in
+++ b/Makefile.in
@@ -126,26 +126,16 @@ tier_necko::
 	$(foreach tier,$(TIERS),$(MAKE) tools_tier_$(tier); )
 endif
 
 distclean::
 	cat unallmakefiles | $(XARGS) rm -f
 	rm -f unallmakefiles $(DIST_GARBAGE)
 
 ifeq ($(OS_ARCH),WINNT)
-rebase:
-ifdef MOZILLA_OFFICIAL
-	echo rebasing $(DIST)
-	/bin/find $(DIST) -name "*.dll" -a -not -name "msvc*" > rebase.lst
-	rebase -b 60000000 -R . -G rebase.lst
-	rm rebase.lst
-endif
-endif # WINNT
-
-ifeq ($(OS_ARCH),WINNT)
 # we want to copy PDB files on Windows
 MAKE_SYM_STORE_ARGS := -c
 ifdef PDBSTR_PATH
 MAKE_SYM_STORE_ARGS += -i
 endif
 ifeq (,$(CYGWIN_WRAPPER))
 # this doesn't work with Cygwin Python
 MAKE_SYM_STORE_ARGS += --vcs-info
@@ -201,29 +191,16 @@ ifdef MOZ_CRASHREPORTER
           zip -r9D "../$(PKG_PATH)$(SYMBOL_ARCHIVE_BASENAME).zip" .
 endif # MOZ_CRASHREPORTER
 
 uploadsymbols:
 ifdef MOZ_CRASHREPORTER
 	$(SHELL) $(topsrcdir)/toolkit/crashreporter/tools/upload_symbols.sh "$(DIST)/$(PKG_PATH)$(SYMBOL_ARCHIVE_BASENAME).zip"
 endif
 
-ifeq ($(OS_ARCH),WINNT)
-signnss:
-ifdef MOZILLA_OFFICIAL
-	echo signing NSS libs
-	cd $(DIST)/bin; ./shlibsign.exe -v -i softokn3.dll
-	cd $(DIST)/bin; ./shlibsign.exe -v -i freebl3.dll
-	cd $(DIST)/bin; ./shlibsign.exe -v -i nssdbm3.dll
-endif # MOZILLA_OFFICIAL
-
-deliver: rebase signnss
-
-endif # WINNT
-
 ifneq (,$(wildcard $(DIST)/bin/application.ini))
 BUILDID = $(shell $(PYTHON) $(srcdir)/config/printconfigsetting.py $(DIST)/bin/application.ini App BuildID)
 else
 BUILDID = $(shell $(PYTHON) $(srcdir)/config/printconfigsetting.py $(DIST)/bin/platform.ini Build BuildID)
 endif
 
 #XXX: this is a hack, since we don't want to clobber for MSVC
 # PGO support, but we can't do this test in client.mk
--- a/toolkit/mozapps/installer/packager.mk
+++ b/toolkit/mozapps/installer/packager.mk
@@ -62,16 +62,20 @@ endif
 endif
 endif # MOZ_PKG_FORMAT
 
 ifeq ($(OS_ARCH),OS2)
 INSTALLER_DIR   = os2
 else
 ifneq (,$(filter WINNT WINCE,$(OS_ARCH)))
 INSTALLER_DIR   = windows
+define REBASE
+@echo "Rebasing $1"
+/bin/find $1 -name "*.dll" -a -not -name "MSVC*" | sort | xargs rebase -b 60000000
+endef
 else
 ifneq (cocoa,$(MOZ_WIDGET_TOOLKIT))
 INSTALLER_DIR   = unix
 endif
 endif
 endif
 
 PACKAGE       = $(PKG_PATH)$(PKG_BASENAME)$(PKG_SUFFIX)
@@ -346,16 +350,17 @@ endif
 		$(foreach pkg,$(MOZ_LOCALIZED_PKG_LIST),$(PKG_ARG)) )
 ifdef MOZ_OPTIONAL_PKG_LIST
 	$(call PACKAGER_COPY, "$(DIST)",\
 		"$(DEPTH)/installer-stage/optional", \
 		"$(MOZ_PKG_MANIFEST)", "$(PKGCP_OS)", 1, 0, 1 \
 		$(foreach pkg,$(MOZ_OPTIONAL_PKG_LIST),$(PKG_ARG)) )
 endif
 	$(PERL) $(MOZILLA_DIR)/xpinstall/packager/xptlink.pl -s $(DIST) -d $(DIST)/xpt -f $(DEPTH)/installer-stage/nonlocalized/components -v -x "$(XPIDL_LINK)"
+	$(call REBASE, $(DEPTH)/installer-stage/nonlocalized)
 
 stage-package: $(MOZ_PKG_MANIFEST) $(MOZ_PKG_REMOVALS_GEN)
 	@rm -rf $(DIST)/$(MOZ_PKG_DIR) $(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..."
 	@mkdir $(DIST)/$(MOZ_PKG_DIR)
 ifndef UNIVERSAL_BINARY
@@ -416,16 +421,17 @@ ifndef PKG_SKIP_STRIP
 else
 ifdef UNIVERSAL_BINARY
 # universal binaries will have had their .chk files removed prior to the unify
 # step, and if they're also --disable-install-strip then they won't get
 # re-signed in the block above.
 	$(SIGN_NSS)
 endif # UNIVERSAL_BINARY
 endif # PKG_SKIP_STRIP
+	$(call REBASE, $(DIST)/$(STAGEPATH)$(MOZ_PKG_DIR))
 	@echo "Removing unpackaged files..."
 ifdef NO_PKG_FILES
 	cd $(DIST)/$(STAGEPATH)$(MOZ_PKG_DIR)$(_BINPATH); rm -rf $(NO_PKG_FILES)
 endif
 ifdef MOZ_PKG_REMOVALS
 	$(SYSINSTALL) $(IFLAGS1) $(MOZ_PKG_REMOVALS_GEN) $(DIST)/$(STAGEPATH)$(MOZ_PKG_DIR)$(_BINPATH)
 endif # MOZ_PKG_REMOVALS