[vlc-commits] configure: Find makensis and check its version

Marvin Scholz git at videolan.org
Fri Mar 16 02:05:19 CET 2018


vlc | branch: master | Marvin Scholz <epirat07 at gmail.com> | Fri Mar 16 01:51:26 2018 +0100| [ea1bd4b72e28bd782d602e09664037142b1aa87f] | committer: Marvin Scholz

configure: Find makensis and check its version

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=ea1bd4b72e28bd782d602e09664037142b1aa87f
---

 configure.ac | 32 ++++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)

diff --git a/configure.ac b/configure.ac
index 7af0979cfe..23e430de71 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4163,6 +4163,38 @@ AC_SUBST(soliddatadir)
 AM_CONDITIONAL(KDE_SOLID, [test "x${soliddatadir}" != "x"])
 
 dnl
+dnl  Find tools for win32 packaging
+dnl
+AS_IF([test "${SYS}" = "mingw32"], [
+    dnl
+    dnl Find makensis required to build the NSIS installer
+    dnl
+    nsis_major_required="3"
+    nsis_version_ok="no"
+    AC_PATH_PROG([MAKENSIS], [makensis], [no])
+    AS_IF([test "$MAKENSIS" != "no"], [
+        # Check version
+        AC_MSG_CHECKING([makensis version])
+        nsis_version=$($MAKENSIS -VERSION)
+        AC_MSG_RESULT([$nsis_version])
+        nsis_version_major=$(echo "$nsis_version" | awk -F \. '{print $1}' | sed 's/v//')
+        # Check if major version is a valid number
+        AS_IF([test -n "$nsis_version_major" && \
+               test "$nsis_version_major" -eq "$nsis_version_major" 2> /dev/null], [
+            # Do the version check using major version
+            AS_IF([test "$nsis_version_major" -lt "$nsis_major_required"], [
+                AC_MSG_WARN([makensis too old, (needs ${nsis_major_required}.x, have ${nsis_version_major}.x)])
+            ], [
+                nsis_version_ok="yes"
+            ])
+        ], [
+            AC_MSG_WARN([failed to check the makensis version])
+        ])
+    ])
+])
+AM_CONDITIONAL(HAVE_MAKENSIS, [test "x$MAKENSIS" != "xno" && test "$nsis_version_ok" == "yes"])
+
+dnl
 dnl Check wether we have the PROCESS_MITIGATION_IMAGE_LOAD_POLICY 
 dnl It should only be available when building for win10, but some SDKs define it unconditionnaly
 dnl



More information about the vlc-commits mailing list