Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Script to build all configurations?



James,

On 26 Feb 2007, at 13:20, James Walker wrote:

How would you write, say, an AppleScript to build all configurations of a project? (I did do a search of the list archives, and found that I'm not the first person to ask this question, but found no answer.) I've used AppleScript before, but I guess I don't understand it deeply enough, because when I see an error message like "Can't make every build configuration into type reference", I have no idea what it means.

It's not obvious to me how to solve this problem using the xcodebuild command either. There's an -alltargets option, but no - allconfigurations option.

Here's a sample, where you'd replace <project> with the name of your project, <target{0,1,2}> with the names of your targets, and <configuration{0,1,2}> with the names of the configurations.


tell application "Finder"
open file "<project>.xcodeproj"
end tell
tell application "Xcode"
tell target "<target0>" of project "<project>" to build using build configuration "<configuration0>"
tell target "<target0>" of project "<project>" to build using build configuration "<configuration1>"
tell target "<target0>" of project "<project>" to build using build configuration "<configuration2>"
tell target "<target1>" of project "<project>" to build using build configuration "<configuration0>"
tell target "<target1>" of project "<project>" to build using build configuration "<configuration1>"
tell target "<target1>" of project "<project>" to build using build configuration "<configuration2>"
tell target "<target2>" of project "<project>" to build using build configuration "<configuration0>"
tell target "<target2>" of project "<project>" to build using build configuration "<configuration1>"
tell target "<target2>" of project "<project>" to build using build configuration "<configuration2>"
quit
end tell


Andreas Wittenstein
BitJazz Inc.
http://www.bitjazz.com/

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/xcode-users/email@hidden

This email sent to email@hidden
References: 
 >Script to build all configurations? (From: James Walker <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.