From ef2377a942fb02910a9a2d033d70cbc28ef7f7be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C3=ABl=20Carr=C3=A9?= Date: Sat, 25 May 2013 03:11:37 +0200 Subject: [PATCH] nsis: refuse to run on Windows < XP SP2 --- extras/package/win32/NSIS/vlc.win32.nsi.in | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/extras/package/win32/NSIS/vlc.win32.nsi.in b/extras/package/win32/NSIS/vlc.win32.nsi.in index 65d6815697..56e8b03b23 100644 --- a/extras/package/win32/NSIS/vlc.win32.nsi.in +++ b/extras/package/win32/NSIS/vlc.win32.nsi.in @@ -49,6 +49,7 @@ RequestExecutionLevel user !addincludedir NSIS !addplugindir NSIS !include UAC.nsh +!include WinVer.nsh ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; NSIS Modern User Interface configuration ; @@ -430,6 +431,14 @@ Function .onInit @HAVE_WIN64_TRUE@ MessageBox MB_OK|MB_ICONSTOP "This version of VLC only runs on 64bits operating systems.$\nYour operating system is 32bits.$\n$\nPlease get the 32 BITS version." @HAVE_WIN64_TRUE@ Quit @HAVE_WIN64_TRUE@ ${Endif} +${If} ${AtLeastWinXP} + ${If} ${IsWinXP} + ${AndIf} ${AtMostServicePack} 1 + Goto WinTooOld + ${Endif} +${Else} + Goto WinTooOld +${Endif} @HAVE_WIN64_TRUE@ SetRegView 64 ReadRegStr $INSTDIR HKLM "${PRODUCT_DIR_REGKEY}" "InstallDir" @@ -451,6 +460,10 @@ UAC_ElevationAborted: MessageBox mb_iconstop "This installer requires admin access, aborting!" Abort +WinTooOld: + MessageBox MB_OK|MB_ICONSTOP "This version of VLC only runs on Windows XP SP2 and newer." + Quit + UAC_Success: StrCmp 1 $3 +4 StrCmp 3 $1 0 UAC_ElevationAborted -- GitLab