diff options
author | Codist | 2020-07-20 23:59:02 +0800 |
---|---|---|
committer | Codist | 2020-07-20 23:59:02 +0800 |
commit | eafd111141561d1bccfe3fcf3875f51e4b781b9d (patch) | |
tree | 738f16033de76faaef8c11669a19ee3b1091626c /run.sh | |
parent | edc3a70ab35cab0b23c5673f5d6bcc4c82e9e21d (diff) | |
download | aur-eafd111141561d1bccfe3fcf3875f51e4b781b9d.tar.gz |
Upgrade WeChat to 2.9.5.56
Signed-off-by: Codist <countstarlight@gmail.com>
Diffstat (limited to 'run.sh')
-rwxr-xr-x | run.sh | 33 |
1 files changed, 23 insertions, 10 deletions
@@ -11,7 +11,7 @@ WINEPREFIX="$HOME/.deepinwine/Deepin-WeChat" APPDIR="/opt/deepinwine/apps/Deepin-WeChat" APPVER="2.6.8.65deepin0" WECHAT_INSTALLER="WeChatSetup" -WECHAT_VER="2.9.5.41" +WECHAT_VER="2.9.5.56" APPTAR="files.7z" PACKAGENAME="com.wechat" WINE_CMD="wine" @@ -39,7 +39,7 @@ CallApp() env WINEPREFIX="$WINEPREFIX" WINEDEBUG=-msvcrt $WINE_CMD "c:\\Program Files\\Tencent\\WeChat\\WeChat.exe" & fi - if [ ! -f "$WINEPREFIX/deepin" ]; then + if [ "$WINE_CMD" = "wine" ]; then # run 'shadow.exe' if process not exist if [[ -z "$(ps -e | grep -o 'shadow.exe')" ]]; then env WINEPREFIX="$WINEPREFIX" WINEDEBUG=-msvcrt $WINE_CMD "c:\\shadow.exe" & @@ -104,29 +104,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" + fi + 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 |