Skip to content
This repository has been archived by the owner on Jan 20, 2023. It is now read-only.

Commit

Permalink
Upgrade TIM to 3.3.0.22020 and add deepin-wine5 support.
Browse files Browse the repository at this point in the history
Signed-off-by: Codist <[email protected]>
  • Loading branch information
vufa committed Feb 3, 2021
1 parent 533b07a commit 947dcd1
Show file tree
Hide file tree
Showing 8 changed files with 201 additions and 303 deletions.
20 changes: 10 additions & 10 deletions .SRCINFO
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
pkgbase = deepin-wine-tim
pkgdesc = Tencent TIM (com.qq.office) on Deepin Wine For Archlinux
pkgver = 3.2.0.21856
pkgdesc = Tencent TIM on Deepin Wine5(com.qq.office.deepin) For Archlinux
pkgver = 3.3.0.22020
pkgrel = 1
url = http://tim.qq.com/
url = https://tim.qq.com/
install = deepin-wine-tim.install
arch = x86_64
license = custom
Expand All @@ -21,14 +21,14 @@ pkgbase = deepin-wine-tim
conflicts = wine-tim
conflicts = deepin.com.qq.office
conflicts = deepin-tim-for-arch
source = http://packages.deepin.com/deepin/pool/non-free/d/deepin.com.qq.office/deepin.com.qq.office_2.0.0deepin4_i386.deb
source = https://dldir1.qq.com/qqfile/qq/PCTIM/TIM3.2.0/TIM3.2.0.21856.exe
source = https://community-store-packages.deepin.com/appstore/pool/appstore/c/com.qq.im.deepin/com.qq.im.deepin_9.3.2deepin14_i386.deb
source = https://dldir1.qq.com/qqfile/qq/PCTIM/TIM3.3.0/TIM3.3.0.22020.exe
source = run.sh
source = reg.patch
md5sums = d5c37cb4f960e13111ce24dbc0dd2d58
md5sums = 534c33e25dfa6360f710e5df4f3da1dd
md5sums = dbb4a2773f41c3e7ed56fea650884560
md5sums = d049e1171da0dc82c951b07cc534c39d
source = share.7z
md5sums = e12c4b26c791ca32cdc96e5441341148
md5sums = 07fe0f065594b90673ab28d7388017d4
md5sums = 3dcb24166e65ebbba4ba9a535402b34a
md5sums = 479ae2a04a9c5dcc08c67c7b1395a944

pkgname = deepin-wine-tim

2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
TIM*
deepin.com.qq*
com.qq.*
deepin-wine-tim-*.pkg*
/pkg/
/src/
Expand Down
60 changes: 33 additions & 27 deletions PKGBUILD
Original file line number Diff line number Diff line change
@@ -1,52 +1,58 @@
# Maintainer: Codist <[email protected]>

