700字范文,内容丰富有趣,生活中的好帮手!
700字范文 > Mac 安装 home Brew以及 XCTool的过程记录

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

时间:2022-09-25 09:23:31

相关推荐

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

一、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。

使用

查看brew的帮助安装软件卸载软件搜索软件显示已经安装软件列表更新软件,把所有的Formula目录更新,并且会对本机已经安装并有更新的软件用*标明。更新某具体软件查看软件信息删除程序,和upgrade一样,单个软件删除和所有程序老版删除。查看那些已安装的程序需要更新

程序安装路径及文件夹

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

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

//06/use-homebrew-package-management.html

二、XCTool相关

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

功能如下:

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

示例截图:

如何安装xctool

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

brew updatebrew 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

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。