优化
This commit is contained in:
parent
cf62ac97cd
commit
de9c155740
@ -11,4 +11,4 @@ Priority: optional
|
|||||||
Depends: python3, python3-pyqt5, bubblewrap, gx-env-runtime
|
Depends: python3, python3-pyqt5, bubblewrap, gx-env-runtime
|
||||||
Section: utils
|
Section: utils
|
||||||
Installed-Size: 1100
|
Installed-Size: 1100
|
||||||
Description: gx-env-runtime
|
Description: deepin15(deepin20/23)兼容环境
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
# 缓存目录:~/.cache/deepin-wine-runner
|
# 缓存目录:~/.cache/deepin-wine-runner
|
||||||
if [ "$1" = "remove" ] || [ "$1" = "purge" ]; then
|
if [ "$1" = "remove" ] || [ "$1" = "purge" ]; then
|
||||||
rm -rf /usr/share/applications/gx-env/*.desktop
|
rm -rf /usr/share/applications/gx-env/*.desktop
|
||||||
|
rm -rf /usr/share/applications/gx-env-*.desktop
|
||||||
else
|
else
|
||||||
echo "非卸载,跳过清理"
|
echo "非卸载,跳过清理"
|
||||||
fi
|
fi
|
@ -5,7 +5,7 @@ if [[ ! -f $HOME/.config/gx-env/nosandbox ]]; then
|
|||||||
else
|
else
|
||||||
gx-env-run-root python3 /gx-env/gx-env-load-desktop-in-chroot 1
|
gx-env-run-root python3 /gx-env/gx-env-load-desktop-in-chroot 1
|
||||||
fi
|
fi
|
||||||
if [[ ! -d /usr/share/applications/gx-env ]]; then
|
#if [[ ! -d /usr/share/applications/gx-env ]]; then
|
||||||
pkexec mkdir /usr/share/applications/gx-env -p
|
# pkexec mkdir /usr/share/applications/gx-env -p
|
||||||
fi
|
#fi
|
||||||
pkexec cp $chrootEnvPath/gx-env/desktop/* /usr/share/applications/gx-env -v
|
pkexec cp $chrootEnvPath/gx-env/desktop/* /usr/share/applications/ -v
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
import shutil
|
||||||
import traceback
|
import traceback
|
||||||
import threading
|
import threading
|
||||||
import PyQt5.QtWidgets as QtWidgets
|
import PyQt5.QtWidgets as QtWidgets
|
||||||
@ -13,14 +14,14 @@ def Save():
|
|||||||
try:
|
try:
|
||||||
if allCommandAddNoSandbox.isChecked() and not os.path.exists("{}/.config/gx-env/nosandbox".format(homePath)):
|
if allCommandAddNoSandbox.isChecked() and not os.path.exists("{}/.config/gx-env/nosandbox".format(homePath)):
|
||||||
os.mknod("{}/.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.remove("{}/.config/gx-env/nosandbox".format(homePath))
|
||||||
os.system("pkexec env `printenv` gx-env-run")
|
os.system("pkexec env `printenv` gx-env-run")
|
||||||
QtWidgets.QMessageBox.information(window, "提示", "设置完成!")
|
QtWidgets.QMessageBox.information(window, "提示", "设置完成!")
|
||||||
|
|
||||||
except:
|
except:
|
||||||
traceback.print_exc()
|
traceback.print_exc()
|
||||||
QtWidgets.QMessageBox.critical(window, "错误", traceback.print_exc())
|
QtWidgets.QMessageBox.critical(window, "错误", traceback.format_exc())
|
||||||
|
|
||||||
app = QtWidgets.QApplication(sys.argv)
|
app = QtWidgets.QApplication(sys.argv)
|
||||||
window = QtWidgets.QMainWindow()
|
window = QtWidgets.QMainWindow()
|
||||||
|
@ -5,7 +5,7 @@ if [[ ! -f $HOME/.config/gx-env/nosandbox ]]; then
|
|||||||
else
|
else
|
||||||
gx-env-run-root python3 /gx-env/gx-env-load-desktop-in-chroot 1
|
gx-env-run-root python3 /gx-env/gx-env-load-desktop-in-chroot 1
|
||||||
fi
|
fi
|
||||||
if [[ ! -d /usr/share/applications/gx-env ]]; then
|
#if [[ ! -d /usr/share/applications/gx-env ]]; then
|
||||||
pkexec mkdir /usr/share/applications/gx-env -p
|
# pkexec mkdir /usr/share/applications/gx-env -p
|
||||||
fi
|
#fi
|
||||||
pkexec cp $chrootEnvPath/gx-env/desktop/* /usr/share/applications/gx-env -v
|
pkexec cp $chrootEnvPath/gx-env/desktop/* /usr/share/applications/ -v
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
import shutil
|
||||||
import traceback
|
import traceback
|
||||||
import threading
|
import threading
|
||||||
import PyQt5.QtWidgets as QtWidgets
|
import PyQt5.QtWidgets as QtWidgets
|
||||||
@ -13,14 +14,14 @@ def Save():
|
|||||||
try:
|
try:
|
||||||
if allCommandAddNoSandbox.isChecked() and not os.path.exists("{}/.config/gx-env/nosandbox".format(homePath)):
|
if allCommandAddNoSandbox.isChecked() and not os.path.exists("{}/.config/gx-env/nosandbox".format(homePath)):
|
||||||
os.mknod("{}/.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.remove("{}/.config/gx-env/nosandbox".format(homePath))
|
||||||
os.system("pkexec env `printenv` gx-env-run")
|
os.system("pkexec env `printenv` gx-env-run")
|
||||||
QtWidgets.QMessageBox.information(window, "提示", "设置完成!")
|
QtWidgets.QMessageBox.information(window, "提示", "设置完成!")
|
||||||
|
|
||||||
except:
|
except:
|
||||||
traceback.print_exc()
|
traceback.print_exc()
|
||||||
QtWidgets.QMessageBox.critical(window, "错误", traceback.print_exc())
|
QtWidgets.QMessageBox.critical(window, "错误", traceback.format_exc())
|
||||||
|
|
||||||
app = QtWidgets.QApplication(sys.argv)
|
app = QtWidgets.QApplication(sys.argv)
|
||||||
window = QtWidgets.QMainWindow()
|
window = QtWidgets.QMainWindow()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user