mirror of
https://gitee.com/gfdgd-xi/deep-wine-runner
synced 2025-01-12 01:28:28 +08:00
修复MountWithouHome.sh的问题
This commit is contained in:
parent
12d8fb69e8
commit
9fb280271b
@ -26,4 +26,4 @@ chmod 777 -R root
|
||||
xhost +
|
||||
|
||||
# 如果参数 3 存在
|
||||
chroot ${@:3}
|
||||
chroot . ${@:3}
|
||||
|
@ -20,7 +20,8 @@ umount ./etc/resolv.conf
|
||||
umount ./sys
|
||||
umount ./dev/shm
|
||||
# 挂载 Wine 运行器目录
|
||||
umount ./opt/apps/deepin-wine-runner/
|
||||
umount ./opt
|
||||
umount ./opt/apps/deepin-wine-runner
|
||||
# 挂载字体
|
||||
umount ./usr/share/fonts
|
||||
# 挂载用户目录到 /root(默认 $HOME 路径)
|
||||
|
@ -471,7 +471,7 @@ def ConfigQemu():
|
||||
choose = QtWidgets.QInputDialog.getItem(window, "提示", "选择需要 Chroot 到里面的容器", lists, 0, False)
|
||||
if not choose[1]:
|
||||
return
|
||||
threading.Thread(target=OpenTerminal, args=[f"python3 '{programPath}/QemuRun.py' '{int(setting['QemuUnMountHome'])}' '{choose[0]}' "]).start()
|
||||
threading.Thread(target=OpenTerminal, args=[f"python3 '{programPath}/QemuRun.py' '{choose[0]}' '{int(setting['QemuUnMountHome'])}' "]).start()
|
||||
print(choose)
|
||||
|
||||
# 生成 desktop 文件在桌面
|
||||
@ -2257,7 +2257,7 @@ try:
|
||||
for g in qemuBottleList:
|
||||
nameValue.append([
|
||||
f"使用qemu-{g[0]}-static 调用容器{g[1]}运行 ",
|
||||
f"python3 '{programPath}/QemuRun.py' {int(setting['QemuUnMountHome'])} '{g[0]}/{g[1]}' "
|
||||
f"python3 '{programPath}/QemuRun.py' '{g[0]}/{g[1]}' {int(setting['QemuUnMountHome'])} "
|
||||
])
|
||||
except:
|
||||
traceback.print_exc()
|
||||
@ -2406,6 +2406,20 @@ for i in iconListUnBuild:
|
||||
iconList.append(i)
|
||||
print(iconList)
|
||||
|
||||
# Qemu Lock
|
||||
try:
|
||||
if os.path.exists("/tmp/deepin-wine-runner-lock.txt"):
|
||||
print("lock")
|
||||
with open(f"/tmp/deepin-wine-runner-lock.txt", "r") as file:
|
||||
setting["QemuUnMountHome"] = bool(int(file.read()))
|
||||
else:
|
||||
print("unlock")
|
||||
with open(f"/tmp/deepin-wine-runner-lock.txt", "w") as file:
|
||||
# = bool(int(file.read()))
|
||||
file.write(str(int(setting["QemuUnMountHome"])))
|
||||
except:
|
||||
traceback.print_exc()
|
||||
|
||||
###########################
|
||||
# 窗口创建
|
||||
###########################
|
||||
|
@ -471,7 +471,7 @@ def ConfigQemu():
|
||||
choose = QtWidgets.QInputDialog.getItem(window, "提示", "选择需要 Chroot 到里面的容器", lists, 0, False)
|
||||
if not choose[1]:
|
||||
return
|
||||
threading.Thread(target=OpenTerminal, args=[f"python3 '{programPath}/QemuRun.py' '{int(setting['QemuUnMountHome'])}' '{choose[0]}' "]).start()
|
||||
threading.Thread(target=OpenTerminal, args=[f"python3 '{programPath}/QemuRun.py' '{choose[0]}' '{int(setting['QemuUnMountHome'])}' "]).start()
|
||||
print(choose)
|
||||
|
||||
# 生成 desktop 文件在桌面
|
||||
@ -2257,7 +2257,7 @@ try:
|
||||
for g in qemuBottleList:
|
||||
nameValue.append([
|
||||
f"使用qemu-{g[0]}-static 调用容器{g[1]}运行 ",
|
||||
f"python3 '{programPath}/QemuRun.py' {int(setting['QemuUnMountHome'])} '{g[0]}/{g[1]}' "
|
||||
f"python3 '{programPath}/QemuRun.py' '{g[0]}/{g[1]}' {int(setting['QemuUnMountHome'])} "
|
||||
])
|
||||
except:
|
||||
traceback.print_exc()
|
||||
@ -2406,6 +2406,20 @@ for i in iconListUnBuild:
|
||||
iconList.append(i)
|
||||
print(iconList)
|
||||
|
||||
# Qemu Lock
|
||||
try:
|
||||
if os.path.exists("/tmp/deepin-wine-runner-lock.txt"):
|
||||
print("lock")
|
||||
with open(f"/tmp/deepin-wine-runner-lock.txt", "r") as file:
|
||||
setting["QemuUnMountHome"] = bool(int(file.read()))
|
||||
else:
|
||||
print("unlock")
|
||||
with open(f"/tmp/deepin-wine-runner-lock.txt", "w") as file:
|
||||
# = bool(int(file.read()))
|
||||
file.write(str(int(setting["QemuUnMountHome"])))
|
||||
except:
|
||||
traceback.print_exc()
|
||||
|
||||
###########################
|
||||
# 窗口创建
|
||||
###########################
|
||||
|
Loading…
Reference in New Issue
Block a user