2009-02-16
clangのための入力を簡易化する
Clangは既にbuildされていると正常に検査されないのでcleanする必要がある。けど毎回の長い入力作業がめんどくさかったので簡易化。また、何度か繰り返してるうちにエラーが含まれている事が判ったのでメモ。
arm-apple-darwin9-gcc-4.0.1がエラーを出すので、リンクをつくる
参照 qkiの日記
$ln -s /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/arm-apple-darwin9-gcc-4.0.1 /Developer/usr/bin/arm-apple-darwin9-gcc-4.0.1
cleanupの簡易化
xcodecleanupでDebug、Release、Distributionを全部cleanup。.bashrcに書き込む。
$echo "alias xcodecleanup='xcodebuild clean -configuration Debug > /tmp/cleanlog ;xcodebuild clean -configuration Release > /tmp/cleanlog ;xcodebuild clean -configuration Distribution > /tmp/cleanlog '" >> ~/.bashrc $source ~/.bashrc
コメント
2009-02-11
iPhone アプリのソースコードをterminalからビルドする場合
iTunes Connectでの申請情報が文字化けとか、いつ市場にでるのか判らない状態。とりあえずNDAにはほど遠い部分のことで初エントリーということに。
xcodeをterminalから動かす場合、iPhone内にインストールを指定できるのかは微妙です。多分そこらへんは判ったとしてもSDKに触れそうなので、通常使用の範囲内にて。
- xcodebuild
- 標準の指定構成でビルドする
- xcodebuild -configuration <target>
- 指定された構成でビルドする
- Target:
- Debug
- Release
- Distribution
- xcodebuild clean
- 標準の指定構成をクリーンアップする
- xcodebuild clean -configuration <target>
- 指定された構成をクリーンアップする
- Target:
- Debug
- Release
- Distribution
- xcodebuild -version
- xcodeのバージョンを表示
- xcodebuild -target <targetname>
- ビルドする対象のターゲットを標準の指定構成でビルド
- 複数のターゲットを同一フォルダ内に入れている場合等
- ビルドする対象のターゲットを標準の指定構成でビルド
- xcodebuild -project <targetprojectname>
- ビルドする対象のプロジェクトを標準の指定構成でビルド
- 複数のプロジェクトを同一フォルダ内に入れている場合等
- ビルドする対象のプロジェクトを標準の指定構成でビルド
Clangで解析する場合は、以下の手順。
$xcodebuild clean -configuration <target>
$scan-build -o ~/Documents/AppName --view xcodebuild -configuration <target>