From 006b8ae77365e6a9c7da627272d8fdb482d48064 Mon Sep 17 00:00:00 2001
From: gfdgd_xi <3025613752@qq.com>
Date: Fri, 7 Jun 2024 11:17:31 +0800
Subject: [PATCH] =?UTF-8?q?=E5=A4=84=E7=90=86UOS=20arm=20dwine6=E4=B8=8D?=
 =?UTF-8?q?=E5=90=8C=E7=9A=84=E9=97=AE=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 ShellList/repair-arm-package-problem-to-uos.py | 8 ++++++++
 1 file changed, 8 insertions(+)
 mode change 100644 => 100755 ShellList/repair-arm-package-problem-to-uos.py

diff --git a/ShellList/repair-arm-package-problem-to-uos.py b/ShellList/repair-arm-package-problem-to-uos.py
old mode 100644
new mode 100755
index b8392dc..5b9fcb3
--- a/ShellList/repair-arm-package-problem-to-uos.py
+++ b/ShellList/repair-arm-package-problem-to-uos.py
@@ -11,10 +11,14 @@ def Replace(path):
     
     isReplace = False
     isSparkHelper = False
+    # 替换 Wine 包名
+    data = data.replace("deepin-wine6-stable,", "deepin-wine6-stable | com.deepin-wine6-stable.deepin,")
+    data = data.replace("deepin-wine6-stable | deepin-wine6-stable-bcm | deepin-wine6-stable-dcm,", "deepin-wine6-stable | deepin-wine6-stable-bcm | deepin-wine6-stable-dcm | com.deepin-wine6-stable.deepin,")
     if "spark-dwine-helper | store.spark-app.spark-dwine-helper" in data and not isReplace:
         isReplace = True
         isSparkHelper = True
         data = data.replace("spark-dwine-helper | store.spark-app.spark-dwine-helper", "deepin-wine-helper | com.wine-helper.deepin")
+        
     if "deepin-wine-helper (>= 5.1.30-1)" in data and not isReplace:
         isReplace = True
         data = data.replace("deepin-wine-helper (>= 5.1.30-1)", "deepin-wine-helper | com.wine-helper.deepin")
@@ -30,6 +34,10 @@ def ReplaceSparkHelper(path):
     with open(f"{path}/opt/apps/{name}/files/run.sh", "w") as file:
         file.write(data)
 
+if len(sys.argv) <= 1:
+    print(f"请加参数,命令示例: {sys.argv[0]} xxx.deb")
+    exit(1)
+
 tempPath = "/tmp/turn-deb"
 for i in sys.argv[1:]:
     os.system(f"rm -rf '{tempPath}'")