• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: genstrings from Xcode project file list
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >genstrings from Xcode project file list (From: Sanford Selznick <email@hidden>)
 >Re: genstrings from Xcode project file list (From: Tommy Nordgren <email@hidden>)

  • Prev by Date: Re: Help...Debugger won't stop at breakpoints
  • Next by Date: Re: adding target dependencies to an Xcode project using AppleScript
  • Previous by thread: Re: genstrings from Xcode project file list
  • Next by thread: PackageMaker problem
  • Index(es):
    • Date
    • Thread