Mercurial > mxe-octave
changeset 4387:05b44661c970
nsis-installer: Check new reg values for Win10 (Bug #50552)
* tools/makeinst-script.sh.in
(CheckWinVer): use CurrentMajorVersionNumber, CurrentMinorVersionNumber reg values for version number and fall back to Version, if didnt get a version number
author | John D |
---|---|
date | Thu, 18 May 2017 14:29:43 -0400 |
parents | d28a54afe7e7 |
children | d18a08f439b9 |
files | tools/makeinst-script.sh.in |
diffstat | 1 files changed, 17 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/tools/makeinst-script.sh.in Tue May 16 08:36:10 2017 -0400 +++ b/tools/makeinst-script.sh.in Thu May 18 14:29:43 2017 -0400 @@ -428,8 +428,21 @@ Push \$0 Push \$1 + ; try read new way of getting version + ReadRegStr \$0 HKLM "SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion" CurrentMajorVersionNumber + ; since is DWORD reg value, error will be set, however will be "" if no value read + StrCmp \$0 "" is_less_than_win10 + ReadRegStr \$1 HKLM "SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion" CurrentMinorVersionNumber + StrCmp \$1 "" is_less_than_win10 + + StrCpy \$0 "\$0.\$1" + Goto is_winnt + +is_less_than_win10: + ClearErrors ReadRegStr \$0 HKLM "SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion" CurrentVersion IfErrors is_error is_winnt + is_winnt: StrCpy \$1 \$0 1 StrCmp \$1 4 is_error ; Aborting installation for Windows versions older than Windows 2000 @@ -439,8 +452,10 @@ StrCmp \$0 "6.0" is_winnt_vista StrCmp \$0 "6.1" is_winnt_7 StrCmp \$0 "6.2" is_winnt_8 - StrCmp \$0 "6.3" is_winnt_10 + StrCmp \$0 "6.3" is_winnt_8 ; win 8.1 + StrCmp \$0 "10.0" is_winnt_10 StrCmp \$1 6 is_winnt_10 ; Checking for future versions of Windows 10+ + StrCmp \$1 1 is_winnt_10 ; Checking for future versions of Windows 10+ Goto is_error is_winnt_10: @@ -455,6 +470,7 @@ Goto done is_error: StrCpy \$1 \$0 + ClearErrors ReadRegStr \$0 HKLM "SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion" ProductName IfErrors 0 +4 ReadRegStr \$0 HKLM "SOFTWARE\\Microsoft\\Windows\\CurrentVersion" Version