Bug 556644 - 10. Make windows installer locale repacks use the standard repacking path, r=rs,khuey a=blocking2.0
authorMichael Wu <mwu@mozilla.com>
Thu, 12 Aug 2010 21:36:16 -0700
changeset 50378 7cf1fba2029a2c75c89281c28f68c2b1a49b323f
parent 50377 d37b6b33722759cc84e51001d721b835e62e89f0
child 50379 b799524f7810ae3d003da8a1e547a72f39cc3ead
push id15048
push usermwu@mozilla.com
push dateFri, 13 Aug 2010 05:08:30 +0000
treeherdermozilla-central@b799524f7810 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersrs, khuey, blocking2
bugs556644
milestone2.0b4pre
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 556644 - 10. Make windows installer locale repacks use the standard repacking path, r=rs,khuey a=blocking2.0
browser/installer/windows/nsis/installer.nsi
browser/locales/Makefile.in
testing/release/common/unpack.sh
toolkit/locales/l10n.mk
toolkit/mozapps/installer/packager.mk
toolkit/mozapps/installer/windows/nsis/common.nsh
--- a/browser/installer/windows/nsis/installer.nsi
+++ b/browser/installer/windows/nsis/installer.nsi
@@ -232,17 +232,17 @@ SectionEnd
 Section "-Application" APP_IDX
   ${StartUninstallLog}
 
   SetDetailsPrint both
   DetailPrint $(STATUS_INSTALL_APP)
   SetDetailsPrint none
 
   ${LogHeader} "Installing Main Files"
-  ${CopyFilesFromDir} "$EXEDIR\nonlocalized" "$INSTDIR" \
+  ${CopyFilesFromDir} "$EXEDIR\core" "$INSTDIR" \
                       "$(ERROR_CREATE_DIRECTORY_PREFIX)" \
                       "$(ERROR_CREATE_DIRECTORY_SUFFIX)"
 
   ; Register DLLs
   ; XXXrstrong - AccessibleMarshal.dll can be used by multiple applications but
   ; is only registered for the last application installed. When the last
   ; application installed is uninstalled AccessibleMarshal.dll will no longer be
   ; registered. bug 338878
@@ -263,25 +263,16 @@ Section "-Application" APP_IDX
   ${LogUninstall} "File: \components\compreg.dat"
   ${LogUninstall} "File: \components\xpti.dat"
   ${LogUninstall} "File: \active-update.xml"
   ${LogUninstall} "File: \install.log"
   ${LogUninstall} "File: \install_status.log"
   ${LogUninstall} "File: \install_wizard.log"
   ${LogUninstall} "File: \updates.xml"
 
-  SetDetailsPrint both
-  DetailPrint $(STATUS_INSTALL_LANG)
-  SetDetailsPrint none
-
-  ${LogHeader} "Installing Localized Files"
-  ${CopyFilesFromDir} "$EXEDIR\localized" "$INSTDIR" \
-                      "$(ERROR_CREATE_DIRECTORY_PREFIX)" \
-                      "$(ERROR_CREATE_DIRECTORY_SUFFIX)"
-
   ; Check if QuickTime is installed and copy the nsIQTScriptablePlugin.xpt from
   ; its plugins directory into the app's components directory.
   ClearErrors
   ReadRegStr $R0 HKLM "Software\Apple Computer, Inc.\QuickTime" "InstallDir"
   ${Unless} ${Errors}
     ${GetLongPath} "$R0" $R0
     ${Unless} "$R0" == ""
       ClearErrors
@@ -524,18 +515,18 @@ Section "-InstallEndCleanup"
 SectionEnd
 
 ################################################################################
 # Install Abort Survey Functions
 
 Function CustomAbort
   ${If} "${AB_CD}" == "en-US"
   ${AndIf} "$PageName" != ""
