diff --git a/AutoConfig.py b/AutoConfig.py index 021290a..f6b65de 100755 --- a/AutoConfig.py +++ b/AutoConfig.py @@ -61,12 +61,7 @@ class ProgramRunStatusUpload(): ProgramRunStatusUpload.starLayout.addWidget(ProgramRunStatusUpload.starList[-1]) ProgramRunStatusUpload.starLayout.addItem(QtWidgets.QSpacerItem(20, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)) ProgramRunStatusUpload.programName.setPlaceholderText(QtCore.QCoreApplication.translate("U", "如果这个程序和程序名确实是合法还是检测到敏感词,改为“NULL”即可")) - ProgramRunStatusUpload.fen.addItems(["0分", - "1分", - "2分", - "3分", - "4分", - "5分"]) + ProgramRunStatusUpload.fen.addItems(["0分", "1分", "2分", "3分", "4分", "5分"]) ProgramRunStatusUpload.fen.setCurrentIndex(4) ProgramRunStatusUpload.fen.currentIndexChanged.connect(ProgramRunStatusUpload.ChangeStar) msgWidgetLayout.addWidget(QtWidgets.QLabel(QtCore.QCoreApplication.translate("U", "程序名:")), 0, 0) @@ -86,7 +81,7 @@ class ProgramRunStatusUpload(): #if ProgramRunStatusUpload.sha1Value == "": #ProgramRunStatusUpload.sha1Value = ProgramRunStatusUpload.GetSHA1(e2.currentText()) QtWidgets.QMessageBox.information(None, QtCore.QCoreApplication.translate("U", "提示"), json.loads(requests.post("http://120.25.153.144:30250/bash", { - "BashName": ProgramRunStatusUpload.programName.text(), + "BashName": ProgramRunStatusUpload.sha1Value, "Fen": ProgramRunStatusUpload.fen.currentIndex() }).text)["Error"]) except: @@ -121,12 +116,21 @@ class ProgramRunStatusShow(): tipsInfo = "暂时无人提交此脚本运行情况,是否立即提交?" maxHead = fenlists.index(max(fenlists)) + allNumber = 0 + for i in fenlists: + allNumber += i + try: + maxNumber = max(fenlists) / allNumber * 100 + if tipsInfo == "": + tipsInfo = f"有{maxNumber}%的用户选择了这个评分" + except: + pass ProgramRunStatusShow.msgWindow = QtWidgets.QMainWindow() msgWidget = QtWidgets.QWidget() msgWidgetLayout = QtWidgets.QGridLayout() starLayout = QtWidgets.QHBoxLayout() uploadButton = QtWidgets.QPushButton(QtCore.QCoreApplication.translate("U", "点此上传运行情况")) - uploadButton.clicked.connect(lambda: ProgramRunStatusUpload.ShowWindow(fileName, fileName)) + uploadButton.clicked.connect(lambda: ProgramRunStatusUpload.ShowWindow(fileName, choose)) msgWidgetLayout.addWidget(QtWidgets.QLabel(QtCore.QCoreApplication.translate("U", "综合评价:")), 0, 0) msgWidgetLayout.addLayout(starLayout, 0, 1) msgWidgetLayout.addWidget(QtWidgets.QLabel(tipsInfo), 1, 0, 1, 2) @@ -145,9 +149,25 @@ class ProgramRunStatusShow(): msgWidget.setLayout(msgWidgetLayout) ProgramRunStatusShow.msgWindow.setCentralWidget(msgWidget) ProgramRunStatusShow.msgWindow.setWindowIcon(QtGui.QIcon(iconPath)) - #ProgramRunStatusShow.msgWindow.setWindowTitle(f"应用“{title}”的运行情况") + ProgramRunStatusShow.msgWindow.setWindowTitle(f"脚本“{choose}”运行情况") ProgramRunStatusShow.msgWindow.show() +def UploadFen(): + global lists + # 获取选中项 + try: + choose = ui.searchList.selectionModel().selectedIndexes()[0].data() + except: + QtWidgets.QMessageBox.critical(window, "错误", "您未选择任何配置文件") + return + fileName = "" + for i in lists: + print(i) + if i[0] == choose: + fileName = i[1] + break + ProgramRunStatusUpload.ShowWindow(fileName, choose) + class Connect: def SearchBotton_Clicked(): nmodel = QtGui.QStandardItemModel(window) @@ -249,6 +269,7 @@ if __name__ == "__main__": window.show() # 连接信号和槽 ui.saerchBotton.clicked.connect(Connect.SearchBotton_Clicked) + ui.uploadFen.clicked.connect(UploadFen) ui.runBotton.clicked.connect(Connect.RunBotton_Clicked) ui.openFile.triggered.connect(Connect.OpenFile_Triggered) ui.exitProgram.triggered.connect(window.close) diff --git a/Makefile b/Makefile index 29cf47a..4e8b8bd 100755 --- a/Makefile +++ b/Makefile @@ -2,6 +2,7 @@ build: #cd VM-source && qmake #cd VM-source && make #cd wine && make + cp -rv helperset deb/opt/apps/deepin-wine-runner/ cp -rv VM-source/VirtualMachine VM cp -rv VM-source/deepin-wine-runner.svg VM cp -rv VM-source/api VM diff --git a/UI/__pycache__/KeyAddKeyboardGui.cpython-37.pyc b/UI/__pycache__/KeyAddKeyboardGui.cpython-37.pyc new file mode 100644 index 0000000..f2da1d9 Binary files /dev/null and b/UI/__pycache__/KeyAddKeyboardGui.cpython-37.pyc differ diff --git a/deb/DEBIAN/control b/deb/DEBIAN/control index ee4d027..baaa050 100755 --- a/deb/DEBIAN/control +++ b/deb/DEBIAN/control @@ -1,26 +1,23 @@ Package: spark-deepin-wine-runner -Version: 2.4.0~alpha1 +Version: 2.4.0-spark Maintainer: gfdgd xi <3025613752@qq.com>, 为什么您不喜欢熊出没和阿布呢 Homepage: https://gitee.com/gfdgd-xi/deep-wine-runner, https://github.com/gfdgd-xi/deep-wine-runner, https://gitlink.org.cn/gfdgd_xi/deep-wine-runner Architecture: all Priority: optional -Depends: python3, python3-pil, python3-pil.imagetk, python3-pyquery, aria2, curl, unrar, unzip, python3-requests, fakeroot, bash, python3-pyqt5, python3-psutil, deepin-terminal | mate-terminal | gnome-terminal | xfce4-terminal +Depends: python3, python3-pil, python3-pil.imagetk, python3-pyquery, aria2, curl, unrar, unzip, python3-requests, fakeroot, bash, python3-pyqt5, python3-psutil, deepin-terminal | mate-terminal | gnome-terminal | xfce4-terminal, python3-dbus, python3-pip Recommends: winbind, wimtools Section: utils Conflicts: spark.deepin-venturi-setter, spark-deepin-wine5-application-packer, spark-deepin-wine-runner Replaces: spark.deepin-venturi-setter, spark-deepin-wine5-application-packer -Installed-Size: 26576 +Installed-Size: 26976 Description: gfdgd xi、为什么您不喜欢熊出没和阿布呢 制作的 wine 运行器 - 2.3.0 更新内容: - ※1、自动配置解释器支持 bash 语法(新版底层调用 bash,旧版任然使用旧版解析引擎) - ※2、修复缺失 wimtools 依赖导致无法正常安装的问题 - ※3、修复基于生态适配活动脚本打包器对话框过多影响使用的问题,并支持指定不同的包名和容器名 - ※4、7z 文件解压不会自动替换文件然后卡死以及因此导致程序闪退的问题 - ※5、修复安装更多 Wine 终端调用问题和图标问题 - ※6、支持 openkylin - 7、支持通过 exe 路径自动生成 Wine 容器路径 - 8、支持禁用/启用 wine 容器是否生成快捷方式的功能以及启用/禁用程序崩溃提示对话框 - 9、支持设置 wine 容器代理 - 10、自动配置脚本支持使用 --help 参数查看帮助 - 更新时间:2022年10月02日 + 2.4.0 更新内容: + ※1、新增 VB Runtime 组件安装工具 + ※2、优化自动配置容器搜索功能,搜索不区分大小写 + ※3、新增 Wine 容器快捷键映射功能 + ※4、修复在 arm 架构运行 Wine 时提示无法解压资源的问题 + ※5、修复右键无法找到 Wine 运行器打开方式的问题 + ※6、修复了容器自动配置脚本 GUI 解析器无法指定 Wine、容器以及位数的功能 + ※7、容器自动配置脚本支持评分功能 + 更新时间:2022年10月24日(1024版) 作者:gfdgd xi、为什么您不喜欢熊出没和阿布呢 diff --git a/deb/DEBIAN/postinst b/deb/DEBIAN/postinst index 1285d1d..9763b40 100755 --- a/deb/DEBIAN/postinst +++ b/deb/DEBIAN/postinst @@ -7,6 +7,7 @@ # 感谢:感谢 wine、deepin-wine 以及星火团队,提供了 wine、deepin-wine、spark-wine-devel 给大家使用,让我能做这个程序 # 基于 sh ################################################################################################################# +python3 -m pip install --upgrade pynput --trusted-host https://repo.huaweicloud.com -i https://repo.huaweicloud.com/repository/pypi/simple # 如果为非 X86 PC,可以删除掉一些无用组件(主要是用不了) if [ `arch` != "x86_64" ]; then echo 非X86架构,删除对非X86架构无用的组件 @@ -32,4 +33,4 @@ fi # 设置目录权限,让用户可读可写,方便后续删除组件 chmod 777 -R /opt/apps/deepin-wine-runner # 向服务器返回安装数加1(不显示内容且忽略错误) -curl https://304626p927.goho.co/spark-deepin-wine-runner/Install.php?Version=2.3.0 -s > /dev/null | true +curl https://304626p927.goho.co/spark-deepin-wine-runner/Install.php?Version=2.4.0 -s > /dev/null | true diff --git a/deb/opt/apps/deepin-wine-runner/AutoConfig.py b/deb/opt/apps/deepin-wine-runner/AutoConfig.py index 3927109..f6b65de 100755 --- a/deb/opt/apps/deepin-wine-runner/AutoConfig.py +++ b/deb/opt/apps/deepin-wine-runner/AutoConfig.py @@ -10,6 +10,7 @@ ################# # 引入所需的库 ################# +from fileinput import filename import os import sys import json @@ -21,6 +22,151 @@ from Model import * urlSources = "https://code.gitlink.org.cn/gfdgd_xi/wine-runner-list/raw/branch/master/auto" lists = [] +class ProgramRunStatusUpload(): + msgWindow = None + starLayout = None + fen = None + starList = [] + sha1Value = "" + programName = None + def ChangeStar(): + if ProgramRunStatusUpload.fen.currentIndex() > 5: + for i in ProgramRunStatusUpload.starList: + i.setText(f"<img src='{programPath}/Icon/BadStar.svg' width=25>") + return + for i in range(ProgramRunStatusUpload.fen.currentIndex()): + ProgramRunStatusUpload.starList[i].setText(f"<img src='{programPath}/Icon/Star.svg' width=25>") + head = ProgramRunStatusUpload.fen.currentIndex() + end = len(ProgramRunStatusUpload.starList) + for i in range(head, end): + ProgramRunStatusUpload.starList[i].setText(f"<img src='{programPath}/Icon/UnStar.svg' width=25>") + + def ShowWindow(sha="", title=""): + ProgramRunStatusUpload.starList = [] + ProgramRunStatusUpload.sha1Value = sha + ProgramRunStatusUpload.msgWindow = QtWidgets.QMainWindow() + msgWidget = QtWidgets.QWidget() + msgWidgetLayout = QtWidgets.QGridLayout() + ProgramRunStatusUpload.programName = QtWidgets.QLineEdit() + ProgramRunStatusUpload.fen = QtWidgets.QComboBox() + ProgramRunStatusUpload.starLayout = QtWidgets.QHBoxLayout() + upload = QtWidgets.QPushButton(QtCore.QCoreApplication.translate("U", "上传")) + upload.clicked.connect(ProgramRunStatusUpload.Upload) + if title != "": + ProgramRunStatusUpload.programName.setText(title) + ProgramRunStatusUpload.programName.setDisabled(True) + # 生成星星列表 + for i in [1, 1, 1, 1, 0]: + ProgramRunStatusUpload.starList.append(QtWidgets.QLabel(f"<img src='{programPath}/Icon/{['Un', ''][i]}Star.svg' width=25>")) + ProgramRunStatusUpload.starLayout.addWidget(ProgramRunStatusUpload.starList[-1]) + ProgramRunStatusUpload.starLayout.addItem(QtWidgets.QSpacerItem(20, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)) + ProgramRunStatusUpload.programName.setPlaceholderText(QtCore.QCoreApplication.translate("U", "如果这个程序和程序名确实是合法还是检测到敏感词,改为“NULL”即可")) + ProgramRunStatusUpload.fen.addItems(["0分", "1分", "2分", "3分", "4分", "5分"]) + ProgramRunStatusUpload.fen.setCurrentIndex(4) + ProgramRunStatusUpload.fen.currentIndexChanged.connect(ProgramRunStatusUpload.ChangeStar) + msgWidgetLayout.addWidget(QtWidgets.QLabel(QtCore.QCoreApplication.translate("U", "程序名:")), 0, 0) + msgWidgetLayout.addWidget(QtWidgets.QLabel(QtCore.QCoreApplication.translate("U", "评分:")), 1, 0) + msgWidgetLayout.addWidget(ProgramRunStatusUpload.programName, 0, 1) + msgWidgetLayout.addWidget(ProgramRunStatusUpload.fen, 1, 1) + msgWidgetLayout.addLayout(ProgramRunStatusUpload.starLayout, 2, 1) + msgWidgetLayout.addWidget(upload, 3, 1) + msgWidget.setLayout(msgWidgetLayout) + ProgramRunStatusUpload.msgWindow.setCentralWidget(msgWidget) + ProgramRunStatusUpload.msgWindow.setWindowTitle(QtCore.QCoreApplication.translate("U", "上传程序运行情况")) + ProgramRunStatusUpload.msgWindow.setWindowIcon(QtGui.QIcon(iconPath)) + ProgramRunStatusUpload.msgWindow.show() + + def Upload(): + try: + #if ProgramRunStatusUpload.sha1Value == "": + #ProgramRunStatusUpload.sha1Value = ProgramRunStatusUpload.GetSHA1(e2.currentText()) + QtWidgets.QMessageBox.information(None, QtCore.QCoreApplication.translate("U", "提示"), json.loads(requests.post("http://120.25.153.144:30250/bash", { + "BashName": ProgramRunStatusUpload.sha1Value, + "Fen": ProgramRunStatusUpload.fen.currentIndex() + }).text)["Error"]) + except: + traceback.print_exc() + QtWidgets.QMessageBox.critical(None, QtCore.QCoreApplication.translate("U", "错误"), QtCore.QCoreApplication.translate("U", "数据上传失败!")) + +class ProgramRunStatusShow(): + msgWindow = None + def ShowWindow(): + global lists + # 获取选中项 + try: + choose = ui.searchList.selectionModel().selectedIndexes()[0].data() + except: + QtWidgets.QMessageBox.critical(window, "错误", "您未选择任何配置文件") + return + fileName = "" + for i in lists: + print(i) + if i[0] == choose: + fileName = i[1] + break + try: + fenlists = requests.get(f"http://120.25.153.144/spark-deepin-wine-runner/bashapp/{fileName}/all.json").json() + #r = requests.get(base64.b64decode("aHR0cDovLzEyMC4yNS4xNTMuMTQ0L3NwYXJrLWRlZXBpbi13aW5lLXJ1bm5lci9hcHAv").decode("utf-8") + sha + base64.b64decode("L3RpdGxlLnR4dA==").decode("utf-8")) + #r.encoding = "utf-8" + #title = r.text + tipsInfo = "" + except: + #traceback.print_exc() + fenlists = [0, 0, 0, 0, 0] + tipsInfo = "暂时无人提交此脚本运行情况,是否立即提交?" + + maxHead = fenlists.index(max(fenlists)) + allNumber = 0 + for i in fenlists: + allNumber += i + try: + maxNumber = max(fenlists) / allNumber * 100 + if tipsInfo == "": + tipsInfo = f"有{maxNumber}%的用户选择了这个评分" + except: + pass + ProgramRunStatusShow.msgWindow = QtWidgets.QMainWindow() + msgWidget = QtWidgets.QWidget() + msgWidgetLayout = QtWidgets.QGridLayout() + starLayout = QtWidgets.QHBoxLayout() + uploadButton = QtWidgets.QPushButton(QtCore.QCoreApplication.translate("U", "点此上传运行情况")) + uploadButton.clicked.connect(lambda: ProgramRunStatusUpload.ShowWindow(fileName, choose)) + msgWidgetLayout.addWidget(QtWidgets.QLabel(QtCore.QCoreApplication.translate("U", "综合评价:")), 0, 0) + msgWidgetLayout.addLayout(starLayout, 0, 1) + msgWidgetLayout.addWidget(QtWidgets.QLabel(tipsInfo), 1, 0, 1, 2) + #msgWidgetLayout.addWidget(QtWidgets.QLabel("" if dateVersion == "" else f"数据版本:{dateVersion}"), 2, 0, 1, 2) + msgWidgetLayout.addWidget(uploadButton, 3, 0, 1, 2) + end = 5 + if maxHead > 5: + for i in range(end): + starLayout.addWidget(QtWidgets.QLabel(f"<img src='{programPath}/Icon/BadStar.svg' width=50>")) + else: + for i in range(maxHead): + starLayout.addWidget(QtWidgets.QLabel(f"<img src='{programPath}/Icon/Star.svg' width=50>")) + head = maxHead + for i in range(head, end): + starLayout.addWidget(QtWidgets.QLabel(f"<img src='{programPath}/Icon/UnStar.svg' width=50>")) + msgWidget.setLayout(msgWidgetLayout) + ProgramRunStatusShow.msgWindow.setCentralWidget(msgWidget) + ProgramRunStatusShow.msgWindow.setWindowIcon(QtGui.QIcon(iconPath)) + ProgramRunStatusShow.msgWindow.setWindowTitle(f"脚本“{choose}”运行情况") + ProgramRunStatusShow.msgWindow.show() + +def UploadFen(): + global lists + # 获取选中项 + try: + choose = ui.searchList.selectionModel().selectedIndexes()[0].data() + except: + QtWidgets.QMessageBox.critical(window, "错误", "您未选择任何配置文件") + return + fileName = "" + for i in lists: + print(i) + if i[0] == choose: + fileName = i[1] + break + ProgramRunStatusUpload.ShowWindow(fileName, choose) class Connect: def SearchBotton_Clicked(): @@ -89,7 +235,7 @@ class Connect: if "($" in things: OpenTerminal(f"env WINE='{wine}' WINEPREFIX='{wineprefix}' '{programPath}/ConfigLanguareRunner.py' '{path[0]}' --system") # 执行脚本 - OpenTerminal(f"env WINE='{wine}' WINEPREFIX='{wineprefix}' '{programPath}/AutoShell/main.py' '{path[0]}'") + OpenTerminal(f"env WINEARCH='{os.getenv('WINEARCH')}' WINEDEBUG='{os.getenv('WINEDEBUG')}' WINE='{wine}' WINEPREFIX='{wineprefix}' '{programPath}/AutoShell/main.py' '{path[0]}'") #process = QtCore.QProcess() #process.start(f"{programPath}/launch.sh", ["deepin-terminal", "-e", "env", f"WINE={wine}", f"WINEPREFIX={wineprefix}", f"{programPath}/ConfigLanguareRunner.py", path[0], "--system"]) #process.waitForFinished() @@ -119,12 +265,15 @@ if __name__ == "__main__": ui.setupUi(window) window.setWindowTitle(f"Wine 运行器 {version}——容器自动配置部署脚本") window.setWindowIcon(QtGui.QIcon(f"{programPath}/deepin-wine-runner.svg")) + iconPath = "{}/deepin-wine-runner.svg".format(programPath) window.show() # 连接信号和槽 ui.saerchBotton.clicked.connect(Connect.SearchBotton_Clicked) + ui.uploadFen.clicked.connect(UploadFen) ui.runBotton.clicked.connect(Connect.RunBotton_Clicked) ui.openFile.triggered.connect(Connect.OpenFile_Triggered) ui.exitProgram.triggered.connect(window.close) + ui.getFen.clicked.connect(ProgramRunStatusShow.ShowWindow) # 解析云列表 try: # 获取列表 @@ -137,4 +286,5 @@ if __name__ == "__main__": except: traceback.print_exc() QtWidgets.QMessageBox.critical(window, "提示", "无法连接服务器") + app.exec_() \ No newline at end of file diff --git a/deb/opt/apps/deepin-wine-runner/AutoShell/command/bat b/deb/opt/apps/deepin-wine-runner/AutoShell/command/bat index 1bf2fba..b766ea2 100755 --- a/deb/opt/apps/deepin-wine-runner/AutoShell/command/bat +++ b/deb/opt/apps/deepin-wine-runner/AutoShell/command/bat @@ -10,4 +10,5 @@ argv = [] for i in sys.argv[1:]: argv.append(i.replace(" ", "\\ ")) com = ConfigLanguareRunner.Command(f"{os.path.basename(sys.argv[0])} {' '.join(argv)}") -com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE")) \ No newline at end of file +com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE")) +sys.exit(int(ConfigLanguareRunner.programEnv[9][1])) \ No newline at end of file diff --git a/deb/opt/apps/deepin-wine-runner/AutoShell/command/changeversion b/deb/opt/apps/deepin-wine-runner/AutoShell/command/changeversion index 1bf2fba..b766ea2 100755 --- a/deb/opt/apps/deepin-wine-runner/AutoShell/command/changeversion +++ b/deb/opt/apps/deepin-wine-runner/AutoShell/command/changeversion @@ -10,4 +10,5 @@ argv = [] for i in sys.argv[1:]: argv.append(i.replace(" ", "\\ ")) com = ConfigLanguareRunner.Command(f"{os.path.basename(sys.argv[0])} {' '.join(argv)}") -com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE")) \ No newline at end of file +com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE")) +sys.exit(int(ConfigLanguareRunner.programEnv[9][1])) \ No newline at end of file diff --git a/deb/opt/apps/deepin-wine-runner/AutoShell/command/createbotton b/deb/opt/apps/deepin-wine-runner/AutoShell/command/createbotton index 1bf2fba..b766ea2 100755 --- a/deb/opt/apps/deepin-wine-runner/AutoShell/command/createbotton +++ b/deb/opt/apps/deepin-wine-runner/AutoShell/command/createbotton @@ -10,4 +10,5 @@ argv = [] for i in sys.argv[1:]: argv.append(i.replace(" ", "\\ ")) com = ConfigLanguareRunner.Command(f"{os.path.basename(sys.argv[0])} {' '.join(argv)}") -com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE")) \ No newline at end of file +com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE")) +sys.exit(int(ConfigLanguareRunner.programEnv[9][1])) \ No newline at end of file diff --git a/deb/opt/apps/deepin-wine-runner/AutoShell/command/demo.py b/deb/opt/apps/deepin-wine-runner/AutoShell/command/demo.py new file mode 100644 index 0000000..c1b2416 --- /dev/null +++ b/deb/opt/apps/deepin-wine-runner/AutoShell/command/demo.py @@ -0,0 +1,6 @@ +import os +for i in os.listdir(): + with open(i, "r") as file: + things = file.read().replace("sys.exit(int(ConfigLanguareRunner.programEnv[9][1]))", "sys.exit(int(ConfigLanguareRunner.programEnv[9][1]))") + with open(i, "w") as file: + file.write(things) \ No newline at end of file diff --git a/deb/opt/apps/deepin-wine-runner/AutoShell/command/disbledWinebottlecreatelink b/deb/opt/apps/deepin-wine-runner/AutoShell/command/disbledWinebottlecreatelink index 1bf2fba..b766ea2 100755 --- a/deb/opt/apps/deepin-wine-runner/AutoShell/command/disbledWinebottlecreatelink +++ b/deb/opt/apps/deepin-wine-runner/AutoShell/command/disbledWinebottlecreatelink @@ -10,4 +10,5 @@ argv = [] for i in sys.argv[1:]: argv.append(i.replace(" ", "\\ ")) com = ConfigLanguareRunner.Command(f"{os.path.basename(sys.argv[0])} {' '.join(argv)}") -com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE")) \ No newline at end of file +com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE")) +sys.exit(int(ConfigLanguareRunner.programEnv[9][1])) \ No newline at end of file diff --git a/deb/opt/apps/deepin-wine-runner/AutoShell/command/disbledhttpproxy b/deb/opt/apps/deepin-wine-runner/AutoShell/command/disbledhttpproxy index 1bf2fba..b766ea2 100755 --- a/deb/opt/apps/deepin-wine-runner/AutoShell/command/disbledhttpproxy +++ b/deb/opt/apps/deepin-wine-runner/AutoShell/command/disbledhttpproxy @@ -10,4 +10,5 @@ argv = [] for i in sys.argv[1:]: argv.append(i.replace(" ", "\\ ")) com = ConfigLanguareRunner.Command(f"{os.path.basename(sys.argv[0])} {' '.join(argv)}") -com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE")) \ No newline at end of file +com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE")) +sys.exit(int(ConfigLanguareRunner.programEnv[9][1])) \ No newline at end of file diff --git a/deb/opt/apps/deepin-wine-runner/AutoShell/command/disbledopengl b/deb/opt/apps/deepin-wine-runner/AutoShell/command/disbledopengl index 1bf2fba..b766ea2 100755 --- a/deb/opt/apps/deepin-wine-runner/AutoShell/command/disbledopengl +++ b/deb/opt/apps/deepin-wine-runner/AutoShell/command/disbledopengl @@ -10,4 +10,5 @@ argv = [] for i in sys.argv[1:]: argv.append(i.replace(" ", "\\ ")) com = ConfigLanguareRunner.Command(f"{os.path.basename(sys.argv[0])} {' '.join(argv)}") -com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE")) \ No newline at end of file +com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE")) +sys.exit(int(ConfigLanguareRunner.programEnv[9][1])) \ No newline at end of file diff --git a/deb/opt/apps/deepin-wine-runner/AutoShell/command/disbledwinecrashdialog b/deb/opt/apps/deepin-wine-runner/AutoShell/command/disbledwinecrashdialog index 1bf2fba..b766ea2 100755 --- a/deb/opt/apps/deepin-wine-runner/AutoShell/command/disbledwinecrashdialog +++ b/deb/opt/apps/deepin-wine-runner/AutoShell/command/disbledwinecrashdialog @@ -10,4 +10,5 @@ argv = [] for i in sys.argv[1:]: argv.append(i.replace(" ", "\\ ")) com = ConfigLanguareRunner.Command(f"{os.path.basename(sys.argv[0])} {' '.join(argv)}") -com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE")) \ No newline at end of file +com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE")) +sys.exit(int(ConfigLanguareRunner.programEnv[9][1])) \ No newline at end of file diff --git a/deb/opt/apps/deepin-wine-runner/AutoShell/command/download b/deb/opt/apps/deepin-wine-runner/AutoShell/command/download index 1bf2fba..b766ea2 100755 --- a/deb/opt/apps/deepin-wine-runner/AutoShell/command/download +++ b/deb/opt/apps/deepin-wine-runner/AutoShell/command/download @@ -10,4 +10,5 @@ argv = [] for i in sys.argv[1:]: argv.append(i.replace(" ", "\\ ")) com = ConfigLanguareRunner.Command(f"{os.path.basename(sys.argv[0])} {' '.join(argv)}") -com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE")) \ No newline at end of file +com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE")) +sys.exit(int(ConfigLanguareRunner.programEnv[9][1])) \ No newline at end of file diff --git a/deb/opt/apps/deepin-wine-runner/AutoShell/command/enabledWinebottlecreatelink b/deb/opt/apps/deepin-wine-runner/AutoShell/command/enabledWinebottlecreatelink index 1bf2fba..b766ea2 100755 --- a/deb/opt/apps/deepin-wine-runner/AutoShell/command/enabledWinebottlecreatelink +++ b/deb/opt/apps/deepin-wine-runner/AutoShell/command/enabledWinebottlecreatelink @@ -10,4 +10,5 @@ argv = [] for i in sys.argv[1:]: argv.append(i.replace(" ", "\\ ")) com = ConfigLanguareRunner.Command(f"{os.path.basename(sys.argv[0])} {' '.join(argv)}") -com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE")) \ No newline at end of file +com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE")) +sys.exit(int(ConfigLanguareRunner.programEnv[9][1])) \ No newline at end of file diff --git a/deb/opt/apps/deepin-wine-runner/AutoShell/command/enabledhttpproxy b/deb/opt/apps/deepin-wine-runner/AutoShell/command/enabledhttpproxy index 1bf2fba..b766ea2 100755 --- a/deb/opt/apps/deepin-wine-runner/AutoShell/command/enabledhttpproxy +++ b/deb/opt/apps/deepin-wine-runner/AutoShell/command/enabledhttpproxy @@ -10,4 +10,5 @@ argv = [] for i in sys.argv[1:]: argv.append(i.replace(" ", "\\ ")) com = ConfigLanguareRunner.Command(f"{os.path.basename(sys.argv[0])} {' '.join(argv)}") -com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE")) \ No newline at end of file +com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE")) +sys.exit(int(ConfigLanguareRunner.programEnv[9][1])) \ No newline at end of file diff --git a/deb/opt/apps/deepin-wine-runner/AutoShell/command/enabledopengl b/deb/opt/apps/deepin-wine-runner/AutoShell/command/enabledopengl index 1bf2fba..b766ea2 100755 --- a/deb/opt/apps/deepin-wine-runner/AutoShell/command/enabledopengl +++ b/deb/opt/apps/deepin-wine-runner/AutoShell/command/enabledopengl @@ -10,4 +10,5 @@ argv = [] for i in sys.argv[1:]: argv.append(i.replace(" ", "\\ ")) com = ConfigLanguareRunner.Command(f"{os.path.basename(sys.argv[0])} {' '.join(argv)}") -com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE")) \ No newline at end of file +com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE")) +sys.exit(int(ConfigLanguareRunner.programEnv[9][1])) \ No newline at end of file diff --git a/deb/opt/apps/deepin-wine-runner/AutoShell/command/enabledwinecrashdialog b/deb/opt/apps/deepin-wine-runner/AutoShell/command/enabledwinecrashdialog index 1bf2fba..b766ea2 100755 --- a/deb/opt/apps/deepin-wine-runner/AutoShell/command/enabledwinecrashdialog +++ b/deb/opt/apps/deepin-wine-runner/AutoShell/command/enabledwinecrashdialog @@ -10,4 +10,5 @@ argv = [] for i in sys.argv[1:]: argv.append(i.replace(" ", "\\ ")) com = ConfigLanguareRunner.Command(f"{os.path.basename(sys.argv[0])} {' '.join(argv)}") -com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE")) \ No newline at end of file +com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE")) +sys.exit(int(ConfigLanguareRunner.programEnv[9][1])) \ No newline at end of file diff --git a/deb/opt/apps/deepin-wine-runner/AutoShell/command/error b/deb/opt/apps/deepin-wine-runner/AutoShell/command/error index 1bf2fba..b766ea2 100755 --- a/deb/opt/apps/deepin-wine-runner/AutoShell/command/error +++ b/deb/opt/apps/deepin-wine-runner/AutoShell/command/error @@ -10,4 +10,5 @@ argv = [] for i in sys.argv[1:]: argv.append(i.replace(" ", "\\ ")) com = ConfigLanguareRunner.Command(f"{os.path.basename(sys.argv[0])} {' '.join(argv)}") -com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE")) \ No newline at end of file +com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE")) +sys.exit(int(ConfigLanguareRunner.programEnv[9][1])) \ No newline at end of file diff --git a/deb/opt/apps/deepin-wine-runner/AutoShell/command/info b/deb/opt/apps/deepin-wine-runner/AutoShell/command/info index 1bf2fba..b766ea2 100755 --- a/deb/opt/apps/deepin-wine-runner/AutoShell/command/info +++ b/deb/opt/apps/deepin-wine-runner/AutoShell/command/info @@ -10,4 +10,5 @@ argv = [] for i in sys.argv[1:]: argv.append(i.replace(" ", "\\ ")) com = ConfigLanguareRunner.Command(f"{os.path.basename(sys.argv[0])} {' '.join(argv)}") -com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE")) \ No newline at end of file +com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE")) +sys.exit(int(ConfigLanguareRunner.programEnv[9][1])) \ No newline at end of file diff --git a/deb/opt/apps/deepin-wine-runner/AutoShell/command/installdll b/deb/opt/apps/deepin-wine-runner/AutoShell/command/installdll index 1bf2fba..b766ea2 100755 --- a/deb/opt/apps/deepin-wine-runner/AutoShell/command/installdll +++ b/deb/opt/apps/deepin-wine-runner/AutoShell/command/installdll @@ -10,4 +10,5 @@ argv = [] for i in sys.argv[1:]: argv.append(i.replace(" ", "\\ ")) com = ConfigLanguareRunner.Command(f"{os.path.basename(sys.argv[0])} {' '.join(argv)}") -com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE")) \ No newline at end of file +com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE")) +sys.exit(int(ConfigLanguareRunner.programEnv[9][1])) \ No newline at end of file diff --git a/deb/opt/apps/deepin-wine-runner/AutoShell/command/installdxvk b/deb/opt/apps/deepin-wine-runner/AutoShell/command/installdxvk index 1bf2fba..b766ea2 100755 --- a/deb/opt/apps/deepin-wine-runner/AutoShell/command/installdxvk +++ b/deb/opt/apps/deepin-wine-runner/AutoShell/command/installdxvk @@ -10,4 +10,5 @@ argv = [] for i in sys.argv[1:]: argv.append(i.replace(" ", "\\ ")) com = ConfigLanguareRunner.Command(f"{os.path.basename(sys.argv[0])} {' '.join(argv)}") -com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE")) \ No newline at end of file +com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE")) +sys.exit(int(ConfigLanguareRunner.programEnv[9][1])) \ No newline at end of file diff --git a/deb/opt/apps/deepin-wine-runner/AutoShell/command/installfont b/deb/opt/apps/deepin-wine-runner/AutoShell/command/installfont index 1bf2fba..b766ea2 100755 --- a/deb/opt/apps/deepin-wine-runner/AutoShell/command/installfont +++ b/deb/opt/apps/deepin-wine-runner/AutoShell/command/installfont @@ -10,4 +10,5 @@ argv = [] for i in sys.argv[1:]: argv.append(i.replace(" ", "\\ ")) com = ConfigLanguareRunner.Command(f"{os.path.basename(sys.argv[0])} {' '.join(argv)}") -com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE")) \ No newline at end of file +com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE")) +sys.exit(int(ConfigLanguareRunner.programEnv[9][1])) \ No newline at end of file diff --git a/deb/opt/apps/deepin-wine-runner/AutoShell/command/installgecko b/deb/opt/apps/deepin-wine-runner/AutoShell/command/installgecko index 1bf2fba..b766ea2 100755 --- a/deb/opt/apps/deepin-wine-runner/AutoShell/command/installgecko +++ b/deb/opt/apps/deepin-wine-runner/AutoShell/command/installgecko @@ -10,4 +10,5 @@ argv = [] for i in sys.argv[1:]: argv.append(i.replace(" ", "\\ ")) com = ConfigLanguareRunner.Command(f"{os.path.basename(sys.argv[0])} {' '.join(argv)}") -com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE")) \ No newline at end of file +com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE")) +sys.exit(int(ConfigLanguareRunner.programEnv[9][1])) \ No newline at end of file diff --git a/deb/opt/apps/deepin-wine-runner/AutoShell/command/installmono b/deb/opt/apps/deepin-wine-runner/AutoShell/command/installmono index 1bf2fba..b766ea2 100755 --- a/deb/opt/apps/deepin-wine-runner/AutoShell/command/installmono +++ b/deb/opt/apps/deepin-wine-runner/AutoShell/command/installmono @@ -10,4 +10,5 @@ argv = [] for i in sys.argv[1:]: argv.append(i.replace(" ", "\\ ")) com = ConfigLanguareRunner.Command(f"{os.path.basename(sys.argv[0])} {' '.join(argv)}") -com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE")) \ No newline at end of file +com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE")) +sys.exit(int(ConfigLanguareRunner.programEnv[9][1])) \ No newline at end of file diff --git a/deb/opt/apps/deepin-wine-runner/AutoShell/command/installmsxml b/deb/opt/apps/deepin-wine-runner/AutoShell/command/installmsxml index 1bf2fba..b766ea2 100755 --- a/deb/opt/apps/deepin-wine-runner/AutoShell/command/installmsxml +++ b/deb/opt/apps/deepin-wine-runner/AutoShell/command/installmsxml @@ -10,4 +10,5 @@ argv = [] for i in sys.argv[1:]: argv.append(i.replace(" ", "\\ ")) com = ConfigLanguareRunner.Command(f"{os.path.basename(sys.argv[0])} {' '.join(argv)}") -com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE")) \ No newline at end of file +com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE")) +sys.exit(int(ConfigLanguareRunner.programEnv[9][1])) \ No newline at end of file diff --git a/deb/opt/apps/deepin-wine-runner/AutoShell/command/installnet b/deb/opt/apps/deepin-wine-runner/AutoShell/command/installnet index 1bf2fba..b766ea2 100755 --- a/deb/opt/apps/deepin-wine-runner/AutoShell/command/installnet +++ b/deb/opt/apps/deepin-wine-runner/AutoShell/command/installnet @@ -10,4 +10,5 @@ argv = [] for i in sys.argv[1:]: argv.append(i.replace(" ", "\\ ")) com = ConfigLanguareRunner.Command(f"{os.path.basename(sys.argv[0])} {' '.join(argv)}") -com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE")) \ No newline at end of file +com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE")) +sys.exit(int(ConfigLanguareRunner.programEnv[9][1])) \ No newline at end of file diff --git a/deb/opt/apps/deepin-wine-runner/AutoShell/command/installsparkcorefont b/deb/opt/apps/deepin-wine-runner/AutoShell/command/installsparkcorefont index 1bf2fba..b766ea2 100755 --- a/deb/opt/apps/deepin-wine-runner/AutoShell/command/installsparkcorefont +++ b/deb/opt/apps/deepin-wine-runner/AutoShell/command/installsparkcorefont @@ -10,4 +10,5 @@ argv = [] for i in sys.argv[1:]: argv.append(i.replace(" ", "\\ ")) com = ConfigLanguareRunner.Command(f"{os.path.basename(sys.argv[0])} {' '.join(argv)}") -com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE")) \ No newline at end of file +com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE")) +sys.exit(int(ConfigLanguareRunner.programEnv[9][1])) \ No newline at end of file diff --git a/deb/opt/apps/deepin-wine-runner/AutoShell/command/installvb b/deb/opt/apps/deepin-wine-runner/AutoShell/command/installvb index 1bf2fba..b766ea2 100755 --- a/deb/opt/apps/deepin-wine-runner/AutoShell/command/installvb +++ b/deb/opt/apps/deepin-wine-runner/AutoShell/command/installvb @@ -10,4 +10,5 @@ argv = [] for i in sys.argv[1:]: argv.append(i.replace(" ", "\\ ")) com = ConfigLanguareRunner.Command(f"{os.path.basename(sys.argv[0])} {' '.join(argv)}") -com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE")) \ No newline at end of file +com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE")) +sys.exit(int(ConfigLanguareRunner.programEnv[9][1])) \ No newline at end of file diff --git a/deb/opt/apps/deepin-wine-runner/AutoShell/command/installvcpp b/deb/opt/apps/deepin-wine-runner/AutoShell/command/installvcpp index bcf4bde..331d1ca 100755 --- a/deb/opt/apps/deepin-wine-runner/AutoShell/command/installvcpp +++ b/deb/opt/apps/deepin-wine-runner/AutoShell/command/installvcpp @@ -11,3 +11,5 @@ for i in sys.argv[1:]: argv.append(i.replace(" ", "\\ ")) com = ConfigLanguareRunner.Command(f"{os.path.basename(sys.argv[0])} {' '.join(argv)}") com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE")) + +sys.exit(int(ConfigLanguareRunner.programEnv[9][1])) \ No newline at end of file diff --git a/deb/opt/apps/deepin-wine-runner/AutoShell/command/killallwineserver b/deb/opt/apps/deepin-wine-runner/AutoShell/command/killallwineserver index 1bf2fba..b766ea2 100755 --- a/deb/opt/apps/deepin-wine-runner/AutoShell/command/killallwineserver +++ b/deb/opt/apps/deepin-wine-runner/AutoShell/command/killallwineserver @@ -10,4 +10,5 @@ argv = [] for i in sys.argv[1:]: argv.append(i.replace(" ", "\\ ")) com = ConfigLanguareRunner.Command(f"{os.path.basename(sys.argv[0])} {' '.join(argv)}") -com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE")) \ No newline at end of file +com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE")) +sys.exit(int(ConfigLanguareRunner.programEnv[9][1])) \ No newline at end of file diff --git a/deb/opt/apps/deepin-wine-runner/AutoShell/command/pause b/deb/opt/apps/deepin-wine-runner/AutoShell/command/pause index 1bf2fba..b766ea2 100755 --- a/deb/opt/apps/deepin-wine-runner/AutoShell/command/pause +++ b/deb/opt/apps/deepin-wine-runner/AutoShell/command/pause @@ -10,4 +10,5 @@ argv = [] for i in sys.argv[1:]: argv.append(i.replace(" ", "\\ ")) com = ConfigLanguareRunner.Command(f"{os.path.basename(sys.argv[0])} {' '.join(argv)}") -com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE")) \ No newline at end of file +com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE")) +sys.exit(int(ConfigLanguareRunner.programEnv[9][1])) \ No newline at end of file diff --git a/deb/opt/apps/deepin-wine-runner/AutoShell/command/reg b/deb/opt/apps/deepin-wine-runner/AutoShell/command/reg index 1bf2fba..b766ea2 100755 --- a/deb/opt/apps/deepin-wine-runner/AutoShell/command/reg +++ b/deb/opt/apps/deepin-wine-runner/AutoShell/command/reg @@ -10,4 +10,5 @@ argv = [] for i in sys.argv[1:]: argv.append(i.replace(" ", "\\ ")) com = ConfigLanguareRunner.Command(f"{os.path.basename(sys.argv[0])} {' '.join(argv)}") -com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE")) \ No newline at end of file +com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE")) +sys.exit(int(ConfigLanguareRunner.programEnv[9][1])) \ No newline at end of file diff --git a/deb/opt/apps/deepin-wine-runner/AutoShell/command/stopdll b/deb/opt/apps/deepin-wine-runner/AutoShell/command/stopdll index 1bf2fba..b766ea2 100755 --- a/deb/opt/apps/deepin-wine-runner/AutoShell/command/stopdll +++ b/deb/opt/apps/deepin-wine-runner/AutoShell/command/stopdll @@ -10,4 +10,5 @@ argv = [] for i in sys.argv[1:]: argv.append(i.replace(" ", "\\ ")) com = ConfigLanguareRunner.Command(f"{os.path.basename(sys.argv[0])} {' '.join(argv)}") -com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE")) \ No newline at end of file +com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE")) +sys.exit(int(ConfigLanguareRunner.programEnv[9][1])) \ No newline at end of file diff --git a/deb/opt/apps/deepin-wine-runner/AutoShell/command/taskmgr b/deb/opt/apps/deepin-wine-runner/AutoShell/command/taskmgr index 1bf2fba..b766ea2 100755 --- a/deb/opt/apps/deepin-wine-runner/AutoShell/command/taskmgr +++ b/deb/opt/apps/deepin-wine-runner/AutoShell/command/taskmgr @@ -10,4 +10,5 @@ argv = [] for i in sys.argv[1:]: argv.append(i.replace(" ", "\\ ")) com = ConfigLanguareRunner.Command(f"{os.path.basename(sys.argv[0])} {' '.join(argv)}") -com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE")) \ No newline at end of file +com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE")) +sys.exit(int(ConfigLanguareRunner.programEnv[9][1])) \ No newline at end of file diff --git a/deb/opt/apps/deepin-wine-runner/AutoShell/command/thank b/deb/opt/apps/deepin-wine-runner/AutoShell/command/thank index 1bf2fba..b766ea2 100755 --- a/deb/opt/apps/deepin-wine-runner/AutoShell/command/thank +++ b/deb/opt/apps/deepin-wine-runner/AutoShell/command/thank @@ -10,4 +10,5 @@ argv = [] for i in sys.argv[1:]: argv.append(i.replace(" ", "\\ ")) com = ConfigLanguareRunner.Command(f"{os.path.basename(sys.argv[0])} {' '.join(argv)}") -com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE")) \ No newline at end of file +com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE")) +sys.exit(int(ConfigLanguareRunner.programEnv[9][1])) \ No newline at end of file diff --git a/deb/opt/apps/deepin-wine-runner/AutoShell/command/version b/deb/opt/apps/deepin-wine-runner/AutoShell/command/version index 1bf2fba..b766ea2 100755 --- a/deb/opt/apps/deepin-wine-runner/AutoShell/command/version +++ b/deb/opt/apps/deepin-wine-runner/AutoShell/command/version @@ -10,4 +10,5 @@ argv = [] for i in sys.argv[1:]: argv.append(i.replace(" ", "\\ ")) com = ConfigLanguareRunner.Command(f"{os.path.basename(sys.argv[0])} {' '.join(argv)}") -com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE")) \ No newline at end of file +com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE")) +sys.exit(int(ConfigLanguareRunner.programEnv[9][1])) \ No newline at end of file diff --git a/deb/opt/apps/deepin-wine-runner/AutoShell/command/warning b/deb/opt/apps/deepin-wine-runner/AutoShell/command/warning index 1bf2fba..b766ea2 100755 --- a/deb/opt/apps/deepin-wine-runner/AutoShell/command/warning +++ b/deb/opt/apps/deepin-wine-runner/AutoShell/command/warning @@ -10,4 +10,5 @@ argv = [] for i in sys.argv[1:]: argv.append(i.replace(" ", "\\ ")) com = ConfigLanguareRunner.Command(f"{os.path.basename(sys.argv[0])} {' '.join(argv)}") -com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE")) \ No newline at end of file +com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE")) +sys.exit(int(ConfigLanguareRunner.programEnv[9][1])) \ No newline at end of file diff --git a/deb/opt/apps/deepin-wine-runner/AutoShell/command/winecfg b/deb/opt/apps/deepin-wine-runner/AutoShell/command/winecfg index 1bf2fba..b766ea2 100755 --- a/deb/opt/apps/deepin-wine-runner/AutoShell/command/winecfg +++ b/deb/opt/apps/deepin-wine-runner/AutoShell/command/winecfg @@ -10,4 +10,5 @@ argv = [] for i in sys.argv[1:]: argv.append(i.replace(" ", "\\ ")) com = ConfigLanguareRunner.Command(f"{os.path.basename(sys.argv[0])} {' '.join(argv)}") -com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE")) \ No newline at end of file +com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE")) +sys.exit(int(ConfigLanguareRunner.programEnv[9][1])) \ No newline at end of file diff --git a/deb/opt/apps/deepin-wine-runner/AutoShell/command/winver b/deb/opt/apps/deepin-wine-runner/AutoShell/command/winver index 1bf2fba..b766ea2 100755 --- a/deb/opt/apps/deepin-wine-runner/AutoShell/command/winver +++ b/deb/opt/apps/deepin-wine-runner/AutoShell/command/winver @@ -10,4 +10,5 @@ argv = [] for i in sys.argv[1:]: argv.append(i.replace(" ", "\\ ")) com = ConfigLanguareRunner.Command(f"{os.path.basename(sys.argv[0])} {' '.join(argv)}") -com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE")) \ No newline at end of file +com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE")) +sys.exit(int(ConfigLanguareRunner.programEnv[9][1])) \ No newline at end of file diff --git a/deb/opt/apps/deepin-wine-runner/ConfigLanguareRunner.py b/deb/opt/apps/deepin-wine-runner/ConfigLanguareRunner.py index ba6c723..b966e9d 100755 --- a/deb/opt/apps/deepin-wine-runner/ConfigLanguareRunner.py +++ b/deb/opt/apps/deepin-wine-runner/ConfigLanguareRunner.py @@ -553,6 +553,10 @@ class Command(): break app = QtWidgets.QApplication(sys.argv) +if os.getenv("WINE") != None: + programEnv[1][1] = os.getenv("WINE") +if os.getenv("WINEPREFIX") != None: + programEnv[0][1] = os.getenv("WINEPREFIX") if __name__ == "__main__": optionAll = 0 if "--debug" in sys.argv: @@ -560,10 +564,6 @@ if __name__ == "__main__": if "--system" in sys.argv: programEnv[2][1] = "1" optionAll += 1 - if os.getenv("WINE") != None: - programEnv[1][1] = os.getenv("WINE") - if os.getenv("WINEPREFIX") != None: - programEnv[0][1] = os.getenv("WINEPREFIX") if len(sys.argv) - optionAll < 2: print("Wine 运行器自动配置文件解析器交互环境") print(f"版本:{version}") @@ -575,7 +575,7 @@ if __name__ == "__main__": break com = Command(commandLine) com.Run(com.GetCommandList(), programEnv[0][1], programEnv[1][1]) - exit() + sys.exit(int(programEnv[9][1])) # 读取文件 try: file = open(sys.argv[1], "r") @@ -588,4 +588,5 @@ if __name__ == "__main__": print(f"版本:{version}") print(f"©2020~{time.strftime('%Y')} gfdgd xi、为什么您不喜欢熊出没和阿布呢") print("--------------------------------------------------------------") - com.Run(com.GetCommandList(), programEnv[0][1], programEnv[1][1]) \ No newline at end of file + com.Run(com.GetCommandList(), programEnv[0][1], programEnv[1][1]) + sys.exit(int(programEnv[9][1])) \ No newline at end of file diff --git a/deb/opt/apps/deepin-wine-runner/UI/AutoConfig.py b/deb/opt/apps/deepin-wine-runner/UI/AutoConfig.py index 1418666..159b556 100644 --- a/deb/opt/apps/deepin-wine-runner/UI/AutoConfig.py +++ b/deb/opt/apps/deepin-wine-runner/UI/AutoConfig.py @@ -35,13 +35,19 @@ class Ui_MainWindow(object): self.horizontalLayout_2.setObjectName("horizontalLayout_2") spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) self.horizontalLayout_2.addItem(spacerItem) + self.getFen = QtWidgets.QPushButton(self.centralwidget) + self.getFen.setObjectName("getFen") + self.horizontalLayout_2.addWidget(self.getFen) + self.uploadFen = QtWidgets.QPushButton(self.centralwidget) + self.uploadFen.setObjectName("uploadFen") + self.horizontalLayout_2.addWidget(self.uploadFen) self.runBotton = QtWidgets.QPushButton(self.centralwidget) self.runBotton.setObjectName("runBotton") self.horizontalLayout_2.addWidget(self.runBotton) self.verticalLayout_3.addLayout(self.horizontalLayout_2) MainWindow.setCentralWidget(self.centralwidget) self.menubar = QtWidgets.QMenuBar(MainWindow) - self.menubar.setGeometry(QtCore.QRect(0, 0, 800, 36)) + self.menubar.setGeometry(QtCore.QRect(0, 0, 800, 33)) self.menubar.setObjectName("menubar") self.menu = QtWidgets.QMenu(self.menubar) self.menu.setObjectName("menu") @@ -67,6 +73,8 @@ class Ui_MainWindow(object): MainWindow.setWindowTitle(_translate("MainWindow", "自动部署脚本")) self.searchTips.setText(_translate("MainWindow", "搜索内容(为空代表显示所有内容):")) self.saerchBotton.setText(_translate("MainWindow", "搜索")) + self.getFen.setText(_translate("MainWindow", "获取选中项的评分")) + self.uploadFen.setText(_translate("MainWindow", "提交选中项的评分")) self.runBotton.setText(_translate("MainWindow", "部署此方案")) self.menu.setTitle(_translate("MainWindow", "程序")) self.about.setText(_translate("MainWindow", "关于")) diff --git a/deb/opt/apps/deepin-wine-runner/UI/KeyAddGui.py b/deb/opt/apps/deepin-wine-runner/UI/KeyAddGui.py index 171ad00..45e7d8c 100644 --- a/deb/opt/apps/deepin-wine-runner/UI/KeyAddGui.py +++ b/deb/opt/apps/deepin-wine-runner/UI/KeyAddGui.py @@ -32,9 +32,9 @@ class Ui_MainWindow(object): self.editButton = QtWidgets.QPushButton(self.centralwidget) self.editButton.setObjectName("editButton") self.horizontalLayout.addWidget(self.editButton) - self.saveButton = QtWidgets.QPushButton(self.centralwidget) - self.saveButton.setObjectName("saveButton") - self.horizontalLayout.addWidget(self.saveButton) + self.delectButton = QtWidgets.QPushButton(self.centralwidget) + self.delectButton.setObjectName("delectButton") + self.horizontalLayout.addWidget(self.delectButton) self.verticalLayout.addLayout(self.horizontalLayout) MainWindow.setCentralWidget(self.centralwidget) self.menuBar = QtWidgets.QMenuBar(MainWindow) @@ -74,7 +74,7 @@ class Ui_MainWindow(object): self.tips.setText(_translate("MainWindow", "<html><head/><body><p>此工具可以用于设置快捷键到 Wine 容器的映射,以便 Wine 程序可以正常的使用快捷键<br/>Deepin/UOS将会使用默认的快捷键服务,其它发行版将使用此运行器提供的快捷键服务<br>Deepin/UOS将只会提供快捷键添加功能,请在控制中心进行快捷键的修改管理</p></body></html>")) self.addButton.setText(_translate("MainWindow", "添加")) self.editButton.setText(_translate("MainWindow", "编辑")) - self.saveButton.setText(_translate("MainWindow", "保存")) + self.delectButton.setText(_translate("MainWindow", "删除")) self.menu.setTitle(_translate("MainWindow", "设置快捷键服务")) self.action.setText(_translate("MainWindow", "关于")) self.serverTips.setText(_translate("MainWindow", "此内容只支持非Deepin/UOS发行版")) diff --git a/deb/opt/apps/deepin-wine-runner/deepin-wine-runner b/deb/opt/apps/deepin-wine-runner/deepin-wine-runner index 806639a..e565e7c 100755 --- a/deb/opt/apps/deepin-wine-runner/deepin-wine-runner +++ b/deb/opt/apps/deepin-wine-runner/deepin-wine-runner @@ -616,7 +616,16 @@ def WineBottonAutoConfig(): wineBottonPath = setting["DefultBotton"] else: wineBottonPath = e1.currentText() - os.system(f"'{programPath}/AutoConfig.py' '{wine[o1.currentText()]}' '{wineBottonPath}'") + option = "" + if setting["Architecture"] != "Auto": + option += f"WINEARCH={setting['Architecture']} " + if setting["MonoGeckoInstaller"]: + option += f"WINEDLLOVERRIDES=\"mscoree,mshtml=\" " + if not setting["Debug"]: + option += "WINEDEBUG=-all " + else: + option += "WINEDEBUG=FIXME,ERR,WARN,TRACE,Message " + os.system(f"env WINEPREFIX='{wineBottonPath}' {option} WINE='{wine[o1.currentText()]}' '{programPath}/AutoConfig.py' '{wine[o1.currentText()]}' '{wineBottonPath}'") def InstallMonoGecko(program): if e1.currentText() == "": @@ -1640,6 +1649,7 @@ try: "wine": "wine", "wine64": "wine64", "ukylin-wine": "ukylin-wine", + "mono(这不是 wine,但可以实现初步调用运行 .net 应用)": "mono", "基于 linglong 的 deepin-wine6-stable(不推荐)": f"ll-cli run '' --exec '/bin/deepin-wine6-stable'" } untipsWine = ["基于 UOS box86 的 deepin-wine6-stable", "基于 exagear 的 deepin-wine6-stable", "基于 linglong 的 deepin-wine6-stable(不推荐)"] @@ -1837,10 +1847,15 @@ exe路径\' 参数 \' <code>N: 鉴于仓库 'https://community-packages.deepin.com/beige beige InRelease' 不支持 'i386' 体系结构,跳过配置文件 'main/binary-i386/Packages' 的获取。</code>''' updateThingsString = '''※1、新增 VB Runtime 组件安装工具 ※2、优化自动配置容器搜索功能,搜索不区分大小写 +※3、新增 Wine 容器快捷键映射功能 +※4、修复在 arm 架构运行 Wine 时提示无法解压资源的问题 +※5、修复右键无法找到 Wine 运行器打开方式的问题 +※6、修复了容器自动配置脚本 GUI 解析器无法指定 Wine、容器以及位数的功能 +※7、容器自动配置脚本支持评分功能 ''' for i in information["Thank"]: thankText += f"{i}\n" -updateTime = "2022年10月02日" +updateTime = "2022年10月24日" about = f'''<h1>关于</h1> <p>一个能让Linux用户更加方便运行Windows应用的程序,内置了对wine图形化的支持和各种Wine工具和自制Wine程序打包器、运行库安装工具等等</p> <p>同时也内置了基于VirtualBox制作的小白Windows虚拟机安装工具,可以做到只需要用户下载系统镜像并点击安装即可,无需顾及虚拟机安装、创建、虚拟机的分区等等</p> @@ -1868,6 +1883,11 @@ Qt 版本:{QtCore.qVersion()} <pre>{tips} </pre> <hr> +<h1>友谊链接</h1> +<pre>星火应用商店:https://spark-app.store/ +Deepin 官网:https://www.deepin.org +Deepin 论坛:https://bbs.deepin.org</pre> +<hr> <h1>©2020~{time.strftime("%Y")} gfdgd xi、为什么您不喜欢熊出没和阿布呢</h1>''' title = "Wine 运行器 {}".format(version) updateThings = "{} 更新内容:\n{}\n更新时间:{}".format(version, updateThingsString, updateTime, time.strftime("%Y")) @@ -1935,7 +1955,7 @@ leftUpLayout.addWidget(e1, 3, 0, 1, 1) button1 = QtWidgets.QPushButton("浏览") button1.clicked.connect(liulanbutton) leftUpLayout.addWidget(button1, 3, 1, 1, 1) -leftUpLayout.addWidget(QtWidgets.QLabel(QtCore.QCoreApplication.translate("U", "请选择要执行的程序:")), 4, 0, 1, 1) +leftUpLayout.addWidget(QtWidgets.QLabel(QtCore.QCoreApplication.translate("U", "请选择要执行的程序(EXE、MSI或者命令):")), 4, 0, 1, 1) e2 = QtWidgets.QComboBox() if setting["AutoPath"]: e2.editTextChanged.connect(ChangePath) @@ -2092,6 +2112,7 @@ w2 = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "安装常见字 w3 = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "安装自定义字体")) w4 = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "删除选择的 Wine 容器")) cleanBottonUOS = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "清理 Wine 容器(基于 Wine 适配活动脚本)")) +wineKeyboardLnk = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "Wine 快捷键映射")) w5 = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "打包 wine 应用")) w6 = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "使用官方 Wine 适配活动的脚本进行打包")) getDllOnInternet = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "从互联网获取DLL")) @@ -2107,6 +2128,8 @@ wineOption.addSeparator() wineOption.addAction(w5) wineOption.addAction(w6) wineOption.addSeparator() +wineOption.addAction(wineKeyboardLnk) +wineOption.addSeparator() wineOption.addAction(getDllOnInternet) wineOption.addAction(w7) wineOption.addSeparator() @@ -2196,6 +2219,7 @@ w4.triggered.connect(DeleteWineBotton) cleanBottonUOS.triggered.connect(CleanWineBottonByUOS) w5.triggered.connect(BuildExeDeb) w6.triggered.connect(UOSPackageScript) +wineKeyboardLnk.triggered.connect(lambda: threading.Thread(target=os.system, args=[f"'{programPath}/key/key-add-gui.py'"]).start()) getDllOnInternet.triggered.connect(GetDllFromInternet) w7.triggered.connect(GetDllFromWindowsISO.ShowWindow) updateGeek.triggered.connect(lambda: os.system(f"'{programPath}/launch.sh' deepin-terminal -C '\"{programPath}/UpdateGeek.sh\"' --keep-open")) diff --git a/deb/opt/apps/deepin-wine-runner/helperset/deepin-wine-venturi-setter b/deb/opt/apps/deepin-wine-runner/helperset/deepin-wine-venturi-setter new file mode 100755 index 0000000..61865ed --- /dev/null +++ b/deb/opt/apps/deepin-wine-runner/helperset/deepin-wine-venturi-setter @@ -0,0 +1,71 @@ +#!/usr/bin/env python3 +import os +import sys + +# 读取文本文档 +def readtxt(path: "路径")->"读取文本文档": + f = open(path, "r") # 设置文件对象 + str = f.read() # 获取内容 + f.close() # 关闭文本对象 + return str # 返回结果 + + +def ChangeDeepinWineOpenFileDialogDefult()->"": + info = readtxt("/opt/deepinwine/tools/run_v3.sh") + all = "" + for line in info.split('\n'): + if "export ATTACH_FILE_DIALOG=" in line: + if "#" in line: + return False + line = "#" + line + all = all + line + "\n" + return all[0: -1] + +def ChangeDeepinWineOpenFileDialogDeepinDialog()->"": + info = readtxt("/opt/deepinwine/tools/run_v3.sh") + all = "" + for line in info.split('\n'): + if "export ATTACH_FILE_DIALOG=" in line: + if "#" not in line: + return False + line = line.replace("#", "") + all = all + line + "\n" + return all[0: -1] + +# 写入文本文档 +def write_txt(path: "路径", things: "内容")->"写入文本文档": + file = open(path, 'w', encoding='UTF-8') # 设置文件对象 + file.write(things) # 写入文本 + file.close() # 关闭文本对象 + +def Help(): + print("参数帮助:") + print("deepin\t使用 deepin 默认文管") + print("defult\t使用 wine 默认文管") + print("recovery\t恢复默认设置") + print("--help\t查看帮助") + +if len(sys.argv) <= 1: + print("参数错误!") + Help() + sys.exit(1) +if not sys.argv[1] == "deepin" and not sys.argv[1] == "defult" and not sys.argv[1] == "recovery" or sys.argv[1] == "--help": + Help() + sys.exit(1) +things = "" +if sys.argv[1] == "deepin": + things = ChangeDeepinWineOpenFileDialogDeepinDialog() +elif sys.argv[1] == "defult": + things = ChangeDeepinWineOpenFileDialogDefult() +elif sys.argv[1] == "recovery": + os.system("sudo apt reinstall deepin-wine-helper:i386") + sys.exit(0) +else: + print("参数错误!") + Help() + sys.exit(1) +if things == False or things == "": + print("无法更新配置:配置不准重复更新") + sys.exit(1) +write_txt("/opt/deepinwine/tools/run_v3.sh", things) +sys.exit(0) diff --git a/deb/opt/apps/deepin-wine-runner/helperset/deepin-wine-venturi-setter-dtk b/deb/opt/apps/deepin-wine-runner/helperset/deepin-wine-venturi-setter-dtk new file mode 100755 index 0000000..6462df2 Binary files /dev/null and b/deb/opt/apps/deepin-wine-runner/helperset/deepin-wine-venturi-setter-dtk differ diff --git a/deb/opt/apps/deepin-wine-runner/helperset/deepin-wine-venturi-setter-dtk.desktop b/deb/opt/apps/deepin-wine-runner/helperset/deepin-wine-venturi-setter-dtk.desktop new file mode 100644 index 0000000..bfd16c8 --- /dev/null +++ b/deb/opt/apps/deepin-wine-runner/helperset/deepin-wine-venturi-setter-dtk.desktop @@ -0,0 +1,8 @@ +[Desktop Entry] +Categories=System +Exec=deepin-wine-venturi-setter-dtk +Icon=/opt/apps/deepin-wine-venturi-setter/logo.png +Name=deepin wine 文管设置器 +StartupNotify=true +Terminal=false +Type=Application \ No newline at end of file diff --git a/deb/opt/apps/deepin-wine-runner/helperset/logo.png b/deb/opt/apps/deepin-wine-runner/helperset/logo.png new file mode 100755 index 0000000..b164d46 Binary files /dev/null and b/deb/opt/apps/deepin-wine-runner/helperset/logo.png differ diff --git a/deb/opt/apps/deepin-wine-runner/key/key-add-gui.py b/deb/opt/apps/deepin-wine-runner/key/key-add-gui.py index 2b71aab..13fe039 100755 --- a/deb/opt/apps/deepin-wine-runner/key/key-add-gui.py +++ b/deb/opt/apps/deepin-wine-runner/key/key-add-gui.py @@ -1,6 +1,7 @@ #!/usr/bin/env python3 import os import sys +import traceback programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string sys.path.append(f"{programPath}/..") @@ -12,12 +13,15 @@ import threading from UI.KeyAddGui import * import PyQt5.QtWidgets as QtWidgets +keyListDebianMap = [[], ["shift"], ["ctrl"], ["alt"], ["ctrl", "alt"], ["ctrl", "shift"], ["alt", "shift"]] +keyList = ["无快捷键", "shift", "ctrl", "alt", "ctrl+alt", "ctrl+shift", "alt+shift"] + class Check: def VersionCheck(): try: bus = dbus.SessionBus() bus.get_object("com.deepin.daemon.Keybinding", "/com/deepin/daemon/Keybinding").List() - int("a") + #int("a") return True except: print("无法检测到 Deepin/UOS 快捷键服务") @@ -30,23 +34,60 @@ class Check: ui.setUnautoStart.setDisabled(True) ui.editButton.setDisabled(True) ui.keyBoardList.setDisabled(True) - ui.saveButton.setDisabled(True) + ui.delectButton.setDisabled(True) def Clear(): - ui.keyBoardList.model().removeRows(0, ui.keyBoardList.model().rowCount()) + #ui.keyBoardList.model().removeRows(0, ui.keyBoardList.model().rowCount()) + model = QtCore.QStringListModel(window) - with open(f"{programPath}/list/KeyList.json", "r") as file: - lists = [] - for i in json.loads(file.read()): - lists.append(f"{i[0]}({'+'.join(i[1: -1])}),{i[-1]}") - model.setStringList(lists) - ui.keyBoardList.setModel(model) - + try: + with open(f"{programPath}/list/KeyList.json", "r") as file: + lists = [] + for i in json.loads(file.read()): + #lists.append(f"{i[0]}({'+'.join(i[0: -1])}),{i[-1]}") + choice = i + #ui.localKeyboardChoose.setCurrentIndex(keyListDebianMap.index(choice[:-2])) + newList = [] + newList.append([keyListDebianMap.index(choice[:-2]), choice[-2]]) + # 解析命令 + command = choice[-1] + # 筛掉路径 + command = command[command[1:].index("'") + 2:].strip() + # 筛出其中一个快捷键 + newList.append([command[command.index(" ") - 1]]) + command = command[command.index(" ") + 2:] + # 读 exe + newList.insert(0, command[:command.index("'")]) + command = command[command.index("'") + 1: ].strip() + # 读最后的快捷键 + newList[2].insert(0, int(command)) + print(newList) + lists.append(f"{newList[0]}({'+'.join(keyListDebianMap[newList[1][0]])}+{newList[1][1]})=>({'+'.join(keyListDebianMap[newList[2][0]])}+{newList[2][1]})") + model.setStringList(lists) + ui.keyBoardList.setModel(model) + except: + traceback.print_exc() class Click: def AddButton(): os.system(f"'{programPath}/keyboard-add-gui.py'") + Clear() + def EditButton(): + os.system(f"'{programPath}/keyboard-add-gui.py' {ui.keyBoardList.currentIndex().row()}") + Clear() + + def DeleteButton(): + try: + with open(f"{programPath}/list/KeyList.json", "r") as file: + lists = json.loads(file.read()) + del lists[ui.keyBoardList.currentIndex().row()] + with open(f"{programPath}/list/KeyList.json", "w") as file: + file.write(json.dumps(lists)) + Clear() + except: + traceback.print_exc() + QtWidgets.QMessageBox.critical(window, "错误", traceback.format_exc()) if __name__ == "__main__": @@ -56,10 +97,12 @@ if __name__ == "__main__": ui.setupUi(window) # 连接槽 ui.addButton.clicked.connect(Click.AddButton) + ui.editButton.clicked.connect(Click.EditButton) + ui.delectButton.clicked.connect(Click.DeleteButton) ui.startServer.triggered.connect(lambda: threading.Thread(target=os.system, args=[f"nohup '{programPath}/key-get.py' &"]).start()) ui.stopServer.triggered.connect(lambda: threading.Thread(target=os.system, args=[f"'{programPath}/stop.sh'"]).start()) - ui.setAutoStart.triggered.connect(lambda: threading.Thread(target=os.system, args=[f"'{programPath}/start-auto-server.sh'"]).start()) - ui.setUnautoStart.triggered.connect(lambda: threading.Thread(target=os.system, args=[f"'{programPath}/stop-auto-server.sh'"]).start()) + ui.setAutoStart.triggered.connect(lambda: threading.Thread(target=os.system, args=[f"pkexec '{programPath}/start-auto-server.sh'"]).start()) + ui.setUnautoStart.triggered.connect(lambda: threading.Thread(target=os.system, args=[f"pkexec '{programPath}/stop-auto-server.sh'"]).start()) window.show() threading.Thread(target=Check.CheckThreading).start() Clear() diff --git a/deb/opt/apps/deepin-wine-runner/key/key-get.py b/deb/opt/apps/deepin-wine-runner/key/key-get.py index 48251f9..7a0ecbb 100755 --- a/deb/opt/apps/deepin-wine-runner/key/key-get.py +++ b/deb/opt/apps/deepin-wine-runner/key/key-get.py @@ -91,11 +91,11 @@ def Read(): time.sleep(0.01) # Lock 锁防止多次调用 -if os.path.exists("/tmp/deepin-wine-runner-keyboard-lock"): - print("不可多次调用") - print("锁 /tmp/deepin-wine-runner-keyboard-lock 已存在") - sys.exit(1) -os.mknod("/tmp/deepin-wine-runner-keyboard-lock") +#if os.path.exists("/tmp/deepin-wine-runner-keyboard-lock"): +# print("不可多次调用") +# print("锁 /tmp/deepin-wine-runner-keyboard-lock 已存在") +# sys.exit(1) +#os.mknod("/tmp/deepin-wine-runner-keyboard-lock") threading.Thread(target=Read).start() with keyboard.Listener( on_press=on_press, diff --git a/deb/opt/apps/deepin-wine-runner/key/keyboard-add-gui.py b/deb/opt/apps/deepin-wine-runner/key/keyboard-add-gui.py index 2510a42..a530cf0 100755 --- a/deb/opt/apps/deepin-wine-runner/key/keyboard-add-gui.py +++ b/deb/opt/apps/deepin-wine-runner/key/keyboard-add-gui.py @@ -22,7 +22,7 @@ class Check: try: bus = dbus.SessionBus() bus.get_object("com.deepin.daemon.Keybinding", "/com/deepin/daemon/Keybinding").List() - int("a") + #int("a") return True except: print("无法检测到 Deepin/UOS 快捷键服务") @@ -69,7 +69,7 @@ class Click: return print(keyboardList) addList = [] - addList = keyListDebianMap[ui.wineKeyboardChoose.currentIndex()][:] + addList = keyListDebianMap[ui.localKeyboardChoose.currentIndex()][:] print(keyListDebianMap) print(addList) addList.append(ui.localKey.text()[0]) diff --git a/deb/opt/apps/deepin-wine-runner/key/start-auto-server.sh b/deb/opt/apps/deepin-wine-runner/key/start-auto-server.sh index 226d344..0e73207 100755 --- a/deb/opt/apps/deepin-wine-runner/key/start-auto-server.sh +++ b/deb/opt/apps/deepin-wine-runner/key/start-auto-server.sh @@ -7,6 +7,7 @@ # 感谢:感谢 wine、deepin-wine 以及星火团队,提供了 wine、deepin-wine、spark-wine-devel 给大家使用,让我能做这个程序 # 基于 Bash 制作 ################################################################################################################# +cd `dirname $0` programPath=$(cd "$(dirname "$0")";pwd) echo $programPath if [[ -f "/etc/xdg/autostart/deepin-wine-runner-keyboard.desktop" ]]; then diff --git a/deb/opt/apps/deepin-wine-runner/key/stop-auto-server.sh b/deb/opt/apps/deepin-wine-runner/key/stop-auto-server.sh index f2086b7..5226cec 100755 --- a/deb/opt/apps/deepin-wine-runner/key/stop-auto-server.sh +++ b/deb/opt/apps/deepin-wine-runner/key/stop-auto-server.sh @@ -8,6 +8,7 @@ # 基于 Bash 制作 ################################################################################################################# programPath=$(cd "$(dirname "$0")";pwd) +cd `dirname $0` echo $programPath if [[ ! -f "/etc/xdg/autostart/deepin-wine-runner-keyboard.desktop" ]]; then # 判断是否自启动,已经自启动就不再考虑 diff --git a/deb/opt/apps/deepin-wine-runner/package-script.zip b/deb/opt/apps/deepin-wine-runner/package-script.zip index 7147ce2..1b5fdf6 100755 Binary files a/deb/opt/apps/deepin-wine-runner/package-script.zip and b/deb/opt/apps/deepin-wine-runner/package-script.zip differ diff --git a/helperset/deepin-wine-venturi-setter b/helperset/deepin-wine-venturi-setter new file mode 100755 index 0000000..61865ed --- /dev/null +++ b/helperset/deepin-wine-venturi-setter @@ -0,0 +1,71 @@ +#!/usr/bin/env python3 +import os +import sys + +# 读取文本文档 +def readtxt(path: "路径")->"读取文本文档": + f = open(path, "r") # 设置文件对象 + str = f.read() # 获取内容 + f.close() # 关闭文本对象 + return str # 返回结果 + + +def ChangeDeepinWineOpenFileDialogDefult()->"": + info = readtxt("/opt/deepinwine/tools/run_v3.sh") + all = "" + for line in info.split('\n'): + if "export ATTACH_FILE_DIALOG=" in line: + if "#" in line: + return False + line = "#" + line + all = all + line + "\n" + return all[0: -1] + +def ChangeDeepinWineOpenFileDialogDeepinDialog()->"": + info = readtxt("/opt/deepinwine/tools/run_v3.sh") + all = "" + for line in info.split('\n'): + if "export ATTACH_FILE_DIALOG=" in line: + if "#" not in line: + return False + line = line.replace("#", "") + all = all + line + "\n" + return all[0: -1] + +# 写入文本文档 +def write_txt(path: "路径", things: "内容")->"写入文本文档": + file = open(path, 'w', encoding='UTF-8') # 设置文件对象 + file.write(things) # 写入文本 + file.close() # 关闭文本对象 + +def Help(): + print("参数帮助:") + print("deepin\t使用 deepin 默认文管") + print("defult\t使用 wine 默认文管") + print("recovery\t恢复默认设置") + print("--help\t查看帮助") + +if len(sys.argv) <= 1: + print("参数错误!") + Help() + sys.exit(1) +if not sys.argv[1] == "deepin" and not sys.argv[1] == "defult" and not sys.argv[1] == "recovery" or sys.argv[1] == "--help": + Help() + sys.exit(1) +things = "" +if sys.argv[1] == "deepin": + things = ChangeDeepinWineOpenFileDialogDeepinDialog() +elif sys.argv[1] == "defult": + things = ChangeDeepinWineOpenFileDialogDefult() +elif sys.argv[1] == "recovery": + os.system("sudo apt reinstall deepin-wine-helper:i386") + sys.exit(0) +else: + print("参数错误!") + Help() + sys.exit(1) +if things == False or things == "": + print("无法更新配置:配置不准重复更新") + sys.exit(1) +write_txt("/opt/deepinwine/tools/run_v3.sh", things) +sys.exit(0) diff --git a/helperset/deepin-wine-venturi-setter-dtk b/helperset/deepin-wine-venturi-setter-dtk new file mode 100755 index 0000000..6462df2 Binary files /dev/null and b/helperset/deepin-wine-venturi-setter-dtk differ diff --git a/helperset/deepin-wine-venturi-setter-dtk.desktop b/helperset/deepin-wine-venturi-setter-dtk.desktop new file mode 100644 index 0000000..bfd16c8 --- /dev/null +++ b/helperset/deepin-wine-venturi-setter-dtk.desktop @@ -0,0 +1,8 @@ +[Desktop Entry] +Categories=System +Exec=deepin-wine-venturi-setter-dtk +Icon=/opt/apps/deepin-wine-venturi-setter/logo.png +Name=deepin wine 文管设置器 +StartupNotify=true +Terminal=false +Type=Application \ No newline at end of file diff --git a/helperset/logo.png b/helperset/logo.png new file mode 100755 index 0000000..b164d46 Binary files /dev/null and b/helperset/logo.png differ diff --git a/key/key-add-gui.py b/key/key-add-gui.py index 6a13395..13fe039 100755 --- a/key/key-add-gui.py +++ b/key/key-add-gui.py @@ -101,8 +101,8 @@ if __name__ == "__main__": ui.delectButton.clicked.connect(Click.DeleteButton) ui.startServer.triggered.connect(lambda: threading.Thread(target=os.system, args=[f"nohup '{programPath}/key-get.py' &"]).start()) ui.stopServer.triggered.connect(lambda: threading.Thread(target=os.system, args=[f"'{programPath}/stop.sh'"]).start()) - ui.setAutoStart.triggered.connect(lambda: threading.Thread(target=os.system, args=[f"'{programPath}/start-auto-server.sh'"]).start()) - ui.setUnautoStart.triggered.connect(lambda: threading.Thread(target=os.system, args=[f"'{programPath}/stop-auto-server.sh'"]).start()) + ui.setAutoStart.triggered.connect(lambda: threading.Thread(target=os.system, args=[f"pkexec '{programPath}/start-auto-server.sh'"]).start()) + ui.setUnautoStart.triggered.connect(lambda: threading.Thread(target=os.system, args=[f"pkexec '{programPath}/stop-auto-server.sh'"]).start()) window.show() threading.Thread(target=Check.CheckThreading).start() Clear() diff --git a/key/key-get.py b/key/key-get.py index 48251f9..7a0ecbb 100755 --- a/key/key-get.py +++ b/key/key-get.py @@ -91,11 +91,11 @@ def Read(): time.sleep(0.01) # Lock 锁防止多次调用 -if os.path.exists("/tmp/deepin-wine-runner-keyboard-lock"): - print("不可多次调用") - print("锁 /tmp/deepin-wine-runner-keyboard-lock 已存在") - sys.exit(1) -os.mknod("/tmp/deepin-wine-runner-keyboard-lock") +#if os.path.exists("/tmp/deepin-wine-runner-keyboard-lock"): +# print("不可多次调用") +# print("锁 /tmp/deepin-wine-runner-keyboard-lock 已存在") +# sys.exit(1) +#os.mknod("/tmp/deepin-wine-runner-keyboard-lock") threading.Thread(target=Read).start() with keyboard.Listener( on_press=on_press, diff --git a/key/keyboard-add-gui.py b/key/keyboard-add-gui.py index 225ddf7..a530cf0 100755 --- a/key/keyboard-add-gui.py +++ b/key/keyboard-add-gui.py @@ -22,7 +22,7 @@ class Check: try: bus = dbus.SessionBus() bus.get_object("com.deepin.daemon.Keybinding", "/com/deepin/daemon/Keybinding").List() - int("a") + #int("a") return True except: print("无法检测到 Deepin/UOS 快捷键服务") diff --git a/key/list/KeyList.json b/key/list/KeyList.json index 0637a08..fe51488 100755 --- a/key/list/KeyList.json +++ b/key/list/KeyList.json @@ -1 +1 @@ -[] \ No newline at end of file +[] diff --git a/key/start-auto-server.sh b/key/start-auto-server.sh index 226d344..0e73207 100755 --- a/key/start-auto-server.sh +++ b/key/start-auto-server.sh @@ -7,6 +7,7 @@ # 感谢:感谢 wine、deepin-wine 以及星火团队,提供了 wine、deepin-wine、spark-wine-devel 给大家使用,让我能做这个程序 # 基于 Bash 制作 ################################################################################################################# +cd `dirname $0` programPath=$(cd "$(dirname "$0")";pwd) echo $programPath if [[ -f "/etc/xdg/autostart/deepin-wine-runner-keyboard.desktop" ]]; then diff --git a/key/stop-auto-server.sh b/key/stop-auto-server.sh index f2086b7..5226cec 100755 --- a/key/stop-auto-server.sh +++ b/key/stop-auto-server.sh @@ -8,6 +8,7 @@ # 基于 Bash 制作 ################################################################################################################# programPath=$(cd "$(dirname "$0")";pwd) +cd `dirname $0` echo $programPath if [[ ! -f "/etc/xdg/autostart/deepin-wine-runner-keyboard.desktop" ]]; then # 判断是否自启动,已经自启动就不再考虑 diff --git a/mainwindow.py b/mainwindow.py index b1659bf..e565e7c 100755 --- a/mainwindow.py +++ b/mainwindow.py @@ -1649,6 +1649,7 @@ try: "wine": "wine", "wine64": "wine64", "ukylin-wine": "ukylin-wine", + "mono(这不是 wine,但可以实现初步调用运行 .net 应用)": "mono", "基于 linglong 的 deepin-wine6-stable(不推荐)": f"ll-cli run '' --exec '/bin/deepin-wine6-stable'" } untipsWine = ["基于 UOS box86 的 deepin-wine6-stable", "基于 exagear 的 deepin-wine6-stable", "基于 linglong 的 deepin-wine6-stable(不推荐)"] @@ -1854,7 +1855,7 @@ updateThingsString = '''※1、新增 VB Runtime 组件安装工具 ''' for i in information["Thank"]: thankText += f"{i}\n" -updateTime = "2022年10月23日" +updateTime = "2022年10月24日" about = f'''<h1>关于</h1> <p>一个能让Linux用户更加方便运行Windows应用的程序,内置了对wine图形化的支持和各种Wine工具和自制Wine程序打包器、运行库安装工具等等</p> <p>同时也内置了基于VirtualBox制作的小白Windows虚拟机安装工具,可以做到只需要用户下载系统镜像并点击安装即可,无需顾及虚拟机安装、创建、虚拟机的分区等等</p> diff --git a/package-script.zip b/package-script.zip index 7147ce2..1b5fdf6 100755 Binary files a/package-script.zip and b/package-script.zip differ