Bug 470197 (Calendar Win32 only) - Update Sunbird installer. r=ctalbert
authorRobert Strong <robert.bugzilla@gmail.com>
Tue, 13 Jan 2009 00:05:03 -0800
changeset 1621 19e24a3d455e8aa512eab362cfea92776432d7ae
parent 1620 2eb04c5e52fb14448d758f2677f43d1f7c5dc98c
child 1622 7ae154a2a5981d7e2dafd34ef4bf3d3def9d0256
push id1299
push userrstrong@mozilla.com
push dateTue, 13 Jan 2009 08:06:41 +0000
treeherdercomm-central@306be9e163b0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersctalbert
bugs470197
Bug 470197 (Calendar Win32 only) - Update Sunbird installer. r=ctalbert
calendar/installer/windows/Makefile.in
--- a/calendar/installer/windows/Makefile.in
+++ b/calendar/installer/windows/Makefile.in
@@ -46,84 +46,117 @@ include $(MOZILLA_SRCDIR)/toolkit/mozapp
 
 CONFIG_DIR = instgen
 SFX_MODULE = $(MOZILLA_SRCDIR)/other-licenses/7zstub/sunbird/7zSD.sfx
 
 PP_LOCALIZED_FILES = \
 	packages-static \
 	$(NULL)
 
-INSTALLER_FILES = \
-	app.tag \
+# All script and locale files used by the Unicode version of NSIS need to be
+# converted from UTF-8 to UTF-16LE
+INSTALLER_FILES_CONV = \
 	nsis/installer.nsi \
 	nsis/uninstaller.nsi \
 	nsis/shared.nsh \
 	$(NULL)
 
-BRANDING_FILES = \
+INSTALLER_FILES = \
+	app.tag \
+	$(NULL)
+
+# All script and locale files used by the Unicode version of NSIS need to be
+# converted from UTF-8 to UTF-16LE
+BRANDING_FILES_CONV = \
 	branding.nsi \
 	license.txt \
+	$(NULL)
+
+BRANDING_FILES = \
 	wizHeader.bmp \
 	wizHeaderRTL.bmp \
 	wizWatermark.bmp \
 	$(NULL)
 
 DEFINES += \
 	-DAB_CD=$(AB_CD) \
 	-DPKG_BASENAME=$(PKG_BASENAME) \
 	-DMOZ_APP_VERSION=$(MOZ_APP_VERSION) \
 	-DMOZ_APP_DISPLAYNAME=${MOZ_APP_DISPLAYNAME} \
 	-DMOZILLA_VERSION=${MOZILLA_VERSION} \
 	$(NULL)
 
 include $(topsrcdir)/config/config.mk
-include $(call EXPAND_MOZLOCALE_SRCDIR,toolkit/locales)/installer/windows/charset.mk
 
 installer::
 	$(MAKE) -C .. installer-stage
 	$(MAKE) $(CONFIG_DIR)/setup.exe
 
 # For building the uninstaller during the application build so it can be
 # included for mar file generation.
 uninstaller::
 	$(RM) -rf $(CONFIG_DIR) && mkdir $(CONFIG_DIR)
+	for i in $(INSTALLER_FILES_CONV); do \
+	  iconv -f UTF-8 -t UTF-16LE $(srcdir)/$$i | \
+	    cat $(MOZILLA_SRCDIR)/toolkit/mozapps/installer/windows/nsis/utf16-le-bom.bin - > \
+	    $(CONFIG_DIR)/`basename $$i`; \
+	done
 	$(INSTALL) $(addprefix $(srcdir)/,$(INSTALLER_FILES)) $(CONFIG_DIR)
+	for i in $(BRANDING_FILES_CONV); do \
+	  iconv -f UTF-8 -t UTF-16LE $(DIST)/branding/$$i | \
+	    cat $(MOZILLA_SRCDIR)/toolkit/mozapps/installer/windows/nsis/utf16-le-bom.bin - > \
+	    $(CONFIG_DIR)/$$i; \
+	done
 	$(INSTALL) $(addprefix $(DIST)/branding/,$(BRANDING_FILES)) $(CONFIG_DIR)
 	$(EXIT_ON_ERROR) \
 	for i in $(PP_LOCALIZED_FILES); do \
 	  $(PERL) $(MOZILLA_SRCDIR)/config/preprocessor.pl $(DEFINES) $(ACDEFINES) $(srcdir)/$$i > $(CONFIG_DIR)/$$i; \
 	done
 	$(PERL) $(MOZILLA_SRCDIR)/config/preprocessor.pl -Fsubstitution $(DEFINES) $(ACDEFINES) \
