Skip to content

Commit

Permalink
修复覆盖安装可能会导致签名问题
Browse files Browse the repository at this point in the history
  • Loading branch information
yanmao committed Sep 16, 2020
1 parent 9a2351e commit 39a2e21
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
16 changes: 16 additions & 0 deletions WeChatExtension/Rely/Install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,23 @@ app_executable_path="${app_bundle_path}/${app_name}"
app_executable_backup_path="${app_executable_path}_backup"
framework_path="${app_bundle_path}/${framework_name}.framework"

# 先执行卸载流程
if [ -f "$app_executable_backup_path" ]
then
rm "$app_executable_path"
rm -rf "$framework_path"
mv "$app_executable_backup_path" "$app_executable_path"

if [ -f "$app_executable_backup_path" ]
then
echo "卸载失败,请到 /Applications/WeChat.app/Contents/MacOS 路径,删除 WeChatPlugin.framework、WeChat 两个文件文件,并将 WeChat_backup 重命名为 WeChat"
else
echo "\n\t卸载旧小助手成功,安装新版中..."
fi
#未发现小助手
fi

# 执行安装流程
# 对 WeChat 赋予权限
if [ ! -w "$wechat_path" ]
then
Expand Down
2 changes: 1 addition & 1 deletion WeChatExtension/Rely/Uninstall.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,5 @@ else
fi

else
echo "\n\t未发现微信小助手"
echo "\n\t未发现微信小助手"
fi

0 comments on commit 39a2e21

Please sign in to comment.