参考地址:http://www.mopsled.com/2016/build-optool-osx/

1、git clone https://github.com/alexzielenski/optool.git

2、cd optool/ git submodule update --init --recursive

这一步如果报错就直接下载CoreParse代码,丢到optool/FSArgumentParser/CoreParse里

CoreParse下载地址:https://github.com/beelsebob/CoreParse

ArgumentParser下载地址:https://github.com/mysteriouspants/ArgumentParser

optool下载地址:https://github.com/alexzielenski/optool

也就是CoreParse放ArgumentParser里,ArgumentParser放optool/FSArgumentParser里

 

--------------------------------------------------------------------------------------------------

How To Build optool on Mac OS 10.11

FEBRUARY 9, 2016

optool

optool is a tool for editing MachO executables load commands. This post outlines how to build optool from source.

Steps

Clone from git

git clone https://github.com/alexzielenski/optool.git

Make initialize optool’s submodules:

cd optool/
git submodule update --init --recursive

If you’re running into the errors:

‘FSArgumentParser/ArgumentParser/FSArguments.h’ file not found

or

No such file or directory: ‘optool/optool/FSArgumentParser/CoreParse/CoreParse/Parsers/CPShiftReduceParsers/CPItem.m’

run the git command above to recursively download optool’s submodule requirements.

Change optool’s deployment target

Unless you’re running Mac OS X 10.9, optool’s default project settings cause these build errors:

The run destination My Mac is not valid for Running the scheme ‘optool’.

or

Check dependencies error: There is no SDK with the name or path ‘/Users/mopsled/Source/optool/macosx10.9’

To fix it, the project’s build settings need to be changed.

Open the optool project in XCode. Click on the optool project in the project organizer:

Next, click on the optool target:

And change it to the optool project:

In the optool project, select Build Settings:

Select the Base SDK setting and change it to Latest OS X

Finally, click the Run button to compile optool for your Mac:

Locate the optool binary

After the project builds, select the optool Product in the project organizer and click Show in Finder:

Finder should open to the built copy of optool.

You’re done!

posted on 2016-05-26 22:39  袁晓平  阅读(3208)  评论(1编辑  收藏  举报