Add local Windows Server inventory collection and validation; include core package

This commit is contained in:
2026-10-30 11:24:40 -07:00
parent 967b2bd46a
commit f65ade9fff
35 changed files with 2200 additions and 56 deletions

20
samsara/core/startup.py Normal file
View File

@@ -0,0 +1,20 @@
"""Check common desktop prerequisites before Qt can abort the process."""
import ctypes
import os
import sys
def desktop_error():
if not sys.platform.startswith('linux'):
return None
backend = os.environ.get('QT_QPA_PLATFORM', '').split(':')[0]
uses_xcb = backend == 'xcb' or (not backend and os.environ.get('DISPLAY') and not os.environ.get('WAYLAND_DISPLAY'))
if uses_xcb:
try:
ctypes.CDLL('libxcb-cursor.so.0')
except OSError:
return ('Samsara needs the Qt X11 cursor library. On Debian-based desktops run:\n'
' sudo apt install libxcb-cursor0\n'
'Then retry: python -m samsara.main\n'
'For other Linux distributions install the package providing libxcb-cursor.so.0.')
return None