[vlc-commits] nsis: refuse to run on Windows < XP SP2
Rafaël Carré
git at videolan.org
Sat May 25 03:12:15 CEST 2013
vlc | branch: master | Rafaël Carré <funman at videolan.org> | Sat May 25 03:11:37 2013 +0200| [ef2377a942fb02910a9a2d033d70cbc28ef7f7be] | committer: Rafaël Carré
nsis: refuse to run on Windows < XP SP2
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=ef2377a942fb02910a9a2d033d70cbc28ef7f7be
---
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 65d6815..56e8b03 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
More information about the vlc-commits
mailing list