我的optool安装以及问题

作者: 游城十代2dai | 来源:发表于2017-01-27 11:13 被阅读337次

关于optool网上的资源还可以,我认为这个mac下编译optool方法写的就很不错, 我会附带图片说明

  • 安装
  1. 从Git上克隆一下, 此时的optool还不完整
git clone https://github.com/alexzielenski/optool.git
  1. 进行安装,尝试一下会不会出错,如果出错肯定是optool 不完整
cd optool/
git submodule update --init --recursive
  1. 出错了的话, 就去看看FSArgumentParser/CoreParse这两个文件夹有没有东西, 少了什么就去添加什么, FSArgumentParser, CoreParse, 也就是CoreParseArgumentParser里,ArgumentParseroptool/FSArgumentParser
  2. 弄完第三步,再去执行第二步
  3. 此时回到带有.git的最外面的根目录下执行
xcodebuild -project optool.xcodeproj -configuration Release ARCHS="x86_64" build
  1. 如果遇到以下错误, 到工程中修改Build Settings的版本信息选择 Latest macos最新的版本
Check dependencies error: There is no SDK with the name or path ‘/Users/mopsled/Source/optool/macosx10.9’
第六步

在使用optool的时候举个例子:

$ /path/to/optool install -c load -p "@executable_path/WeChatRedEnvelop.dylib" -t wechat/Payload/WeChat.app/WeChat

类似这么个使用方式,其中的/path/to/optool这个东西是你的optool工程运行之后的产物。。。所在的地址

运行工程 show in finder 就是这个所在的地址

ps: 也许会遇到 Submodule path 'optool/FSArgumentParser/CoreParse': checked out '1be510abdfffb33544272cd2ce82d4b0b3260723'这么个问题, 我也不知道怎么过去的, 这个问题就是多试几次 git submodule update --init --recursive这个就会好

我的整个过程截图

相关文章

网友评论

  • 小王子sl:有 修改过的 optool源码吗
    方便 发我 一份吗

本文标题:我的optool安装以及问题

本文链接:https://www.haomeiwen.com/subject/srpfittx.html