-  ${AndIf} ${FileExists} "$EXEDIR\nonlocalized\distribution\distribution.ini"
-    ReadINIStr $0 "$EXEDIR\nonlocalized\distribution\distribution.ini" "Global" "about"
+  ${AndIf} ${FileExists} "$EXEDIR\core\distribution\distribution.ini"
+    ReadINIStr $0 "$EXEDIR\core\distribution\distribution.ini" "Global" "about"
     ClearErrors
     ${WordFind} "$0" "Funnelcake" "E#" $1
     ${Unless} ${Errors}
       ; Yes = fill out the survey and exit, No = don't fill out survey and exit,
       ; Cancel = don't exit.
       MessageBox MB_YESNO|MB_ICONEXCLAMATION \
                  "Would you like to tell us why you are canceling this installation?" \
                  IDYes +1 IDNO CustomAbort_finish
@@ -684,28 +675,28 @@ FunctionEnd
 ; using " " for BrandingText will hide the "Nullsoft Install System..." branding
 BrandingText " "
 
 ################################################################################
 # Page pre, show, and leave functions
 
 Function preWelcome
   StrCpy $PageName "Welcome"
-  ${If} ${FileExists} "$EXEDIR\localized\distribution\modern-wizard.bmp"
+  ${If} ${FileExists} "$EXEDIR\core\distribution\modern-wizard.bmp"
     Delete "$PLUGINSDIR\modern-wizard.bmp"
-    CopyFiles /SILENT "$EXEDIR\localized\distribution\modern-wizard.bmp" "$PLUGINSDIR\modern-wizard.bmp"
+    CopyFiles /SILENT "$EXEDIR\core\distribution\modern-wizard.bmp" "$PLUGINSDIR\modern-wizard.bmp"
   ${EndIf}
 FunctionEnd
 
 Function preOptions
   StrCpy $PageName "Options"
-  ${If} ${FileExists} "$EXEDIR\localized\distribution\modern-header.bmp"
+  ${If} ${FileExists} "$EXEDIR\core\distribution\modern-header.bmp"
   ${AndIf} $hHeaderBitmap == ""
     Delete "$PLUGINSDIR\modern-header.bmp"
-    CopyFiles /SILENT "$EXEDIR\localized\distribution\modern-header.bmp" "$PLUGINSDIR\modern-header.bmp"
+    CopyFiles /SILENT "$EXEDIR\core\distribution\modern-header.bmp" "$PLUGINSDIR\modern-header.bmp"
     ${ChangeMUIHeaderImage} "$PLUGINSDIR\modern-header.bmp"
   ${EndIf}
   !insertmacro MUI_HEADER_TEXT "$(OPTIONS_PAGE_TITLE)" "$(OPTIONS_PAGE_SUBTITLE)"
   !insertmacro MUI_INSTALLOPTIONS_DISPLAY "options.ini"
 FunctionEnd
 
 Function leaveOptions
   ${MUI_INSTALLOPTIONS_READ} $0 "options.ini" "Settings" "State"
@@ -921,17 +912,17 @@ Function preFinish
 FunctionEnd
 
 ################################################################################
 # Initialization Functions
 
 Function .onInit
   StrCpy $PageName ""
   StrCpy $LANGUAGE 0
-  ${SetBrandNameVars} "$EXEDIR\localized\distribution\setup.ini"
+  ${SetBrandNameVars} "$EXEDIR\core\distribution\setup.ini"
 
   ${InstallOnInitCommon} "$(WARN_MIN_SUPPORTED_OS_MSG)"
 
   !insertmacro InitInstallOptionsFile "options.ini"
   !insertmacro InitInstallOptionsFile "shortcuts.ini"
   !insertmacro InitInstallOptionsFile "summary.ini"
 
   WriteINIStr "$PLUGINSDIR\options.ini" "Settings" NumFields "5"
@@ -1004,19 +995,18 @@ Function .onInit
   WriteINIStr "$PLUGINSDIR\shortcuts.ini" "Field 4" Type   "checkbox"
   WriteINIStr "$PLUGINSDIR\shortcuts.ini" "Field 4" Text   "$(ICONS_QUICKLAUNCH)"
   WriteINIStr "$PLUGINSDIR\shortcuts.ini" "Field 4" Left   "15"
   WriteINIStr "$PLUGINSDIR\shortcuts.ini" "Field 4" Right  "-1"
   WriteINIStr "$PLUGINSDIR\shortcuts.ini" "Field 4" Top    "60"
   WriteINIStr "$PLUGINSDIR\shortcuts.ini" "Field 4" Bottom "70"
   WriteINIStr "$PLUGINSDIR\shortcuts.ini" "Field 4" State  "1"
 
