diff options
author | Vufa | 2022-02-15 14:32:49 +0800 |
---|---|---|
committer | Vufa | 2022-02-15 14:32:49 +0800 |
commit | 89d200cde6148ee018074923fe85f4f4bac2832a (patch) | |
tree | 214a62709060a2195caaf1b3e941750bae981b8e /run.sh | |
parent | d0a5ad0bb90a3d38d85ba0fd1f7c8b5fe1edf30c (diff) | |
download | aur-89d200cde6148ee018074923fe85f4f4bac2832a.tar.gz |
re-deploy bollte after reinstalling.
Signed-off-by: Vufa <countstarlight@gmail.com>
Diffstat (limited to 'run.sh')
-rwxr-xr-x | run.sh | 40 |
1 files changed, 26 insertions, 14 deletions
@@ -39,6 +39,27 @@ OpenWinecfg() env WINEPREFIX=$WINEPREFIX $APPRUN_CMD winecfg } +DeployApp() +{ + # backup fonts + if [ -d "$WECHAT_FONTS" ];then + mkdir -p $HOME/.deepinwine/.wechat_tmp + cp $WECHAT_FONTS/* $HOME/.deepinwine/.wechat_tmp/ + fi + + # re-deploy bottle + rm -rf "$WINEPREFIX" + # run installer + env WINEDLLOVERRIDES="winemenubuilder.exe=d" $START_SHELL_PATH $BOTTLENAME $APPVER "$WECHAT_INSTALLER_PATH" "$@" + + # restore fonts + if [ -d "$HOME/.deepinwine/.wechat_tmp" ];then + cp -n $HOME/.deepinwine/.wechat_tmp/* $WECHAT_FONTS/ + rm -rf "$HOME/.deepinwine/.wechat_tmp" + fi + touch $WINEPREFIX/reinstalled +} + Run() { if [ -z "$DISABLE_ATTACH_FILE_DIALOG" ];then @@ -51,22 +72,13 @@ Run() if [ -n "$EXEC_PATH" ];then if [ ! -f "$WINEPREFIX/reinstalled" ];then - # backup fonts - if [ -d "$WECHAT_FONTS" ];then - mkdir $HOME/.deepinwine/.wechat_tmp - cp "$WECHAT_FONTS/*" "$HOME/.deepinwine/.wechat_tmp/" + DeployApp + else + # missing exec file + if [ ! -d "$EXEC_PATH" ];then + DeployApp fi - # run installer - env WINEDLLOVERRIDES="winemenubuilder.exe=d" $START_SHELL_PATH $BOTTLENAME $APPVER "$WECHAT_INSTALLER_PATH" "$@" - - # restore fonts - if [ -d "$HOME/.deepinwine/.wechat_tmp" ];then - cp -n "$HOME/.deepinwine/.wechat_tmp/*" "$WECHAT_FONTS/" - rm -rf "$HOME/.deepinwine/.wechat_tmp" - fi - touch $WINEPREFIX/reinstalled - else if [ -z "${EXEC_PATH##*.lnk*}" ];then $START_SHELL_PATH $BOTTLENAME $APPVER "C:/windows/command/start.exe" "/Unix" "$EXEC_PATH" "$@" else |