Restrict OpenShell installs to Windows 10

This commit is contained in:
2Shirt 2021-09-25 20:37:39 -06:00
parent b05835d80f
commit 68d8e292cc
Signed by: 2Shirt
GPG key ID: 152FAC923B0E132C

View file

@ -96,6 +96,8 @@ LIBREOFFICE_XCU_DATA = '''<?xml version="1.0" encoding="UTF-8"?>
</oor:items>
'''
MENU_PRESETS = Menu()
OS_VERSION = -1
if platform.system() == 'Windows':
OS_VERSION = float(platform.win32_ver()[0])
PROGRAMFILES_32 = os.environ.get(
'PROGRAMFILES(X86)', os.environ.get(
@ -579,6 +581,12 @@ def install_libreoffice(
def install_open_shell():
"""Install Open Shell (just the Start Menu)."""
installer = get_tool_path('OpenShell', 'OpenShell', check=False)
# Bail early
if OS_VERSION != 10:
raise GenericWarning('Unsupported OS')
# Install OpenShell
download_tool('OpenShell', 'OpenShell')
download_tool('OpenShell', 'Fluent-Metro', suffix='zip')
cmd = [installer, '/qn', 'ADDLOCAL=StartMenu']