aboutsummarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorCountStarlight2018-07-12 22:22:21 +0800
committerCountStarlight2018-07-12 22:22:21 +0800
commit2f6f35a239b1bf8a65312d6f05830173a99eecd0 (patch)
treedc87c9e9d3c9ae65fae53d0d3c8798721b81234c
downloadaur-2f6f35a239b1bf8a65312d6f05830173a99eecd0.tar.gz
init
Signed-off-by: CountStarlight <countstarlight@gmail.com>
-rw-r--r--.SRCINFO33
-rw-r--r--.gitignore5
-rw-r--r--.travis.yml26
-rw-r--r--PKGBUILD49
-rw-r--r--README.md37
-rwxr-xr-xclean.sh2
-rwxr-xr-xgen.sh2
-rw-r--r--reg_files.tar.bz2bin0 -> 193047 bytes
-rwxr-xr-xrun.sh121
-rw-r--r--update.policy33
-rw-r--r--wine-qq-music.install7
11 files changed, 315 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..bb5274ef0812
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,33 @@
+pkgbase = wine-qq-music
+ pkgdesc = Tencent QQ music on wine For Archlinux
+ pkgver = 15.9.5
+ pkgrel = 0
+ url = http://y.qq.com/
+ install = wine-qq-music.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
+ source = https://dldir1.qq.com/music/clntupate/QQMusicSetup.exe
+ source = https://github.com/countstarlight/wine-qq-music-arch/raw/master/data.7z
+ source = run.sh
+ source = reg_files.tar.bz2
+ source = update.policy
+ md5sums = d43ebec09d182c9e561c596fe8b47452
+ md5sums = b4c3f538c12a39c660ef345b9aeff6ad
+ md5sums = 9cf044bc9bf692a04ba34ee2c869c36c
+ md5sums = ebde755e3bd213550f5ccc69d3192060
+ md5sums = a66646b473a3fbad243ac1afd64da07a
+
+pkgname = wine-qq-music
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..27c54d33a68d
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,5 @@
+QQMusicSetup*
+wine-qq-music-*
+pkg/
+src/
+data.7z
diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 000000000000..aa7ea04518ea
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,26 @@
+sudo: required
+
+services:
+- docker
+
+arch:
+ repos:
+ - archlinuxfr=http://repo.archlinux.fr/$arch
+ packages:
+ - 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
+ script:
+ - "makepkg"
+
+script:
+- "curl -s https://raw.githubusercontent.com/mikkeloscar/arch-travis/master/arch-travis.sh | bash"
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..f591d4d4110f
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,49 @@
+# Maintainer: CountStarlight <countstarlight@gmail.com>
+# Maintainer: wszqkzqk <wszqkzqk@gmail.com>
+# Maintainer: ssfdust <ssfdust@gmail.com>
+
+pkgname=wine-qq-music
+pkgver=15.9.5
+pkgrel=0
+pkgdesc="Tencent QQ music on wine For Archlinux"
+arch=("x86_64")
+url="http://y.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')
+install="wine-qq-music.install"
+source=("https://dldir1.qq.com/music/clntupate/QQMusicSetup.exe"
+ "https://github.com/countstarlight/wine-qq-music-arch/raw/master/data.7z"
+ "run.sh"
+ "reg_files.tar.bz2"
+ "update.policy")
+md5sums=('d43ebec09d182c9e561c596fe8b47452'
+ 'b4c3f538c12a39c660ef345b9aeff6ad'
+ '9cf044bc9bf692a04ba34ee2c869c36c'
+ 'ebde755e3bd213550f5ccc69d3192060'
+ 'a66646b473a3fbad243ac1afd64da07a')
+
+build() {
+ msg "Extracting QQ Music archive ..."
+ 7z x -aoa "data.7z" -o"${srcdir}/"
+ msg "Adding config files and fonts"
+ tar -jxvf reg_files.tar.bz2 -C "${srcdir}/"
+ cp userdef.reg "${srcdir}/qqmusicdir/userdef.reg"
+ cp system.reg "${srcdir}/qqmusicdir/system.reg"
+ cp update.policy "${srcdir}/qqmusicdir/update.policy"
+ cp user.reg "${srcdir}/qqmusicdir/user.reg"
+ ln -sf "/usr/share/fonts/wenquanyi/wqy-microhei/wqy-microhei.ttc" "${srcdir}/qqmusicdir/drive_c/windows/Fonts/wqy-microhei.ttc"
+ ln -sf "/usr/share/fonts/adobe-source-han-sans/SourceHanSansCN-Medium.otf" "${srcdir}/qqmusicdir/drive_c/windows/Fonts/SourceHanSansCN-Medium.otf"
+ msg "Repackaging app archive ..."
+ 7z a -t7z -r "${srcdir}/files.7z" "${srcdir}/qqmusicdir/*"
+}
+
+package() {
+ msg "Preparing icons ..."
+ install -d "${pkgdir}/usr/share"
+ cp -a ${srcdir}/dpkgdir/usr/share/* "${pkgdir}/usr/share/"
+ msg "Copying QQ Music to /opt/customwine/apps/QQ-Music ..."
+ install -d "${pkgdir}/opt/customwine/apps/QQ-Music"
+ install -m644 "${srcdir}/files.7z" "${pkgdir}/opt/customwine/apps/QQ-Music/"
+ install -m755 "${srcdir}/run.sh" "${pkgdir}/opt/customwine/apps/QQ-Music/"
+ install -m644 "${srcdir}/QQMusicSetup.exe" "${pkgdir}/opt/customwine/apps/QQ-Music/"
+}
diff --git a/README.md b/README.md
new file mode 100644
index 000000000000..80dd283ad3c3
--- /dev/null
+++ b/README.md
@@ -0,0 +1,37 @@
+# 在Archlinux及衍生发行版上运行QQ音乐
+
+基于deepin wine应用打包的QQ音乐
+
+构建状态: [![travis-ci](https://travis-ci.org/countstarlight/wine-qq-music-arch.svg?branch=master)](https://travis-ci.org/countstarlight/wine-qq-music-arch)
+
+感谢:
+
+* [Wuhan Deepin Technology Co.,Ltd.](http://www.deepin.org/)
+
+存在如下问题:
+ * 1.字体发虚
+
+## 安装
+* 1.已添加到AUR [wine-qq-music](https://aur.archlinux.org/packages/wine-qq-music/),可直接安装:
+```shell
+yaourt wine-qq-music
+```
+
+* 2.手动安装
+
+```shell
+ git clone https://github.com/countstarlight/wine-qq-music-arch.git
+
+ cd wine-qq-music-arch
+
+ makepkg -si
+```
+
+* 运行开始菜单中创建的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)
+## 更新日志
+* 2018-7-12 QQ Music 15.9.5 \ 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/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..200177d8a408
--- /dev/null
+++ b/run.sh
@@ -0,0 +1,121 @@
+#!/bin/sh
+
+# Copyright (C) 2016 Deepin, Inc.
+#
+# Author: Li LongYu <lilongyu@linuxdeepin.com>
+# Peng Hao <penghao@linuxdeepin.com>
+
+# CountStarlight <countstarlight@gmail.com>
+WINEPREFIX="$HOME/.customwine/QQ-Music"
+APPDIR="/opt/customwine/apps/QQ-Music"
+APPVER="15.9.5"
+APPTAR="files.7z"
+PACKAGENAME="com.qq.y"
+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()
+{
+ if [ ! -f $WINEPREFIX/reinstalled ]
+ then
+ touch $WINEPREFIX/reinstalled
+ env WINEPREFIX=$WINEPREFIX wine $APPDIR/QQMusicSetup.exe
+ else
+ #Support use native file dialog
+ export ATTACH_FILE_DIALOG=1
+
+ env WINEPREFIX="$WINEPREFIX" $WINE_CMD "c:\\Program Files\\Tencent\\QQMusic\\QQMusic.exe" &
+ 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"
diff --git a/wine-qq-music.install b/wine-qq-music.install
new file mode 100644
index 000000000000..c69da130b3e6
--- /dev/null
+++ b/wine-qq-music.install
@@ -0,0 +1,7 @@
+post_upgrade() {
+ find /home -maxdepth 2 -name ".customwine" -exec rm -f \{\}/QQ-Music/reinstalled \;
+}
+pre_remove() {
+ echo "deleting the TIM bottle..."
+ find /home -maxdepth 2 -name ".customwine" -exec rm -rf \{\}/QQ-Music/ \;
+}