From 586b6efb59cb9c000a4448160d8f5bb600c11f60 Mon Sep 17 00:00:00 2001
From: gfdgd_xi <3025613752@qq.com>
Date: Fri, 2 Feb 2024 12:41:31 +0800
Subject: [PATCH] =?UTF-8?q?Makefile=E6=94=AF=E6=8C=81=E6=9E=84=E5=BB=BArpm?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 Makefile                          |  4 ++++
 deb/DEBIAN/postinst               |  2 +-
 mainwindow.py                     | 19 ++++++++++---------
 rpm/spark-deepin-wine-runner.spec |  1 +
 4 files changed, 16 insertions(+), 10 deletions(-)

diff --git a/Makefile b/Makefile
index af21946..b3e2365 100755
--- a/Makefile
+++ b/Makefile
@@ -17,6 +17,10 @@ clean:
 
 #package-rpm:
 
+package-rpm:
+	sudo rpmbuild -bb rpm/spark-deepin-wine-runner.spec
+	sudo cp /root/rpmbuild/RPMS/x86_64/spark-deepin-wine-runner-*.rpm .
+	sudo rm -rf /root/rpmbuild/
 
 package-pkg:
 	#sudo debtap -u
diff --git a/deb/DEBIAN/postinst b/deb/DEBIAN/postinst
index 81e6245..46bec2f 100755
--- a/deb/DEBIAN/postinst
+++ b/deb/DEBIAN/postinst
@@ -11,7 +11,7 @@
 # 程序版本号
 version=3.4.1
 echo 安装组件
-#python3 -m pip install --upgrade PyQt5 --trusted-host https://repo.huaweicloud.com -i https://repo.huaweicloud.com/repository/pypi/simple > /dev/null 2>&1 | true
+#python3 -m pip install --upgrade pyqt5 --trusted-host https://repo.huaweicloud.com -i https://repo.huaweicloud.com/repository/pypi/simple > /dev/null 2>&1 | true
 #python3 -m pip install --upgrade PyQtWebEngine --trusted-host https://repo.huaweicloud.com -i https://repo.huaweicloud.com/repository/pypi/simple > /dev/null 2>&1 | true
 python3 -m pip install --upgrade pynput --trusted-host https://repo.huaweicloud.com -i https://repo.huaweicloud.com/repository/pypi/simple --break-system-packages > /dev/null 2>&1 | true
 python3 -m pip install --upgrade xpinyin --trusted-host https://repo.huaweicloud.com -i https://repo.huaweicloud.com/repository/pypi/simple --break-system-packages > /dev/null 2>&1 | true
diff --git a/mainwindow.py b/mainwindow.py
index b734e25..4adea98 100755
--- a/mainwindow.py
+++ b/mainwindow.py
@@ -29,16 +29,16 @@ import req as requests
 import urllib.parse as parse
 try:
     import PyQt5.QtGui as QtGui
-expect:
-    os.system("python3 -m pip install --upgrade PyQt5 --trusted-host https://repo.huaweicloud.com -i https://repo.huaweicloud.com/repository/pypi/simple > /dev/null 2>&1 | true")
+except:
+    os.system("python3 -m pip install --upgrade pyqt5 --trusted-host https://repo.huaweicloud.com -i https://repo.huaweicloud.com/repository/pypi/simple")
     import PyQt5.QtGui as QtGui
 import PyQt5.QtCore as QtCore
 import PyQt5.QtWidgets as QtWidgets
 try:
     import PyQt5.QtWebEngineWidgets as QtWebEngineWidgets
     bad = False
-    threading.Thread(target=os.system, args=["python3 -m pip install --upgrade PyQtWebEngine --trusted-host https://repo.huaweicloud.com -i https://repo.huaweicloud.com/repository/pypi/simple > /dev/null 2>&1 | true"]).start()
 except:
+    threading.Thread(target=os.system, args=["python3 -m pip install --upgrade PyQtWebEngine --trusted-host https://repo.huaweicloud.com -i https://repo.huaweicloud.com/repository/pypi/simple"]).start()
     bad = True
 from trans import *
 from Model import *
@@ -2637,12 +2637,13 @@ exe路径\' 参数 \'
 updateThingsString = QtCore.QCoreApplication.translate("U", '''※1、修复简易打包器在 Deepin/UOS 上无法正常启动的问题
 ※2、打包器生成的 deb 修复在非 Deepin/UOS 且未安装星火应用商店的系统中启动器无程序图标的问题
 ※3、修复 Box86/64 国内源源失效的问题
-※4、支持 Arch Linux
-※5、打包器支持将 deb 包转换为其它格式
-6、新增公告和新版本提示功能
-7、修复公告的链接在部分机器无法正常打开的问题
-8、新增赞赏入口
-9、支持识别 spark-wine9、spark-wine9-wow''')
+※4、适配 Arch Linux
+※5、适配 Fedora
+※6、打包器支持将 deb 包转换为其它格式
+7、新增公告和新版本提示功能
+8、修复公告的链接在部分机器无法正常打开的问题
+9、新增赞赏入口
+10、支持识别 spark-wine9、spark-wine9-wow''')
 for i in information["Thank"]:
     thankText += f"{i}\n"
 updateTime = "2024年02月02日"
diff --git a/rpm/spark-deepin-wine-runner.spec b/rpm/spark-deepin-wine-runner.spec
index da04be9..3418d1e 100644
--- a/rpm/spark-deepin-wine-runner.spec
+++ b/rpm/spark-deepin-wine-runner.spec
@@ -21,6 +21,7 @@ Requires: deepin-terminal
 Requires: python3-dbus
 Requires: python3-pip
 Requires: p7zip
+Requires: p7zip-plugins
 Requires: sudo
 Requires: python3-pyperclip
 Requires: bubblewrap