diff --git a/config/autoconf.mk.in b/config/autoconf.mk.in index 9f361aaf0bc..b88ffcbbbac 100644 --- a/config/autoconf.mk.in +++ b/config/autoconf.mk.in @@ -177,6 +177,8 @@ JAR="@JAR@" TAR=@TAR@ +MAKENSIS=@MAKENSIS@ + RM = rm -f # The MOZ_UI_LOCALE var is used to build a particular locale. Do *not* diff --git a/configure.in b/configure.in index 2fc1d074fe5..81fe836e3e2 100644 --- a/configure.in +++ b/configure.in @@ -6428,12 +6428,32 @@ MOZ_ARG_DISABLE_BOOL(installer, MOZ_INSTALLER=, MOZ_INSTALLER=1) if test -n "$MOZ_INSTALLER" -a "$OS_ARCH" = "WINNT"; then - # Disable installer for Windows builds that use the new toolkit if NSIS - # isn't in the path. - MOZ_PATH_PROGS(MAKENSIS, makensis) + # Disable installer for Windows builds that use the new toolkit if the + # required major version and minimum minor version of Unicode NSIS isn't in + # the path. + REQ_NSIS_MAJOR_VER=2 + MIN_NSIS_MINOR_VER=33 + MOZ_PATH_PROGS(MAKENSIS, $MAKENSIS makensisu-2.46 makensisu makensis) if test -z "$MAKENSIS" || test "$MAKENSIS" = ":"; then - AC_MSG_ERROR([To build the installer makensis is required in your path. To build without the installer reconfigure using --disable-installer.]) + AC_MSG_ERROR([To build the installer you must have the latest MozillaBuild or Unicode NSIS with a major version of $REQ_NSIS_MAJOR_VER and a minimum minor version of $MIN_NSIS_MINOR_VER in your path. To build without the installer reconfigure using --disable-installer.]) fi + changequote(,) + MAKENSIS_VER=`"$MAKENSIS" -version 2>/dev/null | sed -e '/-Unicode/!s/.*//g' -e 's/^v\([0-9]\+\.[0-9]\+\)\-Unicode$/\1/g'` + changequote([,]) + if test ! "$MAKENSIS_VER" == ""; then + MAKENSIS_MAJOR_VER=`echo $MAKENSIS_VER | $AWK -F\. '{ print $1 }'` + MAKENSIS_MINOR_VER=`echo $MAKENSIS_VER | $AWK -F\. '{ print $2 }'` + fi + AC_MSG_CHECKING([for Unicode NSIS with major version == $REQ_NSIS_MAJOR_VER and minor version >= $MIN_NSIS_MINOR_VER]) + if test "$MAKENSIS_VER" == "" || + test ! "$MAKENSIS_MAJOR_VER" == "$REQ_NSIS_MAJOR_VER" || + test ! "$MAKENSIS_MINOR_VER" -ge $MIN_NSIS_MINOR_VER; then + AC_MSG_RESULT([no]) + AC_MSG_ERROR([To build the installer you must have the latest MozillaBuild or Unicode NSIS with a major version of $REQ_NSIS_MAJOR_VER and a minimum minor version of $MIN_NSIS_MINOR_VER in your path. To build without the installer reconfigure using --disable-installer.]) + fi + AC_MSG_RESULT([yes]) + MAKENSIS="${CYGWIN_WRAPPER} $MAKENSIS" + # The Windows build for NSIS requires the iconv command line utility to # convert the charset of the locale files. MOZ_PATH_PROGS(HOST_ICONV, $HOST_ICONV "iconv", "") @@ -8693,6 +8713,7 @@ AC_SUBST(CYGWIN_WRAPPER) AC_SUBST(AS_PERL) AC_SUBST(WIN32_REDIST_DIR) AC_SUBST(PYTHON) +AC_SUBST(MAKENSIS) AC_SUBST(WINCE) AC_SUBST(WINCE_SDK_DIR) diff --git a/toolkit/mozapps/installer/windows/nsis/makensis.mk b/toolkit/mozapps/installer/windows/nsis/makensis.mk index 643696f6a41..bc784cff8f1 100644 --- a/toolkit/mozapps/installer/windows/nsis/makensis.mk +++ b/toolkit/mozapps/installer/windows/nsis/makensis.mk @@ -68,10 +68,10 @@ $(CONFIG_DIR)/setup.exe:: done $(INSTALL) $(addprefix $(MOZILLA_DIR)/toolkit/mozapps/installer/windows/nsis/,$(TOOLKIT_NSIS_FILES)) $(CONFIG_DIR) $(INSTALL) $(MOZILLA_DIR)/toolkit/mozapps/installer/windows/nsis/setup.ico $(CONFIG_DIR) - cd $(CONFIG_DIR) && makensisu.exe installer.nsi + cd $(CONFIG_DIR) && $(MAKENSIS) installer.nsi # Support for building the uninstaller when repackaging locales ifeq ($(CONFIG_DIR),l10ngen) - cd $(CONFIG_DIR) && makensisu.exe uninstaller.nsi + cd $(CONFIG_DIR) && $(MAKENSIS) uninstaller.nsi endif $(CONFIG_DIR)/7zSD.sfx: @@ -94,6 +94,6 @@ uninstaller:: done $(INSTALL) $(addprefix $(MOZILLA_DIR)/toolkit/mozapps/installer/windows/nsis/,$(TOOLKIT_NSIS_FILES)) $(CONFIG_DIR) $(INSTALL) $(MOZILLA_DIR)/toolkit/mozapps/installer/windows/nsis/setup.ico $(CONFIG_DIR) - cd $(CONFIG_DIR) && makensisu.exe uninstaller.nsi + cd $(CONFIG_DIR) && $(MAKENSIS) uninstaller.nsi $(NSINSTALL) -D $(DIST)/bin/uninstall cp $(CONFIG_DIR)/helper.exe $(DIST)/bin/uninstall