aboutsummarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorCountStarlight2019-01-03 17:48:46 +0800
committerCountStarlight2019-01-03 17:48:46 +0800
commit1f9700200a8cf00b4977538b22b1251e635a207f (patch)
tree16902df970b28e9c51f814879522a8f588b506f1
downloadaur-1f9700200a8cf00b4977538b22b1251e635a207f.tar.gz
WeChat 2.6.2
Signed-off-by: CountStarlight <countstarlight@gmail.com>
-rw-r--r--.SRCINFO33
-rw-r--r--.gitignore5
-rw-r--r--PKGBUILD51
-rw-r--r--README.md54
-rwxr-xr-xclean.sh2
-rw-r--r--deepin-wine-wechat.install7
-rwxr-xr-xgen.sh2
-rw-r--r--reg_files.tar.bz2bin0 -> 193047 bytes
-rwxr-xr-xrun.sh110
-rw-r--r--update.policy33
10 files changed, 297 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..dba5f1faf53d
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,33 @@
+pkgbase = deepin-wine-wechat
+ pkgdesc = Tencent WeChat (com.wechat) on Deepin Wine For Archlinux
+ pkgver = 2.6.2
+ pkgrel = 0
+ url = https://weixin.qq.com/
+ install = deepin-wine-wechat.install
+ arch = x86_64
+ license = custom
+ depends = p7zip
+ depends = wine
+ depends = wine-mono
+ depends = wine_gecko
+ depends = xorg-xwininfo
+ depends = xdotool
+ depends = wqy-microhei
+ depends = adobe-source-han-sans-cn-fonts
+ depends = lib32-alsa-lib
+ depends = lib32-alsa-plugins
+ depends = lib32-libpulse
+ depends = lib32-openal
+ depends = lib32-mpg123
+ conflicts = deepin-wechat
+ source = https://mirrors.ustc.edu.cn/deepin/pool/non-free/d/deepin.com.wechat/deepin.com.wechat_2.6.2.31deepin0_i386.deb
+ source = run.sh
+ source = reg_files.tar.bz2
+ source = update.policy
+ md5sums = c66a173fe6817afd898e0061d9eaf42e
+ md5sums = 8a47e1c10ff08a9592fbb5a76dc69982
+ md5sums = ebde755e3bd213550f5ccc69d3192060
+ md5sums = a66646b473a3fbad243ac1afd64da07a
+
+pkgname = deepin-wine-wechat
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..687399ddcda4
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,5 @@
+.directory
+deepin.com.wechat*
+deepin-wine-wechat-*.tar.xz
+pkg/
+src/
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..71b0da7d6d39
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,51 @@
+# Maintainer: CountStarlight <countstarlight@gmail.com>
+
+pkgname=deepin-wine-wechat
+pkgver=2.6.2
+deepinwechatver=2.6.2.31deepin0
+pkgrel=0
+pkgdesc="Tencent WeChat (com.wechat) on Deepin Wine For Archlinux"
+arch=("x86_64")
+url="https://weixin.qq.com/"
+license=('custom')
+depends=('p7zip' 'wine' 'wine-mono' 'wine_gecko' 'xorg-xwininfo' 'xdotool' 'wqy-microhei' 'adobe-source-han-sans-cn-fonts' 'lib32-alsa-lib' 'lib32-alsa-plugins' 'lib32-libpulse' 'lib32-openal' 'lib32-mpg123')
+conflicts=('deepin-wechat')
+install="deepin-wine-wechat.install"
+_mirror="https://mirrors.ustc.edu.cn/deepin"
+source=("$_mirror/pool/non-free/d/deepin.com.wechat/deepin.com.wechat_${deepinwechatver}_i386.deb"
+ "run.sh"
+ "reg_files.tar.bz2"
+ "update.policy")
+md5sums=('c66a173fe6817afd898e0061d9eaf42e'
+ '8a47e1c10ff08a9592fbb5a76dc69982'
+ 'ebde755e3bd213550f5ccc69d3192060'
+ 'a66646b473a3fbad243ac1afd64da07a')
+
+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.wechat.desktop"
+ msg "Extracting Deepin Wine WeChat archive ..."
+ 7z x -aoa "${srcdir}/dpkgdir/opt/deepinwine/apps/Deepin-WeChat/files.7z" -o"${srcdir}/deepinwechatdir"
+ msg "Adding config files and fonts"
+ tar -jxvf reg_files.tar.bz2 -C "${srcdir}/"
+ cp userdef.reg "${srcdir}/deepinwechatdir/userdef.reg"
+ cp system.reg "${srcdir}/deepinwechatdir/system.reg"
+ cp update.policy "${srcdir}/deepinwechatdir/update.policy"
+ cp user.reg "${srcdir}/deepinwechatdir/user.reg"
+ ln -sf "/usr/share/fonts/wenquanyi/wqy-microhei/wqy-microhei.ttc" "${srcdir}/deepinwechatdir/drive_c/windows/Fonts/wqy-microhei.ttc"
+ ln -sf "/usr/share/fonts/adobe-source-han-sans/SourceHanSansCN-Medium.otf" "${srcdir}/deepinwechatdir/drive_c/windows/Fonts/SourceHanSansCN-Medium.otf"
+ msg "Repackaging app archive ..."
+ 7z a -t7z -r "${srcdir}/files.7z" "${srcdir}/deepinwechatdir/*"
+}
+
+package() {
+ msg "Preparing icons ..."
+ install -d "${pkgdir}/usr/share"
+ cp -a ${srcdir}/dpkgdir/usr/share/* "${pkgdir}/usr/share/"
+ msg "Copying WeChat to /opt/deepinwine/apps/Deepin-WeChat ..."
+ install -d "${pkgdir}/opt/deepinwine/apps/Deepin-WeChat"
+ install -m644 "${srcdir}/files.7z" "${pkgdir}/opt/deepinwine/apps/Deepin-WeChat/"
+ install -m755 "${srcdir}/run.sh" "${pkgdir}/opt/deepinwine/apps/Deepin-WeChat/"
+}
diff --git a/README.md b/README.md
new file mode 100644
index 000000000000..d5a106fcddf9
--- /dev/null
+++ b/README.md
@@ -0,0 +1,54 @@
+# 在Archlinux及衍生发行版上运行微信(WeChat)
+
+Deepin打包的微信(WeChat)容器移植到Archlinux
+
+感谢:
+
+* [Wuhan Deepin Technology Co.,Ltd.](http://www.deepin.org/)
+
+**注意:**微信最新版本是2.6.6(2019.1.3),经测试能正常运行,但不能固定下载的版本(下载文件名都是WeChatSetup,不能确定下载到的是2.6.6还是更新的版本,也没有找到提供历史版本下载),所以还是直接使用deepin官方打包的2.6.2版本。
+
+* 存在如下问题:
+ * 1.不能视频通话
+ * 2.不能截图(微信2.6.2和最新的2.6.6,2019.1.3)
+ * 3.请用[issue](https://github.com/countstarlight/deepin-wine-wechat-arch/issues)反馈给我
+
+## 安装
+
+`deepin-wine-wechat`依赖`Multilib`仓库中的`wine`,`wine_gecko`和`wine-mono`,Archlinux默认没有开启`Multilib`仓库,需要编辑`/etc/pacman.conf`,取消对应行前面的注释([Archlinux wiki](https://wiki.archlinux.org/index.php/Official_repositories#multilib)):
+
+```diff
+# If you want to run 32 bit applications on your x86_64 system,
+# enable the multilib repositories as required here.
+
+#[multilib-testing]
+#Include = /etc/pacman.d/mirrorlist
+
+-#[multilib]
+-#Include = /etc/pacman.d/mirrorlist
++[multilib]
++Include = /etc/pacman.d/mirrorlist
+```
+
+* 1.已添加到AUR [deepin-wine-wechat](https://aur.archlinux.org/packages/deepin-wine-wechat/),可直接安装:
+```shell
+yaourt deepin-wine-wechat
+```
+
+* 2.手动安装
+
+```shell
+ git clone https://github.com/countstarlight/deepin-wine-wechat-arch.git
+
+ cd deepin-wine-wechat-arch
+
+ makepkg -si
+```
+
+* 运行开始菜单中创建的WeChat,点击运行
+* 默认使用文泉驿微米黑(`wqy-microhei`)字体,要使用其他字体,如 微软雅黑或者微软宋体放进`~/.deepinwine/Deepin-TIM/drive_c/windows/Fonts`中。
+## 常见问题
+* 1.在 2k/4k 屏幕下字体和图标都非常小, 参见[issue1](https://github.com/countstarlight/deepin-wine-tim-arch/issues/1)
+* 2.使用全局截图快捷键和解决Gnome上窗口化问题,参见[issue2](https://github.com/countstarlight/deepin-wine-tim-arch/issues/2)
+## 更新日志
+* 2019-01-03 WeChat-2.6.2 \ No newline at end of file
diff --git a/clean.sh b/clean.sh
new file mode 100755
index 000000000000..eed5376fa004
--- /dev/null
+++ b/clean.sh
@@ -0,0 +1,2 @@
+#!/bin/sh
+git clean -xfd
diff --git a/deepin-wine-wechat.install b/deepin-wine-wechat.install
new file mode 100644
index 000000000000..5b8b1f2b7c1e
--- /dev/null
+++ b/deepin-wine-wechat.install
@@ -0,0 +1,7 @@
+post_upgrade() {
+ find /home -maxdepth 2 -name ".deepinwine" -exec rm -f \{\}/Deepin-WeChat/reinstalled \;
+}
+pre_remove() {
+ echo "deleting the WeChat bottle..."
+ find /home -maxdepth 2 -name ".deepinwine" -exec rm -rf \{\}/Deepin-WeChat/ \;
+}
diff --git a/gen.sh b/gen.sh
new file mode 100755
index 000000000000..8c19586bb6e4
--- /dev/null
+++ b/gen.sh
@@ -0,0 +1,2 @@
+#!/bin/sh
+makepkg --printsrcinfo > .SRCINFO
diff --git a/reg_files.tar.bz2 b/reg_files.tar.bz2
new file mode 100644
index 000000000000..d890779e19b1
--- /dev/null
+++ b/reg_files.tar.bz2
Binary files differ
diff --git a/run.sh b/run.sh
new file mode 100755
index 000000000000..1128682c0930
--- /dev/null
+++ b/run.sh
@@ -0,0 +1,110 @@
+#!/bin/sh
+
+# Copyright (C) 2016 Deepin, Inc.
+#
+# Author: Li LongYu <lilongyu@linuxdeepin.com>
+# Peng Hao <penghao@linuxdeepin.com>
+
+WINEPREFIX="$HOME/.deepinwine/Deepin-WeChat"
+APPDIR="/opt/deepinwine/apps/Deepin-WeChat"
+APPVER="2.6.2.31deepin0"
+APPTAR="files.7z"
+PACKAGENAME="com.wechat"
+WINE_CMD="wine"
+
+HelpApp()
+{
+ echo " Extra Commands:"
+ echo " -r/--reset Reset app to fix errors"
+ echo " -e/--remove Remove deployed app files"
+ echo " -h/--help Show program help info"
+}
+CallApp()
+{
+ env WINEPREFIX="$WINEPREFIX" WINEDEBUG=-msvcrt $WINE_CMD "c:\\Program Files\\Tencent\\WeChat\\WeChat.exe" &
+}
+ExtractApp()
+{
+ mkdir -p "$1"
+ 7z x "$APPDIR/$APPTAR" -o"$1"
+ mv "$1/drive_c/users/@current_user@" "$1/drive_c/users/$USER"
+ sed -i "s#@current_user@#$USER#" $1/*.reg
+}
+DeployApp()
+{
+ ExtractApp "$WINEPREFIX"
+ echo "$APPVER" > "$WINEPREFIX/PACKAGE_VERSION"
+}
+RemoveApp()
+{
+ rm -rf "$WINEPREFIX"
+}
+ResetApp()
+{
+ echo "Reset $PACKAGENAME....."
+ read -p "* Are you sure?(Y/N)" ANSWER
+ if [ "$ANSWER" = "Y" -o "$ANSWER" = "y" -o -z "$ANSWER" ]; then
+ EvacuateApp
+ DeployApp
+ CallApp
+ fi
+}
+UpdateApp()
+{
+ if [ -f "$WINEPREFIX/PACKAGE_VERSION" ] && [ "$(cat "$WINEPREFIX/PACKAGE_VERSION")" = "$APPVER" ]; then
+ return
+ fi
+ if [ -d "${WINEPREFIX}.tmpdir" ]; then
+ rm -rf "${WINEPREFIX}.tmpdir"
+ fi
+ ExtractApp "${WINEPREFIX}.tmpdir"
+ /opt/deepinwine/tools/updater -s "${WINEPREFIX}.tmpdir" -c "${WINEPREFIX}" -v
+ rm -rf "${WINEPREFIX}.tmpdir"
+ echo "$APPVER" > "$WINEPREFIX/PACKAGE_VERSION"
+}
+RunApp()
+{
+ if [ -d "$WINEPREFIX" ]; then
+ UpdateApp
+ else
+ DeployApp
+ fi
+ CallApp
+}
+
+CreateBottle()
+{
+ if [ -d "$WINEPREFIX" ]; then
+ UpdateApp
+ else
+ DeployApp
+ fi
+}
+
+if [ -z $1 ]; then
+ RunApp
+ exit 0
+fi
+case $1 in
+ "-r" | "--reset")
+ ResetApp
+ ;;
+ "-c" | "--create")
+ CreateBottle
+ ;;
+ "-e" | "--remove")
+ RemoveApp
+ ;;
+ "-u" | "--uri")
+ RunApp $2
+ ;;
+ "-h" | "--help")
+ HelpApp
+ ;;
+ *)
+ echo "Invalid option: $1"
+ echo "Use -h|--help to get help"
+ exit 1
+ ;;
+esac
+exit 0
diff --git a/update.policy b/update.policy
new file mode 100644
index 000000000000..75535d3e8b1e
--- /dev/null
+++ b/update.policy
@@ -0,0 +1,33 @@
+[File]
+;;=============================================================
+;; Registry - Mask this file is a registry file.
+;; Keep - Default. Use template file.
+;; Override - Use file in current prefix.
+;; Replace - If it's different type in current prefix and
+;; in template, use template one to replace it.
+;; Ingore - Ingore file when copy.
+
+;; Ingore update.policy itself.
+"^update.policy$" = "Ingore"
+"^.update-timestamp$" = "Ingore"
+
+;; System registry files.
+"^(system|userdef|user).reg$" = "Registry"
+
+;; Addtional assist files.
+"^drive_c/Deepin" = "Keep"
+
+;; Microsoft Office files.
+"^drive_c/Windows/(?:control\.ini|hh\.dat|mapiuid\.ini|Reg Save Log\.txt)$" = "Override"
+
+
+
+[Registry]
+;;=============================================================
+;; Keep - Use template key section
+;; Override - Use user current key section
+;; Merge - Default. Merge two section, user current values
+ override template
+
+"^Software\\Wine\\DllOverrides$" = "Keep"
+"^Software\\Wine\\Fonts\\Replacements$" = "Keep"