pkgname=deepin-wine-tim
pkgver=3.2.0.21856
deepintimver=2.0.0deepin4
pkgver=3.3.0.22020
debpkgver=9.3.2deepin14
debpkgname="com.qq.im.deepin"
timpkgname="com.qq.office.deepin"
pkgrel=1
pkgdesc="Tencent TIM (com.qq.office) on Deepin Wine For Archlinux"
pkgdesc="Tencent TIM on Deepin Wine5(${timpkgname}) For Archlinux"
arch=("x86_64")
url="http://tim.qq.com/"
url="https://tim.qq.com/"
license=('custom')
depends=('p7zip' 'wine' 'wine-mono' 'wine-gecko' 'xorg-xwininfo' 'wqy-microhei' 'lib32-alsa-lib' 'lib32-alsa-plugins' 'lib32-libpulse' 'lib32-openal' 'lib32-mpg123' 'lib32-gnutls')
conflicts=('wine-tim' 'deepin.com.qq.office' 'deepin-tim-for-arch')
install="deepin-wine-tim.install"
_mirror="http://packages.deepin.com/deepin"
source=("$_mirror/pool/non-free/d/deepin.com.qq.office/deepin.com.qq.office_${deepintimver}_i386.deb"
"https://dldir1.qq.com/qqfile/qq/PCTIM/TIM3.2.0/TIM${pkgver}.exe"
_mirror="https://community-store-packages.deepin.com"
source=("$_mirror/appstore/pool/appstore/c/${debpkgname}/${debpkgname}_${debpkgver}_i386.deb"
"https://dldir1.qq.com/qqfile/qq/PCTIM/TIM3.3.0/TIM${pkgver}.exe"
"run.sh"
"reg.patch")
md5sums=('d5c37cb4f960e13111ce24dbc0dd2d58'
'534c33e25dfa6360f710e5df4f3da1dd'
'dbb4a2773f41c3e7ed56fea650884560'
'd049e1171da0dc82c951b07cc534c39d')
"share.7z")
md5sums=('e12c4b26c791ca32cdc96e5441341148'
'07fe0f065594b90673ab28d7388017d4'
'3dcb24166e65ebbba4ba9a535402b34a'
'479ae2a04a9c5dcc08c67c7b1395a944')

build() {
msg "Extracting DPKG package ..."
mkdir -p "${srcdir}/dpkgdir"
tar -xvf data.tar.xz -C "${srcdir}/dpkgdir"
sed "s/\(Categories.*$\)/\1Network;/" -i "${srcdir}/dpkgdir/usr/share/applications/deepin.com.qq.office.desktop"
sed "13s/TIM.exe/tim.exe/" -i "${srcdir}/dpkgdir/usr/share/applications/deepin.com.qq.office.desktop"
msg "Extracting Deepin Wine TIM archive ..."
7z x -aoa "${srcdir}/dpkgdir/opt/deepinwine/apps/Deepin-TIM/files.7z" -o"${srcdir}/deepintimdir"
msg "Removing original outdated TIM directory ..."
rm -r "${srcdir}/deepintimdir/drive_c/Program Files/Tencent/TIM"
msg "Patching reg files ..."
patch -p1 -d "${srcdir}/deepintimdir/" < "${srcdir}/reg.patch"
#sed "s/\(Categories.*$\)/\1Network;/" -i "${srcdir}/dpkgdir/usr/share/applications/deepin.com.qq.office.desktop"
#sed "13s/TIM.exe/tim.exe/" -i "${srcdir}/dpkgdir/usr/share/applications/deepin.com.qq.office.desktop"
msg "Extracting Deepin Wine QQ archive ..."
7z x -aoa "${srcdir}/dpkgdir/opt/apps/${debpkgname}/files/files.7z" -o"${srcdir}/deepintimdir"
msg "Cleaning up the original package directory ..."
rm -r "${srcdir}/deepintimdir/drive_c/Program Files/Tencent/QQ"
#msg "Patching reg files ..."
#patch -p1 -d "${srcdir}/deepintimdir/" < "${srcdir}/reg.patch"
msg "Creating font file link ..."
ln -sf "/usr/share/fonts/wenquanyi/wqy-microhei/wqy-microhei.ttc" "${srcdir}/deepintimdir/drive_c/windows/Fonts/wqy-microhei.ttc"
msg "Copying latest TIM installer to ${srcdir}/deepintimdir/drive_c/Program Files/Tencent/ ..."
install -m644 "${srcdir}/TIM${pkgver}.exe" "${srcdir}/deepintimdir/drive_c/Program Files/Tencent/"
msg "Repackaging app archive ..."
7z a -t7z -r "${srcdir}/files.7z" "${srcdir}/deepintimdir/*"
}

