From d7e131c778a123327099de92c88dee4e79b06926 Mon Sep 17 00:00:00 2001
From: shenmo <jifengshenmo@outlook.com>
Date: Mon, 4 Nov 2024 07:51:41 +0800
Subject: [PATCH 1/6] fix: Can not pass '--xxx' options to wine progs

---
 deepin-wine-easy-packager.py   | 2 +-
 package-script/template/run.sh | 4 ++--
 packager-config/run.sh         | 4 ++--
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/deepin-wine-easy-packager.py b/deepin-wine-easy-packager.py
index 2b6c8df..99149c1 100755
--- a/deepin-wine-easy-packager.py
+++ b/deepin-wine-easy-packager.py
@@ -305,7 +305,7 @@ if [ -n "$EXEC_PATH" ];then
     if [ -z "${{EXEC_PATH##*.lnk*}}" ];then
         $START_SHELL_PATH $BOTTLENAME $APPVER "C:/windows/command/start.exe" "/Unix" "$EXEC_PATH" "$@"
     else
-        $START_SHELL_PATH $BOTTLENAME $APPVER "C:/windows/command/start.exe" "/Unix" "$EXEC_PATH" "$@"
+        $START_SHELL_PATH $BOTTLENAME $APPVER "$EXEC_PATH" "$@"
     fi
 else
     $START_SHELL_PATH $BOTTLENAME $APPVER "uninstaller.exe" "$@"
diff --git a/package-script/template/run.sh b/package-script/template/run.sh
index 739f8bd..ee54480 100755
--- a/package-script/template/run.sh
+++ b/package-script/template/run.sh
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 
 #   Copyright (C) 2016 Deepin, Inc.
 #
@@ -109,7 +109,7 @@ if [ -n "$EXEC_PATH" ];then
     if [ -z "${EXEC_PATH##*.lnk*}" ];then
         $START_SHELL_PATH $BOTTLENAME $APPVER "C:/windows/command/start.exe" "/Unix" "$EXEC_PATH" "$@"
     else
-        $START_SHELL_PATH $BOTTLENAME $APPVER "C:/windows/command/start.exe" "/Unix" "$EXEC_PATH" "$@"
+        $START_SHELL_PATH $BOTTLENAME $APPVER "$EXEC_PATH" "$@"
     fi
 else
     $START_SHELL_PATH $BOTTLENAME $APPVER "uninstaller.exe" "$@"
diff --git a/packager-config/run.sh b/packager-config/run.sh
index ca94c24..62ba4c5 100644
--- a/packager-config/run.sh
+++ b/packager-config/run.sh
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 
 #   Copyright (C) 2016 Deepin, Inc.
 #
@@ -156,7 +156,7 @@ if [ -n "$EXEC_PATH" ];then
     if [ -z "${EXEC_PATH##*.lnk*}" ];then
         $START_SHELL_PATH $BOTTLENAME $APPVER "C:/windows/command/start.exe" "/Unix" "$EXEC_PATH" "$@"
     else
-        $START_SHELL_PATH $BOTTLENAME $APPVER "C:/windows/command/start.exe" "/Unix" "$EXEC_PATH" "$@"
+        $START_SHELL_PATH $BOTTLENAME $APPVER "$EXEC_PATH" "$@"
     fi
 else
     $START_SHELL_PATH $BOTTLENAME $APPVER "uninstaller.exe" "$@"

From ebf9474bc61da8ea3a7247b3daa9368394c30932 Mon Sep 17 00:00:00 2001
From: shenmo <jifengshenmo@outlook.com>
Date: Mon, 4 Nov 2024 07:55:46 +0800
Subject: [PATCH 2/6] feat: Now we pass %u as default config

---
 deepin-wine-easy-packager.py | 2 +-
 deepin-wine-packager.py      | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/deepin-wine-easy-packager.py b/deepin-wine-easy-packager.py
index 99149c1..e06b54f 100755
--- a/deepin-wine-easy-packager.py
+++ b/deepin-wine-easy-packager.py
@@ -321,7 +321,7 @@ Encoding=UTF-8
 Type=Application
 X-Created-By=@@@Maintainer@@@
 Icon=@@@Icon@@@
-Exec="/opt/apps/@@@Package@@@/files/run.sh"
+Exec="/opt/apps/@@@Package@@@/files/run.sh --uri %u"
 Name=@@@Name@@@
 Comment=@@@Description@@@
 MimeType=
diff --git a/deepin-wine-packager.py b/deepin-wine-packager.py
index 9435217..b809f01 100755
--- a/deepin-wine-packager.py
+++ b/deepin-wine-packager.py
@@ -636,7 +636,7 @@ Description: {e3_text.text()}
                 ["@@@MAINTAINER@@@", e4_text.text()],
                 ["@@@DESCRIPTION@@@", e3_text.text()],
                 ["@@@DESKTOP_EXEC@@@", 
-                 f'''"/opt/apps/{e1_text.text()}/files/run.sh" {command}'''],
+                 f'''"/opt/apps/{e1_text.text()}/files/run.sh" {command} %u'''],
                 ["@@@DESKTOP_NAME@@@", iconUiList[0][3].text()],
                 ["@@@DESKTOP_MIMETYPE@@@", iconUiList[0][5].text()],
                 ["@@@DESKTOP_CATEGORIES@@@", iconUiList[0][1].currentText()]

