]> git.sesse.net Git - vlc/commitdiff
nsis: refuse to run on Windows < XP SP2
authorRafaël Carré <funman@videolan.org>
Sat, 25 May 2013 01:11:37 +0000 (03:11 +0200)
committerRafaël Carré <funman@videolan.org>
Sat, 25 May 2013 01:12:10 +0000 (03:12 +0200)
extras/package/win32/NSIS/vlc.win32.nsi.in

index 65d6815697168ff3ffdebe8795325bec5941b4ff..56e8b03b2325a5e88e89dc48274e7eedf6c85280 100644 (file)
@@ -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