This commit is contained in:
gfdgd xi 2023-06-29 12:00:05 +08:00
parent cf62ac97cd
commit de9c155740
6 changed files with 16 additions and 13 deletions

View File

@ -11,4 +11,4 @@ Priority: optional
Depends: python3, python3-pyqt5, bubblewrap, gx-env-runtime
Section: utils
Installed-Size: 1100
Description: gx-env-runtime
Description: deepin15(deepin20/23)兼容环境

View File

@ -3,6 +3,7 @@
# 缓存目录:~/.cache/deepin-wine-runner
if [ "$1" = "remove" ] || [ "$1" = "purge" ]; then
rm -rf /usr/share/applications/gx-env/*.desktop
rm -rf /usr/share/applications/gx-env-*.desktop
else
echo "非卸载,跳过清理"
fi

View File

@ -5,7 +5,7 @@ if [[ ! -f $HOME/.config/gx-env/nosandbox ]]; then
else
gx-env-run-root python3 /gx-env/gx-env-load-desktop-in-chroot 1
fi
if [[ ! -d /usr/share/applications/gx-env ]]; then
pkexec mkdir /usr/share/applications/gx-env -p
fi
pkexec cp $chrootEnvPath/gx-env/desktop/* /usr/share/applications/gx-env -v
#if [[ ! -d /usr/share/applications/gx-env ]]; then
# pkexec mkdir /usr/share/applications/gx-env -p
#fi
pkexec cp $chrootEnvPath/gx-env/desktop/* /usr/share/applications/ -v

View File

@ -1,6 +1,7 @@
#!/usr/bin/env python3
import os
import sys
import shutil
import traceback
import threading
import PyQt5.QtWidgets as QtWidgets
@ -13,14 +14,14 @@ def Save():
try:
if allCommandAddNoSandbox.isChecked() and not os.path.exists("{}/.config/gx-env/nosandbox".format(homePath)):
os.mknod("{}/.config/gx-env/nosandbox".format(homePath))
if allCommandAddNoSandbox.isChecked() and not os.path.exists("{}/.config/gx-env/nosandbox".format(homePath)):
if not allCommandAddNoSandbox.isChecked() and os.path.exists("{}/.config/gx-env/nosandbox".format(homePath)):
os.remove("{}/.config/gx-env/nosandbox".format(homePath))
os.system("pkexec env `printenv` gx-env-run")
QtWidgets.QMessageBox.information(window, "提示", "设置完成!")
except:
traceback.print_exc()
QtWidgets.QMessageBox.critical(window, "错误", traceback.print_exc())
QtWidgets.QMessageBox.critical(window, "错误", traceback.format_exc())
app = QtWidgets.QApplication(sys.argv)
window = QtWidgets.QMainWindow()

View File

@ -5,7 +5,7 @@ if [[ ! -f $HOME/.config/gx-env/nosandbox ]]; then
else
gx-env-run-root python3 /gx-env/gx-env-load-desktop-in-chroot 1
fi
if [[ ! -d /usr/share/applications/gx-env ]]; then
pkexec mkdir /usr/share/applications/gx-env -p
fi
pkexec cp $chrootEnvPath/gx-env/desktop/* /usr/share/applications/gx-env -v
#if [[ ! -d /usr/share/applications/gx-env ]]; then
# pkexec mkdir /usr/share/applications/gx-env -p
#fi
pkexec cp $chrootEnvPath/gx-env/desktop/* /usr/share/applications/ -v

View File

@ -1,6 +1,7 @@
#!/usr/bin/env python3
import os
import sys
import shutil
import traceback
import threading
import PyQt5.QtWidgets as QtWidgets
@ -13,14 +14,14 @@ def Save():
try:
if allCommandAddNoSandbox.isChecked() and not os.path.exists("{}/.config/gx-env/nosandbox".format(homePath)):
os.mknod("{}/.config/gx-env/nosandbox".format(homePath))
if allCommandAddNoSandbox.isChecked() and not os.path.exists("{}/.config/gx-env/nosandbox".format(homePath)):
if not allCommandAddNoSandbox.isChecked() and os.path.exists("{}/.config/gx-env/nosandbox".format(homePath)):
os.remove("{}/.config/gx-env/nosandbox".format(homePath))
os.system("pkexec env `printenv` gx-env-run")
QtWidgets.QMessageBox.information(window, "提示", "设置完成!")
except:
traceback.print_exc()
QtWidgets.QMessageBox.critical(window, "错误", traceback.print_exc())
QtWidgets.QMessageBox.critical(window, "错误", traceback.format_exc())
app = QtWidgets.QApplication(sys.argv)
window = QtWidgets.QMainWindow()