mirror of
https://gitee.com/gfdgd-xi/deep-wine-runner
synced 2025-12-14 11:02:04 +08:00
优化在termux的使用体验
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
#!/usr/bin/env python3
|
||||
import os
|
||||
import sys
|
||||
import subprocess
|
||||
import PyQt5.QtWidgets as QtWidgets
|
||||
programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
|
||||
arch = subprocess.getoutput("dpkg --print-architecture").replace(" ", "").replace("\n", "")
|
||||
if os.path.exists(f"{programPath}/VirtualMachine-{arch}"):
|
||||
@@ -13,6 +15,10 @@ if not os.path.exists(f"{programPath}/VirtualMachine-amd64"):
|
||||
if os.path.exists(f"{programPath}/VirtualMachine-{arch}"):
|
||||
os.system(f"{programPath}/VirtualMachine-{arch}")
|
||||
exit()
|
||||
app = QtWidgets.QApplication(sys.argv)
|
||||
QtWidgets.QMessageBox.information(None, "提示", "虚拟机安装器暂不支持此系统")
|
||||
exit(1)
|
||||
# 后面已废弃
|
||||
# 只能使用 Qemu User 运行程序
|
||||
if os.path.exists("/usr/lib/x86_64-linux-gnu/") and not os.system("which qemu-x86_64"):
|
||||
os.system(f"qemu-x86_64 '{programPath}/VirtualMachine-x86_64'")
|
||||
|
||||
Reference in New Issue
Block a user