From 0bed460254a43f4e420afa10a776fd37c2edffc0 Mon Sep 17 00:00:00 2001 From: tk <1049893361@qq.com> Date: Fri, 18 Aug 2017 14:29:37 +0800 Subject: [PATCH] Update ==> Install.sh && README.md --- Other/Install.sh | 10 +++++----- README.md | 15 ++++++--------- 2 files changed, 11 insertions(+), 14 deletions(-) diff --git a/Other/Install.sh b/Other/Install.sh index 1cdbf43d..d8708245 100755 --- a/Other/Install.sh +++ b/Other/Install.sh @@ -12,8 +12,8 @@ framework_path="${app_bundle_path}/${framework_name}.framework" # 对 WeChat 赋予权限 if [ ! -w "$wechat_path" ] then -echo "请输入密码对微信赋予权限" -sudo chmod -R 777 "$wechat_path" +echo "更改微信的owner >>>" +sudo chown -R $(whoami) "$wechat_path" fi # 备份 WeChat 原始可执行文件 @@ -22,10 +22,10 @@ then cp "$app_executable_path" "$app_executable_backup_path" result="y" else -read -t 10 -p "已经安装过微信小助手,是否覆盖?[y/n]:" result +read -t 10 -p "已安装微信小助手,是否覆盖?[y/n]:" result fi if [[ "$result" == 'y' ]]; then - cp -r "./${shell_path}/Products/Debug/${framework_name}.framework" ${app_bundle_path} - ./${shell_path}/insert_dylib --all-yes "${framework_path}/${framework_name}" "$app_executable_backup_path" "$app_executable_path" + cp -r "${shell_path}/Products/Debug/${framework_name}.framework" ${app_bundle_path} + ${shell_path}/insert_dylib --all-yes "${framework_path}/${framework_name}" "$app_executable_backup_path" "$app_executable_path" fi diff --git a/README.md b/README.md index d9698517..503031a2 100644 --- a/README.md +++ b/README.md @@ -40,28 +40,25 @@ * 微信多开 ![微信多开.gif](http://upload-images.jianshu.io/upload_images/965383-51d8eae02d48fda9.gif?imageMogr2/auto-orient/strip) - - * 远程控制 (测试关闭Chrome、QQ、开启屏幕保护) ![远程控制.gif](http://upload-images.jianshu.io/upload_images/965383-0cf50d9b22b02f2f.gif?imageMogr2/auto-orient/strip) --- ### 安装 -* 先对微信赋予权限 `sudo chmod -R 777 /Applications/WeChat.app` 否则会出现类似**Permission denied**的错误。 -![Permission denied.png](http://upload-images.jianshu.io/upload_images/965383-11e4480553ba086e.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) +**1. 无安装Xcode** -**1. 已安装Xcode** +* 下载WeChatPlugin,用 Termimal 打开项目当前目录,执行 `./Other/Install.sh`即可。 +**2. 已安装Xcode** + +* 先更改微信的 owner `sudo chown -R $(whoami) /Applications/WeChat.app` 否则会出现类似**Permission denied**的错误。 +![Permission denied.png](http://upload-images.jianshu.io/upload_images/965383-11e4480553ba086e.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) * 下载 WeChatPlugin, 用Xcode打开,先进行 Build (`command + B`),之后 Run (`command + R`)即可启动微信,此时插件注入完成。 * 若 Error,提示找不到 Framework,先进行 Build。 -**2. 无安装Xcode** - -* 下载WeChatPlugin,用 Termimal 打开项目当前目录,执行 `./Other/Install.sh`即可。 - **3. 安装完成** * 登录微信,在**菜单栏**中看到**微信小助手**即安装成功。