gpt4 book ai didi

xcode - 无法从 Textmate 构建 XCode 4 项目

转载 作者:行者123 更新时间:2023-12-02 05:59:35 26 4
gpt4 key购买 nike

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

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”(STYLEARGNAME 变量在第 36 行设置)。

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

最佳答案

您想要修改/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

关于xcode - 无法从 Textmate 构建 XCode 4 项目,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6313638/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com