diff --git a/.bin/Scripts/functions/common.py b/.bin/Scripts/functions/common.py index ef918f0f..492a1adb 100644 --- a/.bin/Scripts/functions/common.py +++ b/.bin/Scripts/functions/common.py @@ -616,12 +616,21 @@ def check_os(): # Query registry path = r'SOFTWARE\Microsoft\Windows NT\CurrentVersion' with winreg.OpenKey(HKLM, path) as key: - for name in ['CurrentBuild', 'ProductName']: + for name in ['CurrentBuild', 'CurrentVersion', 'ProductName']: try: tmp[name] = winreg.QueryValueEx(key, name)[0] except FileNotFoundError: tmp[name] = 'Unknown' + # Handle CurrentBuild collision + if tmp['CurrentBuild'] == '9200': + if tmp['CurrentVersion'] == '6.2': + # Windown 8, set to fake build number + tmp['CurrentBuild'] = '9199' + else: + # Windows 8.1, leave alone + pass + # Check bit depth tmp['Arch'] = 32 if 'PROGRAMFILES(X86)' in global_vars['Env']: @@ -631,6 +640,7 @@ def check_os(): build_info = WINDOWS_BUILDS.get( tmp['CurrentBuild'], ('Unknown', 'Build {}'.format(tmp['CurrentBuild']), None, None, 'unrecognized')) + build_info = list(build_info) tmp['Version'] = build_info.pop(0) tmp['Release'] = build_info.pop(0) tmp['Codename'] = build_info.pop(0) @@ -650,7 +660,7 @@ def check_os(): # Set display name tmp['DisplayName'] = '{} x{}'.format(tmp['Name'], tmp['Arch']) if tmp['Notes']: - tmp['Name'] += ' ({})'.format(tmp['Notes']) + tmp['DisplayName'] += ' ({})'.format(tmp['Notes']) global_vars['OS'] = tmp diff --git a/.bin/Scripts/settings/windows_builds.py b/.bin/Scripts/settings/windows_builds.py index 4be67d98..bdac8bf4 100644 --- a/.bin/Scripts/settings/windows_builds.py +++ b/.bin/Scripts/settings/windows_builds.py @@ -10,7 +10,9 @@ WINDOWS_BUILDS = { '7600': ( '7', 'RTM', 'Vienna', None, 'unsupported'), '7601': ( '7', 'SP1', 'Vienna', None, 'outdated'), - '9200': ( '8', 'RTM', None, None, 'unsupported'), + #9199 is a fake build since Win 8 is 6.2.9200 but that collides with Win 8.1 (6.3.9200) + '9199': ( '8', 'RTM', None, None, 'unsupported'), + '9200': ( '8.1', None, 'Blue', None, 'outdated'), '9600': ( '8.1', None, 'Update', None, None),