10年以上前の Cocoa アプリをコンパイルする必要が出てきたので、それのメモ書き。
一応で Mac OS X 10.9 以上に対応させるのが目的。
XCodeのバージョンは9.2、AppStoreからインストールしたものです。
準備
- https://github.com/devernay/xcodelegacy から XcodeLegacy.sh をダウンロードしておく。
- https://github.com/phracker/MacOSX-SDKs/releases から対象SDKをダウンロードしておく
インストール
対象SDK(この場合は MacOSX10.9.sdk.tar.xz
)のあるディレクトリで、XcodeLegacy.sh
のコマンドを実行する。
~/Downloads/r $ sudo /Users/yasui/bin/XcodeLegacy.sh -osx109 install
*** Info: found Xcode >= 4.3 in /Applications/Xcode.app
*** installed MacOSX10.9.sdk.tar.xz
*** modified MacOSX Info.plist
*** Warning: /Developer/SDKs should be a symlink to /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs
Check that /Developer exists, and fix /Developer/SDKs with:
$ sudo ln -sf '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs' /Developer/SDKs
設定
対象プロジェクトでプロジェクトの Architecture
→BaseSDK
でOS X 10.9
が選択できれば成功です。