浏览代码

Meta: Assume virgl support to not be present if ldconfig isn't found

This mirrors the behavior of the old run.sh script.
Tim Schumacher 1 年之前
父节点
当前提交
9e1df152d9
共有 1 个文件被更改,包括 6 次插入2 次删除
  1. 6 2
      Meta/run.py

+ 6 - 2
Meta/run.py

@@ -534,8 +534,12 @@ def setup_audio_hardware(config: Configuration):
 
 
 def has_virgl() -> bool:
-    ldconfig_result = run(["ldconfig", "-p"], capture_output=True, encoding="utf-8").stdout.lower()
-    return "virglrenderer" in ldconfig_result
+    try:
+        ldconfig_result = run(["ldconfig", "-p"], capture_output=True, encoding="utf-8").stdout.lower()
+        return "virglrenderer" in ldconfig_result
+    except FileNotFoundError:
+        print("Warning: ldconfig not found in PATH, assuming virgl support to not be present.")
+        return False
 
 
 def setup_screens(config: Configuration):