Mac 安装 home Brew以及 XCTool的过程记录

时间 : 14-09-04 栏目 : CI, iOS, 集成测试 作者 : meiw@z3a105.com 评论 : 0 点击 : 334 次

一、HomeBrew相关:

先对HomeBrew做一个简单的介绍吧,之前了解的也不多。

主要就是用于安装Unix的工具包。

注意:HomeBrew依赖于Xcode的 Command Line Tool.

官方的链接:

http://mxcl.github.io/homebrew/

 

Homebrew作为OS X上强大的包管理器,为系统软件提供了非常方便的安装方式,独特式的解决了包的依赖问题,并不再需要烦人的sudo,一键式编译,无参数困扰,真的,你值得拥有。

安装

Homebrew依赖于XCode,首先需要安装,lion后XCode也是免费的了,直接到App store下载。同时Homebrew也依赖ruby,Mac已经自带ruby。

1
ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"

使用

  • 查看brew的帮助
1
brew --help
  • 安装软件
1
brew install git
  • 卸载软件
1
brew uninstall git
  • 搜索软件
1
brew search git
  • 显示已经安装软件列表
1
brew list
  • 更新软件,把所有的Formula目录更新,并且会对本机已经安装并有更新的软件用*标明。
1
brew update
  • 更新某具体软件
1
brew upgrade git
  • 查看软件信息
1
brew [info | home] [FORMULA...]
  • 删除程序,和upgrade一样,单个软件删除和所有程序老版删除。
1
2
brew cleanup git
brew cleanup
  • 查看那些已安装的程序需要更新
1
brew outdated

程序安装路径及文件夹

Homebrew将本地的/usr/local初始化为git的工作树,并将目录所有者变更为当前所操作的用户,以后的操作将不需要sudo。

1
2
3
4
5
6
-bin          用于存放所安装程序的启动链接(相当于快捷方式)
-Cellar       所以brew安装的程序,都将以[程序名/版本号]存放于本目录下
-etc          brew安装程序的配置文件默认存放路径
-Library      Homebrew 系统自身文件夹
+–Formula     程序的下载路径和编译参数及安装路径等配置文件存放地
+–Homebrew    brew程序自身命令集

 

HomeBrew与MacPorts的比较,貌似MacPorts会被人逐渐遗弃

http://hi.hiing.net/2011/06/use-homebrew-package-management.html

 

二、XCTool相关

xctool是facebook开源的一个命令行工具,用来替代苹果的xcodebuild工具。

功能如下:

  • 像xcode一样跑测试用例
  • 结构化输出编译测试结果
  • 彩色且方便阅读的编译内容输出

示例截图:

xctool

如何安装xctool

最简单的办法是通过homebrew安装xctool

brew update
brew install xctool

搞定

如何使用xctool

打包

path/to/xctool.sh \
  -workspace YourWorkspace.xcworkspace \
  -scheme YourScheme \
  archive

build

path/to/xctool.sh \
  -workspace YourWorkspace.xcworkspace \
  -scheme YourScheme \
  build

测试

path/to/xctool.sh \
  -workspace YourWorkspace.xcworkspace \
  -scheme YourScheme \
  test

使用命令如下,上面的命令参照

切换到工程目录下,然后输入如下命令:

xctool -workspace taoappios.xcworkspace -scheme taoappios archive

生成archive文件

xctool -workspace taoappios.xcworkspace -scheme taoappios build

编译

usage: xctool [BASE OPTIONS] [ACTION [ACTION ARGUMENTS]] ...

Examples:

    xctool [BASE OPTIONS] clean

    xctool [BASE OPTIONS] build

    xctool [BASE OPTIONS] build-tests [-only TARGET] [-skip-deps]

    xctool [BASE OPTIONS] run-tests [-test-sdk SDK] [-only SPEC] [-freshSimulator] [-freshInstall]

    xctool [BASE OPTIONS] test [-test-sdk SDK] [-only SPEC] [-skip-deps] [-freshSimulator] [-freshInstall]

    xctool [BASE OPTIONS] archive

Base Options:

    -help                    show help

    -workspace PATH          path to workspace

    -project PATH            path to project

    -scheme NAME             scheme to use for building or testing

    -find-target TARGET      Search for the workspace/project/scheme to build the target

    -find-target-path PATH   Path to search for -find-target.

    -find-target-exclude-pathColon-separated list of paths to exclude for -find-target.

    -sdk VERSION             sdk to use for building (e.g. 6.0, 6.1)

    -configuration NAME      configuration to use (e.g. Debug, Release)

    -jobs NUMBER             number of concurrent build operations to run

    -arch ARCH               arch to build for (e.g. i386, armv7)

    -toolchain PATH          path to toolchain

    -xcconfig PATH           path to an xcconfig

    -reporter TYPE[:FILE]    add reporter

    -showBuildSettings       display a list of build settings and values

    -version                 print version and exit

    SETTING=VALUE            Set the build 'setting' to 'value'

Options for 'build-tests' action:

    -only TARGET             build only a specific test TARGET

    -skip-deps               Only build the target, not its dependencies

