From 413a32b453313b3edb371dd95a8f73d62a903ff3 Mon Sep 17 00:00:00 2001
From: gfdgd_xi <3025613752@qq.com>
Date: Thu, 12 Jan 2023 22:16:52 +0800
Subject: [PATCH] =?UTF-8?q?=E8=87=AA=E5=8A=A8=E9=85=8D=E7=BD=AE=E8=84=9A?=
=?UTF-8?q?=E6=9C=AC=20For=20UEngine=20=E8=BF=90=E8=A1=8C=E5=99=A8?=
=?UTF-8?q?=E5=88=9D=E6=AD=A5?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
AutoConfig.py | 592 +++++++++++++++
AutoShell/command/download | 14 +
AutoShell/command/error | 14 +
AutoShell/command/info | 14 +
AutoShell/command/installapk | 14 +
AutoShell/command/pause | 14 +
AutoShell/command/programforum | 14 +
AutoShell/command/thank | 14 +
AutoShell/command/version | 14 +
AutoShell/command/warning | 14 +
AutoShell/main.py | 75 ++
ConfigLanguareRunner-help.json | 46 ++
ConfigLanguareRunner.py | 673 ++++++++++++++++++
Model/__init__.py | 37 +
Model/__pycache__/__init__.cpython-310.pyc | Bin 0 -> 1122 bytes
Model/__pycache__/__init__.cpython-36.pyc | Bin 0 -> 1086 bytes
Model/__pycache__/__init__.cpython-37.pyc | Bin 0 -> 1101 bytes
UI/AutoConfig.py | 125 ++++
UI/AutoConfig.ui | 199 ++++++
UI/KeyAddGui.py | 85 +++
UI/KeyAddGui.ui | 127 ++++
UI/KeyAddKeyboardGui.py | 86 +++
UI/KeyAddKeyboardGui.ui | 130 ++++
UI/__pycache__/AutoConfig.cpython-310.pyc | Bin 0 -> 2603 bytes
UI/__pycache__/AutoConfig.cpython-37.pyc | Bin 0 -> 3820 bytes
UI/__pycache__/KeyAddGui.cpython-37.pyc | Bin 0 -> 3123 bytes
.../KeyAddKeyboardGui.cpython-37.pyc | Bin 0 -> 2674 bytes
__pycache__/getxmlimg.cpython-37.pyc | Bin 4068 -> 3183 bytes
req/__init__.py | 27 +
req/__pycache__/__init__.cpython-310.pyc | Bin 0 -> 1163 bytes
req/__pycache__/__init__.cpython-36.pyc | Bin 0 -> 1180 bytes
req/__pycache__/__init__.cpython-37.pyc | Bin 0 -> 978 bytes
32 files changed, 2328 insertions(+)
create mode 100755 AutoConfig.py
create mode 100755 AutoShell/command/download
create mode 100755 AutoShell/command/error
create mode 100755 AutoShell/command/info
create mode 100755 AutoShell/command/installapk
create mode 100755 AutoShell/command/pause
create mode 100755 AutoShell/command/programforum
create mode 100755 AutoShell/command/thank
create mode 100755 AutoShell/command/version
create mode 100755 AutoShell/command/warning
create mode 100755 AutoShell/main.py
create mode 100644 ConfigLanguareRunner-help.json
create mode 100755 ConfigLanguareRunner.py
create mode 100755 Model/__init__.py
create mode 100644 Model/__pycache__/__init__.cpython-310.pyc
create mode 100644 Model/__pycache__/__init__.cpython-36.pyc
create mode 100644 Model/__pycache__/__init__.cpython-37.pyc
create mode 100755 UI/AutoConfig.py
create mode 100755 UI/AutoConfig.ui
create mode 100755 UI/KeyAddGui.py
create mode 100755 UI/KeyAddGui.ui
create mode 100755 UI/KeyAddKeyboardGui.py
create mode 100755 UI/KeyAddKeyboardGui.ui
create mode 100755 UI/__pycache__/AutoConfig.cpython-310.pyc
create mode 100644 UI/__pycache__/AutoConfig.cpython-37.pyc
create mode 100644 UI/__pycache__/KeyAddGui.cpython-37.pyc
create mode 100755 UI/__pycache__/KeyAddKeyboardGui.cpython-37.pyc
create mode 100755 req/__init__.py
create mode 100644 req/__pycache__/__init__.cpython-310.pyc
create mode 100644 req/__pycache__/__init__.cpython-36.pyc
create mode 100644 req/__pycache__/__init__.cpython-37.pyc
diff --git a/AutoConfig.py b/AutoConfig.py
new file mode 100755
index 0000000..ed2cb42
--- /dev/null
+++ b/AutoConfig.py
@@ -0,0 +1,592 @@
+#!/usr/bin/env python3
+# 使用系统默认的 python3 运行
+###########################################################################################
+# 作者:gfdgd xi、为什么您不喜欢熊出没和阿布呢
+# 版本:2.4.0
+# 更新时间:2022年10月25日
+# 感谢:感谢 wine 以及 deepin-wine 团队,提供了 wine 和 deepin-wine 给大家使用,让我能做这个程序
+# 基于 Python3 构建
+###########################################################################################
+#################
+# 引入所需的库
+#################
+import os
+import sys
+import base64
+import json
+import traceback
+import urllib.request
+import req as requests
+import PyQt5.QtWidgets as QtWidgets
+from UI.AutoConfig import *
+from Model import *
+try:
+ import PyQt5.QtWebEngineWidgets as QtWebEngineWidgets
+ webeng = True
+except:
+ print("未安装此依赖库")
+ webeng = False
+
+urlSourcesList = [
+ "https://code.gitlink.org.cn/gfdgd_xi/uengine-runner-list/raw/branch/master/auto", # Gitlink 源
+ "https://gitee.com/gfdgd-xi/uengine-wine-runner-auto-configuration-script/raw/master/", # Gitee 源
+ "https://gfdgd-xi.github.io/uengine-wine-runner-auto-configuration-script/", # Github 源
+ "http://gfdgdxi.msns.cn/uengine-runner-list/auto/", # 备用源1,纯 IPv6 源
+ "http://gfdgdxi.free.idcfengye.com/uengine-runner-auto-configuration-script/", # 备用源2
+ "http://gfdgdxi.free.idcfengye.com/uengine-runner-list/auto/", # 备用源 3
+ "http://127.0.0.1/uengine-runner-list/auto/" # 本地测试源
+]
+urlSources = urlSourcesList[0]
+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"")
+ return
+ for i in range(ProgramRunStatusUpload.fen.currentIndex()):
+ ProgramRunStatusUpload.starList[i].setText(f"")
+ head = ProgramRunStatusUpload.fen.currentIndex()
+ end = len(ProgramRunStatusUpload.starList)
+ for i in range(head, end):
+ ProgramRunStatusUpload.starList[i].setText(f"")
+
+ 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""))
+ 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", "提示"), requests.post(base64.b64decode("aHR0cDovLzEyMC4yNS4xNTMuMTQ0OjMwMjUwL2Jhc2g=").decode("utf-8"), {
+ "BashName": ProgramRunStatusUpload.sha1Value,
+ "Fen": ProgramRunStatusUpload.fen.currentIndex()
+ }).json()["Error"])
+ except:
+ traceback.print_exc()
+ QtWidgets.QMessageBox.critical(None, QtCore.QCoreApplication.translate("U", "错误"), QtCore.QCoreApplication.translate("U", "数据上传失败!"))
+
+class InformationWindow():
+ def ShowWindow():
+ #webeng = False
+ # 获取选中项
+ 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
+ aboutHtml = ""
+ try:
+ get = requests.get(f"{urlSources}/information/{fileName}.txt")
+ if get.status_code / 100 != 2 and get.status_code / 100 != 3:
+ int("Bad")
+ about = get.text
+ aboutHtml = str(about)
+ if not "<" in about:
+ # 非 Html 标签
+ for i in about.splitlines():
+ about += f"
{i}
\n"
+ #about = f"{about}
"
+ about = f"关于“{choose}”的介绍
\n{about}"
+ except:
+ traceback.print_exc()
+ about = f"关于“{choose}”的介绍
\n暂无此程序的介绍
"
+ try:
+ import requests as r
+ fenlists = requests.get(base64.b64decode("aHR0cHM6Ly9jb2RlLmdpdGxpbmsub3JnLmNuL2dmZGdkLXhpLW9yZy93aW5lLXJ1bm5lci1kb3dubG9hZHMtb2YtcnVubmVyL3Jhdy9icmFuY2gvbWFzdGVyL0Jhc2hBcHBGZW4v").decode("utf-8") + urllib.request.quote(fileName) + base64.b64decode("L2FsbC5qc29u").decode("utf-8"), timeout=1000).json()
+ tipsInfo = ""
+ except:
+ 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
+ end = 5
+ starHtml = ""
+ if maxHead > 5:
+ for i in range(end):
+ if webeng:
+ starHtml += f"\n"
+ else:
+ starHtml += f"\n"
+ else:
+ for i in range(maxHead):
+ if webeng:
+ starHtml += f"\n"
+ else:
+ starHtml += f"\n"
+ head = maxHead
+ for i in range(head, end):
+ if webeng:
+ starHtml += f""
+ else:
+ starHtml += f""
+ about += f"\n
评分情况
\n{starHtml}
\n{tipsInfo}
"
+ message = QtWidgets.QDialog()
+ messageLayout = QtWidgets.QVBoxLayout()
+ if webeng:
+ informationText = QtWebEngineWidgets.QWebEngineView()
+ print(aboutHtml)
+ if aboutHtml[:7] == "Visit: ":
+ url = aboutHtml[7:].splitlines()[0]
+ print(url)
+ informationText.setUrl(QtCore.QUrl(url.strip()))
+ else:
+ #informationText.linkClicked.connect(lambda: print("a"))
+ try:
+ with open("/tmp/deepin-wine-runner-information.html", "w") as file:
+ file.write(about)
+ informationText.setUrl(QtCore.QUrl("file:///tmp/deepin-wine-runner-information.html"))
+ except:
+ traceback.print_exc()
+ informationText.setHtml(about)
+ #informationText.urlChanged.connect(lambda: informationText.setUrl(QtCore.QUrl("https://gfdgd-xi.github.io")))
+ else:
+ informationText = QtWidgets.QTextBrowser()
+ informationText.setHtml(about)
+ uploadFen = QtWidgets.QPushButton("提交评分")
+ uploadFen.clicked.connect(lambda: ProgramRunStatusUpload.ShowWindow(fileName, choose))
+
+ #informationText.setUrl(QtCore.QUrl("https://gfdgd-xi.github.io"))
+ messageLayout.addWidget(informationText)
+ messageLayout.addWidget(uploadFen)
+ message.setWindowTitle(f"关于“{choose}”的介绍")
+ message.resize(int(message.frameSize().width() * 1.5), int(message.frameSize().height()))
+ message.setLayout(messageLayout)
+ #message.setWindowModality(ApplicationModal);
+ message.show()
+ message.exec_()
+
+def Add(lists: list):
+ global pinLunLayout
+ pinLunLayout1 = QtWidgets.QVBoxLayout()
+ pinLunLayout = QtWidgets.QWidget()
+ pinLunLayout.setLayout(pinLunLayout1)
+ for i in range(pinLunLayout1.count()):
+ pinLunLayout1.removeItem(pinLunLayout1.itemAt(i))
+ for i in lists:
+ widget = QtWidgets.QWidget()
+ inLayout = QtWidgets.QGridLayout()
+ inLayout.addWidget(QtWidgets.QLabel("
"), 0, 0, 1, 3)
+ inLayout.addWidget(QtWidgets.QLabel(f"{i[0]}"), 1, 0)
+ inLayout.addWidget(QtWidgets.QLabel(f"第{i[1]}层
"), 1, 2)
+ inLayout.addWidget(QtWidgets.QLabel(i[2]), 2, 0, 1, 3)
+ widget.setLayout(inLayout)
+ pinLunLayout1.addWidget(widget)
+ #pinLunLayout.addWidget(QtWidgets.QLabel("
"))
+# pinLunLayout = widget
+
+all = 0
+now = 0
+class ProgramRunStatusShow():
+ msgWindow = None
+ pingLunLayout = None
+ def ShowWindow():
+ global lists
+ global all
+ global now
+ global leftButton
+ global rightButton
+ # 获取选中项
+ 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(base64.b64decode("aHR0cHM6Ly9jb2RlLmdpdGxpbmsub3JnLmNuL2dmZGdkLXhpLW9yZy93aW5lLXJ1bm5lci1kb3dubG9hZHMtb2YtcnVubmVyL3Jhdy9icmFuY2gvbWFzdGVyL0Jhc2hBcHBGZW4v").decode("utf-8") + urllib.request.quote(fileName) + base64.b64decode("L2FsbC5qc29u").decode("utf-8")).json()
+ 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, 2, 1)
+ msgWidgetLayout.addLayout(starLayout, 0, 1, 2, 1)
+ msgWidgetLayout.addWidget(QtWidgets.QLabel(tipsInfo), 0, 2)
+ #msgWidgetLayout.addWidget(QtWidgets.QLabel("" if dateVersion == "" else f"数据版本:{dateVersion}"), 2, 0, 1, 2)
+ msgWidgetLayout.addWidget(uploadButton, 1, 2)
+ end = 5
+ if maxHead > 5:
+ for i in range(end):
+ starLayout.addWidget(QtWidgets.QLabel(f""))
+ else:
+ for i in range(maxHead):
+ starLayout.addWidget(QtWidgets.QLabel(f""))
+ head = maxHead
+ for i in range(head, end):
+ starLayout.addWidget(QtWidgets.QLabel(f""))
+ pingLun = QtWidgets.QWidget()
+ msgWidgetLayout.addWidget(pingLun, 4, 0, 1, 3)
+ pingLunLayout = QtWidgets.QGridLayout()
+ pingLunInfo = QtWidgets.QTextEdit()
+ #pingLunInfo.document().setMaximumBlockCount(5)
+ uploadButton = QtWidgets.QPushButton("评论")
+ pingLunLayout.addWidget(pingLunInfo, 0, 0, 1, 3)
+ pingLunLayout.addWidget(uploadButton, 1, 2)
+ pingLunInfo.setPlaceholderText("""在此输入评论,须知:
+※1、不得含有色情、暴力、侮辱等违法内容以及不得有广告推广等内容
+※2、字数至少 15 字,但不得超过 250 字,评论内容最多 5 行,且评论内容将会进行审核,意味着评论不会实时生效显示
+※3、如果审核不通过将会被屏蔽并拉入黑名单,以及公开发布 IP 地址,评论前请三思!""")
+ leftButton = QtWidgets.QPushButton("上一页")
+ rightButton = QtWidgets.QPushButton("下一页")
+ if maxHead == 0:
+ #pingLun.setDisabled(True)
+ pass
+ else:
+ # 显示最新的3条评论
+ try:
+ all = int(requests.get(f"{base64.b64decode('aHR0cHM6Ly9jb2RlLmdpdGxpbmsub3JnLmNuL2dmZGdkLXhpLW9yZy9iYXNocGlubHVuL3Jhdy9icmFuY2gvbWFzdGVyLw==').decode('utf-8')}{urllib.request.quote(fileName)}/data.txt").text)
+ now = all - 3
+ print(all)
+ if all < 3:
+ start = 0
+ rightButton.setDisabled(True)
+ else:
+ start = all - 3
+ uploadList = []
+ for i in range(all - 1, start - 1, -1):
+ print(f"第 {i + 1} 条评论:")
+ info = requests.get(f"{base64.b64decode('aHR0cHM6Ly9jb2RlLmdpdGxpbmsub3JnLmNuL2dmZGdkLXhpLW9yZy9iYXNocGlubHVuL3Jhdy9icmFuY2gvbWFzdGVyLw==').decode('utf-8')}{urllib.request.quote(fileName)}/pf-{i}.txt").text.strip()
+ print(info)
+ uploadList.append([f"用户{i + 1}", i + 1, info])
+ Add(uploadList)
+ except:
+ traceback.print_exc()
+ try:
+ ProgramRunStatusShow.pingLunLayout = pingLunLayout
+ pingLunLayout.addWidget(pinLunLayout, 2, 0, 1, 3)
+ except:
+ leftButton.setDisabled(True)
+ rightButton.setDisabled(True)
+ leftButton.clicked.connect(Left)
+ rightButton.clicked.connect(Right)
+ pingLunLayout.addWidget(leftButton, 3, 0)
+ pingLunLayout.addWidget(rightButton, 3, 2)
+ leftButton.setDisabled(True)
+ pingLun.setLayout(pingLunLayout)
+ msgWidget.setLayout(msgWidgetLayout)
+ uploadButton.clicked.connect(lambda: ProgramRunStatusShow.Upload(pingLunInfo.toPlainText(), fileName))
+ ProgramRunStatusShow.msgWindow.setCentralWidget(msgWidget)
+ ProgramRunStatusShow.msgWindow.setWindowIcon(QtGui.QIcon(iconPath))
+ ProgramRunStatusShow.msgWindow.setWindowTitle(f"脚本“{choose}”运行情况")
+ ProgramRunStatusShow.msgWindow.show()
+
+ def Upload(info, name):
+ print(f"脚本:{name}")
+ print(f"评论:{info}")
+ try:
+ res = requests.post(base64.b64decode("aHR0cDovLzEyMC4yNS4xNTMuMTQ0OjMwMjUwL1BpbmdMdW4=").decode("utf-8"), {"PinLun": info, "Version": name}).json()
+ print(res)
+ if res["ExitCode"]:
+ QtWidgets.QMessageBox.critical(ProgramRunStatusShow.msgWindow, "错误", res["Error"])
+ return
+ QtWidgets.QMessageBox.information(ProgramRunStatusShow.msgWindow, "提示", res["Error"])
+ except:
+ traceback.print_exc()
+ QtWidgets.QMessageBox.critical(ProgramRunStatusShow.msgWindow, "错误", "提交失败")
+
+
+def UpdateFen():
+ global now
+ fileName = ""
+ # 获取选中项
+ try:
+ choose = ui.searchList.selectionModel().selectedIndexes()[0].data()
+ except:
+ QtWidgets.QMessageBox.critical(window, "错误", "您未选择任何配置文件")
+ return
+ for i in lists:
+ print(i)
+ if i[0] == choose:
+ fileName = i[1]
+ break
+ uploadList = []
+ for i in range(now + 2, now - 1, -1):
+ print(f"第 {i + 1} 条评论:")
+ info = requests.get(f"https://code.gitlink.org.cn/gfdgd-xi-org/bashpinlun/raw/branch/master/{urllib.request.quote(fileName)}/pf-{i}.txt").text.strip()
+ print(info)
+ uploadList.append([f"用户{i + 1}", i + 1, info])
+ #ProgramRunStatusShow.pingLunLayout.removeItem(ProgramRunStatusShow.pingLunLayout.itemAt(2))
+ ProgramRunStatusShow.pingLunLayout.removeWidget(pinLunLayout)
+ pinLunLayout.hide()
+ #pinLunLayout.
+ Add(uploadList)
+ #l = QtWidgets.QGridLayout()
+ #l.removeWidget(pinLunLayout)
+ ProgramRunStatusShow.pingLunLayout.addWidget(pinLunLayout, 2, 0, 1, 3)
+
+def Left():
+ global now
+ global all
+
+ if now + 6 >= all:
+ now = all - 3
+ leftButton.setDisabled(True)
+ rightButton.setEnabled(True)
+ else:
+ now += 3
+ leftButton.setEnabled(True)
+ rightButton.setEnabled(True)
+ UpdateFen()
+ print(all)
+ print(now)
+
+def Right():
+ global now
+ if now - 3 < 0:
+ now = 0
+ rightButton.setDisabled(True)
+ leftButton.setEnabled(True)
+ else:
+ now -= 3
+ leftButton.setEnabled(True)
+ rightButton.setEnabled(True)
+ UpdateFen()
+
+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)
+ if ui.searchThings.text() == "":
+ # 显示全部内容
+ for i in lists:
+ nmodel.appendRow(QtGui.QStandardItem(i[0]))
+ ui.searchList.setModel(nmodel)
+ return
+ for i in lists:
+ # 显示筛选的内容
+ if ui.searchThings.text().upper() in i[0].upper():
+ nmodel.appendRow(QtGui.QStandardItem(i[0]))
+ ui.searchList.setModel(nmodel)
+
+ def RunBotton_Clicked():
+ # 获取选中项
+ 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
+ # 下载脚本
+ things = ""
+ try:
+ print(f"{urlSources}/{fileName}")
+ file = open("/tmp/wine-runner-auto-config.wsh", "w")
+ things = requests.get(f"{urlSources}/{fileName}").text
+ file.write(things)
+ file.close()
+ except:
+ traceback.print_exc()
+ QtWidgets.QMessageBox.critical(window, "错误", "无法获取配置文件")
+ return
+ # 判断版本以启动对应的解释器
+ # 做到新旧兼容
+ if "($" in things:
+ print("a")
+ OpenTerminal(f"env WINE='{wine}' WINEPREFIX='{wineprefix}' '{programPath}/ConfigLanguareRunner.py' '/tmp/wine-runner-auto-config.wsh' --system")
+ # 执行脚本
+ print(f"env WINE='{wine}' WINEPREFIX='{wineprefix}' '{programPath}/AutoShell/main.py' '/tmp/wine-runner-auto-config.wsh'")
+ OpenTerminal(f"env WINE='{wine}' WINEPREFIX='{wineprefix}' '{programPath}/AutoShell/main.py' '/tmp/wine-runner-auto-config.wsh'")
+ #process = QtCore.QProcess()
+ #process.start(f"{programPath}/launch.sh", ["deepin-terminal", "-e", "env", f"WINE={wine}", f"WINEPREFIX={wineprefix}", f"{programPath}/ConfigLanguareRunner.py", "/tmp/wine-runner-auto-config.wsh", "--system"])
+ #process.waitForFinished()
+
+ def OpenFile_Triggered():
+ path = QtWidgets.QFileDialog.getOpenFileName(window, "提示", homePath, "配置文件(*.sh *.wsh);;全部文件(*.*)")
+ if path[0] == "":
+ return
+ try:
+ things = ""
+ with open(path) as file:
+ things = file.read()
+ except:
+ traceback.print_exc()
+ # 判断版本以启动对应的解释器
+ # 做到新旧兼容
+ if "($" in things:
+ OpenTerminal(f"env WINE='{wine}' WINEPREFIX='{wineprefix}' '{programPath}/ConfigLanguareRunner.py' '{path[0]}' --system")
+ # 执行脚本
+ 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()
+
+# 读取文本文档
+def readtxt(path):
+ f = open(path, "r") # 设置文件对象
+ str = f.read() # 获取内容
+ f.close() # 关闭文本对象
+ return str # 返回结果
+
+def ChangeSources():
+ global urlSources
+ sources = [ui.actionGitlink, ui.actionGitee, ui.actionGithub, ui.action_IPv6, ui.action_2, ui.action_3, ui.action]
+ for i in range(0, len(sources)):
+ if sources[i].isChecked():
+ urlSources = urlSourcesList[i]
+ # 解析云列表
+ try:
+ # 获取列表
+ lists = json.loads(requests.get(f"{urlSources}/list.json").text)
+ # 解释列表并显示在 GUI 上
+ nmodel = QtGui.QStandardItemModel(window)
+ for i in lists:
+ nmodel.appendRow(QtGui.QStandardItem(i[0]))
+ ui.searchList.setModel(nmodel)
+ except:
+ traceback.print_exc()
+ QtWidgets.QMessageBox.critical(window, "提示", "无法连接服务器")
+ break
+
+if __name__ == "__main__":
+ homePath = os.path.expanduser('~')
+ programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
+ information = json.loads(readtxt(f"{programPath}/information.json"))
+ version = information["Version"]
+ wine = "deepin-wine6-stable"
+ wineprefix = f"{homePath}/.wine"
+ try:
+ wine = sys.argv[1]
+ wineprefix = sys.argv[2]
+ except:
+ pass
+ app = QtWidgets.QApplication(sys.argv)
+ window = QtWidgets.QMainWindow()
+ ui = Ui_MainWindow()
+ pinLunLayout = QtWidgets.QHBoxLayout()
+ ui.setupUi(window)
+ window.setWindowTitle(f"UEngine 运行器 {version}——容器自动配置部署脚本")
+ window.setWindowIcon(QtGui.QIcon(f"{programPath}/deepin-wine-runner.svg"))
+ iconPath = "{}/runner.svg".format(programPath)
+ window.show()
+ #ui.actionGitlink.setExclusive(True)
+ sourcesGroup = QtWidgets.QActionGroup(window)
+ sourcesGroup.addAction(ui.actionGitlink)
+ sourcesGroup.addAction(ui.actionGitee)
+ sourcesGroup.addAction(ui.actionGithub)
+ sourcesGroup.addAction(ui.action_IPv6)
+ sourcesGroup.addAction(ui.action_2)
+ sourcesGroup.addAction(ui.action_3)
+ sourcesGroup.addAction(ui.action)
+ sourcesGroup.triggered.connect(ChangeSources)
+ sourcesGroup.setExclusive(True)
+ #for i in [ui.actionGitlink, ui.actionGitee, ui.actionGithub, ui.action_IPv6, ui.action]:
+ #i.triggered.connect(ChangeSources)
+ #pass
+ # 连接信号和槽
+ ui.saerchBotton.clicked.connect(Connect.SearchBotton_Clicked)
+ #ui.uploadFen.clicked.connect(UploadFen)
+ ui.getInfoButton.clicked.connect(InformationWindow.ShowWindow)
+ 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:
+ # 获取列表
+ lists = json.loads(requests.get(f"{urlSources}/list.json").text)
+ # 解释列表并显示在 GUI 上
+ nmodel = QtGui.QStandardItemModel(window)
+ for i in lists:
+ nmodel.appendRow(QtGui.QStandardItem(i[0]))
+ ui.searchList.setModel(nmodel)
+ except:
+ traceback.print_exc()
+ QtWidgets.QMessageBox.critical(window, "提示", "无法连接服务器")
+
+ app.exec_()
\ No newline at end of file
diff --git a/AutoShell/command/download b/AutoShell/command/download
new file mode 100755
index 0000000..b766ea2
--- /dev/null
+++ b/AutoShell/command/download
@@ -0,0 +1,14 @@
+#!/usr/bin/env python3
+# 加入路径
+import os
+import sys
+programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
+sys.path.append(f"{programPath}/../../")
+import ConfigLanguareRunner
+# 符号转移
+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"))
+sys.exit(int(ConfigLanguareRunner.programEnv[9][1]))
\ No newline at end of file
diff --git a/AutoShell/command/error b/AutoShell/command/error
new file mode 100755
index 0000000..b766ea2
--- /dev/null
+++ b/AutoShell/command/error
@@ -0,0 +1,14 @@
+#!/usr/bin/env python3
+# 加入路径
+import os
+import sys
+programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
+sys.path.append(f"{programPath}/../../")
+import ConfigLanguareRunner
+# 符号转移
+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"))
+sys.exit(int(ConfigLanguareRunner.programEnv[9][1]))
\ No newline at end of file
diff --git a/AutoShell/command/info b/AutoShell/command/info
new file mode 100755
index 0000000..b766ea2
--- /dev/null
+++ b/AutoShell/command/info
@@ -0,0 +1,14 @@
+#!/usr/bin/env python3
+# 加入路径
+import os
+import sys
+programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
+sys.path.append(f"{programPath}/../../")
+import ConfigLanguareRunner
+# 符号转移
+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"))
+sys.exit(int(ConfigLanguareRunner.programEnv[9][1]))
\ No newline at end of file
diff --git a/AutoShell/command/installapk b/AutoShell/command/installapk
new file mode 100755
index 0000000..b766ea2
--- /dev/null
+++ b/AutoShell/command/installapk
@@ -0,0 +1,14 @@
+#!/usr/bin/env python3
+# 加入路径
+import os
+import sys
+programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
+sys.path.append(f"{programPath}/../../")
+import ConfigLanguareRunner
+# 符号转移
+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"))
+sys.exit(int(ConfigLanguareRunner.programEnv[9][1]))
\ No newline at end of file
diff --git a/AutoShell/command/pause b/AutoShell/command/pause
new file mode 100755
index 0000000..b766ea2
--- /dev/null
+++ b/AutoShell/command/pause
@@ -0,0 +1,14 @@
+#!/usr/bin/env python3
+# 加入路径
+import os
+import sys
+programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
+sys.path.append(f"{programPath}/../../")
+import ConfigLanguareRunner
+# 符号转移
+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"))
+sys.exit(int(ConfigLanguareRunner.programEnv[9][1]))
\ No newline at end of file
diff --git a/AutoShell/command/programforum b/AutoShell/command/programforum
new file mode 100755
index 0000000..b766ea2
--- /dev/null
+++ b/AutoShell/command/programforum
@@ -0,0 +1,14 @@
+#!/usr/bin/env python3
+# 加入路径
+import os
+import sys
+programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
+sys.path.append(f"{programPath}/../../")
+import ConfigLanguareRunner
+# 符号转移
+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"))
+sys.exit(int(ConfigLanguareRunner.programEnv[9][1]))
\ No newline at end of file
diff --git a/AutoShell/command/thank b/AutoShell/command/thank
new file mode 100755
index 0000000..b766ea2
--- /dev/null
+++ b/AutoShell/command/thank
@@ -0,0 +1,14 @@
+#!/usr/bin/env python3
+# 加入路径
+import os
+import sys
+programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
+sys.path.append(f"{programPath}/../../")
+import ConfigLanguareRunner
+# 符号转移
+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"))
+sys.exit(int(ConfigLanguareRunner.programEnv[9][1]))
\ No newline at end of file
diff --git a/AutoShell/command/version b/AutoShell/command/version
new file mode 100755
index 0000000..b766ea2
--- /dev/null
+++ b/AutoShell/command/version
@@ -0,0 +1,14 @@
+#!/usr/bin/env python3
+# 加入路径
+import os
+import sys
+programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
+sys.path.append(f"{programPath}/../../")
+import ConfigLanguareRunner
+# 符号转移
+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"))
+sys.exit(int(ConfigLanguareRunner.programEnv[9][1]))
\ No newline at end of file
diff --git a/AutoShell/command/warning b/AutoShell/command/warning
new file mode 100755
index 0000000..b766ea2
--- /dev/null
+++ b/AutoShell/command/warning
@@ -0,0 +1,14 @@
+#!/usr/bin/env python3
+# 加入路径
+import os
+import sys
+programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
+sys.path.append(f"{programPath}/../../")
+import ConfigLanguareRunner
+# 符号转移
+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"))
+sys.exit(int(ConfigLanguareRunner.programEnv[9][1]))
\ No newline at end of file
diff --git a/AutoShell/main.py b/AutoShell/main.py
new file mode 100755
index 0000000..47ea08d
--- /dev/null
+++ b/AutoShell/main.py
@@ -0,0 +1,75 @@
+#!/usr/bin/env python3
+import os
+import sys
+import time
+import json
+import platform
+
+# 读取文本文档
+def readtxt(path):
+ f = open(path, "r") # 设置文件对象
+ str = f.read() # 获取内容
+ f.close() # 关闭文本对象
+ return str # 返回结果
+programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
+information = json.loads(readtxt(f"{programPath}/../information.json"))
+version = information["Version"]
+thankText = ""
+for i in information["Thank"]:
+ thankText += f"{i}\n"
+programEnv = [
+ ["WINEPREFIX", f"{os.path.expanduser('~')}/.wine"],
+ ["WINE", "deepin-wine6-stable"],
+ ["DANGER", "0"],
+ ["PROGRAMPATH", programPath],
+ ["VERSION", version],
+ ["THANK", thankText.replace("\n", "\\n")],
+ ["MAKER", "gfdgd xi、为什么您不喜欢熊出没和阿布呢"],
+ ["COPYRIGHT", f"©2020~{time.strftime('%Y')} gfdgd xi、为什么您不喜欢熊出没和阿布呢"],
+ ["PLATFORM", platform.system()],
+ ["DEBUG", str(int("--debug" in sys.argv))]
+]
+'''programEnv = [
+ ["($WINEPREFIX)", f"{os.path.expanduser('~')}/.wine"],
+ ["($WINE)", "deepin-wine6-stable"],
+ ["($DANGER)", "0"],
+ ["($HOME)", os.path.expanduser('~')],
+ ["($PROGRAMPATH)", programPath],
+ ["($VERSION)", version],
+ ["($THANK)", thankText],
+ ["($MAKER)", "gfdgd xi、为什么您不喜欢熊出没和阿布呢"],
+ ["($COPYRIGHT)", f"©2020~{time.strftime('%Y')} gfdgd xi、为什么您不喜欢熊出没和阿布呢"],
+ ["?", "0"],
+ ["PLATFORM)", platform.system()],
+ ["DEBUG)", str(int("--debug" in sys.argv))]
+]'''
+optionAll = 0
+if "--debug" in sys.argv:
+ optionAll += 1
+if "--system" in sys.argv:
+ programEnv.append(["DANGER", "1"])
+ optionAll += 1
+if os.getenv("WINE") != None:
+ programEnv.append(["WINE", os.getenv("WINE")])
+if os.getenv("WINEPREFIX") != None:
+ programEnv.append(["WINEPREFIX", os.getenv("WINEPREFIX")])
+# 生成可以使用的参数
+commandEnv = ""
+for i in programEnv:
+ commandEnv += f"{i[0]}=\"{i[1]}\" "
+commandEnv += f"PATH=\"{programPath}/command:$PATH\" "
+if len(sys.argv) - optionAll < 2:
+ print("Wine 运行器自动配置文件解析器交互环境(基于 Bash)")
+ print(f"版本:{version}")
+ print(f"©2020~{time.strftime('%Y')} gfdgd xi、为什么您不喜欢熊出没和阿布呢")
+ print("--------------------------------------------------------------")
+ os.system(f"{commandEnv} bash ")
+ exit()
+command = ""
+for i in sys.argv[1:]:
+ command += f"\"{i}\" "
+print("Wine 运行器自动配置文件解析器(基于 Bash)")
+print(f"版本:{version}")
+print(f"©2020~{time.strftime('%Y')} gfdgd xi、为什么您不喜欢熊出没和阿布呢")
+print("--------------------------------------------------------------")
+os.system(f"{commandEnv} bash {command}")
\ No newline at end of file
diff --git a/ConfigLanguareRunner-help.json b/ConfigLanguareRunner-help.json
new file mode 100644
index 0000000..e7f594c
--- /dev/null
+++ b/ConfigLanguareRunner-help.json
@@ -0,0 +1,46 @@
+{
+ "installdll": "安装指定 dll 在指定容器\n参数数量:1\n参数介绍:dll名称或在从互联网获取DLL工具的编号,如 7012 xolehlp.dll 平台:2003 架构:64 的 7012",
+ "stopdll": "不允许指定 dll/exe 运行\n参数数量:1\n参数介绍:dll/exe 名称,如 example.exe",
+ "installfont": "安装指定字体到指定容器\n参数数量:1\n在字体商店的编号,如 5 msyhbd.ttc 的 5",
+ "installsparkcorefont": "安装星火应用商店的“微软核心字体”\n参数数量:0\n参数介绍:无",
+ "installmono": "安装最新版本的 mono 到指定容器\n参数数量:0\n参数介绍:无",
+ "installgecko": "安装最新版本的 gecko 到指定容器\n参数数量:0\n参数介绍:无",
+ "installvcpp": "安装指定的 VCPP 运行库到指定容器\n参数数量:1\n参数介绍:在安装 Visual Studio C++ 工具的编号,如 10 Visual Studio C++ 2015、2017、2019 和 2022 X64 的 10",
+ "installnet": "安装指定的 .net framework 运行库到指定容器\n参数数量:1\n参数介绍:在安装 .net framework 工具的编号,如 3 .net framework 4.5.1 Offline Installer 的 3",
+ "installmsxml": "安装指定的 MSXML 运行库到指定容器\n参数数量:1\n参数介绍:在安装 MSXML 工具的编号,如 1、MSXML 4.0 SP3 的 1",
+ "echo": "显示内容\n参数数量:≥1\n参数介绍:接要显示的内容",
+ "info": "显示提示对话框\n参数数量:2\n参数介绍:标题+显示内容",
+ "error": "显示错误对话框\n参数数量:2\n参数介绍:标题+显示内容",
+ "warning": "显示警告对话框\n参数数量:2\n参数介绍:标题+显示内容",
+ "exit": "退出程序\n参数数量:0\n参数介绍:无",
+ "bat": "执行 cmd 命令在 Wine 容器内(在 Windows 将在系统执行命令)\n参数数量:≥1\n参数介绍:接要执行的命令",
+ "bash": "执行 bash 命令(在 Windows 系统将执行 cmd 命令)\n参数数量:≥1\n参数介绍:接要执行的命令",
+ "version": "显示解释器版本(Wine 运行器版本)\n参数数量:0\n参数介绍:无",
+ "thank": "显示谢明列表\n参数数量:0\n参数介绍:无",
+ "pause": "按回车键后继续\n参数数量:0\n参数介绍:无",
+ "download": "使用 aria2 下载文件\n参数数量:≥1 && ≤3\n参数介绍:下载URL+保存在的文件夹+保存的文件名",
+ "installdxvk": "安装 dxvk 到指定容器\n参数数量:0\n参数介绍:无",
+ "createbotton": "在指定目录创建容器\n参数数量:0\n参数介绍:无",
+ "reg": "导入 .reg 文件\n参数数量:0\n参数介绍:reg 文件路径",
+ "enabledopengl": "开启 OpenGL\n参数数量:0\n参数介绍:无",
+ "disbledopengl": "关闭 OpenGL\n参数数量:0\n参数介绍:无",
+ "winecfg": "显示“Wine 设置”\n参数数量:0\n参数介绍:无",
+ "winver": "显示“关于 Wine”\n参数数量:0\n参数介绍:无",
+ "changeversion": "更改 Wine 容器系统版本(未实现)\n参数数量:无\n参数介绍:无",
+ "cat": "显示指定文件(只支持显示编码为UTF-8的文件)\n参数数量:1\n参数介绍:无",
+ "enabledhttpproxy": "设置指定容器代理\n参数数量:2\n参数介绍:代理服务器地址+端口",
+ "disbledhttpproxy": "禁用指定容器代理\n参数数量:0\n参数介绍:无",
+ "enabledwinecrashdialog": "启用 Wine 容器程序崩溃提示窗口\n参数数量:0\n参数介绍:无",
+ "disbledwinecrashdialog": "禁用 Wine 容器程序崩溃提示窗口\n参数数量:0\n参数介绍:无",
+ "disbledWinebottlecreatelink": "禁止 Wine 容器生成快捷方式\n参数数量:0\n参数介绍:无",
+ "enabledWinebottlecreatelink": "允许 Wine 容器生成快捷方式\n参数数量:0\n参数介绍:无",
+ "killall": "杀死指定进程\n参数数量:1\n参数介绍:进程名",
+ "control": "打开控制面板\n参数数量:0\n参数介绍:无",
+ "taskmgr": "打开任务管理器\n参数数量:0\n参数介绍:无",
+ "killallwineserver": "杀死所有 Wine 程序\n参数数量:0\n参数介绍:无",
+ "installvb": "安装指定的 VB 运行库到指定容器\n参数数量:1\n参数介绍:在安装 Visual Basic Runtime 工具的编号,如 4 Visual Basic Runtime Visual Basic 6",
+ "installother": "安装未归类的运行库到指定容器\n参数数量:1\n参数介绍:在安装其它运行库工具的编号,如 2 MFC运行库",
+ "decompressionbottle": "解压用 wine 打包的 deb 包内的容器到指定路径\n参数数量:2\n参数介绍:deb 包路径+要解压到的路径",
+ "programforum": "打开程序论坛\n参数数量:0\n参数介绍:无",
+ "installmsi": "安装 MSI 文件到指定容器\n参数数量:1\n参数介绍:msi 文件路径"
+}
\ No newline at end of file
diff --git a/ConfigLanguareRunner.py b/ConfigLanguareRunner.py
new file mode 100755
index 0000000..240e2f4
--- /dev/null
+++ b/ConfigLanguareRunner.py
@@ -0,0 +1,673 @@
+#!/usr/bin/env python3
+# 使用系统默认的 python3 运行
+###########################################################################################
+# 作者:gfdgd xi、为什么您不喜欢熊出没和阿布呢
+# 版本:3.0.1
+# 更新时间:2022年10月05日
+# 感谢:感谢 wine 以及 deepin-wine 团队,提供了 wine 和 deepin-wine 给大家使用,让我能做这个程序
+# 基于 Python3 构建
+###########################################################################################
+import os
+import sys
+import time
+import json
+import random
+import api as uengineapi
+import platform
+import traceback
+import webbrowser
+import subprocess
+import PyQt5.QtWidgets as QtWidgets
+# 读取文本文档
+def readtxt(path):
+ f = open(path, "r") # 设置文件对象
+ str = f.read() # 获取内容
+ f.close() # 关闭文本对象
+ return str # 返回结果
+
+programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
+information = json.loads(readtxt(f"{programPath}/information.json"))
+version = information["Version"]
+thankText = ""
+helpList = json.loads(readtxt(f"{programPath}/ConfigLanguareRunner-help.json"))
+for i in information["Contribute"]:
+ thankText += f"{i}\n"
+programEnv = [
+ ["($WINEPREFIX)", f"{os.path.expanduser('~')}/.wine"],
+ ["($WINE)", "deepin-wine6-stable"],
+ #["($DANGER)", "0"],
+ ["($DANGER)", "1"],
+ ["($HOME)", os.path.expanduser('~')],
+ ["($PROGRAMPATH)", programPath],
+ ["($VERSION)", version],
+ ["($THANK)", thankText],
+ ["($MAKER)", "RacoonGX 团队,By gfdgd xi、为什么您不喜欢熊出没和阿布呢"],
+ ["($COPYRIGHT)", f"©2020~{time.strftime('%Y')} RacoonGX 团队,By gfdgd xi、为什么您不喜欢熊出没和阿布呢"],
+ ["($?)", "0"],
+ ["($PLATFORM)", platform.system()],
+ ["($DEBUG)", "1"]
+ #["($DEBUG)", str(int("--debug" in sys.argv))]
+]
+readOnlyEnv = [
+ "($DANGER)",
+ "($HOME)",
+ "($PROGRAMPATH)",
+ "($VERSION)",
+ "($THANK)",
+ "($MAKER)",
+ "($COPYRIGHT)",
+ "($?)",
+ "($SYSTEM)",
+ "($DEBUG)"
+]
+
+def FindFile(file, name):
+ for i in os.listdir(file):
+ path = f"{file}/{i}"
+ if os.path.isdir(path):
+ returnPath = FindFile(path, name)
+ if returnPath != None:
+ return returnPath.replace("//", "/")
+ if os.path.isfile(path):
+ if i == name:
+ return path
+ return None
+
+def Debug():
+ if "--debug" in sys.argv:
+ traceback.print_exc()
+
+class Command():
+ # 有风险的命令
+ dangerCommand = [
+ "bash",
+ "bat",
+ "download",
+ "reg"
+ ]
+ # 可以被使用的命令
+ commandList = [
+ "installdll",
+ "installfont",
+ "installsparkcorefont",
+ "installmono",
+ "installgecko",
+ "installvcpp",
+ "installnet",
+ "installmsxml",
+ "echo",
+ "info",
+ "error",
+ "warning",
+ "exit",
+ "bash",
+ "bat",
+ "version",
+ "thank",
+ "pause",
+ "download",
+ "installdxvk",
+ "createbotton",
+ "reg",
+ "enabledopengl",
+ "disbledopengl",
+ "winecfg",
+ "winver",
+ "changeversion",
+ "stopdll",
+ "cat",
+ "taskmgr",
+ "control",
+ "killall",
+ "killallwineserver",
+ "enabledhttpproxy",
+ "disbledhttpproxy",
+ "enabledwinecrashdialog",
+ "disbledwinecrashdialog",
+ "disbledWinebottlecreatelink",
+ "enabledWinebottlecreatelink",
+ "installvb",
+ "installother",
+ "decompressionbottle",
+ "programforum",
+ "installmsi",
+ "installapk"
+ ]
+
+ def __init__(self, commandString: str) -> None:
+ self.commandString = commandString
+
+ # 解析器
+ # 命令字符串转可供解析的列表
+ def GetCommandList(self) -> list:
+ shellList = []
+ shellFirstShell = self.commandString.split("\n")
+ # 转换成可以执行的数组
+ for l in range(0, len(shellFirstShell)):
+ i = shellFirstShell[l]
+ # 判断有没有注释
+ if "#" in i:
+ # 忽略注释
+ i = i[:i.index("#")]
+ # 删除前后空格
+ i = i.strip()
+ # 如果是空行
+ if i == "":
+ # 忽略此行,此行不做处理
+ continue
+ # 空格转义
+ i = i.replace("\\ ", "@Space@")
+ # 解析
+ i = i.split()
+ # 判断是否为合法的参数,否则提示并忽略
+ if not i[0] in self.commandList and i[0][0] != "(":
+ print(f"行{l + 1}命令{i[0]}不存在,忽略")
+ programEnv[9][1] = "-2"
+ continue
+ if programEnv[2][1] == "0" and i[0] in self.dangerCommand:
+ print(f"行{l + 1}命令{i[0]}目前解析器不允许运行,忽略")
+ print("如果需要运行,可以在配置面板开启“允许修改系统”选项(针对GUI用户)")
+ print("或添加参数 --system(终端调用运行用户)")
+ programEnv[9][1] = "-1"
+ continue
+ rightList = []
+ for k in i:
+ # 处理符号转义
+ rightList.append(k.replace("@Space@", " ").replace("\\n", "\n").replace("\\r", "\r"))
+ shellList.append(rightList)
+ return shellList
+
+ # 运行器
+ class Run():
+ close = False
+ programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
+ def Exit(self):
+ self.close = True
+ return 0
+
+ def InstallDll(self) -> int:
+ import InstallDll
+ # 如果是数字
+ number = False
+ try:
+ int(self.command[1])
+ number = True
+ except:
+ pass
+ if number:
+ return InstallDll.Download(self.wineBottonPath, InstallDll.GetNameByNumber(int(self.command[1])), InstallDll.GetUrlByNumber(int(self.command[1])), self.wine)
+ return InstallDll.Download(self.wineBottonPath, self.command[1], InstallDll.GetUrlByName(self.command[1]), self.wine)
+
+ def InstallDxvk(self):
+ if not os.path.exists(f"{programPath}/dxvk"):
+ if os.system(f"7z x \"{programPath}/dxvk.7z\" -o\"{programPath}\""):
+ print("错误:无法解压资源")
+ return 1
+ os.remove(f"{programPath}/dxvk.7z")
+ return os.system(f"env 'WINE={self.wine}' 'WINE64={self.wine}' 'WINEPREFIX={self.wineBottonPath}' bash '{programPath}/dxvk/auto.sh' install")
+
+ def Thank(self) -> int:
+ for i in information["Contribute"]:
+ print(i)
+ return 0
+
+ def InstallFont(self) -> int:
+ import InstallFont
+ return InstallFont.Download(self.wineBottonPath, int(self.command[1]))
+
+ def InstallMono(self) -> int:
+ return os.system(f"ENTERNOTSHOW=0 '{self.programPath}/InstallMono.py' '{self.wineBottonPath}' '{self.wine}' mono")
+
+ def InstallGecko(self) -> int:
+ return os.system(f"ENTERNOTSHOW=0 '{self.programPath}/InstallMono.py' '{self.wineBottonPath}' '{self.wine}' gecko")
+
+ def InstallVCPP(self) -> int:
+ import InstallVisualCPlusPlus
+ return InstallVisualCPlusPlus.Download(self.wineBottonPath, int(self.command[1]), self.wine)
+
+ def InstallNet(self) -> int:
+ import InstallNetFramework
+ return InstallNetFramework.Download(self.wineBottonPath, int(self.command[1]), self.wine)
+
+ def InstallMsxml(self) -> int:
+ import InstallMsxml
+ return InstallMsxml.Download(self.wineBottonPath, int(self.command[1]), self.wine)
+
+ def Info(self) -> int:
+ QtWidgets.QMessageBox.information(None, self.command[1], self.command[2])
+ return 0
+
+ def StopDll(self) -> int:
+ return os.system(f"WINEPREFIX='{self.wineBottonPath}' '{self.wine}' reg add 'HKEY_CURRENT_USER\Software\Wine\DllOverrides' /v {os.path.splitext(self.command[1])[0]} /f")
+
+ def CreateBotton(self):
+ self.command = ["bat", "exit"]
+ self.Bat()
+ return 0
+
+ def InstallSparkCoreFont(self):
+ if not os.system("which aptss"):
+ # 最新版本星火应用商店处理
+ os.system("pkexec bash aptss ssupdate")
+ return os.system("pkexec bash aptss install ms-core-fonts")
+ if not os.system("which ss-apt-fast"):
+ # 稍久的版本
+ os.system("pkexec ss-apt-fast update")
+ return os.system("pkexec bash ss-apt-fast install ms-core-fonts")
+ # 不知道什么版本的处理方法
+ if not os.system("which apt-fast"):
+ # 稍久的版本
+ os.system("pkexec apt-fast update")
+ return os.system("pkexec apt-fast install ms-core-fonts")
+ os.system("pkexec apt update")
+ return os.system("pkexec apt install ms-core-fonts")
+
+ def Echo(self) -> int:
+ del self.command[0]
+ print(" ".join(self.command))
+ return 0
+
+ def Warning(self):
+ QtWidgets.QMessageBox.warning(None, self.command[1], self.command[2])
+ return 0
+
+ def Error(self):
+ QtWidgets.QMessageBox.critical(None, self.command[1], self.command[2])
+ return 0
+
+ def Bash(self):
+ command = ""
+ for i in self.command[1:]:
+ command += f"'{i}' "
+ return os.system(command)
+
+ def Bat(self) -> int:
+ # Windows 直接转换为以 cmd 运行
+ if platform.system() == "Windows":
+ # 直接调用 Bash 函数
+ return self.Bash()
+ command = ["WINEPREFIX='($WINEPREFIX)'", "($WINE)"]
+ for i in programEnv:
+ for k in range(len(command)):
+ command[k] = command[k].replace(i[0], i[1])
+ for i in self.command[1:]:
+ command.append(i)
+ commandStr = command[0] + " "
+ for i in command[1:]:
+ commandStr += f"'{i}' "
+ return os.system(commandStr)
+
+ def Version(self):
+ print(f"版本:{version}")
+ print(f"©2020~{time.strftime('%Y')} RacoonGX 团队,By gfdgd xi、为什么您不喜欢熊出没和阿布呢")
+ return 0
+
+ def Pause(self) -> int:
+ input("按回车键继续……")
+ return 0
+
+ def Download(self) -> int:
+ command = f"aria2c -x 16 -s 16 -c '{self.command[1]}' "
+ try:
+ command += f"-d '{self.command[2]}' "
+ command += f"-o '{self.command[3]}' "
+ except:
+ pass
+ return os.system(command)
+
+ def Reg(self) -> int:
+ self.command = ["bat", "regedit", "/s", self.command[1]]
+ return self.Bat()
+
+ def EnabledOpenGl(self) -> int:
+ self.command = ["reg", f"z:{programPath}/EnabledOpengl.reg"]
+ return self.Reg()
+
+ def DisbledOpenGl(self) -> int:
+ self.command = ["reg", f"z:{programPath}/DisabledOpengl.reg"]
+ return self.Reg()
+
+ def Winver(self):
+ self.command = ["bat", "winver"]
+ return self.Bat()
+
+ def Winecfg(self):
+ self.command = ["bat", "winecfg"]
+ return self.Bat()
+
+ def ChangeVersion(self):
+ # 判断是否为正确的版本
+ if not os.path.exists(f"{programPath}/ChangeWineBottonVersion/{self.command[1]}.reg"):
+ print("错误:您选择的版本错误,目前只支持以下版本")
+ for i in os.listdir(f"{programPath}/ChangeWineBottonVersion"):
+ print(i.replace(".reg", ""), end=" ")
+ print()
+ return 1
+ self.command = ["reg", f"z:/{programPath}/ChangeWineBottonVersion/{self.command[1]}.reg"]
+ return self.Reg()
+
+ def Cat(self):
+ try:
+ file = open(self.command[1], "r")
+ print(file.read())
+ file.close()
+ return 0
+ except:
+ print("文件读取错误")
+ Debug()
+ return 1
+
+ def Taskmgr(self):
+ self.command = ["bat", "taskmgr"]
+ return self.Bat()
+
+ def Control(self):
+ self.command = ["bat", "control"]
+ return self.Bat()
+
+ def Killall(self):
+ return os.system(f"killall -9 {self.command[1]}")
+
+ def KillallWineServer(self):
+ command = ["WINEPREFIX='($WINEPREFIX)'", "($WINE)", "-k"]
+ for i in programEnv:
+ for k in range(len(command)):
+ command[k] = command[k].replace(i[0], i[1])
+ if "box86" in command[1] or "exagear" in command[1] or "box64" in command[1]:
+ print("不支持此 Wine")
+ return 1
+ if os.path.exists(command[1]):
+ # 文件存在
+ command[1] = f"{os.path.dirname(command[1])}/wineserver"
+ else:
+ # 读 which
+ command[1] = f"{os.path.dirname(subprocess.getoutput(f'which {command[1]}').strip())}/wineserver"
+ commandStr = command[0] + " "
+ for i in command[1:]:
+ commandStr += f"'{i}' "
+ return os.system(commandStr)
+
+ def EnabledWineBottleCreateLink(self):
+ self.command = ["bat", "reg", "delete", "HKEY_CURRENT_USER\Software\Wine\DllOverrides", "/v", "winemenubuilder.exe", "/f"]
+ return self.Bat()
+
+ def DisbledWineBottleCreateLink(self):
+ self.command = ["bat", "reg", "add", "HKEY_CURRENT_USER\Software\Wine\DllOverrides", "/v", "winemenubuilder.exe", "/f"]
+ return self.Bat()
+
+ def DisbledWineCrashDialog(self):
+ self.command = ["bat", "reg", "add", "HKEY_CURRENT_USER\Software\Wine\WineDbg", "/v", "ShowCrashDialog", "/t", "REG_DWORD", "/d", "00000000", "/f"]
+ return self.Bat()
+
+ def EnabledWineCrashDialog(self):
+ self.command = ["bat", "reg", "add", "HKEY_CURRENT_USER\Software\Wine\WineDbg", "/v", "ShowCrashDialog", "/t", "REG_DWORD", "/d", "00000001", "/f"]
+ return self.Bat()
+
+ def EnabledHttpProxy(self):
+ proxyServerAddress = self.command[1]
+ port = self.command[2]
+ self.command = ["bat", "reg", "add", "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings", "/v", "ProxyEnable", "/t", "REG_DWORD", "/d", "00000001", "/f"]
+ self.Bat()
+ self.command = ["bat", "reg", "add", "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings", "/v", "ProxyServer", "/d", f"{proxyServerAddress}:{port}", "/f"]
+ return self.Bat()
+
+ def DecompressionBottle(self):
+ tempDebDir = f"/tmp/wine-runner-unpack-deb-{random.randint(0, 1000)}"
+ if os.system(f"dpkg -x '{self.command[1]}' '{tempDebDir}'"):
+ return 1
+ zippath = FindFile(tempDebDir, "files.7z")
+ if zippath == None:
+ return 2
+ # 解压文件
+ os.system(f"mkdir -p '{self.command[2]}'")
+ fi = os.system(f"7z x -y '{zippath}' -o'{self.command[2]}'")
+ os.system(f"rm -rfv '{tempDebDir}'")
+ return fi
+
+
+ def DisbledHttpProxy(self):
+ self.command = ["bat", "reg", "add", "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings", "/v", "ProxyEnable", "/t", "REG_DWORD", "/d", "00000000", "/f"]
+ return self.Bat()
+
+ def InstallVB(self):
+ import InstallVisualBasicRuntime
+ return InstallVisualBasicRuntime.Download(self.wineBottonPath, int(self.command[1]), self.wine)
+
+ def InstallOther(self):
+ import InstallOther
+ return InstallOther.Download(self.wineBottonPath, int(self.command[1]), self.wine)
+
+ def ProgramForum(self):
+ webbrowser.open_new_tab("https://gfdgdxi.flarum.cloud/")
+ return
+
+ def InstallMSI(self):
+ self.command = ["bat", "msiexec", "/i", self.command[1]]
+ return self.Bat()
+
+ def InstallApk(self):
+ if os.system("which uengine > /dev/null"):
+ print("未安装 UEngine,无法使用该命令")
+ return 1
+ apk = uengineapi.APK(self.command[1])
+ result = apk.install()
+ homePath = os.getenv("HOME")
+ if not os.path.exists(f"{homePath}/.local/share/applications/uengine"):
+ os.makedirs(f"{homePath}/.local/share/applications/uengine")
+ if not os.path.exists(f"{homePath}/.local/share/icons/hicolor/apps"):
+ os.makedirs(f"{homePath}/.local/share/icons/hicolor/apps")
+ package = apk.packageName()
+ apk.saveApkIcon(f"{homePath}/.local/share/icons/hicolor/apps/{package}.png")
+ apk.saveDesktopFile(f"{homePath}/.local/share/applications/uengine/{package}.desktop", f"{homePath}/.local/share/icons/hicolor/apps/{package}.png")
+ return result
+
+ # 可以运行的命令的映射关系
+ # 可以被使用的命令的映射
+ commandList = {
+ "installdll": InstallDll,
+ "installfont": InstallFont,
+ "installsparkcorefont": InstallSparkCoreFont,
+ "installmono": InstallMono,
+ "installgecko": InstallGecko,
+ "installvcpp": InstallVCPP,
+ "installnet": InstallNet,
+ "installmsxml": InstallMsxml,
+ "echo": Echo,
+ "info": Info,
+ "warning": Warning,
+ "error": Error,
+ "exit": Exit,
+ "bash": Bash,
+ "bat": Bat,
+ "version": Version,
+ "thank": Thank,
+ "pause": Pause,
+ "download": Download,
+ "installdxvk": InstallDxvk,
+ "createbotton": CreateBotton,
+ "reg": Reg,
+ "enabledopengl": EnabledOpenGl,
+ "disbledopengl": DisbledOpenGl,
+ "winecfg": Winecfg,
+ "winver": Winver,
+ "changeversion": ChangeVersion,
+ "stopdll": StopDll,
+ "cat": Cat,
+ "taskmgr": Taskmgr,
+ "control": Control,
+ "killallwineserver": KillallWineServer,
+ "enabledhttpproxy": EnabledHttpProxy,
+ "disbledhttpproxy": DisbledHttpProxy,
+ "enabledwinecrashdialog": EnabledWineCrashDialog,
+ "disbledwinecrashdialog": DisbledWineCrashDialog,
+ "disbledWinebottlecreatelink": DisbledWineBottleCreateLink,
+ "enabledWinebottlecreatelink": EnabledWineBottleCreateLink,
+ "installvb": InstallVB,
+ "installother": InstallOther,
+ "decompressionbottle": DecompressionBottle,
+ "programforum": ProgramForum,
+ "installmsi": InstallMSI,
+ "installapk": InstallApk
+ }
+
+ # 参数数列表
+ commandInfo = {
+ "killall": [1],
+ "installdll": [1],
+ "installfont": [1],
+ "installsparkcorefont": [0],
+ "installmono": [0],
+ "installgecko": [0],
+ "installvcpp": [1],
+ "installnet": [1],
+ "installmsxml": [1],
+ "echo": [1],
+ "info": [2],
+ "warning": [2],
+ "error": [2],
+ "exit": [0],
+ "bash": [1],
+ "bat": [1],
+ "version": [0],
+ "thank": [0],
+ "pause": [0],
+ "download": [1],
+ "installdxvk": [0],
+ "createbotton": [0],
+ "reg": [1],
+ "enabledopengl": [0],
+ "disbledopengl": [0],
+ "winecfg": [0],
+ "winver": [0],
+ "changeversion": [1],
+ "stopdll": [1],
+ "cat": [1],
+ "taskmgr": [0],
+ "control": [0],
+ "killallwineserver": [0],
+ "enabledhttpproxy": [2],
+ "disbledhttpproxy": [0],
+ "enabledwinecrashdialog": [0],
+ "disbledwinecrashdialog": [0],
+ "disbledWinebottlecreatelink": [0],
+ "enabledWinebottlecreatelink": [0],
+ "installvb": [1],
+ "installother": [1],
+ "decompressionbottle": [2],
+ "programforum": [0],
+ "installmsi": [1],
+ "installapk": [1]
+ }
+ windowsUnrun = [
+ "createbotton",
+ "installdll",
+ "installmono",
+ "installgecko",
+ "winecfg",
+ "stopdll",
+ "changeversion",
+ "enabledopengl",
+ "disbledopengl",
+ "installdxvk",
+ "installfont",
+ "installsparkcorefont",
+ "decompressionbottle",
+ "installapk"
+ ]
+ # 解析
+ def __init__(self, command: list, wineBottonPath: str, wine: str) -> int:
+ self.wineBottonPath = wineBottonPath
+ self.wine = wine
+ for i in command:
+ self.command = i
+ # 变量解析
+ if self.command[0][0] == "(" and "=" in self.command[0]:
+ env = i[0][: i[0].index("=")]
+ value = i[0][i[0].index("=") + 1:]
+ # 判断是不是只读变量
+ if env in readOnlyEnv:
+ print(f"运行命令{' '.join(self.command)}出现错误")
+ print(f"变量 {env} 只读,无法修改,忽略")
+ continue
+ change = False
+ for k in range(len(programEnv)):
+ # 修改变量
+ if env == programEnv[k][0]:
+ programEnv[k][1] = value
+ change = True
+ break
+ if not change:
+ # 添加变量
+ programEnv.append([f"{env}", value])
+ continue
+ # 解析命令是否可以在 Windows 使用(只限在 Windows 系统时)
+ if platform.system() == "Windows" and i[0] in self.windowsUnrun:
+ print("此命令不支持在 Windows 上运行")
+ programEnv[9][1] = "-5"
+ continue
+ # 获取程序帮助信息
+ try:
+ if i[1] == "--help":
+ print(helpList[i[0]].replace("\\n", "\n"))
+ continue
+ except:
+ pass
+ # 正常命令解析
+ if len(i) -1 < self.commandInfo[i[0]][0]:
+ print("参数不足")
+ programEnv[9][1] = "-3"
+ continue
+ # 替换环境变量
+ for a in range(1, len(i)):
+ for b in programEnv:
+ if b[0] in i[a]:
+ i[a] = i[a].replace(b[0], b[1])
+ try:
+ commandReturn = self.commandList[i[0]](self)
+ except:
+ traceback.print_exc()
+ commandReturn = 1
+ if commandReturn:
+ print(f"运行命令{' '.join(self.command)}出现错误,返回值:", commandReturn)
+ programEnv[9][1] = str(commandReturn)
+ if self.close:
+ 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:
+ optionAll += 1
+ if "--system" in sys.argv:
+ programEnv[2][1] = "1"
+ optionAll += 1
+ if len(sys.argv) - optionAll < 2:
+ print("Wine 运行器自动配置文件解析器交互环境")
+ print(f"版本:{version}")
+ print(f"©2020~{time.strftime('%Y')} RacoonGX 团队,By gfdgd xi、为什么您不喜欢熊出没和阿布呢")
+ print("--------------------------------------------------------------")
+ while True:
+ commandLine = input(">")
+ if commandLine == "exit":
+ break
+ com = Command(commandLine)
+ com.Run(com.GetCommandList(), programEnv[0][1], programEnv[1][1])
+ sys.exit(int(programEnv[9][1]))
+ # 读取文件
+ try:
+ file = open(sys.argv[1], "r")
+ com = Command(file.read())
+ file.close()
+ except:
+ print("错误:无法读取该文件,无法继续")
+ sys.exit(1)
+ print("Wine 运行器自动配置文件解析器")
+ print(f"版本:{version}")
+ print(f"©2020~{time.strftime('%Y')} gfdgd xi、为什么您不喜欢熊出没和阿布呢")
+ print("--------------------------------------------------------------")
+ 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/Model/__init__.py b/Model/__init__.py
new file mode 100755
index 0000000..eee72d3
--- /dev/null
+++ b/Model/__init__.py
@@ -0,0 +1,37 @@
+import os
+import sys
+import PyQt5.QtWidgets as QtWidgets
+def OpenTerminal(command):
+ if terminalEnd[terminal][1]:
+ os.system(f"\"{terminal}\" \"{terminalEnd[terminal][0]}\" \"{command}\"")
+ return
+ os.system(f"\"{terminal}\" \"{terminalEnd[terminal][0]}\" {command}")
+programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
+# 对终端的获取
+# 为什么 openkylin 只有 mate-terminal
+# 优先为深度终端
+terminal = ""
+terminalList = [
+ "deepin-terminal",
+ "mate-terminal",
+ "gnome-terminal",
+ "xfce4-terminal"
+]
+terminalEnd = {
+ f"{programPath}/../launch.sh\" \"deepin-terminal": ["-e", 0],
+ "mate-terminal": ["-e", 1],
+ "gnome-terminal": ["--", 0],
+ "xfce4-terminal": ["-e", 1]
+}
+for i in terminalList:
+ if not os.system(f"which {i}"):
+ if i == "deepin-terminal":
+ i = f"{programPath}/../launch.sh\" \"deepin-terminal"
+ terminal = i
+ break
+if terminal == "":
+ print("无法识别到以下的任意一个终端")
+ print(" ".join(terminalList))
+ app = QtWidgets.QApplication(sys.argv)
+ QtWidgets.QMessageBox.critical(None, "错误", "无法识别到以下的任意一个终端\n" + " ".join(terminalList))
+ exit()
diff --git a/Model/__pycache__/__init__.cpython-310.pyc b/Model/__pycache__/__init__.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..0738c427d64c81cce6c00b0273f1a9a09eda4f91
GIT binary patch
literal 1122
zcmb7E&1)M+6rZ;{l2#up`6I3C=1}89h!P}SoKs8aM{;Z2xG5ACQn6?z(m4B-*->JP
z90D=L&_gc`r7;Gn&_kPp3%MBlXXG~5Dt3I%r6@k+jcgec$RPvsd+#^%n>X{`J~npU
z0>Sb8bOPuNd2#hcYh<9wkgE6;4+p~c%i`g5*qnxZ}`q?q&xHEtO
zs^*E8XVfdS3CsKmUXkaw2+M9;EXPROVh-9o+5#(%dFhx7>Xmr$8o52^xt#RN%;oMD
z*|r9de$QQ2zH7D*+a~pEVsazlVN;Qoo{faKOrchU>^1JM4nex
z-)5Eq%+o$ur}MZ@qz*y}E&zp#Ad5&esnSv9B--Q|BRBLF
zubt9zJBq`zeCsd7}%Xpi#3{((ssV1k4lYP(;
ztQZ5}+^
z8Nos~izg0$`{UKlPWSQ$9WGSoq&ci@thcV*TwhUF>MQC;!P;DgY_G
z1VU*?az7X^IL+oA5%6YH7ZVw`r61lzoy?fPrAYz56{(V@{u+eL8JkI@h?J(Qv50hO
z<*Nk4wtOYxNK;?7?`s>svM#RN;A!f&`PcE9c3M&>6a|{{HKE2GaR$skK|5cBG3y5W
ts_C?J3Be%_l)!;cGL$+{&N=8iK#!d46xsqd0tM^H$>1L9J~b4VauURFY!V|T
zi4&`8I7ymVK_t=9h)qycgS<_W;Nv9K$JPO6hLc*Dq{+MJ(IqDhsu_}|=@rz`+Bj;_
zG>JXc`079l7-`3zLC;!qh}y(}xt}ykGHr|z_-uWMCe?`m>GffX>mzOKoPhXb{S?7u
zhzt)nqo}O|>vS7osCX9TM)sh3G+n{U!Kb_h;|`4IF&Kda9s}+e;@1RpglGaoh5BLM
z7()uZP*&^2)fotyMgL^R6tiOvcsX-=Pi?u6CtCW%_ykv=rA>_I44D*^H<<5w_k1F)
z0gze{Ni$lE1a0K7j8}q2!}ZB$#MOoF7m7hBif$N2MM7!F{QNxgX`VNIpYq~VK&V$N
zmzmE*xm*YrW$Hml{fCDe!4pA|svhAKK93E|lMqYP${uPB4$(?CTtV|kFjMt|#&Nvx
zq(UeE%%3Y33PsOt`juKCszIH9>uGt)HQ1}A}6bzQ!uG@#Y0cY`pqJFSDlua@woD_kTYLMqaH9{rb@R$kgd3a1->*~UVScgxKEiZP0=WF
ztMqoTAgu~#0!W@T=mHb{yFX@ZC2L)81f=QF8|qC(m%&)r!Zx;IXADEru=-6s133$)
SG#d}~XANxjGZ}aSXYp?gwLb9x
literal 0
HcmV?d00001
diff --git a/Model/__pycache__/__init__.cpython-37.pyc b/Model/__pycache__/__init__.cpython-37.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..47b2f87ba65454951d2893a2ebc8f3297a3a6301
GIT binary patch
literal 1101
zcmb7C&2JM&6rY)0uh;931WF6(rBMz@F10OH&|WH3DBOT1q7u?dWwr9WtS9Ujv*XsW
zazG+Nk$T_)s#+AuM(UyEkV?Ho%BBB9Z*#3l$Uo3SPP}n&K}Z~Ut9fsJZ-4XNyf^Q1
zz3vf|N2mVo{$msJuK_cu;O1*w#Stn_IE{&aY^hJDm?f5PQNkIwHi>ToSu2g4sV;*%
zrekC+5Wm80-{U3j@G^HJ+pj|93E`D(#yw6VhJKG%(Uy5_irr%@Y`-=*57jH=`_KG3
zkWquzq5gzyvoS3;pw3Hon0z{mg^arIEt9(&w+MLL#()389BEXNy3!>PNZw%eA($`33Q@W9`Rrx
zI#-~$qq4lyhcpr?v}8X`L3XZZ9O6z8h*YQ`Xy@y?_H7R7cds(yw2;EYBeX`(QkzOM
zNtz7jI6yAa*6cRJdJ-yl4I5F4>EFPE)h?WWjX&wM+nqSJ?G<%P@Ca0)EB|kgJ7VXd
z>giIE$3kgWLKsgSZV;@B7=l1obD2dlOqP)+OBmR%&3boD6iS*-Ybs>f*itS
+
+ MainWindow
+
+
+
+ 0
+ 0
+ 800
+ 600
+
+
+
+ 自动部署脚本
+
+
+
+ -
+
+
-
+
+
+ 搜索内容(为空代表显示所有内容):
+
+
+
+ -
+
+
+ -
+
+
+ 搜索
+
+
+
+
+
+ -
+
+
+ -
+
+
-
+
+
+ Qt::Horizontal
+
+
+
+ 40
+ 20
+
+
+
+
+ -
+
+
+ 获取选中项介绍
+
+
+
+ -
+
+
+ 获取/提交选中项的评分和评论
+
+
+
+ -
+
+
+ 部署此方案
+
+
+
+
+
+
+
+
+
+
+ 关于
+
+
+
+
+ 退出程序
+
+
+
+
+ 帮助
+
+
+
+
+ 打开本地部署脚本
+
+
+
+
+ true
+
+
+ true
+
+
+ Gitlink 源(推荐)
+
+
+
+
+ true
+
+
+ Gitee 源
+
+
+
+
+ true
+
+
+ Github 源(国外用户推荐)
+
+
+
+
+ true
+
+
+ 备用源1(只限IPv6用户)
+
+
+
+
+ true
+
+
+ 本地测试源(127.0.0.1)
+
+
+
+
+ true
+
+
+ false
+
+
+ 备用源2
+
+
+
+
+ true
+
+
+ 备用源3
+
+
+
+
+
+
diff --git a/UI/KeyAddGui.py b/UI/KeyAddGui.py
new file mode 100755
index 0000000..45e7d8c
--- /dev/null
+++ b/UI/KeyAddGui.py
@@ -0,0 +1,85 @@
+# -*- coding: utf-8 -*-
+
+# Form implementation generated from reading ui file 'KeyAddGui.ui'
+#
+# Created by: PyQt5 UI code generator 5.11.3
+#
+# WARNING! All changes made in this file will be lost!
+
+from PyQt5 import QtCore, QtGui, QtWidgets
+
+class Ui_MainWindow(object):
+ def setupUi(self, MainWindow):
+ MainWindow.setObjectName("MainWindow")
+ MainWindow.resize(692, 314)
+ self.centralwidget = QtWidgets.QWidget(MainWindow)
+ self.centralwidget.setObjectName("centralwidget")
+ self.verticalLayout = QtWidgets.QVBoxLayout(self.centralwidget)
+ self.verticalLayout.setObjectName("verticalLayout")
+ self.tips = QtWidgets.QLabel(self.centralwidget)
+ self.tips.setObjectName("tips")
+ self.verticalLayout.addWidget(self.tips)
+ self.keyBoardList = QtWidgets.QListView(self.centralwidget)
+ self.keyBoardList.setObjectName("keyBoardList")
+ self.verticalLayout.addWidget(self.keyBoardList)
+ self.horizontalLayout = QtWidgets.QHBoxLayout()
+ self.horizontalLayout.setObjectName("horizontalLayout")
+ spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
+ self.horizontalLayout.addItem(spacerItem)
+ self.addButton = QtWidgets.QPushButton(self.centralwidget)
+ self.addButton.setObjectName("addButton")
+ self.horizontalLayout.addWidget(self.addButton)
+ self.editButton = QtWidgets.QPushButton(self.centralwidget)
+ self.editButton.setObjectName("editButton")
+ self.horizontalLayout.addWidget(self.editButton)
+ 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)
+ self.menuBar.setGeometry(QtCore.QRect(0, 0, 692, 33))
+ self.menuBar.setObjectName("menuBar")
+ self.menu = QtWidgets.QMenu(self.menuBar)
+ self.menu.setObjectName("menu")
+ MainWindow.setMenuBar(self.menuBar)
+ self.action = QtWidgets.QAction(MainWindow)
+ self.action.setObjectName("action")
+ self.serverTips = QtWidgets.QAction(MainWindow)
+ self.serverTips.setEnabled(False)
+ self.serverTips.setObjectName("serverTips")
+ self.startServer = QtWidgets.QAction(MainWindow)
+ self.startServer.setObjectName("startServer")
+ self.stopServer = QtWidgets.QAction(MainWindow)
+ self.stopServer.setObjectName("stopServer")
+ self.setAutoStart = QtWidgets.QAction(MainWindow)
+ self.setAutoStart.setObjectName("setAutoStart")
+ self.setUnautoStart = QtWidgets.QAction(MainWindow)
+ self.setUnautoStart.setObjectName("setUnautoStart")
+ self.menu.addAction(self.serverTips)
+ self.menu.addSeparator()
+ self.menu.addAction(self.startServer)
+ self.menu.addAction(self.stopServer)
+ self.menu.addSeparator()
+ self.menu.addAction(self.setAutoStart)
+ self.menu.addAction(self.setUnautoStart)
+ self.menuBar.addAction(self.menu.menuAction())
+
+ self.retranslateUi(MainWindow)
+ QtCore.QMetaObject.connectSlotsByName(MainWindow)
+
+ def retranslateUi(self, MainWindow):
+ _translate = QtCore.QCoreApplication.translate
+ MainWindow.setWindowTitle(_translate("MainWindow", "编辑快捷键"))
+ self.tips.setText(_translate("MainWindow", "此工具可以用于设置快捷键到 Wine 容器的映射,以便 Wine 程序可以正常的使用快捷键
Deepin/UOS将会使用默认的快捷键服务,其它发行版将使用此运行器提供的快捷键服务
Deepin/UOS将只会提供快捷键添加功能,请在控制中心进行快捷键的修改管理
"))
+ self.addButton.setText(_translate("MainWindow", "添加"))
+ self.editButton.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发行版"))
+ self.startServer.setText(_translate("MainWindow", "启动服务"))
+ self.stopServer.setText(_translate("MainWindow", "停止服务"))
+ self.setAutoStart.setText(_translate("MainWindow", "设置开机自启"))
+ self.setUnautoStart.setText(_translate("MainWindow", "关闭开机自启动"))
+
diff --git a/UI/KeyAddGui.ui b/UI/KeyAddGui.ui
new file mode 100755
index 0000000..a0869ec
--- /dev/null
+++ b/UI/KeyAddGui.ui
@@ -0,0 +1,127 @@
+
+
+ MainWindow
+
+
+
+ 0
+ 0
+ 692
+ 314
+
+
+
+ 编辑快捷键
+
+
+
+ -
+
+
+ <html><head/><body><p>此工具可以用于设置快捷键到 Wine 容器的映射,以便 Wine 程序可以正常的使用快捷键<br/>Deepin/UOS将会使用默认的快捷键服务,其它发行版将使用此运行器提供的快捷键服务<br>Deepin/UOS将只会提供快捷键添加功能,请在控制中心进行快捷键的修改管理</p></body></html>
+
+
+
+ -
+
+
+ -
+
+
-
+
+
+ Qt::Horizontal
+
+
+
+ 40
+ 20
+
+
+
+
+ -
+
+
+ 添加
+
+
+
+ -
+
+
+ 编辑
+
+
+
+ -
+
+
+ 删除
+
+
+
+
+
+
+
+
+
+
+ 关于
+
+
+
+
+ false
+
+
+ 此内容只支持非Deepin/UOS发行版
+
+
+
+
+ 启动服务
+
+
+
+
+ 停止服务
+
+
+
+
+ 设置开机自启
+
+
+
+
+ 关闭开机自启动
+
+
+
+
+
+
diff --git a/UI/KeyAddKeyboardGui.py b/UI/KeyAddKeyboardGui.py
new file mode 100755
index 0000000..5e4e12c
--- /dev/null
+++ b/UI/KeyAddKeyboardGui.py
@@ -0,0 +1,86 @@
+# -*- coding: utf-8 -*-
+
+# Form implementation generated from reading ui file 'KeyAddKeyboardGui.ui'
+#
+# Created by: PyQt5 UI code generator 5.11.3
+#
+# WARNING! All changes made in this file will be lost!
+
+from PyQt5 import QtCore, QtGui, QtWidgets
+
+class Ui_MainWindow(object):
+ def setupUi(self, MainWindow):
+ MainWindow.setObjectName("MainWindow")
+ MainWindow.resize(800, 195)
+ icon = QtGui.QIcon.fromTheme("..")
+ MainWindow.setWindowIcon(icon)
+ self.centralwidget = QtWidgets.QWidget(MainWindow)
+ self.centralwidget.setObjectName("centralwidget")
+ self.verticalLayout = QtWidgets.QVBoxLayout(self.centralwidget)
+ self.verticalLayout.setObjectName("verticalLayout")
+ self.addTips = QtWidgets.QLabel(self.centralwidget)
+ self.addTips.setObjectName("addTips")
+ self.verticalLayout.addWidget(self.addTips)
+ self.horizontalLayout_3 = QtWidgets.QHBoxLayout()
+ self.horizontalLayout_3.setObjectName("horizontalLayout_3")
+ self.exeNameTips = QtWidgets.QLabel(self.centralwidget)
+ self.exeNameTips.setObjectName("exeNameTips")
+ self.horizontalLayout_3.addWidget(self.exeNameTips)
+ self.exeName = QtWidgets.QLineEdit(self.centralwidget)
+ self.exeName.setObjectName("exeName")
+ self.horizontalLayout_3.addWidget(self.exeName)
+ self.verticalLayout.addLayout(self.horizontalLayout_3)
+ self.horizontalLayout = QtWidgets.QHBoxLayout()
+ self.horizontalLayout.setObjectName("horizontalLayout")
+ self.localTips = QtWidgets.QLabel(self.centralwidget)
+ self.localTips.setObjectName("localTips")
+ self.horizontalLayout.addWidget(self.localTips)
+ self.localKeyboardChoose = QtWidgets.QComboBox(self.centralwidget)
+ self.localKeyboardChoose.setObjectName("localKeyboardChoose")
+ self.horizontalLayout.addWidget(self.localKeyboardChoose)
+ self.addTips_2 = QtWidgets.QLabel(self.centralwidget)
+ self.addTips_2.setObjectName("addTips_2")
+ self.horizontalLayout.addWidget(self.addTips_2)
+ self.localKey = QtWidgets.QLineEdit(self.centralwidget)
+ self.localKey.setObjectName("localKey")
+ self.horizontalLayout.addWidget(self.localKey)
+ self.wineTips = QtWidgets.QLabel(self.centralwidget)
+ self.wineTips.setObjectName("wineTips")
+ self.horizontalLayout.addWidget(self.wineTips)
+ self.wineKeyboardChoose = QtWidgets.QComboBox(self.centralwidget)
+ self.wineKeyboardChoose.setObjectName("wineKeyboardChoose")
+ self.horizontalLayout.addWidget(self.wineKeyboardChoose)
+ self.addTipsWine = QtWidgets.QLabel(self.centralwidget)
+ self.addTipsWine.setObjectName("addTipsWine")
+ self.horizontalLayout.addWidget(self.addTipsWine)
+ self.wineKey = QtWidgets.QLineEdit(self.centralwidget)
+ self.wineKey.setObjectName("wineKey")
+ self.horizontalLayout.addWidget(self.wineKey)
+ self.verticalLayout.addLayout(self.horizontalLayout)
+ spacerItem = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
+ self.verticalLayout.addItem(spacerItem)
+ self.horizontalLayout_2 = QtWidgets.QHBoxLayout()
+ self.horizontalLayout_2.setObjectName("horizontalLayout_2")
+ spacerItem1 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
+ self.horizontalLayout_2.addItem(spacerItem1)
+ self.addButton = QtWidgets.QPushButton(self.centralwidget)
+ self.addButton.setObjectName("addButton")
+ self.horizontalLayout_2.addWidget(self.addButton)
+ self.verticalLayout.addLayout(self.horizontalLayout_2)
+ MainWindow.setCentralWidget(self.centralwidget)
+
+ self.retranslateUi(MainWindow)
+ QtCore.QMetaObject.connectSlotsByName(MainWindow)
+
+ def retranslateUi(self, MainWindow):
+ _translate = QtCore.QCoreApplication.translate
+ MainWindow.setWindowTitle(_translate("MainWindow", "添加快捷键"))
+ self.addTips.setText(_translate("MainWindow", "暂时只支持特定组合\n"
+"文本框内的只能输入单字母"))
+ self.exeNameTips.setText(_translate("MainWindow", "可这执行文件名称:"))
+ self.localTips.setText(_translate("MainWindow", "本地映射:"))
+ self.addTips_2.setText(_translate("MainWindow", "+"))
+ self.wineTips.setText(_translate("MainWindow", "Wine 容器映射内容:"))
+ self.addTipsWine.setText(_translate("MainWindow", "+"))
+ self.addButton.setText(_translate("MainWindow", "添加快捷键"))
+
diff --git a/UI/KeyAddKeyboardGui.ui b/UI/KeyAddKeyboardGui.ui
new file mode 100755
index 0000000..b6eb4bc
--- /dev/null
+++ b/UI/KeyAddKeyboardGui.ui
@@ -0,0 +1,130 @@
+
+
+ MainWindow
+
+
+
+ 0
+ 0
+ 800
+ 195
+
+
+
+ 添加快捷键
+
+
+
+ ../../../.designer/backup../../../.designer/backup
+
+
+
+ -
+
+
+ 暂时只支持特定组合
+文本框内的只能输入单字母
+
+
+
+ -
+
+
-
+
+
+ 可这执行文件名称:
+
+
+
+ -
+
+
+
+
+ -
+
+
-
+
+
+ 本地映射:
+
+
+
+ -
+
+
+ -
+
+
+ +
+
+
+
+ -
+
+
+ -
+
+
+ Wine 容器映射内容:
+
+
+
+ -
+
+
+ -
+
+
+ +
+
+
+
+ -
+
+
+
+
+ -
+
+
+ Qt::Vertical
+
+
+
+ 20
+ 40
+
+
+
+
+ -
+
+
-
+
+
+ Qt::Horizontal
+
+
+
+ 40
+ 20
+
+
+
+
+ -
+
+
+ 添加快捷键
+
+
+
+
+
+
+
+
+
+
+
diff --git a/UI/__pycache__/AutoConfig.cpython-310.pyc b/UI/__pycache__/AutoConfig.cpython-310.pyc
new file mode 100755
index 0000000000000000000000000000000000000000..bbf0dfbe8815d7bfbc44d02f5b412bd4f8cb7d9e
GIT binary patch
literal 2603
zcmZuzTW=dh6y9C0udy9Bx8BmyKyLxuR0$y@2w`
zNR`^srbti;2~|}dZ0JLZN`-)jHWYryzEV5QQ{Q>woZ0opDP3#FXTI~zIcF~C%vz~b
zLV_oJHdf5GOVU5sX?;}aoPpOq2@R2mT$0MNCYKdWDTlO>ES;B#LPFOi5~Aw0kQOHD
zjMN|A2Da26aw9oDZZYbHbNswxxbYmnY>+w1?IIFd9|byR;I(_9p^_#ONmGbSlVjJmRKijr^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i
za<9>?{PGLOMedna7yH^#kxik)T3Z?z#AR#xi@fiNfsPBOe|IKQIx=Lcre`GevaHZ_>m(m-H
zJU@CYECzq0%gFnKdb?%Ik5}B#%>$!$QQ4Bf|MNIzaf&!SI2*n8*;(@_W=&hc7T5~P
z5X$g#QdzAe){cwo((AVk@Xc+zA+x6>{}qS0COYHM&VmVkuU*MbX>a
z5#N(jup>tyE7F;=6x>IVUFowkVn?@{uG0VzMnG%~5bKj3#Y`U(L{FjPXB-trRG?2Y
zxR%>vLwmxCzm}|om0*z%7z&HB*fFuMp;mrL?W8?p;ob~b$rOvvk`}b6ow8D$pyfFQ
z-U0CYO>}c~4Pd!j^?V0-(oK8c0c<;8#K)2W_x2b~HJ2J3_$+0T6MOr~neKI6V?j2%&Z;JrrVi7M&A$4!q7cc|q
z6$-3gDin;n&JX!|>;`A$MfHURYG7|6*?=Pk7V=sgJ4;S?Tf}-ruj(~(1KWk>byb>t
XSx475oLhlqC4lY$3@n0y;V=0I$bdU|
diff --git a/req/__init__.py b/req/__init__.py
new file mode 100755
index 0000000..f52e5c6
--- /dev/null
+++ b/req/__init__.py
@@ -0,0 +1,27 @@
+# 此库用于实现 52 版不连接程序服务器
+import requests
+
+unConnect = False
+with open("/var/lib/dpkg/status", "r") as i:
+ unConnect = "Package: spark-deepin-wine-runner-52" in open("/var/lib/dpkg/status", "r").read()
+if unConnect:
+ print("52专版,将会无法连接服务器")
+
+class Respon:
+ text = ""
+
+def get(url, timeout=None): # -> requests.Response:
+ if unConnect:
+ # 全部 Url 都拦截
+ raise Exception("52专版不支持连接服务器")
+ if timeout == None:
+ return requests.get(url)
+ return requests.get(url, timeout=timeout)
+
+def post(url, data, timeout=None):
+ if unConnect:
+ # 全部 Url 都拦截
+ raise Exception("52专版不支持连接服务器")
+ if timeout == None:
+ return requests.post(url, data)
+ return requests.post(url, data, timeout=timeout)
\ No newline at end of file
diff --git a/req/__pycache__/__init__.cpython-310.pyc b/req/__pycache__/__init__.cpython-310.pyc
new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