diff options
author | Codist | 2021-08-25 21:57:30 +0800 |
---|---|---|
committer | Codist | 2021-08-25 21:57:30 +0800 |
commit | e181f631bac3f3702cf99f9c6610380eea2a1a49 (patch) | |
tree | 5ae456b117570af7b9081793dd4add3e5b6fb28b /run.sh | |
parent | b347f752e9ef816c25be61ede9308d320d67c8f6 (diff) | |
download | aur-e181f631bac3f3702cf99f9c6610380eea2a1a49.tar.gz |
Upgrade QQ to 9.5.0.27852 and use aur package 'deepin-wine6-stable' instead of wine.
Signed-off-by: Codist <countstarlight@gmail.com>
Diffstat (limited to 'run.sh')
-rwxr-xr-x | run.sh | 95 |
1 files changed, 9 insertions, 86 deletions
@@ -9,101 +9,39 @@ version_gt() { test "$(echo "$@" | tr " " "\n" | sort -V | head -n 1)" != "$1"; } -extract_archive() -{ - archive=$1 - version_file=$2 - dest_dir=$3 - if [ -f "$archive" ] && [ -n "$dest_dir" ] && [ "$dest_dir" != "." ];then - archive_version=`cat $version_file` - if [ -d "$dest_dir" ];then - if [ -f "$dest_dir/VERSION" ];then - dest_version=`cat $dest_dir/VERSION` - if version_gt "$archive_version" "$dest_version" || [ -z "$dest_version" ];then - 7z x "$archive" -o/"$dest_dir" -aoa - echo "$archive_version" > "$dest_dir/VERSION" - fi - fi - else - mkdir -p $dest_dir - 7z x "$archive" -o/"$dest_dir" -aoa - echo "$archive_version" > "$dest_dir/VERSION" - fi - fi -} - BOTTLENAME="Deepin-QQ" APPVER="9.3.2deepin20" WINEPREFIX="$HOME/.deepinwine/$BOTTLENAME" -QQ_VER="9.4.9.27849" +QQ_VER="9.5.0.27852" EXEC_PATH="c:/Program Files/Tencent/QQ/Bin/QQ.exe" -START_SHELL_PATH="$HOME/.deepinwine/deepin-wine-helper/run_v3.sh" +START_SHELL_PATH="/opt/deepinwine/tools/run_v4.sh" QQ_INSTALLER="PCQQ2021" QQ_INSTALLER_PATH="c:/Program Files/Tencent/$QQ_INSTALLER-$QQ_VER.exe" export MIME_TYPE="" export DEB_PACKAGE_NAME="com.qq.im.deepin" -#export APPRUN_CMD="wine" -export PATCH_LOADER_ENV="" -export FILEDLG_PLUGIN="/opt/apps/$DEB_PACKAGE_NAME/files/gtkGetFileNameDlg" +export APPRUN_CMD="deepin-wine6-stable" +DISABLE_ATTACH_FILE_DIALOG="" export SPECIFY_SHELL_DIR=`dirname $START_SHELL_PATH` ARCHIVE_FILE_DIR="/opt/apps/$DEB_PACKAGE_NAME/files" -msg() -{ - ECHO_LEVEL=("\033[1;32m==> " "\033[1;31m==> ERROR: ") - echo -e "${ECHO_LEVEL[$1]}\033[1;37m$2\033[0m" -} - -SwitchToDeepinWine() -{ - PACKAGE_MANAGER="yay" - DEEPIN_WINE_DEPENDS="deepin-wine5" - if ! [ -x "$(command -v yay)" ]; then - if ! [ -x "$(command -v yaourt)" ]; then - msg 1 "Need to install 'yay' or 'yaourt' first." >&2 - exit 1 - else - PACKAGE_MANAGER="yaourt" - fi - fi - for p in ${DEEPIN_WINE_DEPENDS}; do - if pacman -Qs $p > /dev/null ; then - msg 0 "$p is installed, skip ..." - else - msg 0 "Installing dependency: $p ..." - $PACKAGE_MANAGER -S $p - fi - done - msg 0 "Redeploying app ..." - extract_archive "$ARCHIVE_FILE_DIR/helper_archive.7z" "$ARCHIVE_FILE_DIR/helper_archive.md5sum" "$SPECIFY_SHELL_DIR" - $START_SHELL_PATH $BOTTLENAME $APPVER "$EXEC_PATH" -r - echo "5" > $WINEPREFIX/deepin - rm -f $WINEPREFIX/reinstalled - msg 0 "Done." - exit 0 -} +export WINEDLLPATH=/opt/$APPRUN_CMD/lib:/opt/$APPRUN_CMD/lib64 OpenWinecfg() { - if [ -f "$WINEPREFIX/deepin" ]; then - env WINEPREFIX=$WINEPREFIX deepin-wine5 winecfg - else - env WINEPREFIX=$WINEPREFIX winecfg - fi + env WINEPREFIX=$WINEPREFIX $APPRUN_CMD winecfg } Run() { - extract_archive "$ARCHIVE_FILE_DIR/helper_archive.7z" "$ARCHIVE_FILE_DIR/helper_archive.md5sum" "$SPECIFY_SHELL_DIR" - - if [ -n "$PATCH_LOADER_ENV" ] && [ -n "$EXEC_PATH" ];then - export $PATCH_LOADER_ENV + if [ -z "$DISABLE_ATTACH_FILE_DIALOG" ];then + export ATTACH_FILE_DIALOG=1 fi if [ -n "$EXEC_PATH" ];then if [ ! -f "$WINEPREFIX/reinstalled" ];then + # run installer touch $WINEPREFIX/reinstalled env LC_ALL=zh_CN.UTF-8 WINEDLLOVERRIDES="winemenubuilder.exe=d" $START_SHELL_PATH $BOTTLENAME $APPVER "$QQ_INSTALLER_PATH" "$@" if [ $APPRUN_CMD = "deepin-wine5" ]; then @@ -121,21 +59,9 @@ HelpApp() { echo " Extra Commands:" echo " winecfg Open winecfg" - echo " -d/--deepin Switch to 'deepin-wine'" echo " -h/--help Show program help info" } -if [ -f "$WINEPREFIX/deepin" ]; then - if [ "$(cat $WINEPREFIX/deepin)" = "5" ]; then - export APPRUN_CMD="deepin-wine5" - else - rm $WINEPREFIX/deepin - export APPRUN_CMD="wine" - fi -else - export APPRUN_CMD="wine" -fi - if [ -z $1 ]; then Run "$@" exit 0 @@ -144,9 +70,6 @@ case $1 in "winecfg") OpenWinecfg ;; - "-d" | "--deepin") - SwitchToDeepinWine - ;; "-h" | "--help") HelpApp ;; |