Skip to content

Commit 98157c1

Browse files
committed
Require at least Windows 8
1 parent 6177b8e commit 98157c1

1 file changed

Lines changed: 14 additions & 4 deletions

File tree

installer/installer-x64.nsi

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
!include MUI2.nsh
22
!include LogicLib.nsh
33
!include x64.nsh
4+
!include WinVer.nsh
45

56
# The install path is hardcoded.
67
# We need both a x64 and x86 OpenWith.exe and putting both
@@ -10,6 +11,7 @@
1011
Name "OpenWithEx"
1112
Outfile "build\OpenWithEx-setup-x64.exe"
1213
RequestExecutionLevel admin
14+
ManifestSupportedOS all
1315

1416
!define MUI_ICON "installer.ico"
1517
!define MUI_UNICON "installer.ico"
@@ -36,16 +38,24 @@ RequestExecutionLevel admin
3638

3739
!insertmacro MUI_LANGUAGE "English"
3840

39-
Section "OpenWithEx" OpenWithEx
40-
# Required
41-
SectionIn RO
42-
41+
Function .onInit
4342
# NSIS produces an x86-32 installer. Deny installation if
4443
# we're not on a x86-64 system running WOW64.
4544
${IfNot} ${RunningX64}
4645
MessageBox MB_OK|MB_ICONSTOP "OpenWithEx does not support 32-bit systems."
4746
Quit
4847
${EndIf}
48+
49+
# Need at least Windows 8.
50+
${IfNot} ${AtLeastWin8}
51+
MessageBox MB_OK|MB_ICONSTOP "OpenWithEx requires Windows 8 or greater."
52+
Quit
53+
${EndIf}
54+
FunctionEnd
55+
56+
Section "OpenWithEx" OpenWithEx
57+
# Required
58+
SectionIn RO
4959

5060
# Make sure install directories are clean
5161
RMDir /r "$PROGRAMFILES64\OpenWithEx"

0 commit comments

Comments
 (0)