mirror of
https://gitee.com/gfdgd-xi/deep-wine-runner
synced 2025-12-13 10:32:03 +08:00
支持从QEMU开启
This commit is contained in:
14
VM/VirtualMachine
Normal file
14
VM/VirtualMachine
Normal file
@@ -0,0 +1,14 @@
|
||||
#!/usr/bin/env python3
|
||||
import os
|
||||
import subprocess
|
||||
programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
|
||||
arch = subprocess.getoutput("arch").replace(" ", "").replace("\n", "")
|
||||
if os.path.exists(f"{programPath}/VirtualMachine-{arch}"):
|
||||
os.system(f"{programPath}/VirtualMachine-{arch}")
|
||||
exit()
|
||||
# 只能使用 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'")
|
||||
exit()
|
||||
print("未安装环境,立即安装!")
|
||||
os.system(f"python3 '{programPath}/../RunCommandWithTerminal.py' '{programPath}/../InstallRuntime/amd64.sh'")
|
||||
Reference in New Issue
Block a user