Options for 'run-tests' action:

    -test-sdk SDK            SDK to test with

    -only SPEC               SPEC is TARGET[:Class/case[,Class2/case2]]

    -freshSimulator          Start fresh simulator for each application test target

    -freshInstall            Use clean install of TEST_HOST for every app test run

Options for 'test' action:

    -test-sdk SDK            SDK to test with

    -only SPEC               SPEC is TARGET[:Class/case[,Class2/case2]]

    -skip-deps               Only build the target, not its dependencies

    -freshSimulator          Start fresh simulator for each application test target

    -freshInstall            Use clean install of TEST_HOST for every app test run

 

本文标签 ,

除非注明,文章均为( meiw@z3a105.com )原创,转载请保留链接: http://blog.z3a105.com/?p=23

Mac 安装 home Brew以及 XCTool的过程记录:等您坐沙发呢!

发表评论





       ==QQ:122320466==

 微信    QQ群

推广

  • 104726drf320ff09r7i62f.jpg
  • 103217vn3333zbk3snwz2u.jpg

0

Aujourd’hui, une partie avec le développement du e-commerce, achats en ligne est devenu une partie de la vie pour beaucoup de gens. La mariage a commencé achats en ligne. Si vous choisissez achats les mariages en ligne, il peut être beaucoup moins cher que le salon de la Robe de mariée pas chermariée local, réduisant le budget de mariage. vous pouvez avoir beaucoup de choix si acheter de mariage en ligne. vous pouvez ramasser une robe de mariée bon marché sur Internet.
Piercing fascinerande figur, och nu tittar vi på 2016 senast brudklänning, kan du vara den vackraste bruden det!2016 senaste Bra brudklänning, söt temperament Bra design, romantiska spetsar blomma kjol, som du lägger till en elegant och charmig temperament.Kvinnan tillbaka mjuka linjer, människor brudklänningofta få en känsla av oändlig frestelse. Fall 2016 mässan, lämnar uppgifter om ditt bröllop charmig.
Yesterday afternoon, the Chinese team was training in the Guangzhou Gymnasium, when the reporter asked Zhao Yunlei the feeling of wearing the new cheap jersey , cheap jerseys online shopshe readily took a shirt from the bag crumpled ball to reporters, and she said with a smile: ” This shirt is light. ”Zhao Yunlei said: “Our material is very light like with the clothes of the tennis King Nadal, Federer, after the sweat, sweat does not drip down to the ground, when we do move, it is easy pace slipping if the sweat drip on the floor.”Tennis players Zhang Yawen, told reporters: “You might think the clothes attached to the body, fearing we swing will be affected, in fact, we do not feel anything, because the clothes are very light, very soft, put on quite comfortable. And it’s particularly good clothes to dry, washing and will dry in 15 minutes. ”
China’s sports enthusiasts NFL sweatshirt with mad love and the pursuit of, and therefore, NFL jerseys have a good market in China and development. China is a populous country, is the consumer, the economic momentum is so good, the sales prospects sportswear is immeasurable. With hot sales sweatshirt, but also to promote the importance of sports fans, on health, on the other hand is a matter of concern for the World Cup, fans wearing NFL jerseys and also can express themselves more fully love and obsession Therefore, NFL jerseys Wholesale jerseys online shopwholesale has good prospects and development in China.
ANTA-ANTA Sports Products Limited, referred to as ANTA Sports, Anta, is China’s leading sporting goods companies, mainly engaged in the design, development, manufacture and marketing of ANTA brand sporting goods, including sports footwear, apparel and accessories. Anta sweatshirt design advantages, warm stretch knit fabric, using Slim version of model, more personal fit, bid farewell to bloated, so wearing more stylish.GUIRENNIAO-This logo is a spiritual totem, smooth graphics implication unstoppable force; flexible deliver an elegant arc Wholesale jerseys china shop movement, strength and speed of the United States, a symbol of passion and rationality publicity “Heart” and “meaning”, “concept” unity; pass the fearless and enterprising mind, showing beyond the realm of self, to unstoppable force to create the future.XTEP-Xtep (China) Co., Ltd. is a comprehensive development wholesale jerseys china shop, production and marketing of Xtep brand (XTEP) sports shoes, clothing, bags, caps, balls, socks mainly large sporting goods industry enterprises.
There are a lot of fans in identifying the authenticity of the above cheap jerseys have great distress, so here to i will show you some methods to definitely affordable inexpensive cheap jerseys : Firstly, we should look at if it is working fine. China has been called the world’s factory, a lot cheap jerseys factories in China have foundries, but our cheap jerseys are all from here! Secondly, should to see whether it is the , we all know that it is difficult to get out of print once a genuine cheap cheap jerseys free shipping jersey was print. and we have all kind of stocka on the whole website, in other words, we have all you want ! Finally, look at the price, our price is not necessarily the lowest in the whole website but it must be most fair on the whole website, we certainly you will not regret later when you buy it. Of course, except that cheap jerseys, we also have the other products, such as socks, leggings and some other related products, everyone can enjoy the best services of here!