From dc063f21ac227d5beb14f10596545a93a80665bc Mon Sep 17 00:00:00 2001 From: gfdgd_xi <3025613752@qq.com> Date: Mon, 16 Jan 2023 16:01:33 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BC=80=E5=A7=8B=E7=B2=BE=E7=AE=80=E4=B8=BB?= =?UTF-8?q?=E7=AA=97=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .idea/.gitignore | 3 - .idea/deepin-wine-run.iml | 8 -- .../inspectionProfiles/profiles_settings.xml | 6 - .idea/misc.xml | 4 - .idea/modules.xml | 8 -- .idea/vcs.xml | 6 - .workflow/branch-pipeline.yml | 52 --------- .workflow/master-pipeline.yml | 50 --------- .workflow/pr-pipeline.yml | 37 ------- deepin-wine-runner-update-bug | 104 ------------------ mainwindow.py | 44 -------- 违反开源协议应用事例.md | 3 - 12 files changed, 325 deletions(-) delete mode 100755 .idea/.gitignore delete mode 100755 .idea/deepin-wine-run.iml delete mode 100755 .idea/inspectionProfiles/profiles_settings.xml delete mode 100755 .idea/misc.xml delete mode 100755 .idea/modules.xml delete mode 100755 .idea/vcs.xml delete mode 100644 .workflow/branch-pipeline.yml delete mode 100644 .workflow/master-pipeline.yml delete mode 100644 .workflow/pr-pipeline.yml delete mode 100755 deepin-wine-runner-update-bug delete mode 100755 违反开源协议应用事例.md diff --git a/.idea/.gitignore b/.idea/.gitignore deleted file mode 100755 index 26d3352..0000000 --- a/.idea/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -# Default ignored files -/shelf/ -/workspace.xml diff --git a/.idea/deepin-wine-run.iml b/.idea/deepin-wine-run.iml deleted file mode 100755 index 8437fe6..0000000 --- a/.idea/deepin-wine-run.iml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/.idea/inspectionProfiles/profiles_settings.xml b/.idea/inspectionProfiles/profiles_settings.xml deleted file mode 100755 index 105ce2d..0000000 --- a/.idea/inspectionProfiles/profiles_settings.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml deleted file mode 100755 index dc9ea49..0000000 --- a/.idea/misc.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml deleted file mode 100755 index 915f12f..0000000 --- a/.idea/modules.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml deleted file mode 100755 index 94a25f7..0000000 --- a/.idea/vcs.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/.workflow/branch-pipeline.yml b/.workflow/branch-pipeline.yml deleted file mode 100644 index 5f45c17..0000000 --- a/.workflow/branch-pipeline.yml +++ /dev/null @@ -1,52 +0,0 @@ -version: '1.0' -name: branch-pipeline -displayName: BranchPipeline -stages: - - stage: - name: compile - displayName: 编译 - steps: - - step: build@python - name: build_python - displayName: Python 构建 - pythonVersion: '3.9' - # 非必填字段,开启后表示将构建产物暂存,但不会上传到制品库中,7天后自动清除 - artifacts: - # 构建产物名字,作为产物的唯一标识可向下传递,支持自定义,默认为BUILD_ARTIFACT。在下游可以通过${BUILD_ARTIFACT}方式引用来获取构建物地址 - - name: BUILD_ARTIFACT - # 构建产物获取路径,是指代码编译完毕之后构建物的所在路径 - path: - - ./ - commands: - - python3 -m pip install --upgrade pip - - pip3 config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple - - pip3 install -r requirements.txt - - python3 ./main.py - - step: publish@general_artifacts - name: publish_general_artifacts - displayName: 上传制品 - # 上游构建任务定义的产物名,默认BUILD_ARTIFACT - dependArtifact: BUILD_ARTIFACT - # 上传到制品库时的制品命名,默认output - artifactName: output - dependsOn: build_python - - stage: - name: release - displayName: 发布 - steps: - - step: publish@release_artifacts - name: publish_release_artifacts - displayName: '发布' - # 上游上传制品任务的产出 - dependArtifact: output - # 发布制品版本号 - version: '1.0.0.0' - # 是否开启版本号自增,默认开启 - autoIncrement: true -triggers: - push: - branches: - exclude: - - master - include: - - .* diff --git a/.workflow/master-pipeline.yml b/.workflow/master-pipeline.yml deleted file mode 100644 index 69cf036..0000000 --- a/.workflow/master-pipeline.yml +++ /dev/null @@ -1,50 +0,0 @@ -version: '1.0' -name: master-pipeline -displayName: MasterPipeline -stages: - - stage: - name: compile - displayName: 编译 - steps: - - step: build@python - name: build_python - displayName: Python 构建 - pythonVersion: '3.9' - # 非必填字段,开启后表示将构建产物暂存,但不会上传到制品库中,7天后自动清除 - artifacts: - # 构建产物名字,作为产物的唯一标识可向下传递,支持自定义,默认为BUILD_ARTIFACT。在下游可以通过${BUILD_ARTIFACT}方式引用来获取构建物地址 - - name: BUILD_ARTIFACT - # 构建产物获取路径,是指代码编译完毕之后构建物的所在路径 - path: - - ./ - commands: - - python3 -m pip install --upgrade pip - - pip3 config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple - - pip3 install -r requirements.txt - - python3 ./main.py - - step: publish@general_artifacts - name: publish_general_artifacts - displayName: 上传制品 - # 上游构建任务定义的产物名,默认BUILD_ARTIFACT - dependArtifact: BUILD_ARTIFACT - # 上传到制品库时的制品命名,默认output - artifactName: output - dependsOn: build_python - - stage: - name: release - displayName: 发布 - steps: - - step: publish@release_artifacts - name: publish_release_artifacts - displayName: '发布' - # 上游上传制品任务的产出 - dependArtifact: output - # 发布制品版本号 - version: '1.0.0.0' - # 是否开启版本号自增,默认开启 - autoIncrement: true -triggers: - push: - branches: - include: - - master \ No newline at end of file diff --git a/.workflow/pr-pipeline.yml b/.workflow/pr-pipeline.yml deleted file mode 100644 index e61e401..0000000 --- a/.workflow/pr-pipeline.yml +++ /dev/null @@ -1,37 +0,0 @@ -version: '1.0' -name: pr-pipeline -displayName: PRPipeline -stages: - - stage: - name: compile - displayName: 编译 - steps: - - step: build@python - name: build_python - displayName: Python 构建 - pythonVersion: '3.9' - # 非必填字段,开启后表示将构建产物暂存,但不会上传到制品库中,7天后自动清除 - artifacts: - # 构建产物名字,作为产物的唯一标识可向下传递,支持自定义,默认为BUILD_ARTIFACT。在下游可以通过${BUILD_ARTIFACT}方式引用来获取构建物地址 - - name: BUILD_ARTIFACT - # 构建产物获取路径,是指代码编译完毕之后构建物的所在路径 - path: - - ./ - commands: - - python3 -m pip install --upgrade pip - - pip3 config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple - - pip3 install -r requirements.txt - - python3 ./main.py - - step: publish@general_artifacts - name: publish_general_artifacts - displayName: 上传制品 - # 上游构建任务定义的产物名,默认BUILD_ARTIFACT - dependArtifact: BUILD_ARTIFACT - # 上传到制品库时的制品命名,默认output - artifactName: output - dependsOn: build_python -triggers: - pr: - branches: - include: - - master diff --git a/deepin-wine-runner-update-bug b/deepin-wine-runner-update-bug deleted file mode 100755 index 1f36530..0000000 --- a/deepin-wine-runner-update-bug +++ /dev/null @@ -1,104 +0,0 @@ -#!/usr/bin/env python3 -import os -import sys -import json -import base64 -import req as requests -import traceback -import webbrowser -import urllib.parse as parse -import PyQt5.QtGui as QtGui -import PyQt5.QtWidgets as QtWidgets - -# 读取文本文档 -def readtxt(path: "路径")->"读取文本文档": - f = open(path, "r") # 设置文件对象 - str = f.read() # 获取内容 - f.close() # 关闭文本对象 - return str # 返回结果 - -def Update(name, stars, contact, things, version): - # post 内容 - data = { - "Name": name, - "Starts": stars, - "Contact": contact, - "Things": things, - "Version": version - } - try: - QtWidgets.QMessageBox.information(widget, "提示", requests.post(parse.unquote(base64.b64decode("aHR0cDovLzEyMC4yNS4xNTMuMTQ0L3NwYXJrLWRlZXBpbi13aW5lLXJ1bm5lci9idWcvdXBsb2FkLnBocA==").decode("utf-8")), data=data).text) - except: - traceback.print_exc() - QtWidgets.QMessageBox.critical(widget, "错误", f"服务器疑似出现错误,可以进行以下尝试:①多尝试几次;②使用其他反馈途径\n错误信息:{traceback.format_exc()}") - -def UpdateButtonClick(): - #判断是否为空 - if nameThings.text() == "" or starMenu.currentText() == "" or contactThings.text() == "" or updateThings.toPlainText().replace(" ", "").replace("\n", "") == "": - QtWidgets.QMessageBox.critical(widget, "错误", "反馈信息未填写完整!") - return - Update(name=nameThings.text(), stars=starMenu.currentText(), contact=contactThings.text(), things=updateThings.toPlainText(), version=version) - -def OpenGiteeIssues(): - webbrowser.open_new_tab("https://gitee.com/gfdgd-xi/deep-wine-runner/issues") - -def OpenGithubIssues(): - webbrowser.open_new_tab("https://github.com/gfdgd-xi/deep-wine-runner/issues") - -def OpenGitlinkIssues(): - webbrowser.open_new_tab("https://www.gitlink.org.cn/gfdgd_xi/deep-wine-runner/issues") - -# 获取用户主目录 -def get_home()->"获取用户主目录": - return os.path.expanduser('~') - -########################### -# 程序信息 -########################### -iconPath = "{}/deepin-wine-runner.svg".format(os.path.split(os.path.realpath(__file__))[0]) -programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string -information = json.loads(readtxt(programPath + "/information.json")) -version = information["Version"] - -########################### -# 窗口创建 -########################### -app = QtWidgets.QApplication(sys.argv) -window = QtWidgets.QMainWindow() -widget = QtWidgets.QWidget() -widgetLayout = QtWidgets.QGridLayout() -nameThings = QtWidgets.QLineEdit() -contactThings = QtWidgets.QLineEdit() -starMenu = QtWidgets.QComboBox() -updateThings = QtWidgets.QTextEdit() -updateButton = QtWidgets.QPushButton("提交") -otherUpload = QtWidgets.QHBoxLayout() -giteeButton = QtWidgets.QPushButton("Gitee Issues") -githubButton = QtWidgets.QPushButton("Github Issues") -gitlinkButton = QtWidgets.QPushButton("Gitlink Issues") -otherUpload.addWidget(QtWidgets.QLabel("如果无法正常反馈,可以用其他方式反馈:")) -otherUpload.addWidget(giteeButton) -otherUpload.addWidget(githubButton) -otherUpload.addWidget(gitlinkButton) -otherUpload.addSpacerItem(QtWidgets.QSpacerItem(20, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)) -starMenu.addItems(["5分", "4分", "3分", "2分", "1分"]) -widgetLayout.addWidget(QtWidgets.QLabel("你的昵称:"), 0, 0, 1, 1) -widgetLayout.addWidget(QtWidgets.QLabel("联系方式(电子邮箱):"), 0, 2, 1, 1) -widgetLayout.addWidget(QtWidgets.QLabel("评分:"), 0, 4, 1, 1) -widgetLayout.addWidget(QtWidgets.QLabel("反馈内容(支持 Markdown 格式):"), 1, 0, 1, 2) -widgetLayout.addWidget(nameThings, 0, 1, 1, 1) -widgetLayout.addWidget(contactThings, 0, 3, 1, 1) -widgetLayout.addWidget(starMenu, 0, 5, 1, 1) -widgetLayout.addWidget(updateThings, 2, 0, 1, 6) -widgetLayout.addLayout(otherUpload, 3, 0, 1, 5) -widgetLayout.addWidget(updateButton, 3, 5, 1, 1) -giteeButton.clicked.connect(OpenGiteeIssues) -githubButton.clicked.connect(OpenGithubIssues) -gitlinkButton.clicked.connect(OpenGitlinkIssues) -updateButton.clicked.connect(UpdateButtonClick) -widget.setLayout(widgetLayout) -window.setCentralWidget(widget) -window.setWindowTitle(f"Wine 运行器 {version} 问题/建议反馈") -window.setWindowIcon(QtGui.QIcon(iconPath)) -window.show() -sys.exit(app.exec_()) \ No newline at end of file diff --git a/mainwindow.py b/mainwindow.py index 8428b86..d331412 100755 --- a/mainwindow.py +++ b/mainwindow.py @@ -28,11 +28,6 @@ import urllib.parse as parse import PyQt5.QtGui as QtGui import PyQt5.QtCore as QtCore import PyQt5.QtWidgets as QtWidgets -try: - import PyQt5.QtWebEngineWidgets as QtWebEngineWidgets - bad = False -except: - bad = True from trans import * from Model import * @@ -417,15 +412,6 @@ def about_this_program()->"显示“关于这个程序”窗口": QT.message.resize(int(messageWidget.frameGeometry().width() * 1.5), int(messageWidget.frameGeometry().height() * 1.5)) QT.message.show() -# 显示“提示”窗口 -def helps(): - global tips - QtWidgets.QMessageBox.information(widget, "提示", tips) - -# 显示更新内容窗口 -def UpdateThings(): - QtWidgets.QMessageBox.information(widget, "更新内容", updateThings) - # 生成 desktop 文件在启动器 def make_desktop_on_launcher(): try: @@ -1906,27 +1892,6 @@ def SaveLog(): traceback.print_exc() QtWidgets.QMessageBox.critical(window, "错误", traceback.format_exc()) -def GetNewInformation(): - try: - text = requests.get("https://code.gitlink.org.cn/gfdgd_xi/wine-runner-list/raw/branch/master/information/index.html").text - except: - traceback.print_exc() - text = """

