aboutsummarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorCodist2019-10-23 21:03:04 +0800
committerCodist2019-10-23 21:03:04 +0800
commit60ee4163c36ddef5c09157a48fe89cdce0c647ca (patch)
tree1624b57e4866ab9d71c682ae4ca5455759f31b06
parent0ce5a876278d2388ae60afa24149f18c4454c4f1 (diff)
downloadaur-60ee4163c36ddef5c09157a48fe89cdce0c647ca.tar.gz
Add switch to deepin-wine to run.sh
Signed-off-by: Codist <countstarlight@gmail.com>
-rw-r--r--.SRCINFO2
-rw-r--r--PKGBUILD2
-rw-r--r--README.md74
-rwxr-xr-xrun.sh33
4 files changed, 93 insertions, 18 deletions
diff --git a/.SRCINFO b/.SRCINFO
index c23d02274dfe..34effc1c927c 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -25,7 +25,7 @@ pkgbase = deepin-wine-wechat
source = reg.patch
md5sums = c66a173fe6817afd898e0061d9eaf42e
md5sums = b41f7944b030d617d0b2e7128a149796
- md5sums = 88abd550ffce483a3f9627d84e4d5e3a
+ md5sums = fde92b4241744fdef161aef98cf8f28a
md5sums = 35626e820e6790c230718b4dad6482f6
pkgname = deepin-wine-wechat
diff --git a/PKGBUILD b/PKGBUILD
index 55937f19ef51..336fd8d17c5c 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -19,7 +19,7 @@ source=("$_mirror/pool/non-free/d/deepin.com.wechat/deepin.com.wechat_${deepinwe
"reg.patch")
md5sums=('c66a173fe6817afd898e0061d9eaf42e'
'b41f7944b030d617d0b2e7128a149796'
- '88abd550ffce483a3f9627d84e4d5e3a'
+ 'fde92b4241744fdef161aef98cf8f28a'
'35626e820e6790c230718b4dad6482f6')
build() {
diff --git a/README.md b/README.md
index 9e41cc26f7c1..7b788a15d61d 100644
--- a/README.md
+++ b/README.md
@@ -27,12 +27,15 @@ Deepin打包的微信(WeChat)容器移植到Archlinux,不依赖`deepin-wine`
- [从AUR安装](#从aur安装)
- [用安装包安装](#用安装包安装)
- [本地打包安装](#本地打包安装)
+- [兼容性记录](#兼容性记录)
- [切换到 `deepin-wine`](#切换到-deepin-wine)
- - [1. 安装 deepin-wine](#1-安装-deepin-wine)
- - [2. 修改 `deepin-wine-wechat` 的启动文件](#2-修改-deepin-wine-wechat-的启动文件)
- - [3. 如果是 GNOME 桌面](#3-如果是-gnome-桌面)
- - [4. 删除原先的微信目录](#4-删除原先的微信目录)
- - [5. 修复 `deepin-wine` 字体渲染发虚](#5-修复-deepin-wine-字体渲染发虚)
+ - [自动切换](#自动切换)
+ - [手动切换](#手动切换)
+ - [1. 安装 deepin-wine](#1-安装-deepin-wine)
+ - [2. 修改 `deepin-wine-wechat` 的启动文件](#2-修改-deepin-wine-wechat-的启动文件)
+ - [3. 对于非 GNOME 桌面(KDE, XFCE等)](#3-对于非-gnome-桌面kde-xfce等)
+ - [4. 删除原先的微信目录](#4-删除原先的微信目录)
+ - [5. 修复 `deepin-wine` 字体渲染发虚](#5-修复-deepin-wine-字体渲染发虚)
- [常见问题](#常见问题)
- [感谢](#感谢)
- [更新日志](#更新日志)
@@ -98,54 +101,93 @@ sudo pacman -U #下载的包名
* 安装完可直接启动
+## 兼容性记录
+
+| 微信版本 | wine版本 | 兼容性 | 备注 | deepin-wine版本 | 兼容性 | 备注 |
+| :------: | :------: | :----: | :----------------: | :-------------: | :----: | :--: |
+| 2.7.1.82 | 4.18-1 | 部分 | 不能使用中文输入法 | | | |
+| 2.7.1.82 | 4.17-1 | 部分 | 不能使用中文输入法 | 2.18_18-2 | 不支持 | 闪退 |
+| 2.6.8.65 | 4.16-1 | 支持 | | 2.18_18-2 | 支持 | |
+
## 切换到 `deepin-wine`
由于原版 `wine` 在 [DDE(Deepin Desktop Environment)](https://www.deepin.org/dde/) 上,存在托盘图标无法响应鼠标事件([deepin-wine-tim-arch#21](https://github.com/countstarlight/deepin-wine-tim-arch/issues/21)),边框穿透显示([deepin-wine-wechat-arch#15](https://github.com/countstarlight/deepin-wine-wechat-arch/issues/15)), 无法截图等问题,且原版 `wine` 尚不能实现保存登录密码等功能,可以选择切换到 `deepin-wine`。
+**注意:切换前先确保 `deepin-wine` 支持**
+
根据 [deepin-wine-wechat-arch#15](https://github.com/countstarlight/deepin-wine-wechat-arch/issues/15#issuecomment-515455845),[deepin-wine-wechat-arch#27](https://github.com/countstarlight/deepin-wine-wechat-arch/issues/27),由 [@feileb](https://github.com/feileb), [@violetbobo](https://github.com/violetbobo), [@HE7086](https://github.com/HE7086)提供的方法:
-### 1. 安装 deepin-wine
+### 自动切换
```bash
-yay -S deepin-wine
+/opt/deepinwine/apps/Deepin-WeChat/run.sh -d
+```
+
+这会安装需要的依赖并移除已安装的微信目录
+
+切换回 `wine`:
+
+```bash
+rm ~/.deepinwine/Deepin-WeChat/deepin
+```
+
+如果要卸载自动安装的依赖:
+
+```bash
+sudo pacman -Rns deepin-wine gnome-settings-daemon lib32-freetype2-infinality-ultimate
```
+### 手动切换
+
+#### 1. 安装 deepin-wine
-### 2. 修改 `deepin-wine-wechat` 的启动文件
+```bash
+yay -S deepin-wine
+```
+
+#### 2. 修改 `deepin-wine-wechat` 的启动文件
修改如下两个文件中的 `WINE_CMD` 的值:
`/opt/deepinwine/apps/Deepin-WeChat/run.sh`
-` /opt/deepinwine/tools/run.sh`
+`/opt/deepinwine/tools/run.sh`
```diff
-WINE_CMD="wine"
+WINE_CMD="deepin-wine"
```
-### 3. 如果是 GNOME 桌面
+#### 3. 对于非 GNOME 桌面(KDE, XFCE等)
需要安装 `gnome-settings-daemon`
```bash
sudo pacman -Sy gnome-settings-daemon
```
-并在 `/opt/deepinwine/apps/Deepin-WeChat/run.sh` 文件开头插入一行
+并在 `/opt/deepinwine/apps/Deepin-WeChat/run.sh` 中加入如下几行:
-```
-/usr/lib/gsd-xsettings &
+```diff
+ RunApp()
+ {
++ if [[ -z "$(ps -e | grep -o gsd-xsettings)" ]]
++ then
++ /usr/lib/gsd-xsettings &
++ fi
+ if [ -d "$WINEPREFIX" ]; then
+ UpdateApp
+ else
```
**注意:对 `/opt/deepinwine/apps/Deepin-WeChat/run.sh` 的修改会在 `deepin-wine-wechat` 更新或重装时被覆盖,可以单独拷贝一份作为启动脚本**
-### 4. 删除原先的微信目录
+#### 4. 删除原先的微信目录
-```
+```bash
rm -rf ~/.deepinwine/Deepin-WeChat
```
-### 5. 修复 `deepin-wine` 字体渲染发虚
+#### 5. 修复 `deepin-wine` 字体渲染发虚
```bash
yay -S lib32-freetype2-infinality-ultimate
diff --git a/run.sh b/run.sh
index 2cc75f7a1bf4..6f4d69db909c 100755
--- a/run.sh
+++ b/run.sh
@@ -4,6 +4,7 @@
#
# Author: Li LongYu <lilongyu@linuxdeepin.com>
# Peng Hao <penghao@linuxdeepin.com>
+# Codist <countstarlight@gmail.com>
WINEPREFIX="$HOME/.deepinwine/Deepin-WeChat"
APPDIR="/opt/deepinwine/apps/Deepin-WeChat"
@@ -18,6 +19,7 @@ HelpApp()
echo " Extra Commands:"
echo " -r/--reset Reset app to fix errors"
echo " -e/--remove Remove deployed app files"
+ echo " -d/--deepin Switch to 'deepin-wine'"
echo " -h/--help Show program help info"
}
CallApp()
@@ -91,6 +93,34 @@ CreateBottle()
fi
}
+SwitchToDeepinWine()
+{
+ if [ -d "$WINEPREFIX" ]; then
+ RemoveApp
+ DeployApp
+ fi
+ PACKAGE_MANAGER="yay"
+ if ! [ -x "$(command -v yay)" ]; then
+ if ! [ -x "$(command -v yaourt)" ]; then
+ echo "Error: Need to install 'yay' or 'yaourt' first." >&2
+ exit 1
+ else
+ $PACKAGE_MANAGER="yaourt"
+ fi
+ fi
+ $PACKAGE_MANAGER -S deepin-wine gnome-settings-daemon lib32-freetype2-infinality-ultimate --needed
+ touch -f $WINEPREFIX/deepin
+ echo "Done."
+}
+
+# Init
+if [ -f "$WINEPREFIX/deepin" ]; then
+ WINE_CMD="deepin-wine"
+ if [[ -z "$(ps -e | grep -o gsd-xsettings)" ]]; then
+ /usr/lib/gsd-xsettings &
+ fi
+fi
+
if [ -z $1 ]; then
RunApp
exit 0
@@ -105,6 +135,9 @@ case $1 in
"-e" | "--remove")
RemoveApp
;;
+ "-d" | "--deepin")
+ SwitchToDeepinWine
+ ;;
"-u" | "--uri")
RunApp $2
;;