3 # Copyright (C) 2016 Deepin, Inc.
5 # Author: Li LongYu <lilongyu@linuxdeepin.com>
6 # Peng Hao <penghao@linuxdeepin.com>
8 # Vufa <countstarlight@gmail.com>
10 version_gt
() { test "$(echo "$@
" | tr " " "\n" | sort -V | head -n 1)" != "$1"; }
12 BOTTLENAME
="Deepin-QQ"
13 APPVER
="9.3.2deepin20"
14 WINEPREFIX
="$HOME/.deepinwine/$BOTTLENAME"
15 QQ_FONTS
="$WINEPREFIX/drive_c/windows/Fonts"
17 EXEC_PATH
="c:/Program Files/Tencent/QQ/Bin/QQ.exe"
18 EXEC_FILE
="$WINEPREFIX/drive_c/Program Files/Tencent/QQ/Bin/QQ.exe"
19 START_SHELL_PATH
="/opt/deepinwine/tools/run_v4.sh"
20 QQ_INSTALLER
="PCQQ2021"
21 QQ_INSTALLER_PATH
="c:/Program Files/Tencent/$QQ_INSTALLER-$QQ_VER.exe"
23 export DEB_PACKAGE_NAME
="com.qq.im.deepin"
24 export APPRUN_CMD
="deepin-wine5"
25 DISABLE_ATTACH_FILE_DIALOG
=""
27 export SPECIFY_SHELL_DIR
=`dirname $START_SHELL_PATH`
29 ARCHIVE_FILE_DIR
="/opt/apps/$DEB_PACKAGE_NAME/files"
31 export WINEDLLPATH
=/opt
/$APPRUN_CMD/lib
35 env WINEPREFIX
=$WINEPREFIX $APPRUN_CMD winecfg
41 if [ -d "$QQ_FONTS" ];then
42 mkdir
-p $HOME/.deepinwine
/.qq_tmp
43 cp $QQ_FONTS/* $HOME/.deepinwine
/.qq_tmp
/
49 env LC_ALL
=zh_CN.UTF-8 WINEDLLOVERRIDES
="winemenubuilder.exe=d" $START_SHELL_PATH $BOTTLENAME $APPVER "$QQ_INSTALLER_PATH" "$@"
52 if [ -d "$HOME/.deepinwine/.qq_tmp" ];then
53 cp -n $HOME/.deepinwine
/.qq_tmp
/* $QQ_FONTS/
54 rm -rf "$HOME/.deepinwine/.qq_tmp"
56 touch $WINEPREFIX/reinstalled
57 cat /opt
/apps
/$DEB_PACKAGE_NAME/files
/files.
md5sum > $WINEPREFIX/PACKAGE_VERSION
62 if [ -z "$DISABLE_ATTACH_FILE_DIALOG" ];then
63 export ATTACH_FILE_DIALOG
=1
66 if [ -n "$EXEC_PATH" ];then
67 if [ ! -f "$WINEPREFIX/reinstalled" ];then
71 if [ ! -f "$EXEC_FILE" ];then
75 env LC_ALL
=zh_CN.UTF-8
$START_SHELL_PATH $BOTTLENAME $APPVER "$EXEC_PATH" "$@"
78 env LC_ALL
=zh_CN.UTF-8
$START_SHELL_PATH $BOTTLENAME $APPVER "uninstaller.exe" "$@"
84 echo " Extra Commands:"
85 echo " winecfg Open winecfg"
86 echo " -h/--help Show program help info"