From 1fe4ed75f4144b4f5335f3ef3ec1657c51f0336a Mon Sep 17 00:00:00 2001
From: shenmo <jifengshenmo@outlook.com>
Date: Mon, 4 Nov 2024 08:19:01 +0800
Subject: [PATCH 3/6] fix: Can not pass args to exe without --uri Chore: Bump
 version to 4.1.1.1

---
 deepin-wine-packager.py         | 2 +-
 package-script/information.json | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/deepin-wine-packager.py b/deepin-wine-packager.py
index b809f01..f8198d2 100755
--- a/deepin-wine-packager.py
+++ b/deepin-wine-packager.py
@@ -620,7 +620,7 @@ Description: {e3_text.text()}
             if iconUiList[0][2].text().replace(" ", "") == "":
                 command = f"--uri {iconUiList[0][2].text()}"
             else:
-                command = iconUiList[0][2].text()
+                command = f"--uri {iconUiList[0][2].text()}" # 若要传参进入wine容器,必须--uri,否则是传给run.sh的
             replaceMap = [
                 ["@@@BOTTLENAME@@@", e5_text.text()],
                 ["@@@APPVER@@@", e2_text.text()],
diff --git a/package-script/information.json b/package-script/information.json
index 77dfcd5..dc77ce3 100755
--- a/package-script/information.json
+++ b/package-script/information.json
@@ -1,5 +1,5 @@
 {
-    "Version": "4.1.1.0",
+    "Version": "4.1.1.1",
     "Time": "未知",
     "Thank": [
         "感谢 @り哥拽的冇气质° 和 @杨 提供了 3a5000(新世界的测试机器)",

From 3fe1ff8a61278bc186f2e20f8a18db82a63a3b15 Mon Sep 17 00:00:00 2001
From: shenmo <jifengshenmo@outlook.com>
Date: Mon, 4 Nov 2024 08:26:29 +0800
Subject: [PATCH 4/6] fix: i18n fail on GXDE

---
 .../applications/spark-deepin-wine-package-builder.desktop      | 2 +-
 .../spark-deepin-wine-packager-easy-builder.desktop             | 2 +-
 .../applications/spark-deepin-wine-packager-with-script.desktop | 2 +-
 .../applications/spark-deepin-wine-runner-control-vm.desktop    | 2 +-
 .../applications/spark-deepin-wine-runner-start-vm.desktop      | 2 +-
 deb/usr/share/applications/spark-deepin-wine-runner.desktop     | 2 +-
 6 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/deb/usr/share/applications/spark-deepin-wine-package-builder.desktop b/deb/usr/share/applications/spark-deepin-wine-package-builder.desktop
index cb4fe1a..93791e0 100644
--- a/deb/usr/share/applications/spark-deepin-wine-package-builder.desktop
+++ b/deb/usr/share/applications/spark-deepin-wine-package-builder.desktop
@@ -4,7 +4,7 @@ X-Categories=System;Wine;
 Exec=/usr/bin/deepin-wine-package-builder "~/.wine" %F
 Icon=/opt/apps/deepin-wine-runner/deepin-wine-runner.svg
 Name=Wine Package Builder
-Name[zh]=Wine 打包器
+Name[zh_CN]=Wine 打包器
 Terminal=false
 StartupNotify=true
 NoDisplay=true
diff --git a/deb/usr/share/applications/spark-deepin-wine-packager-easy-builder.desktop b/deb/usr/share/applications/spark-deepin-wine-packager-easy-builder.desktop
index 4d5909b..f128a4a 100644
--- a/deb/usr/share/applications/spark-deepin-wine-packager-easy-builder.desktop
+++ b/deb/usr/share/applications/spark-deepin-wine-packager-easy-builder.desktop
@@ -4,7 +4,7 @@ X-Categories=System;Wine;
 Exec=/usr/bin/deepin-wine-packager-easy-builder %F
 Icon=/opt/apps/deepin-wine-runner/deepin-wine-runner.svg
 Name=Wine Package Builder
-Name[zh]=Wine 简易打包器
+Name[zh_CN]=Wine 简易打包器
 Terminal=false
 StartupNotify=true
 NoDisplay=true
diff --git a/deb/usr/share/applications/spark-deepin-wine-packager-with-script.desktop b/deb/usr/share/applications/spark-deepin-wine-packager-with-script.desktop
index e67f51c..7e0f2ef 100644
--- a/deb/usr/share/applications/spark-deepin-wine-packager-with-script.desktop
+++ b/deb/usr/share/applications/spark-deepin-wine-packager-with-script.desktop
@@ -5,6 +5,6 @@ Exec=/usr/bin/deepin-wine-packager-with-script
 Icon=/opt/apps/deepin-wine-runner/deepin-wine-runner.svg
 Name=Wine Package Builder For UOS
 NoDisplay=true
-Name[zh]=Wine 打包器(基于活动脚本)
+Name[zh_CN]=Wine 打包器(基于活动脚本)
 Terminal=false
 StartupNotify=true
diff --git a/deb/usr/share/applications/spark-deepin-wine-runner-control-vm.desktop b/deb/usr/share/applications/spark-deepin-wine-runner-control-vm.desktop
index 35eacdc..6b4a0d5 100644
--- a/deb/usr/share/applications/spark-deepin-wine-runner-control-vm.desktop
+++ b/deb/usr/share/applications/spark-deepin-wine-runner-control-vm.desktop
@@ -4,7 +4,7 @@ X-Categories=System;Wine;
 Exec=/opt/apps/deepin-wine-runner/RunVM.sh %F
 Icon=/opt/apps/deepin-wine-runner/deepin-wine-runner.svg
 Name=Setting VirtualMachine
-Name[zh]=设置 Windows 虚拟机
+Name[zh_CN]=设置 Windows 虚拟机
 NoDisplay=true
 Terminal=false
 StartupNotify=true
diff --git a/deb/usr/share/applications/spark-deepin-wine-runner-start-vm.desktop b/deb/usr/share/applications/spark-deepin-wine-runner-start-vm.desktop
index 1271f09..2342505 100644
--- a/deb/usr/share/applications/spark-deepin-wine-runner-start-vm.desktop
+++ b/deb/usr/share/applications/spark-deepin-wine-runner-start-vm.desktop
@@ -4,6 +4,6 @@ X-Categories=System;
 Exec=/opt/apps/deepin-wine-runner/StartVM.sh %F
 Icon=/opt/apps/deepin-wine-runner/deepin-wine-runner.svg
 Name=Start Windows VirtualMachine
-Name[zh]=开启 Windows 虚拟机
+Name[zh_CN]=开启 Windows 虚拟机
 Terminal=false
 StartupNotify=true
diff --git a/deb/usr/share/applications/spark-deepin-wine-runner.desktop b/deb/usr/share/applications/spark-deepin-wine-runner.desktop
index af220ee..b0551ea 100644
--- a/deb/usr/share/applications/spark-deepin-wine-runner.desktop
+++ b/deb/usr/share/applications/spark-deepin-wine-runner.desktop
@@ -4,7 +4,7 @@ X-Categories=System;Wine;
 Exec=/usr/bin/deepin-wine-runner %F
 Icon=/opt/apps/deepin-wine-runner/deepin-wine-runner.svg
 Name=Wine Runner
-Name[zh]=Wine 运行器
+Name[zh_CN]=Wine 运行器
 Terminal=false
 StartupNotify=true
 Keywords=exe;scr;

From 0d0438bdddfa92e193ec810c042fa9ebdad3b828 Mon Sep 17 00:00:00 2001
From: shenmo <jifengshenmo@outlook.com>
Date: Mon, 4 Nov 2024 04:44:46 +0000
Subject: [PATCH 5/6] bump version to 4112

Signed-off-by: shenmo <jifengshenmo@outlook.com>
---
 information.json                | 2 +-
 package-script/information.json | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/information.json b/information.json
index dc77ce3..b9194f7 100755
--- a/information.json
+++ b/information.json
@@ -1,5 +1,5 @@
 {
-    "Version": "4.1.1.1",
+    "Version": "4.1.1.2",
     "Time": "未知",
     "Thank": [
         "感谢 @り哥拽的冇气质° 和 @杨 提供了 3a5000(新世界的测试机器)",
diff --git a/package-script/information.json b/package-script/information.json
index dc77ce3..b9194f7 100755
--- a/package-script/information.json
+++ b/package-script/information.json
@@ -1,5 +1,5 @@
 {
-    "Version": "4.1.1.1",
+    "Version": "4.1.1.2",
     "Time": "未知",
     "Thank": [
         "感谢 @り哥拽的冇气质° 和 @杨 提供了 3a5000(新世界的测试机器)",

From 0c4e736b12c1a68bb86df039a457c41c185b63d8 Mon Sep 17 00:00:00 2001
From: shenmo <jifengshenmo@outlook.com>
Date: Mon, 4 Nov 2024 12:51:01 +0800
Subject: [PATCH 6/6] fix: GXDE Deb Installer will install xfce-terminal when
 installing deb

---
 deb/DEBIAN/control | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/deb/DEBIAN/control b/deb/DEBIAN/control
index c53d7b2..79cb486 100755
--- a/deb/DEBIAN/control
+++ b/deb/DEBIAN/control
@@ -18,7 +18,7 @@ Depends: python3,
  python3-requests, 
  python3-pyqt5 | pyqt5, 
  python3-psutil | pypsutil, 
- xfce4-terminal | gxde-terminal | deepin-terminal | mate-terminal | gnome-terminal, 
+ gxde-terminal |xfce4-terminal |  deepin-terminal | mate-terminal | gnome-terminal, 
  python3-dbus, 
  python3-pip | pip, p7zip-full | p7zip-legacy | p7zip, 
  sudo,