-	  $(srcdir)/nsis/defines.nsi.in > $(CONFIG_DIR)/defines.nsi
+	  $(srcdir)/nsis/defines.nsi.in | iconv -f UTF-8 -t UTF-16LE | \
+	  cat $(MOZILLA_SRCDIR)/toolkit/mozapps/installer/windows/nsis/utf16-le-bom.bin - > \
+	  $(CONFIG_DIR)/defines.nsi
 	$(PERL) $(MOZILLA_SRCDIR)/toolkit/mozapps/installer/windows/nsis/preprocess-locale.pl \
-	  $(topsrcdir) $(call EXPAND_LOCALE_SRCDIR,calendar/locales)/installer $(AB_CD) \
-	  $(WIN_INSTALLER_CHARSET) $(CONFIG_DIR)
+	  $(MOZILLA_SRCDIR) $(call EXPAND_LOCALE_SRCDIR,calendar/locales)/installer $(AB_CD) \
+	  $(CONFIG_DIR)
 
 $(CONFIG_DIR)/setup.exe::
 	$(RM) -rf $(CONFIG_DIR) && mkdir $(CONFIG_DIR)
+	for i in $(INSTALLER_FILES_CONV); do \
+	  iconv -f UTF-8 -t UTF-16LE $(srcdir)/$$i | \
+	    cat $(MOZILLA_SRCDIR)/toolkit/mozapps/installer/windows/nsis/utf16-le-bom.bin - > \
+	    $(CONFIG_DIR)/`basename $$i`; \
+	done
 	$(INSTALL) $(addprefix $(srcdir)/,$(INSTALLER_FILES)) $(CONFIG_DIR)
+	for i in $(BRANDING_FILES_CONV); do \
+	  iconv -f UTF-8 -t UTF-16LE $(DIST)/branding/$$i | \
+	    cat $(MOZILLA_SRCDIR)/toolkit/mozapps/installer/windows/nsis/utf16-le-bom.bin - > \
+	    $(CONFIG_DIR)/$$i; \
+	done
 	$(INSTALL) $(addprefix $(DIST)/branding/,$(BRANDING_FILES)) $(CONFIG_DIR)
 	$(EXIT_ON_ERROR) \
 	for i in $(PP_LOCALIZED_FILES); do \
 	  $(PERL) $(MOZILLA_SRCDIR)/config/preprocessor.pl $(DEFINES) $(ACDEFINES) $(srcdir)/$$i > $(CONFIG_DIR)/$$i; \
 	done
 	$(PERL) $(MOZILLA_SRCDIR)/toolkit/mozapps/installer/windows/nsis/make-installremoves.pl \
 	  ../removed-files > $(CONFIG_DIR)/removed-files.log
 	$(PERL) $(MOZILLA_SRCDIR)/config/preprocessor.pl -Fsubstitution $(DEFINES) $(ACDEFINES) \
-	  $(srcdir)/nsis/defines.nsi.in > $(CONFIG_DIR)/defines.nsi
+	  $(srcdir)/nsis/defines.nsi.in | iconv -f UTF-8 -t UTF-16LE | \
+	  cat $(MOZILLA_SRCDIR)/toolkit/mozapps/installer/windows/nsis/utf16-le-bom.bin - > \
+	  $(CONFIG_DIR)/defines.nsi
 	$(PERL) $(MOZILLA_SRCDIR)/toolkit/mozapps/installer/windows/nsis/preprocess-locale.pl \
-	  $(topsrcdir) $(call EXPAND_LOCALE_SRCDIR,calendar/locales)/installer $(AB_CD) \
-	  $(WIN_INSTALLER_CHARSET) $(CONFIG_DIR)
+	  $(MOZILLA_SRCDIR) $(call EXPAND_LOCALE_SRCDIR,calendar/locales)/installer $(AB_CD) \
+	  $(CONFIG_DIR)
 
 include $(topsrcdir)/config/rules.mk
 include $(MOZILLA_SRCDIR)/toolkit/mozapps/installer/windows/nsis/makensis.mk
 
 export::
 ifndef MOZ_BRANDING_DIRECTORY
 	$(NSINSTALL) -D $(DIST)/branding
 	cp $(srcdir)/Header.bmp    $(DIST)/branding/Header.bmp
 	cp $(srcdir)/Watermrk.bmp  $(DIST)/branding/Watermrk.bmp
 	cp $(srcdir)/nsis/branding.nsi $(DIST)/branding/branding.nsi
-	cp $(srcdir)/license.txt  $(DIST)/branding/license.txt
+	cp $(srcdir)/license.txt       $(DIST)/branding/license.txt
 	cp $(srcdir)/wizHeader.bmp     $(DIST)/branding/wizHeader.bmp
 	cp $(srcdir)/wizHeaderRTL.bmp  $(DIST)/branding/wizHeaderRTL.bmp
 	cp $(srcdir)/wizWatermark.bmp  $(DIST)/branding/wizWatermark.bmp
 endif