aboutsummarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorCountStarlight2017-12-31 11:37:39 +0800
committerCountStarlight2017-12-31 11:37:39 +0800
commita17318dd833560c28e0cadd148639e57003e3db0 (patch)
treea17270c20200e9c28d97673bc3e4995de1025bbc
parent4a9793f5f8973c251049a2a05c90afa09698b3fd (diff)
downloadaur-a17318dd833560c28e0cadd148639e57003e3db0.tar.gz
init.
Signed-off-by: CountStarlight <countstarlight@gmail.com>
-rw-r--r--.SRCINFO39
-rw-r--r--[-rwxr-xr-x]PKGBUILD78
-rw-r--r--README.md38
-rwxr-xr-xclean.sh2
-rw-r--r--deepin-wine-qq.install7
-rwxr-xr-xgen.sh2
-rw-r--r--reg_files.tar.bz2bin0 -> 193047 bytes
-rwxr-xr-xrun.sh117
-rw-r--r--update.policy33
9 files changed, 277 insertions, 39 deletions
diff --git a/.SRCINFO b/.SRCINFO
index d9d757f8bc3d..2c7f3f21b38b 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,16 +1,35 @@
pkgbase = deepin-wine-qq
- pkgdesc = Deepin Wine QQ 8.9.
- pkgver = 8.9.19983deepin18
- pkgrel = 2
+ pkgdesc = Latest Tencent QQ (com.qq.im) on Deepin Wine For Archlinux
+ pkgver = 8.9.6
+ pkgrel = 0
url = http://im.qq.com/
- arch = i686
+ install = deepin-wine-qq.install
arch = x86_64
- license = Proprietary
- makedepends = tar
- depends = deepin-wine
- noextract = deepin-wine-qq_8.9.19983deepin18_i386.deb
- source = https://mirrors.ustc.edu.cn/deepin/pool/non-free/d/deepin-wine-qq/deepin-wine-qq_8.9.19983deepin18_i386.deb
- md5sums = SKIP
+ 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
+ conflicts = deepin-qq-im
+ conflicts = deepin.com.qq.im
+ source = https://mirrors.ustc.edu.cn/deepin/pool/non-free/d/deepin.com.qq.im/deepin.com.qq.im_8.9.19983deepin19_i386.deb
+ source = http://dldir1.qq.com/qqfile/qq/QQ8.9.6/2242/QQ8.9.6.exe
+ source = run.sh
+ source = reg_files.tar.bz2
+ source = update.policy
+ md5sums = e727b3dc87f2533aa36b489f38806060
+ md5sums = 61a3a7d936e5f00fc220a4366088325d
+ md5sums = 309746957cfcbeb87b7223b01a6e0317
+ md5sums = ebde755e3bd213550f5ccc69d3192060
+ md5sums = a66646b473a3fbad243ac1afd64da07a
pkgname = deepin-wine-qq
diff --git a/PKGBUILD b/PKGBUILD
index 0d2a4a83dc58..cbdfc8bac90a 100755..100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,37 +1,57 @@
+# Maintainer: CountStarlight <countstarlight@gmail.com>
# Maintainer: wszqkzqk <wszqkzqk@gmail.com>
-# Maintainer: arkli <LFZ0107@outlook.com>
+# Maintainer: ssfdust <ssfdust@gmail.com>
+
pkgname=deepin-wine-qq
-pkgver=8.9.19983deepin18
-pkgrel=2
-epoch=
-pkgdesc="Deepin Wine QQ 8.9."
-arch=('i686' 'x86_64')
+pkgver=8.9.6
+deepinqqver=8.9.19983deepin19
+pkgrel=0
+pkgdesc="Latest Tencent QQ (com.qq.im) on Deepin Wine For Archlinux"
+arch=("x86_64")
url="http://im.qq.com/"
-license=('Proprietary')
-groups=()
-depends=('deepin-wine')
-makedepends=('tar')
-checkdepends=()
-optdepends=()
-provides=()
-conflicts=('deepin-qq-im')
-replaces=()
-backup=()
-options=()
-install=
-changelog=
-source=("https://mirrors.ustc.edu.cn/deepin/pool/non-free/d/${pkgname}/${pkgname}_${pkgver}_i386.deb")
-noextract=("${pkgname}_${pkgver}_i386.deb")
-md5sums=('SKIP')
-validpgpkeys=()
+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')
+conflicts=('deepin-qq-im' 'deepin.com.qq.im')
+install="deepin-wine-qq.install"
+_mirror="https://mirrors.ustc.edu.cn/deepin"
+source=("$_mirror/pool/non-free/d/deepin.com.qq.im/deepin.com.qq.im_${deepinqqver}_i386.deb"
+ "http://dldir1.qq.com/qqfile/qq/QQ${pkgver}/2242/QQ${pkgver}.exe"
+ "run.sh"
+ "reg_files.tar.bz2"
+ "update.policy")
+md5sums=('e727b3dc87f2533aa36b489f38806060'
+ '61a3a7d936e5f00fc220a4366088325d'
+ '309746957cfcbeb87b7223b01a6e0317'
+ 'ebde755e3bd213550f5ccc69d3192060'
+ 'a66646b473a3fbad243ac1afd64da07a')
-prepare() {
- ar -x ${pkgname}_${pkgver}_i386.deb
- mkdir ${pkgname}-${pkgver}
- tar -xf data.tar.xz --directory="${pkgname}-${pkgver}"
+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/local/share/applications/deepin.com.qq.im.desktop"
+ msg "Extracting Deepin Wine QQ archive ..."
+ 7z x -aoa "${srcdir}/dpkgdir/opt/deepinwine/apps/Deepin-QQ/files.7z" -o"${srcdir}/deepinqqdir"
+ msg "Removing original outdated QQ directory ..."
+ rm -r "${srcdir}/deepinqqdir/drive_c/Program Files/Tencent/QQ"
+ msg "Adding config files and fonts"
+ cp userdef.reg "${srcdir}/deepinqqdir/userdef.reg"
+ cp system.reg "${srcdir}/deepinqqdir/system.reg"
+ cp update.policy "${srcdir}/deepinqqdir/update.policy"
+ cp user.reg "${srcdir}/deepinqqdir/user.reg"
+ ln -sf "/usr/share/fonts/wenquanyi/wqy-microhei/wqy-microhei.ttc" "${srcdir}/deepinqqdir/drive_c/windows/Fonts/wqy-microhei.ttc"
+ ln -sf "/usr/share/fonts/adobe-source-han-sans/SourceHanSansCN-Medium.otf" "${srcdir}/deepinqqdir/drive_c/windows/Fonts/SourceHanSansCN-Medium.otf"
+ msg "Repackaging app archive ..."
+ 7z a -t7z -r "${srcdir}/files.7z" "${srcdir}/deepinqqdir/*"
}
package() {
- cd "${pkgname}-${pkgver}"
- cp -r ./ ${pkgdir}/
+ msg "Preparing icons ..."
+ install -d "${pkgdir}/usr/share"
+ cp -a ${srcdir}/dpkgdir/usr/local/share/* "${pkgdir}/usr/share/"
+ msg "Copying QQ to /opt/deepinwine/apps/Deepin-QQ ..."
+ install -d "${pkgdir}/opt/deepinwine/apps/Deepin-QQ"
+ install -m644 "${srcdir}/files.7z" "${pkgdir}/opt/deepinwine/apps/Deepin-QQ/"
+ install -m755 "${srcdir}/run.sh" "${pkgdir}/opt/deepinwine/apps/Deepin-QQ/"
+ install -m644 "${srcdir}/QQ$pkgver.exe" "${pkgdir}/opt/deepinwine/apps/Deepin-QQ/"
}
diff --git a/README.md b/README.md
new file mode 100644
index 000000000000..c4d06b9ba344
--- /dev/null
+++ b/README.md
@@ -0,0 +1,38 @@
+# 在Archlinux及其衍生发行版上运行最新的Tencent QQ
+
+把deepin的QQ容器移植到Archlinux
+
+感谢:
+* @[wszqkzqk](https://github.com/wszqkzqk) 的 [wszqkzqk-deepin-wine-tim-arch](https://github.com/wszqkzqk/wszqkzqk-deepin-wine-tim-arch)
+
+* @[ssfdust](https://github.com/ssfdust) 的 [wszqkzqk-deepin-wine-tim-arch](https://github.com/ssfdust/wszqkzqk-deepin-wine-tim-arch)
+
+存在如下bug:
+ * 1.无法视频通话
+ * 2.无法记住密码
+
+## 安装
+* 1.已添加到AUR [deepin-wine-qq](https://aur.archlinux.org/packages/deepin-wine-qq/),可直接安装:
+```shell
+yaourt deepin-wine-qq
+```
+
+* 2.手动安装
+
+```shell
+ git clone https://github.com/countstarlight/deepin-wine-qq-arch.git
+
+ cd deepin-wine-qq-arch
+
+ makepkg -si
+```
+
+* 运行开始菜单中创建的QQ,点击立即安装
+* 安装完可直接启动,以后启动时无需安装
+* **前几次运行时可能会提示 "qq安全组件异常",尝试重启系统**
+* 默认使用文泉驿微米黑(`wqy-microhei`)字体,要使用其他字体,如 微软雅黑或者微软宋体放进`~/.deepinwine/Deepin-QQ/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)
+## 更新日志
+* 2017-12-31 QQ-8.9.6
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-qq.install b/deepin-wine-qq.install
new file mode 100644
index 000000000000..64cda2dbfb3f
--- /dev/null
+++ b/deepin-wine-qq.install
@@ -0,0 +1,7 @@
+post_upgrade() {
+ find /home -maxdepth 2 -name ".deepinwine" -exec rm -f \{\}/Deepin-QQ/reinstalled \;
+}
+pre_remove() {
+ echo "deleting the TIM bottle..."
+ find /home -maxdepth 2 -name ".deepinwine" -exec rm -rf \{\}/Deepin-QQ/ \;
+}
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..7edeeea5cd82
--- /dev/null
+++ b/run.sh
@@ -0,0 +1,117 @@
+#!/bin/sh
+
+# Copyright (C) 2016 Deepin, Inc.
+#
+# Author: Li LongYu <lilongyu@linuxdeepin.com>
+# Peng Hao <penghao@linuxdeepin.com>
+
+# CountStarlight <countstarlight@gmail.com>
+WINEPREFIX="$HOME/.deepinwine/Deepin-QQ"
+APPDIR="/opt/deepinwine/apps/Deepin-QQ"
+APPVER="8.9.6"
+APPTAR="files.7z"
+PACKAGENAME="deepin.com.qq.im"
+
+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()
+{
+ if [ ! -f $WINEPREFIX/reinstalled ]
+ then
+ touch $WINEPREFIX/reinstalled
+ env WINEPREFIX=$WINEPREFIX wine $APPDIR/QQ$APPVER.exe
+ else
+ bash "$WINEPREFIX/drive_c/deepin/EnvInit.sh"
+ fi
+}
+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
+ sed -i "s/deepin-wine/wine/" $1/drive_c/deepin/EnvInit.sh
+}
+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 $1
+}
+
+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"