diff options
author | Codist | 2020-07-19 12:30:27 +0800 |
---|---|---|
committer | Codist | 2020-07-19 12:30:27 +0800 |
commit | 109665bc7d76a27d019e44bfb41d83263b88fff2 (patch) | |
tree | 33d89a30cb970ba9c5505e07e4a97b746482d7a8 /run.sh | |
parent | a0543b46f668865d54f4312ec77e1017b901d169 (diff) | |
download | aur-109665bc7d76a27d019e44bfb41d83263b88fff2.tar.gz |
Upgrade QQ to 9.3.6.27263
Signed-off-by: Codist <countstarlight@gmail.com>
Diffstat (limited to 'run.sh')
-rwxr-xr-x | run.sh | 29 |
1 files changed, 21 insertions, 8 deletions
@@ -10,7 +10,7 @@ WINEPREFIX="$HOME/.deepinwine/Deepin-QQ" APPDIR="/opt/deepinwine/apps/Deepin-QQ" APPVER="9.1.8deepin0" QQ_INSTALLER="PCQQ2020" -QQ_VER="9.3.5.27030" +QQ_VER="9.3.6.27263" APPTAR="files.7z" PACKAGENAME="com.qq.im" WINE_CMD="wine" @@ -95,29 +95,42 @@ CreateBottle() fi } +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-wine" if ! [ -x "$(command -v yay)" ]; then if ! [ -x "$(command -v yaourt)" ]; then - echo "Error: Need to install 'yay' or 'yaourt' first." >&2 + msg 1 "Need to install 'yay' or 'yaourt' first." >&2 exit 1 else $PACKAGE_MANAGER="yaourt" fi fi - echo -e "\033[0;34mInstalling dependencies ...\033[0m" - $PACKAGE_MANAGER -S deepin-wine xsettingsd lib32-freetype2-infinality-ultimate --needed - echo -e "\033[0;34mRedeploying app ...\033[0m" + if [[ -z "$(ps -e | grep -o gsd-xsettings)" ]]; then + DEEPIN_WINE_DEPENDS="${DEEPIN_WINE_DEPENDS} xsettingsd" + fi + if [ "$XDG_CURRENT_DESKTOP" = "Deepin" ]; then + DEEPIN_WINE_DEPENDS="${DEEPIN_WINE_DEPENDS} lib32-freetype2-infinality-ultimate" + fi + msg 0 "Installing dependencies: ${DEEPIN_WINE_DEPENDS} ..." + $PACKAGE_MANAGER -S ${DEEPIN_WINE_DEPENDS} --needed + msg 0 "Redeploying app ..." if [ -d "$WINEPREFIX" ]; then RemoveApp fi DeployApp - echo -e "\033[0;34mReversing the patch ...\033[0m" + msg 0 "Reversing the patch ..." patch -p1 -R -d ${WINEPREFIX} < $APPDIR/reg.patch - echo -e "\033[0;34mCreating flag file '$WINEPREFIX/deepin' ...\033[0m" + msg 0 "Creating flag file '$WINEPREFIX/deepin' ..." touch -f $WINEPREFIX/deepin - echo -e "\033[0;34mDone.\033[0m" + msg 0 "Done." } # Init |