Skip to content

Commit

Permalink
generate 'PACKAGE_VERSION' file after installation.
Browse files Browse the repository at this point in the history
Signed-off-by: Vufa <[email protected]>
  • Loading branch information
vufa committed Apr 20, 2022
1 parent ac339dc commit 1fef810
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 8 deletions.
6 changes: 3 additions & 3 deletions .SRCINFO
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ pkgbase = deepin-wine-qq
arch = x86_64
license = custom
depends = p7zip
depends = deepin-wine5
depends = deepin-wine-helper
depends = deepin-wine5>=5.0.16-1
depends = deepin-wine-helper>=5.1.30_1-1
depends = xorg-xwininfo
depends = wqy-microhei
depends = lib32-alsa-lib
Expand All @@ -24,6 +24,6 @@ pkgbase = deepin-wine-qq
source = run.sh
md5sums = 5fdc20e614d945bd2ba5251420872479
md5sums = 04bbaf8b82667c251d68ed0347e17ba3
md5sums = fcaad6691c7e5c1d47f487aa213b97bf
md5sums = 77acb2943937363f5491203486f280b3

pkgname = deepin-wine-qq
4 changes: 2 additions & 2 deletions PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ pkgdesc="Tencent QQ on Deepin Wine5(${debpkgname}) For Archlinux"
arch=("x86_64")
url="https://im.qq.com/"
license=('custom')
depends=('p7zip' 'deepin-wine5' 'deepin-wine-helper' 'xorg-xwininfo' 'wqy-microhei' 'lib32-alsa-lib' 'lib32-alsa-plugins' 'lib32-libpulse' 'lib32-openal' 'lib32-mpg123' 'lib32-gnutls')
depends=('p7zip' 'deepin-wine5>=5.0.16-1' 'deepin-wine-helper>=5.1.30_1-1' 'xorg-xwininfo' 'wqy-microhei' 'lib32-alsa-lib' 'lib32-alsa-plugins' 'lib32-libpulse' 'lib32-openal' 'lib32-mpg123' 'lib32-gnutls')
conflicts=('deepin-qq-im' 'deepin.com.qq.im')
install="deepin-wine-qq.install"
_mirror="https://com-store-packages.uniontech.com"
Expand All @@ -20,7 +20,7 @@ source=("$_mirror/appstore/pool/appstore/c/${debpkgname}/${debpkgname}_${debpkgv
"run.sh")
md5sums=('5fdc20e614d945bd2ba5251420872479'
'04bbaf8b82667c251d68ed0347e17ba3'
'fcaad6691c7e5c1d47f487aa213b97bf')
'77acb2943937363f5491203486f280b3')

build() {
msg "Extracting DPKG package ..."
Expand Down
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ Deepin 打包的 QQ 容器(`com.qq.im.deepin`)移植到 Archlinux,包含定制
- [`wine`/`deepin-wine 2.x` 迁移](#从-winedeepin-wine-2x-迁移)
- [卸载](#卸载)
- [常见问题及解决](#常见问题及解决)
- [QQ 安全组件异常](#qq-安全组件异常)
- [不能记住密码](#不能记住密码)
- [网络连接状态改变后不能重连](#网络连接状态改变后不能重连)
- [高分辨率屏幕支持](#高分辨率屏幕支持)
Expand Down Expand Up @@ -196,6 +197,10 @@ QQ在本地保存的数据不会被删除,如保存在用户文档下的数据

## 常见问题及解决

### QQ 安全组件异常

前几次运行时可能会出现该问题,由残留的安装进程导致,可以等一会再运行或重启一下系统

### 不能记住密码

对于之前的版本,可以查看[旧版README](https://github.com/vufa/deepin-wine-qq-arch/blob/827052484c4fd05c165c28f4a227e1773a21332d/README.md)
Expand Down
33 changes: 30 additions & 3 deletions run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@ version_gt() { test "$(echo "$@" | tr " " "\n" | sort -V | head -n 1)" != "$1";
BOTTLENAME="Deepin-QQ"
APPVER="9.3.2deepin20"
WINEPREFIX="$HOME/.deepinwine/$BOTTLENAME"
QQ_FONTS="$WINEPREFIX/drive_c/windows/Fonts"
QQ_VER="9.5.2.27897"
EXEC_PATH="c:/Program Files/Tencent/QQ/Bin/QQ.exe"
EXEC_FILE="$WINEPREFIX/drive_c/Program Files/Tencent/QQ/Bin/QQ.exe"
START_SHELL_PATH="/opt/deepinwine/tools/run_v4.sh"
QQ_INSTALLER="PCQQ2021"
QQ_INSTALLER_PATH="c:/Program Files/Tencent/$QQ_INSTALLER-$QQ_VER.exe"
Expand All @@ -33,6 +35,28 @@ OpenWinecfg()
env WINEPREFIX=$WINEPREFIX $APPRUN_CMD winecfg
}

DeployApp()
{
# backup fonts
if [ -d "$QQ_FONTS" ];then
mkdir -p $HOME/.deepinwine/.qq_tmp
cp $QQ_FONTS/* $HOME/.deepinwine/.qq_tmp/
fi

# re-deploy bottle
rm -rf "$WINEPREFIX"
# run installer
env LC_ALL=zh_CN.UTF-8 WINEDLLOVERRIDES="winemenubuilder.exe=d" $START_SHELL_PATH $BOTTLENAME $APPVER "$QQ_INSTALLER_PATH" "$@"

# restore fonts
if [ -d "$HOME/.deepinwine/.qq_tmp" ];then
cp -n $HOME/.deepinwine/.qq_tmp/* $QQ_FONTS/
rm -rf "$HOME/.deepinwine/.qq_tmp"
fi
touch $WINEPREFIX/reinstalled
cat /opt/apps/$DEB_PACKAGE_NAME/files/files.md5sum > $WINEPREFIX/PACKAGE_VERSION
}

Run()
{
if [ -z "$DISABLE_ATTACH_FILE_DIALOG" ];then
Expand All @@ -41,10 +65,13 @@ Run()

if [ -n "$EXEC_PATH" ];then
if [ ! -f "$WINEPREFIX/reinstalled" ];then
# run installer
env LC_ALL=zh_CN.UTF-8 WINEDLLOVERRIDES="winemenubuilder.exe=d" $START_SHELL_PATH $BOTTLENAME $APPVER "$QQ_INSTALLER_PATH" "$@"
touch $WINEPREFIX/reinstalled
DeployApp
else
# missing exec file
if [ ! -f "$EXEC_FILE" ];then
DeployApp
fi

env LC_ALL=zh_CN.UTF-8 $START_SHELL_PATH $BOTTLENAME $APPVER "$EXEC_PATH" "$@"
fi
else
Expand Down

0 comments on commit 1fef810

Please sign in to comment.