aboutsummarylogtreecommitdiffstats
path: root/run.sh
diff options
context:
space:
mode:
authorCodist2020-05-10 17:39:23 +0800
committerCodist2020-05-10 17:39:23 +0800
commit93d413fa9068fa54ab978400d676293a5e3ef6bf (patch)
tree278d95627eea5a147819be9dc778e4c070e2d182 /run.sh
parentb8c11839dc3def052bba49ce66d6cce5ff8d1e16 (diff)
downloadaur-93d413fa9068fa54ab978400d676293a5e3ef6bf.tar.gz
Upgrade WeChat to 2.9.0.123 and optimized switch to deepin-wine
Signed-off-by: Codist <countstarlight@gmail.com>
Diffstat (limited to 'run.sh')
-rwxr-xr-xrun.sh26
1 files changed, 17 insertions, 9 deletions
diff --git a/run.sh b/run.sh
index c0707dc94f0e..5e1a2209c3c0 100755
--- a/run.sh
+++ b/run.sh
@@ -10,7 +10,7 @@ WINEPREFIX="$HOME/.deepinwine/Deepin-WeChat"
APPDIR="/opt/deepinwine/apps/Deepin-WeChat"
APPVER="2.6.8.65deepin0"
WECHAT_INSTALLER="WeChatSetup"
-WECHAT_VER="2.9.0.114"
+WECHAT_VER="2.9.0.123"
APPTAR="files.7z"
PACKAGENAME="com.wechat"
WINE_CMD="wine"
@@ -37,9 +37,12 @@ CallApp()
env WINEPREFIX="$WINEPREFIX" WINEDEBUG=-msvcrt $WINE_CMD "c:\\Program Files\\Tencent\\WeChat\\WeChat.exe" &
fi
- # 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" &
+
+ if [ ! -f "$WINEPREFIX/deepin" ]; 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" &
+ fi
fi
}
ExtractApp()
@@ -102,10 +105,6 @@ CreateBottle()
SwitchToDeepinWine()
{
- if [ -d "$WINEPREFIX" ]; then
- RemoveApp
- DeployApp
- fi
PACKAGE_MANAGER="yay"
if ! [ -x "$(command -v yay)" ]; then
if ! [ -x "$(command -v yaourt)" ]; then
@@ -115,9 +114,18 @@ SwitchToDeepinWine()
$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 [ -d "$WINEPREFIX" ]; then
+ RemoveApp
+ fi
+ DeployApp
+ echo -e "\033[0;34mReversing the patch ...\033[0m"
+ patch -p1 -R -d ${WINEPREFIX} < $APPDIR/reg.patch
+ echo -e "\033[0;34mCreating flag file '$WINEPREFIX/deepin' ...\033[0m"
touch -f $WINEPREFIX/deepin
- echo "Done."
+ echo -e "\033[0;34mDone.\033[0m"
}
# Init