"Compile AppleScript" build phase replacement
"Compile AppleScript" build phase replacement
- Subject: "Compile AppleScript" build phase replacement
- From: Nathan Vander Wilt <email@hidden>
- Date: Fri, 19 Feb 2010 22:12:57 -0800
I noticed this question went unanswered in the list, but I think I've got a workaround:
http://lists.apple.com/archives/Xcode-users/2009/Sep/msg00630.html
The problem is that Xcode 3.2 no longer has a "Compile AppleScript" build phase option. However, Xcode can still compile AppleScripts through some (hidden?) build rule. The trick is that the File Type (in the General tab of Get Info) must be set to "sourcecode.applescript". If it is set to "sourcecode.scpt" (as it would default to if you add an new AppleScript to your project) you can neither compile it nor add it to your target as a resource.
Xcode 3.2 does add two helpful OSACompile build options to the interface, especially "Save as Execute-Only". (You used to need to add a user-defined "OTHER_OSAFLAGS = -x" line manually.)
So to recap, here's how I've been able to add a (re-)compiled AppleScript to my app in Xcode 3.2:
1. Add the AppleScript file
2. Make sure its file type is set to "sourcecode.applescript" regardless of it being text/not
3. You can then add the script to your target to have it compile like other source files
4. If you want your script Execute-only, use the OSACompile Build settings in the project or target info
After I got it working, it seemed familiar (maybe from a release note now buried somewhere), but hopefully this will save someone else from having to figure this out on their own.
regards,
-natevw _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden