4

TextMate で新しく作成された XCode 4 プロジェクトを開き (マニュアルが示唆するように、プロジェクト フォルダーを TextMate アイコンにドロップして)、Command-B ショートカットを使用して XCode ビルドに 2 を選択してビルドしようとしました。次のエラーが表示されます

xcodebuild: error: invalid option '-activebuildstyle'
Usage: xcodebuild [-project <projectname>] [[-target <targetname>]...|-alltargets] [-configuration <configurationname>] [-arch <architecture>]... [-sdk [<sdkname>|<sdkpath>]] [<buildsetting>=<value>]... [<buildaction>]...
       xcodebuild -workspace <workspacename> -scheme <schemeName> [-configuration <configurationname>] [-arch <architecture>]... [-sdk [<sdkname>|<sdkpath>]] [<buildsetting>=<value>]... [<buildaction>]...
       xcodebuild -version [-sdk [<sdkfullpath>|<sdkname>] [<infoitem>] ]
       xcodebuild -list [[-project <projectname>]|[-workspace <workspacename>]]
       xcodebuild -showsdks
Options:
    -usage                print full usage
    -verbose              provide additional status output
    -project NAME         build the project NAME
.
.
.
.

「-activebuildstyle」オプションを指定している実行中のコマンドを変更できる場所はありますか?

コマンドが入っているようですTextMate.app/Contents/SharedSupport/Bundles/Xcode.tmbundle/Support/run_xcodebuild.sh

行 57/60 には「-activebuildstyle」があります (行 36 で STYLEARGNAME 変数が設定されています)。

もちろん、これは一連の xcode 4/textmate 互換性の問題の 1 つのエラーにすぎない可能性があります。

4

1 に答える 1

3

/Applications/TextMate.app/Contents/SharedSupport/Bundles/Xcode.tmbundle/Support/bin/xcode_version.rb を変更して xcode 4 を検出するには、この行を置き換えます

@@xcode2dot1_or_later = (version_match != nil && ...

これとともに:

xcode4 = /Xcode 4\./.match(version_str)
@@xcode2dot1_or_later = xcode4 || (version_match != nil && ...

/Applications/TextMate.app/Contents/SharedSupport/Bundles/Xcode.tmbundle/Support/bin/run_xcodebuild.sh も変更したい (コメントアウトした行はオリジナルです)

if [[ -n $TM_BUILDSTYLE ]]; then    
    # If we have an Xcode project, and it doesn't contain the build style we're looking for,
    # accept the active build style in the project.
    if [[ -d $PROJECT_FILE ]] && xcodebuild -project "$PROJECT_FILE" -list | awk 'display == "yes" { sub(/^[ \t]+/, ""); print }; /Build (styles|Configurations)/ { display = "yes" }' |    grep -F "${BUILD_STYLE}" &>/dev/null; then
        BUILD_STYLE="-$STYLEARGNAME $BUILD_STYLE";
    else
        # BUILD_STYLE="-active$STYLEARGNAME"
        BUILD_STYLE=""
    fi
else
    # BUILD_STYLE="-active$STYLEARGNAME"
    BUILD_STYLE=""
fi 
于 2011-08-25T15:43:48.177 に答える