aboutsummarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorCodist2020-05-10 18:24:47 +0800
committerCodist2020-05-10 18:24:47 +0800
commitdbd6fa35f72cf8b00b61896ba0c8d0bfc2943902 (patch)
tree54411573af058f898c0e8df8dd39ec2fa0c37f44
parent47e4aa0e0ec80ad7ef55d056022b1e7ef6059927 (diff)
downloadaur-dbd6fa35f72cf8b00b61896ba0c8d0bfc2943902.tar.gz
Optimized switch to deepin-wine
Signed-off-by: Codist <countstarlight@gmail.com>
-rw-r--r--.SRCINFO4
-rw-r--r--PKGBUILD14
-rw-r--r--README.md69
-rw-r--r--deepin-wine-tim.install13
-rwxr-xr-xrun.sh37
5 files changed, 101 insertions, 36 deletions
diff --git a/.SRCINFO b/.SRCINFO
index f03780d35c2d..cde01c35f834 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = deepin-wine-tim
pkgdesc = Tencent TIM (com.qq.office) on Deepin Wine For Archlinux
pkgver = 3.0.0.21315
- pkgrel = 1
+ pkgrel = 2
url = http://tim.qq.com/
install = deepin-wine-tim.install
arch = x86_64
@@ -27,7 +27,7 @@ pkgbase = deepin-wine-tim
source = reg.patch
md5sums = d5c37cb4f960e13111ce24dbc0dd2d58
md5sums = 05ccc6f90f26170c83f00d28628c1e2b
- md5sums = 812b2e77ab9b559278915eeb803a2d9e
+ md5sums = 73930f0bdd8004536ea59d29eb943ad3
md5sums = 79efbcfa58f4f3d539f09ed5951a0899
pkgname = deepin-wine-tim
diff --git a/PKGBUILD b/PKGBUILD
index f96495530fd5..23ab53906b69 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,7 +3,7 @@
pkgname=deepin-wine-tim
pkgver=3.0.0.21315
deepintimver=2.0.0deepin4
-pkgrel=1
+pkgrel=2
pkgdesc="Tencent TIM (com.qq.office) on Deepin Wine For Archlinux"
arch=("x86_64")
url="http://tim.qq.com/"
@@ -18,7 +18,7 @@ source=("$_mirror/pool/non-free/d/deepin.com.qq.office/deepin.com.qq.office_${de
"reg.patch")
md5sums=('d5c37cb4f960e13111ce24dbc0dd2d58'
'05ccc6f90f26170c83f00d28628c1e2b'
- '812b2e77ab9b559278915eeb803a2d9e'
+ '73930f0bdd8004536ea59d29eb943ad3'
'79efbcfa58f4f3d539f09ed5951a0899')
build() {
@@ -46,15 +46,7 @@ package() {
msg "Copying TIM to /opt/deepinwine/apps/Deepin-TIM ..."
install -d "${pkgdir}/opt/deepinwine/apps/Deepin-TIM"
install -m644 "${srcdir}/files.7z" "${pkgdir}/opt/deepinwine/apps/Deepin-TIM/"
+ install -m644 "${srcdir}/reg.patch" "${pkgdir}/opt/deepinwine/apps/Deepin-TIM/"
install -m755 "${srcdir}/run.sh" "${pkgdir}/opt/deepinwine/apps/Deepin-TIM/"
install -m644 "${srcdir}/TIM$pkgver.exe" "${pkgdir}/opt/deepinwine/apps/Deepin-TIM/"
- msg "Printing help info ..."
- echo -e "\033[0;34m=========================提示/INFO==============================="
- echo -e "\033[0;34m* 报告问题(Report issue):"
- echo -e "\033[0;34m https://github.com/countstarlight/deepin-wine-tim-arch/issues"
- echo -e "\033[0;34m* 切换到 'deepin-wine'(Switch to 'deepin-wine'):"
- echo -e "\033[0;34m https://github.com/countstarlight/deepin-wine-tim-arch"
- echo -e "\033[0;34m* 安装包下载(Installation package download):"
- echo -e "\033[0;34m https://github.com/countstarlight/deepin-wine-tim-arch/releases"
- echo -e "\033[0;34m================================================================="
}
diff --git a/README.md b/README.md
index bb3bdbc2a557..037f5811be32 100644
--- a/README.md
+++ b/README.md
@@ -28,11 +28,12 @@ Deepin 打包的 TIM 容器移植到 Archlinux,不依赖 `deepin-wine`,包
- [用安装包安装](#用安装包安装)
- [本地打包安装](#本地打包安装)
- [切换到 `deepin-wine`](#切换到-deepin-wine)
- - [1. 安装 deepin-wine](#1-安装-deepin-wine)
- - [2. 修改 `deepin-wine-tim` 的启动文件](#2-修改-deepin-wine-tim-的启动文件)
- - [3. 对于非 GNOME 桌面(KDE, XFCE等)](#3-对于非-gnome-桌面kde-xfce等)
- - [4. 删除原先的TIM目录](#4-删除原先的tim目录)
- - [5. 修复 `deepin-wine` 字体渲染发虚](#5-修复-deepin-wine-字体渲染发虚)
+ - [自动切换](#自动切换)
+ - [手动切换](#手动切换)
+ - [1. 安装 `deepin-wine`](#1-安装-deepin-wine)
+ - [2. 对于非 GNOME 桌面(KDE, XFCE等)](#2-对于非-gnome-桌面kde-xfce等)
+ - [3. 删除已安装的TIM目录](#3-删除已安装的tim目录)
+ - [4. 修复 `deepin-wine` 字体渲染发虚](#4-修复-deepin-wine-字体渲染发虚)
- [字体](#字体)
- [使用其他字体](#使用其他字体)
- [修复字体模糊](#修复字体模糊)
@@ -103,44 +104,62 @@ sudo pacman -U #下载的包名
## 切换到 `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`。
+原版 `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))的问题,且原版 `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-TIM/run.sh -d
```
-### 2. 修改 `deepin-wine-tim` 的启动文件
+这会安装需要的依赖,移除已安装的TIM目录并回退对注册表文件的修改
-修改如下两个文件中的 `WINE_CMD` 的值:
+切换回 `wine`:
-`/opt/deepinwine/tools/run.sh`
+```bash
+rm ~/.deepinwine/Deepin-TIM/deepin
+```
-`/opt/deepinwine/apps/Deepin-TIM/run.sh`
+如果要卸载自动安装的依赖:
-```diff
--WINE_CMD="wine"
-+WINE_CMD="deepin-wine"
+```bash
+sudo pacman -Rns deepin-wine xsettingsd lib32-freetype2-infinality-ultimate
+```
+
+### 手动切换
+
+#### 1. 安装 `deepin-wine`
+
+```bash
+yay -S deepin-wine
```
-### 3. 对于非 GNOME 桌面(KDE, XFCE等)
+#### 2. 对于非 GNOME 桌面(KDE, XFCE等)
+
+需要安装 `xsettingsd`:
-需要安装 `gnome-settings-daemon`
+根据 [deepin-wine-wechat-arch#36](https://github.com/countstarlight/deepin-wine-wechat-arch/issues/36#issuecomment-612001200),由[Face-Smile](https://github.com/Face-Smile)提供的方法:
```bash
-sudo pacman -Sy gnome-settings-daemon
+sudo pacman -S xsettingsd
```
-并在 `/opt/deepinwine/apps/Deepin-TIM/run.sh` 中加入如下几行:
+
+修改 `/opt/deepinwine/apps/Deepin-TIM/run.sh`:
```diff
+-WINE_CMD="wine"
++WINE_CMD="deepin-wine"
+
RunApp()
{
-+ if [[ -z "$(ps -e | grep -o gsd-xsettings)" ]]
++ if [[ -z "$(ps -e | grep -o xsettingsd)" ]]
+ then
-+ /usr/lib/gsd-xsettings &
++ /usr/bin/xsettingsd &
+ fi
if [ -d "$WINEPREFIX" ]; then
UpdateApp
@@ -149,13 +168,17 @@ sudo pacman -Sy gnome-settings-daemon
**注意:对 `/opt/deepinwine/apps/Deepin-TIM/run.sh` 的修改会在 `deepin-wine-tim` 更新或重装时被覆盖,可以单独拷贝一份作为启动脚本**
-### 4. 删除原先的TIM目录
+#### 3. 删除已安装的TIM目录
```bash
rm -rf ~/.deepinwine/Deepin-TIM
```
-### 5. 修复 `deepin-wine` 字体渲染发虚
+#### 4. 修复 `deepin-wine` 字体渲染发虚
+
+kde桌面参考:[deepin-wine-wechat-arch#36](https://github.com/countstarlight/deepin-wine-wechat-arch/issues/36)
+
+deepin 桌面:
```bash
yay -S lib32-freetype2-infinality-ultimate
diff --git a/deepin-wine-tim.install b/deepin-wine-tim.install
index 76a1ddf51b13..b25162c63398 100644
--- a/deepin-wine-tim.install
+++ b/deepin-wine-tim.install
@@ -1,3 +1,16 @@
+info() {
+ echo -e "\033[0;34m============================提示/INFO==============================="
+ echo -e "* 反馈问题(Report issue):"
+ echo -e " https://github.com/countstarlight/deepin-wine-tim-arch/issues"
+ echo -e "* 切换到 'deepin-wine'(Switch to 'deepin-wine'):"
+ echo -e " https://github.com/countstarlight/deepin-wine-tim-arch"
+ echo -e "* 安装包下载(Installation package download):"
+ echo -e " https://github.com/countstarlight/deepin-wine-tim-arch/releases"
+ echo -e "====================================================================\033[0m"
+}
+post_install() {
+ info
+}
post_upgrade() {
find /home -maxdepth 2 -name ".deepinwine" -exec rm -f \{\}/Deepin-TIM/reinstalled \;
}
diff --git a/run.sh b/run.sh
index 46bf976f4f22..ba5093039139 100755
--- a/run.sh
+++ b/run.sh
@@ -17,6 +17,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()
@@ -93,6 +94,39 @@ CreateBottle()
fi
}
+SwitchToDeepinWine()
+{
+ 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
+ echo -e "\033[0;34mInstalling dependencies ...\033[0m"
+ $PACKAGE_MANAGER -S deepin-wine xsettingsd lib32-freetype2-infinality-ultimate --needed
+ echo -e "\033[0;34mRedeploying app ...\033[0m"
+ if [ -d "$WINEPREFIX" ]; then
+ RemoveApp
+ fi
+ DeployApp
+ echo -e "\033[0;34mReversing the patch ...\033[0m"
+ patch -p1 -R -d ${WINEPREFIX} < $APPDIR/reg.patch
+ echo -e "\033[0;34mCreating flag file '$WINEPREFIX/deepin' ...\033[0m"
+ touch -f $WINEPREFIX/deepin
+ echo -e "\033[0;34mDone.\033[0m"
+}
+
+# Init
+if [ -f "$WINEPREFIX/deepin" ]; then
+ WINE_CMD="deepin-wine"
+ if [[ -z "$(ps -e | grep -o gsd-xsettings)" ]] && [[ -z "$(ps -e | grep -o xsettingsd)" ]]; then
+ /usr/bin/xsettingsd &
+ fi
+fi
+
if [ -z $1 ]; then
RunApp
exit 0
@@ -107,6 +141,9 @@ case $1 in
"-e" | "--remove")
RemoveApp
;;
+ "-d" | "--deepin")
+ SwitchToDeepinWine
+ ;;
"-u" | "--uri")
RunApp $2
;;