无法从Textmate构建XCode 4项目 [英] Can't build XCode 4 Project from Textmate

查看:82
本文介绍了无法从Textmate构建XCode 4项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在TextMate中打开了一个新创建的XCode 4项目(通过像手册中所建议的那样将项目文件夹拖放到TextMate图标上),并尝试使用Command-B快捷方式进行构建并选择2进行XCode构建.我收到以下错误

I've opened a newly created XCode 4 project in TextMate (by dropping the project folder on the TextMate icon like the manual suggests) and have attempted to build it using the Command-B shortcut and selecting 2 for an XCode build. I get the following error

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"选项的正在运行的命令吗?

Any idea where I can modify the command being run that is specifying the '-activebuildstyle' option?

命令似乎在TextMate.app/Contents/SharedSupport/Bundles/Xcode.tmbundle/Support/run_xcodebuild.sh

第57/60行具有"-activebuildstyle"(在第36行设置了STYLEARGNAME变量).

line 57/60 has "-activebuildstyle" (the STYLEARGNAME variable being set on line 36).

当然,这可能只是一系列xcode 4/textmate兼容性问题中的一个错误.

of course, this may just be one error in a series of xcode 4/textmate compatibility issues.

推荐答案

您要修改/Applications/TextMate.app/Contents/SharedSupport/Bundles/Xcode.tmbundle/Support/bin/xcode_version.rb来检测xcode 4,替换此行

you want to modify /Applications/TextMate.app/Contents/SharedSupport/Bundles/Xcode.tmbundle/Support/bin/xcode_version.rb to detect xcode 4, replace this line

@@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 (我注释掉的行是原稿)

you also want to modify /Applications/TextMate.app/Contents/SharedSupport/Bundles/Xcode.tmbundle/Support/bin/run_xcodebuild.sh ( the lines that I commented-out are the originals )

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 

这篇关于无法从Textmate构建XCode 4项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