remove ia64 keywords
[gentoo-zh.git] / net-im / deepin-wine-qq / files / deepin-wine-qq-9.5.2.27897-run.sh
blob107b8d0043e9d566b9c96262e497f72d8e33a246
1 #!/bin/sh
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"
16 QQ_VER="9.5.2.27897"
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"
22 export MIME_TYPE=""
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
33 OpenWinecfg()
35 env WINEPREFIX=$WINEPREFIX $APPRUN_CMD winecfg
38 DeployApp()
40 # backup fonts
41 if [ -d "$QQ_FONTS" ];then
42 mkdir -p $HOME/.deepinwine/.qq_tmp
43 cp $QQ_FONTS/* $HOME/.deepinwine/.qq_tmp/
46 # re-deploy bottle
47 rm -rf "$WINEPREFIX"
48 # run installer
49 env LC_ALL=zh_CN.UTF-8 WINEDLLOVERRIDES="winemenubuilder.exe=d" $START_SHELL_PATH $BOTTLENAME $APPVER "$QQ_INSTALLER_PATH" "$@"
51 # restore fonts
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
60 Run()
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
68 DeployApp
69 else
70 # missing exec file
71 if [ ! -f "$EXEC_FILE" ];then
72 DeployApp
75 env LC_ALL=zh_CN.UTF-8 $START_SHELL_PATH $BOTTLENAME $APPVER "$EXEC_PATH" "$@"
77 else
78 env LC_ALL=zh_CN.UTF-8 $START_SHELL_PATH $BOTTLENAME $APPVER "uninstaller.exe" "$@"
82 HelpApp()
84 echo " Extra Commands:"
85 echo " winecfg Open winecfg"
86 echo " -h/--help Show program help info"
89 if [ -z $1 ]; then
90 Run "$@"
91 exit 0
93 case $1 in
94 "winecfg")
95 OpenWinecfg
97 "-h" | "--help")
98 HelpApp
101 Run "$@"
103 esac
104 exit 0