Prep work for
Bug 569058 - Upgrade NSIS version to 2.45 or later (PCA complains when installer is cancelled on Windows 7). r=standard8
--- a/config/autoconf.mk.in
+++ b/config/autoconf.mk.in
@@ -148,16 +148,18 @@ MOZ_MORK = @MOZ_MORK@
MOZ_MORKREADER = @MOZ_MORKREADER@
MOZ_NO_FAST_LOAD = @MOZ_NO_FAST_LOAD@
NS_PRINTING = @NS_PRINTING@
MOZ_CRASHREPORTER = @MOZ_CRASHREPORTER@
MOZ_HELP_VIEWER = @MOZ_HELP_VIEWER@
TAR=@TAR@
+MAKENSISU=@MAKENSISU@
+
RM = rm -f
# The MOZ_UI_LOCALE var is used to build a particular locale. Do *not*
# use the var to change any binary files. Do *not* use this var unless you
# write rules for the "clean-locale" and "locale" targets.
MOZ_UI_LOCALE = @MOZ_UI_LOCALE@
MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS = @MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS@
--- a/configure.in
+++ b/configure.in
@@ -5433,22 +5433,42 @@ case "$target_os" in
;;
esac
MOZ_ARG_DISABLE_BOOL(installer,
[ --disable-installer Disable building of 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)
- 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.])
+ # 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(MAKENSISU, $MAKENSISU makensisu-2.46 makensisu makensis)
+ if test -z "$MAKENSISU" || test "$MAKENSISU" = ":"; then
+ 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(,)
+ MAKENSISU_VER=`"$MAKENSISU" -version 2>/dev/null | sed -e '/-Unicode/!s/.*//g' -e 's/^v\([0-9]\+\.[0-9]\+\)\-Unicode$/\1/g'`
+ changequote([,])
+ if test ! "$MAKENSISU_VER" == ""; then
+ MAKENSISU_MAJOR_VER=`echo $MAKENSISU_VER | $AWK -F\. '{ print $1 }'`
+ MAKENSISU_MINOR_VER=`echo $MAKENSISU_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 "$MAKENSISU_VER" == "" ||
+ test ! "$MAKENSISU_MAJOR_VER" == "$REQ_NSIS_MAJOR_VER" ||
+ test ! "$MAKENSISU_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])
+ MAKENSISU="${CYGWIN_WRAPPER} $MAKENSISU"
+
# 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", "")
if test -z "$HOST_ICONV"; then
AC_MSG_ERROR([To build the installer iconv is required in your path. To build without the installer reconfigure using --disable-installer.])
fi
fi
@@ -7016,16 +7036,17 @@ dnl win32 options
AC_SUBST(MOZ_DEBUG_SYMBOLS)
AC_SUBST(MOZ_MAPINFO)
AC_SUBST(MOZ_BROWSE_INFO)
AC_SUBST(MOZ_TOOLS_DIR)
AC_SUBST(CYGWIN_WRAPPER)
AC_SUBST(AS_PERL)
AC_SUBST(WIN32_REDIST_DIR)
AC_SUBST(PYTHON)
+AC_SUBST(MAKENSISU)
AC_SUBST(WINCE)
AC_SUBST(WINCE_WINDOWS_MOBILE)
dnl Echo the CFLAGS to remove extra whitespace.
CFLAGS=`echo \
$_WARNINGS_CFLAGS \
$CFLAGS`