diff options
Diffstat (limited to 'run.sh')
-rwxr-xr-x | run.sh | 26 |
1 files changed, 17 insertions, 9 deletions
@@ -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 |