-  ; There must always be nonlocalized and localized directories.
-  ${GetSize} "$EXEDIR\nonlocalized\" "/S=0K" $R5 $R7 $R8
-  ${GetSize} "$EXEDIR\localized\" "/S=0K" $R6 $R7 $R8
+  ; There must always be a core directory.
+  ${GetSize} "$EXEDIR\core\" "/S=0K" $R5 $R7 $R8
   IntOp $R8 $R5 + $R6
   SectionSetSize ${APP_IDX} $R8
 
   ; Initialize $hHeaderBitmap to prevent redundant changing of the bitmap if
   ; the user clicks the back button
   StrCpy $hHeaderBitmap ""
 FunctionEnd
 
--- a/browser/locales/Makefile.in
+++ b/browser/locales/Makefile.in
@@ -95,16 +95,18 @@ MOZ_PKG_MAC_BACKGROUND=$(_ABS_DIST)/bran
 MOZ_PKG_MAC_ICON=$(_ABS_DIST)/branding/disk.icns
 MOZ_PKG_MAC_EXTRA=--symlink "/Applications:/ "
 endif
 
 ifeq (WINNT,$(OS_ARCH))
 UNINSTALLER_PACKAGE_HOOK = $(RM) -r $(STAGEDIST)/uninstall; \
     $(NSINSTALL) -D $(STAGEDIST)/uninstall; \
     cp ../installer/windows/l10ngen/helper.exe $(STAGEDIST)/uninstall; \
+    $(RM) $(_ABS_DIST)/l10n-stage/setup.exe; \
+    cp ../installer/windows/l10ngen/setup.exe $(_ABS_DIST)/l10n-stage; \
     $(NULL)
 endif
 
 include $(topsrcdir)/config/rules.mk
 
 include $(topsrcdir)/toolkit/locales/l10n.mk
 
 $(STAGEDIST): $(DIST)/branding
@@ -190,40 +192,24 @@ libs-%:
 	@$(MAKE) libs AB_CD=$* XPI_NAME=locale-$* PREF_DIR=defaults/pref BOTH_MANIFESTS=1
 	@$(MAKE) -C $(DEPTH)/$(MOZ_BRANDING_DIRECTORY)/locales AB_CD=$* XPI_NAME=locale-$* BOTH_MANIFESTS=1
 
 
 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)."
 	$(MAKE) -C $(DEPTH)/$(MOZ_BRANDING_DIRECTORY) export
-	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
-# copy xpi-stage over, but not install.rdf and chrome.manifest,
-# those are just for language packs
-	cp -r $(DIST)/xpi-stage/locale-$(AB_CD) l10n-stage/localized
-	$(RM) l10n-stage/localized/install.rdf l10n-stage/localized/chrome.manifest
-	mv l10n-stage/localized/chrome/$(AB_CD).manifest l10n-stage/localized/chrome/localized.manifest
 	$(MAKE) -C ../installer/windows CONFIG_DIR=l10ngen l10ngen/setup.exe l10ngen/7zSD.sfx
