[SVN] Revision 1444 (Source)

Chris Thomas chris at cjack.com
Sat Aug 6 05:12:18 UTC 2005


On Aug 5, 2005, at 7:07 PM, Allan Odgaard wrote:

> • updated command to Xcode 2.0
>
> It no longer works with 1.5 since xcodebuild (accompanying 2.0)  
> will place the built application in a Development sub-folder for  
> pre-2.0 projects, so a missing “active configuration” setting can't  
> be used to indicate 1.5. We could query the version of xcodebuild,  
> except that '-version' seems to be something which wasn't added  
> until Xcode 2.0.

Pretty sure this should work (see following patch).  
Xcode.supports_configurations? checks the version. The error from  
earlier version of the tools won't match the regexp and will  
therefore fail.

Index: /Users/chris/Library/Application Support/TextMate/Bundles/ 
Source.tmbundle/Commands/Run (xcode target).plist
===================================================================
--- /Users/chris/Library/Application Support/TextMate/Bundles/ 
Source.tmbundle/Commands/Run (xcode target).plist    (.../Run%20(xcode 
%20target).plist)    (revision 1445)
+++ /Users/chris/Library/Application Support/TextMate/Bundles/ 
Source.tmbundle/Commands/Run (xcode target).plist    (.../Run (xcode  
target).plist)    (working copy)
@@ -18,6 +18,7 @@
"${TM_RUBY:=ruby}" <<'EOF'
require "#{ENV['TM_SUPPORT_PATH']}/lib/plist"
+require "#{ENV['TM_BUNDLE_PATH']}/bin/xcode_version"
def shell_escape (str)
     str.gsub(/[`'" $]/, '\\\\\&')
@@ -37,12 +38,12 @@
userFile     = "#{ENV['PROJECT_DIR']}/#{ENV['USER']}.pbxuser"
user         = PropertyList::load(File.new(userFile))
-activeConfig = user[proj['rootObject']]['activeBuildConfigurationName']
-if activeConfig
-   dir = dir + "/" + activeConfig
-else
-   dir = dir + "/Development"
+if Xcode.supports_configurations? then
+    activeConfig = user[proj['rootObject']] 
['activeBuildConfigurationName']
+    activeConfig = "Development" if activeConfig.nil?
+
+    dir += "/#{activeConfig}"
end
targets = rootObj['targets']





More information about the textmate-dev mailing list