Re: genstrings from Xcode project file list
Re: genstrings from Xcode project file list
- Subject: Re: genstrings from Xcode project file list
- From: Sanford Selznick <email@hidden>
- Date: Wed, 3 Jan 2007 08:41:34 -0700
At 6:55 PM +0100 1/2/07, Tommy Nordgren wrote:
On 2 jan 2007, at 18.40, Sanford Selznick wrote:
Is there a way to get a list of source files out of an Xcode
project and pass it to genstrings somehow? (Xcode 2.4.1)
Sure. Check out any good book on Apple Script.
It is possible to use Apple Script from Shell, Python, or Perl Scripts
In a build phase I did this:
osascript
"/Volumes/Programming/UtilityScripts/genstringsFromProject.scpt"
"${PROJECT_NAME}"
And here's the script: (pardon e-mail formatting)
---
on run (projectname)
tell application "Xcode"
set projpath to project directory of project named projectname
set filelist to get full path of
file references of
project named projectname whose
file kind contains "sourcecode"
end tell
set command to "genstrings -o \"" & projpath & "/English.lproj\" "
repeat with i from 1 to the count of filelist
set onepath to (item i of filelist)
set command to command & " \"" & onepath & "\" "
end repeat
-- Uncomment for debugging:
-- set the clipboard to command
do shell script command
end run
---
It works well, and it's really fast!
Thanks!
Sanford
_______________________________________________
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