无法连接到服务器

-
-

你可以尝试:

-

1. 判断使用的是否使用吾爱版本,如果使用吾爱版本则无法连接

-

2. 判断是否能正常连接网络

""" - global webInformation - if bad: - webInformation = QtWidgets.QTextBrowser() - else: - webInformation = QtWebEngineWidgets.QWebEngineView() - webInformation.setHtml(text) - webInformation.setWindowTitle("获取程序公告") - webInformation.setWindowIcon(QtGui.QIcon(iconPath)) - webInformation.resize(int(webInformation.frameGeometry().width() * 1.3), int(webInformation.frameGeometry().height() * 1.1)) - webInformation.show() - def getFileFolderSize(fileOrFolderPath): """get size for file or folder""" totalSize = 0 @@ -2906,12 +2871,9 @@ if len(qemuBottleList) >= 1: help = menu.addMenu(transla.transe("U", "帮助(&H)")) runStatusWebSize = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(20), transla.transe("U", "查询程序在 Wine 的运行情况")) h1 = help.addMenu(QtWidgets.QApplication.style().standardIcon(20), transla.transe("U", "程序官网")) -h2 = QtWidgets.QAction(transla.transe("U", "小提示")) wineRunnerHelp = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(20), transla.transe("U", "Wine运行器和Wine打包器傻瓜式使用教程(小白专用) By 鹤舞白沙")) -h3 = QtWidgets.QAction(transla.transe("U", "更新内容")) h4 = QtWidgets.QAction(transla.transe("U", "鸣谢名单")) h5 = QtWidgets.QAction(transla.transe("U", "更新这个程序")) -programInformation = QtWidgets.QAction(transla.transe("U", "获取程序公告")) h6 = QtWidgets.QAction(transla.transe("U", "反馈这个程序的建议和问题")) fenUpload = QtWidgets.QAction(transla.transe("U", "程序评分")) h7 = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(9), transla.transe("U", "关于这个程序")) @@ -2934,8 +2896,6 @@ help.addAction(forumWebsize) help.addAction(wineRunnerHelp) help.addAction(runStatusWebSize) help.addSeparator() -help.addAction(h2) -help.addAction(h3) help.addAction(h4) help.addSeparator() wikiHelp = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(20), transla.transe("U", "程序 Wiki")) @@ -2949,7 +2909,6 @@ help.addSeparator() help.addAction(h5) help.addAction(h6) help.addAction(fenUpload) -help.addAction(programInformation) help.addAction(h7) help.addAction(h8) help.addSeparator() @@ -2964,8 +2923,6 @@ gitlab.triggered.connect(lambda: webbrowser.open_new_tab("https://gitlab.com/gfd jihu.triggered.connect(lambda: webbrowser.open_new_tab("https://jihulab.com//gfdgd-xi/deep-wine-runner")) runStatusWebSize.triggered.connect(lambda: webbrowser.open_new_tab("https://gfdgd-xi.github.io/wine-runner-info")) forumWebsize.triggered.connect(lambda: webbrowser.open_new_tab("https://gfdgdxi.flarum.cloud/")) -h2.triggered.connect(helps) -h3.triggered.connect(UpdateThings) wineRunnerHelp.triggered.connect(lambda: webbrowser.open_new_tab("https://bbs.deepin.org/post/246837")) h4.triggered.connect(ThankWindow) wikiHelp.triggered.connect(lambda: webbrowser.open_new_tab("https://gfdgd-xi.github.io/wine-runner-wiki")) @@ -2977,7 +2934,6 @@ fenUpload.triggered.connect(lambda: threading.Thread(target=os.system, args=[f"p h7.triggered.connect(about_this_program) h8.triggered.connect(lambda: QtWidgets.QMessageBox.aboutQt(widget)) hm1_1.triggered.connect(lambda: webbrowser.open_new_tab("https://gitee.com/gfdgd-xi/uengine-runner")) -programInformation.triggered.connect(GetNewInformation) # 异同步获取信息 #threading.Thread(target=GetVersion).start() GetVersion() diff --git a/违反开源协议应用事例.md b/违反开源协议应用事例.md deleted file mode 100755 index 579eec9..0000000 --- a/违反开源协议应用事例.md +++ /dev/null @@ -1,3 +0,0 @@ -下面将会详细标注违反本程序 GPLV3 开源协议的应用以及其违反代码和来源 - -# 超级 Wine \ No newline at end of file