-	cp ../installer/windows/l10ngen/setup.exe l10n-stage
-	$(NSINSTALL) -D l10n-stage/localized/uninstall
-	cp ../installer/windows/l10ngen/helper.exe l10n-stage/localized/uninstall
-	rm -f app.7z
-	cd l10n-stage && \
-	  $(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
-	cat ../installer/windows/l10ngen/7zSD.sfx \
-	    $(topsrcdir)/browser/installer/windows/app.tag \
-	    app.7z > $(WIN32_INSTALLER_OUT)
-	chmod 0755 $(WIN32_INSTALLER_OUT)
+	$(MAKE) repackage-zip \
+	  AB_CD=$(AB_CD) \
+	  MOZ_PKG_FORMAT=SFX7Z \
+	  ZIP_IN=$(WIN32_INSTALLER_IN) \
+	  ZIP_OUT=$(WIN32_INSTALLER_OUT) \
+	  SFX_HEADER="$(PWD)/../installer/windows/l10ngen/7zSD.sfx \
+	              $(topsrcdir)/browser/installer/windows/app.tag"
 
 ifeq (WINNT,$(OS_ARCH))
 repackage-win32-installer-%: $(WIN32_INSTALLER_IN) libs-%
 	@$(MAKE) repackage-win32-installer AB_CD=$* WIN32_INSTALLER_IN=$(WIN32_INSTALLER_IN)
 else
 repackage-win32-installer-%: ;
 endif
 
--- a/testing/release/common/unpack.sh
+++ b/testing/release/common/unpack.sh
@@ -14,22 +14,21 @@ unpack_build () {
             echo "mounting $pkg_file"
             echo "y" | PAGER="/bin/cat"  hdiutil attach -quiet -puppetstrings -noautoopen -mountpoint ./mnt "$pkg_file" > /dev/null
             rsync -a ./mnt/* $dir_name/ 
             hdiutil detach mnt > /dev/null
             cd $dir_name
             ;;
         win32|WINNT_x86-msvc)
             7z x ../"$pkg_file" > /dev/null
-            if [ -d localized ]
+            if [ -d core ]
             then
               mkdir bin/
-              cp -rp nonlocalized/* bin/
-              cp -rp localized/*    bin/
-              cp -rp optional/*     bin/
+              cp -rp core/*     bin/
+              cp -rp optional/* bin/
             else
               for file in *.xpi
               do
                 unzip -o $file > /dev/null
               done
               unzip -o ${locale}.xpi > /dev/null
             fi
             ;;
--- a/toolkit/locales/l10n.mk
+++ b/toolkit/locales/l10n.mk
@@ -75,16 +75,19 @@ core_abspath = $(if $(findstring :,$(1))
 
 # These are defaulted to be compatible with the files the wget-en-US target
 # 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
 
+# Allows overriding the final destination of the repackaged file
+ZIP_OUT ?= $(_ABS_DIST)/$(PACKAGE)
+
 DEFINES += \
 	-DAB_CD=$(AB_CD) \
 	-DMOZ_LANGPACK_EID=$(MOZ_LANGPACK_EID) \
 	-DMOZ_APP_VERSION=$(MOZ_APP_VERSION) \
 	-DLOCALE_SRCDIR=$(call core_abspath,$(LOCALE_SRCDIR)) \
 	-DPKG_BASENAME="$(PKG_BASENAME)" \
 	-DPKG_INST_BASENAME="$(PKG_INST_BASENAME)" \
 	$(NULL)
@@ -118,17 +121,16 @@ endif
 	cd $(DIST)/l10n-stage && \
 	  $(UNMAKE_PACKAGE)
 	$(MAKE) clobber-zip AB_CD=en-US
 
 
 unpack: $(STAGEDIST)
 	@echo done unpacking
 
-repackage-zip: ZIP_OUT="$(_ABS_DIST)/$(PACKAGE)"
 repackage-zip: UNPACKAGE="$(ZIP_IN)"
 repackage-zip:
 # 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
 	cd $(DIST)/xpi-stage/locale-$(AB_CD) && \
 	  tar --exclude=install.rdf --exclude=chrome.manifest $(TAR_CREATE_FLAGS) - * | ( cd $(STAGEDIST) && tar -xf - )
@@ -157,17 +159,17 @@ ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
 	mv $(_ABS_DIST)/l10n-stage/$(MOZ_PKG_APPNAME)/$(_APPNAME)/Contents/Resources/$(AB).lproj $(_ABS_DIST)/l10n-stage/$(MOZ_PKG_APPNAME)/$(_APPNAME)/Contents/Resources/en.lproj
 endif
 endif
 ifdef MOZ_OMNIJAR
 	@(cd $(STAGEDIST) && $(UNPACK_OMNIJAR))
 endif
 	$(MAKE) clobber-zip AB_CD=$(AB_CD)
 	$(NSINSTALL) -D $(DIST)/$(PKG_PATH)
-	mv -f "$(DIST)/l10n-stage/$(PACKAGE)" "$(DIST)/$(PACKAGE)"
+	mv -f "$(DIST)/l10n-stage/$(PACKAGE)" "$(ZIP_OUT)"
 ifeq (WINCE,$(OS_ARCH))
 	mv -f "$(DIST)/l10n-stage/$(PKG_BASENAME).cab" "$(DIST)/$(PKG_PATH)$(PKG_BASENAME).cab"
 endif
 
 repackage-zip-%: $(ZIP_IN) $(STAGEDIST) libs-%
 	@$(MAKE) repackage-zip AB_CD=$* ZIP_IN=$(ZIP_IN)
 
 APP_DEFINES = $(firstword $(wildcard $(LOCALE_SRCDIR)/defines.inc) \
--- a/toolkit/mozapps/installer/packager.mk
+++ b/toolkit/mozapps/installer/packager.mk
@@ -129,16 +129,28 @@ INNER_MAKE_PACKAGE	= $(ZIP) -r9D $(PACKA
 INNER_UNMAKE_PACKAGE	= $(UNZIP) $(UNPACKAGE)
 MAKE_SDK = $(ZIP) -r9D $(SDK) $(MOZ_APP_NAME)-sdk
 endif
 ifeq ($(MOZ_PKG_FORMAT),CAB)
 PKG_SUFFIX	= .cab
 INNER_MAKE_PACKAGE	= $(MAKE_CAB)
 INNER_UNMAKE_PACKAGE	= $(error Unpacking CAB files is not supported)
 endif
+ifeq ($(MOZ_PKG_FORMAT),SFX7Z)
+PKG_SUFFIX	= .exe
+_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)
+_UNMAKE_PACKAGE	= $(CYGWIN_WRAPPER) 7z x $(UNPACKAGE) && \
+  mv core $(MOZ_PKG_DIR)
+endif
 ifeq ($(MOZ_PKG_FORMAT),DMG)
 ifndef _APPNAME
 ifdef MOZ_DEBUG
 _APPNAME	= $(MOZ_APP_DISPLAYNAME)Debug.app
 else
 _APPNAME	= $(MOZ_APP_DISPLAYNAME).app
 endif
 endif
@@ -352,67 +364,49 @@ PLATFORM_EXCLUDE_LIST = ! -name "*.ico" 
 endif
 
 ifneq (,$(filter WINNT WINCE OS2,$(OS_ARCH)))
 PKGCP_OS = dos
 else
 PKGCP_OS = unix
 endif
 
-# The following target stages files into three directories: one directory for
-# locale-independent files, one for locale-specific files, and one for optional
-# extensions based on the information in the MOZ_PKG_MANIFEST file and the
-# following vars:
+# The following target stages files into two directories: one directory for
+# core files, and one for optional extensions based on the information in
+# the MOZ_PKG_MANIFEST file and the following vars:
 # MOZ_NONLOCALIZED_PKG_LIST
 # MOZ_LOCALIZED_PKG_LIST
 # MOZ_OPTIONAL_PKG_LIST
 
 PKG_ARG = , "$(pkg)"
 
 # Define packager macro to work around make 3.81 backslash issue (bug #339933)
 define PACKAGER_COPY
 $(PERL) -I$(MOZILLA_DIR)/xpinstall/packager -e 'use Packager; \
        Packager::Copy($1,$2,$3,$4,$5,$6,$7);'
 endef
 
-installer-stage: $(MOZ_PKG_MANIFEST)
+installer-stage: stage-package
 ifndef MOZ_PKG_MANIFEST
 	$(error MOZ_PKG_MANIFEST unspecified!)
 endif
 	@rm -rf $(DEPTH)/installer-stage $(DIST)/xpt
 	@echo "Staging installer files..."
-	@$(NSINSTALL) -D $(DEPTH)/installer-stage/nonlocalized
-	@$(NSINSTALL) -D $(DEPTH)/installer-stage/localized
+	@$(NSINSTALL) -D $(DEPTH)/installer-stage/core
+	@cp -av $(DIST)/$(STAGEPATH)$(MOZ_PKG_DIR)$(_BINPATH)/. $(DEPTH)/installer-stage/core
+ifdef MOZ_OPTIONAL_PKG_LIST
 	@$(NSINSTALL) -D $(DEPTH)/installer-stage/optional
-	@$(NSINSTALL) -D $(DIST)/xpt
-	$(call PACKAGER_COPY, "$(call core_abspath,$(DIST))",\
-	  "$(call core_abspath,$(DEPTH)/installer-stage/nonlocalized)", \
-	  "$(MOZ_PKG_MANIFEST)", "$(PKGCP_OS)", 1, 0, 1 \
-	  $(foreach pkg,$(MOZ_NONLOCALIZED_PKG_LIST),$(PKG_ARG)) )
-	$(call PACKAGER_COPY, "$(call core_abspath,$(DIST))",\
-	  "$(call core_abspath,$(DEPTH)/installer-stage/localized)", \
-	  "$(MOZ_PKG_MANIFEST)", "$(PKGCP_OS)", 1, 0, 1 \
-	  $(foreach pkg,$(MOZ_LOCALIZED_PKG_LIST),$(PKG_ARG)) )
-ifdef MOZ_OPTIONAL_PKG_LIST
 	$(call PACKAGER_COPY, "$(call core_abspath,$(DIST))",\
 	  "$(call core_abspath,$(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)"
-	$(PYTHON) $(MOZILLA_DIR)/toolkit/mozapps/installer/link-manifests.py \
-	  $(DEPTH)/installer-stage/nonlocalized/components/components.manifest \
-	  $(patsubst %,$(DIST)/manifests/%/components,$(MOZ_NONLOCALIZED_PKG_LIST))
-	$(PYTHON) $(MOZILLA_DIR)/toolkit/mozapps/installer/link-manifests.py \
-	  $(DEPTH)/installer-stage/nonlocalized/chrome/nonlocalized.manifest \
-	  $(patsubst %,$(DIST)/manifests/%/chrome,$(MOZ_NONLOCALIZED_PKG_LIST))
-	$(PYTHON) $(MOZILLA_DIR)/toolkit/mozapps/installer/link-manifests.py \
-	  $(DEPTH)/installer-stage/localized/chrome/localized.manifest \
-	  $(patsubst %,$(DIST)/manifests/%/chrome,$(MOZ_LOCALIZED_PKG_LIST))
-	printf "manifest components/interfaces.manifest\nmanifest components/components.manifest\nmanifest chrome/nonlocalized.manifest\nmanifest chrome/localized.manifest\n" > $(DEPTH)/installer-stage/nonlocalized/chrome.manifest
+ifdef MOZ_OMNIJAR
+	@(cd $(DEPTH)/installer-stage/core && $(PACK_OMNIJAR))
+endif
 
 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
--- a/toolkit/mozapps/installer/windows/nsis/common.nsh
+++ b/toolkit/mozapps/installer/windows/nsis/common.nsh
@@ -3773,18 +3773,17 @@
       IfErrors +4 +1
       Delete /REBOOTOK "$R1.moz-delete"
       ${LogMsg} "Delayed Delete File (Reboot Required): $R1.moz-delete"
       GoTo end
 
       ; Check if the file exists in the source. If it does the new file will
       ; replace the existing file when the system is rebooted. If it doesn't
       ; the file will be deleted when the system is rebooted.
-      IfFileExists "$EXEDIR\nonlocalized$R9" end +1
-      IfFileExists "$EXEDIR\localized$R9" end +1
+      IfFileExists "$EXEDIR\core$R9" end +1
       IfFileExists "$EXEDIR\optional$R9" end +1
       Delete /REBOOTOK "$R1"
       ${LogMsg} "Delayed Delete File (Reboot Required): $R1"
 
       end:
       ClearErrors
 
       Push 0