package() {
msg "Preparing icons ..."
install -d "${pkgdir}/usr/share"
cp -a ${srcdir}/dpkgdir/usr/share/* "${pkgdir}/usr/share/"
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/"
7z x -aoa "${srcdir}/share.7z" -o"${srcdir}/"
cp -a ${srcdir}/share/* "${pkgdir}/usr/share/"
msg "Copying deepin files ..."
install -d "${pkgdir}/opt/apps/${timpkgname}/files"
install -m644 "${srcdir}/files.7z" "${pkgdir}/opt/apps/${timpkgname}/files/"
cp ${srcdir}/dpkgdir/opt/apps/${debpkgname}/files/helper_archive* "${pkgdir}/opt/apps/${timpkgname}/files/"
install -m755 "${srcdir}/dpkgdir/opt/apps/${debpkgname}/files/gtkGetFileNameDlg" "${pkgdir}/opt/apps/${timpkgname}/files/"
md5sum "${srcdir}/files.7z" | awk '{ print $1 }' > "${pkgdir}/opt/apps/${timpkgname}/files/files.md5sum"
install -m755 "${srcdir}/run.sh" "${pkgdir}/opt/apps/${timpkgname}/files/"
}
127 changes: 58 additions & 69 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<img src="https://travis-ci.org/countstarlight/deepin-wine-tim-arch.svg?branch=master" alt="Build Status">
</a>
<a href="https://office.qq.com/download.html">
<img src="https://img.shields.io/badge/TIM-3.2.0.21856-blue.svg" alt="TIM Version">
<img src="https://img.shields.io/badge/TIM-3.3.0.22020-blue.svg" alt="TIM Version">
</a>
<a href="https://aur.archlinux.org/packages/deepin-wine-tim/">
<img src="https://img.shields.io/aur/version/deepin-wine-tim.svg" alt="AUR Version">
Expand All @@ -19,22 +19,20 @@
</a>
</p>

Deepin 打包的 TIM 容器移植到 Archlinux,不依赖 `deepin-wine`,包含定制的注册表配置,TIM 安装包替换为官方最新
Deepin 打包的 QQ 容器移植到 Archlinux,QQ 环境替换为 TIM,不依赖 `deepin-wine`,包含定制的注册表配置,TIM 安装包为官方最新

<!-- TOC -->

- [安装](#安装)
- [从AUR安装](#从aur安装)
- [用安装包安装](#用安装包安装)
- [本地打包安装](#本地打包安装)
- [设置](#设置)
- [兼容性记录](#兼容性记录)
- [切换到 `deepin-wine`](#切换到-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-字体渲染发虚)
- [`deepin-wine 2.x` 迁移](#从-deepin-wine-2x-迁移)
- [卸载](#卸载)
- [常见问题及解决](#常见问题及解决)
- [不能记住密码](#不能记住密码)
- [网络连接状态改变后不能重连](#网络连接状态改变后不能重连)
Expand Down Expand Up @@ -69,15 +67,15 @@ Deepin 打包的 TIM 容器移植到 Archlinux,不依赖 `deepin-wine`,包

### 从AUR安装

已添加到 AUR [deepin-wine-tim](https://aur.archlinux.org/packages/deepin-wine-tim/),使用 `yay` 安装(如未安装 `yay`,请先 `pacman -S yay` 进行安装)
已添加到 AUR [deepin-wine-tim](https://aur.archlinux.org/packages/deepin-wine-tim/),使用 `yay` 安装:

```shell
yay -S deepin-wine-tim
```

### 用安装包安装

> [Travis CI](https://travis-ci.org/countstarlight/deepin-wine-tim-arch) 在 Docker 容器 [mikkeloscar/arch-travis](https://hub.docker.com/r/mikkeloscar/arch-travis) 中自动构建的 ArchLinux 安装包
> [Travis CI](https://travis-ci.org/countstarlight/deepin-wine-tim-arch) 在 Docker 容器 [countstarlight/arch-travis](https://hub.docker.com/r/countstarlight/arch-travis) 中自动构建的 ArchLinux 安装包
[GitHub Release](https://github.com/countstarlight/deepin-wine-tim-arch/releases) 页面下载后缀为 `.pkg.tar.xz``.pkg.tar.zst` 的安装包,使用`pacman`安装:

Expand All @@ -103,20 +101,38 @@ md5sum -c *.md5

用上述三种安装方式之一安装完成后,运行应用菜单中创建的 TIM 快捷方式,首次运行会用 TIM 的安装包进行安装

**注意:安装 TIM 时不需要修改安装路径,如果修改默认路径,要对应修改 `deepin-wine-tim` 的启动脚本(`/opt/deepinwine/apps/Deepin-TIM/run.sh`):**
**注意:安装 TIM 时不需要修改安装路径,如果修改默认路径,要对应修改 `deepin-wine-tim` 的启动脚本(`/opt/apps/com.qq.office.deepin/files/run.sh`):**

```bash
env WINEPREFIX="$WINEPREFIX" WINEDEBUG=-msvcrt $WINE_CMD "c:\\Program Files\\Tencent\\TIM\\Bin\\TIM.exe" &
EXEC_PATH="c:/Program Files/Tencent/TIM/Bin/TIM.exe"
```
改为修改后的安装路径,否则只有安装后第一次能够运行

**NOTE: 前几次运行时可能会提示 "qq安全组件异常",等一会再运行或重启一下系统**

## 设置

> dpi,目录映射等可以在 `winecfg` 进行设置
如果使用默认的 `wine`,打开 `winecfg` 的命令为:

```bash
env WINEPREFIX="$HOME/.deepinwine/Deepin-TIM" winecfg
```

如果已经[切换到 `deepin-wine`](#切换到-deepin-wine),打开 `winecfg` 的命令为:

```bash
env WINEPREFIX="$HOME/.deepinwine/Deepin-TIM" deepin-wine5 winecfg
```

## 兼容性记录

| TIM | wine | 兼容性 | 备注 | deepin-wine | 兼容性 | 备注 |
| :---------: | :--: | :--------: | :------: | :---------: | :----: | :--: |
| 3.2.0.21856 | 5.18 | **不支持** | 无法启动 | 2.18_24-3 | 支持 | |
| 3.1.0.21789 | 5.16 | 支持 | | 2.18_24-3 | 支持 | |
| TIM | wine | 兼容性 | 备注 | deepin-wine | 兼容性 | 备注 |
| :---------: | :--: | :--------: | :--------------------------: | :---------: | :----: | :--: |
| 3.3.0.22020 | 6.1 | 部分 | 部分字体显示为方框且性能较差 | 5.0.16-1 | 支持 | |
| 3.2.0.21856 | 5.18 | **不支持** | 无法启动 | 2.18_24-3 | 支持 | |
| 3.1.0.21789 | 5.16 | 支持 | | 2.18_24-3 | 支持 | |

## 切换到 `deepin-wine`

Expand All @@ -129,77 +145,56 @@ env WINEPREFIX="$WINEPREFIX" WINEDEBUG=-msvcrt $WINE_CMD "c:\\Program Files\\Ten
### 自动切换(推荐)

```bash
/opt/deepinwine/apps/Deepin-TIM/run.sh -d
/opt/apps/com.qq.office.deepin/files/run.sh -d
```

这会安装需要的依赖,移除已安装的 TIM 目录并回退对注册表文件的修改

切换回 `wine`
> `v3.3.0.22020-1` 开始,该命令会切换到 AUR 仓库:[deepin-wine5](https://aur.archlinux.org/packages/deepin-wine5)
```bash
rm ~/.deepinwine/Deepin-TIM/deepin
```

如果要卸载自动安装的依赖
如果想切换回 `wine`

```bash
sudo pacman -Rns deepin-wine xsettingsd lib32-freetype2-infinality-ultimate
rm $HOME/.deepinwine/Deepin-TIM/deepin
```

### 手动切换

#### 1. 安装 `deepin-wine`
如果要卸载自动安装的依赖:

```bash
yay -S deepin-wine
sudo pacman -Rns deepin-wine5
```

#### 2. 对于非 GNOME 桌面(KDE, XFCE等)

> 根据 [deepin-wine-wechat-arch#36](https://github.com/countstarlight/deepin-wine-wechat-arch/issues/36#issuecomment-612001200),由[Face-Smile](https://github.com/Face-Smile)提供的方法
### `deepin-wine 2.x` 迁移

需要安装 `xsettingsd`
若之前使用的是 `deepin-wine 2.x`,更新到 `deepin-wine-tim v3.3.0.22020-1` 及之后的版本会自动切换回 `wine`,运行命令

```bash
sudo pacman -S xsettingsd
/opt/apps/com.qq.office.deepin/files/run.sh -d
```

修改 `/opt/deepinwine/apps/Deepin-TIM/run.sh`
就会自动安装并切换到 `deepin-wine5`

```diff
-WINE_CMD="wine"
+WINE_CMD="deepin-wine"

RunApp()
{
+ if [[ -z "$(ps -e | grep -o xsettingsd)" ]]
+ then
+ /usr/bin/xsettingsd &
+ fi
if [ -d "$WINEPREFIX" ]; then
UpdateApp
else
```

**注意:对 `/opt/deepinwine/apps/Deepin-TIM/run.sh` 的修改会在 `deepin-wine-tim` 更新或重装时被覆盖,可以单独拷贝一份作为启动脚本**

#### 3. 删除已安装的TIM目录
若此时没有其他应用在使用旧版 `deepin-wine`,就可以放心的卸载旧版 `deepin-wine` 及其依赖:

```bash
rm -rf ~/.deepinwine/Deepin-TIM
sudo pacman -S lib32-freetype2 #用原版替换lib32-freetype2-infinality-ultimate
sudo pacman -Rns deepin-wine xsettingsd
```

#### 4. 修复 `deepin-wine` 字体渲染发虚
**注意:切换到 `deepin-wine` 后,对 `wine` 的修改,如更改dpi,都改为对 `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
sudo pacman -Rns deepin-wine-tim
```

**注意:切换到 `deepin-wine` 后,对 `wine` 的修改,如更改dpi,都改为对 `deepin-wine` 的修改**
卸载的同时会删除用户目录下的整个 `WINEPREFIX` 环境,路径为:`~/.deepinwine/Deepin-TIM`

TIM在本地保存的数据不会被删除,如保存在用户文档下的数据(默认:`~/Documents/Tencent Files`)

## 常见问题及解决

Expand All @@ -213,19 +208,7 @@ yay -S lib32-freetype2-infinality-ultimate

### 高分辨率屏幕支持

`winecfg` 的Graphics选项卡中修改dpi,如 修改为`192`

对于 `wine`

```bash
env WINEPREFIX="$HOME/.deepinwine/Deepin-TIM" winecfg
```

对于 `deepin-wine`

```bash
env WINEPREFIX="$HOME/.deepinwine/Deepin-TIM" deepin-wine winecfg
```
参照[设置](#设置)打开 `winecfg` ,在选项卡 `Graphics` 中修改dpi,如 修改为`192`

### GNOME 桌面上的悬浮窗口问题

Expand All @@ -250,6 +233,12 @@ env WINEPREFIX="$HOME/.deepinwine/Deepin-TIM" deepin-wine winecfg
## 更新日志

<details open>
<summary>2021</summary>

* 2021-02-03 TIM-3.3.0.22020 com.qq.im.deepin_9.3.2deepin14

</details>
<details>
<summary>2020</summary>

* 2020-09-30 TIM-3.2.0.21856
Expand Down
2 changes: 1 addition & 1 deletion deepin-wine-tim.install
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ 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 "* 切换到 'deepin-wine5'(Switch to 'deepin-wine5'):"
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"
Expand Down
Loading

0 comments on commit 947dcd1

Please sign in to comment.