• 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: Info.plist preprocessing in single-file tool? [SOLVED]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Info.plist preprocessing in single-file tool? [SOLVED]


  • Subject: Re: Info.plist preprocessing in single-file tool? [SOLVED]
  • From: Nathan Ramella <email@hidden>
  • Date: Mon, 9 Mar 2009 01:40:32 -0700

Here's an example of Plistbuddy using -c. Under my targets for a kernel module I added a 'Run Script' command like this:

/usr/libexec/PlistBuddy -c "set OSBundleLibraries:com.apple.kernel `uname -r`" Info.plist

This will modify to plist entry so that 'ANYTHING' is replaced with the currently running kernel version for your system. I'm sure kext developers will shudder at that technique, but I got tired of having to hand fix it across the multiple kernel versions I test against. Something with 'sed' or XML parsing will do the same thing, but I wanted to try doing it 'The Apple' way using their provided tools to see if it would be possible.

<key>OSBundleLibraries</key>
	 <dict>
                <key>com.apple.kernel</key>
                <string>ANYTHING</string>
        </dict>

There is one caveat, it doesn't always update/run the script for some reason, I'm guessing mtime of the target plist. But if you make clean, make, it works 100% -- it might work 100% if there's enough time between makes as well but no promises from me.

-Nathan Ramella



On Mar 6, 2009, at 10:00 AM, Philip Aker wrote:

On 2009-03-06, at 08:26:27, Karl Moskowski wrote:

Note that the man page mentions that a future version will support only preferences manipulation, not general plist processing; maybe Xcode will better support Info.plist processing in tool-type targets by then. (I've filed Radar Bug #6646614 in case anyone wants to join the fun.)

There's also: <x-man-page://8/PlistBuddy>. But I've yet to figure out how to use the -c option successfully.

Philip Aker
echo email@hidden@nl | tr a-z@. p-za-o.@

Democracy: Two wolves and a sheep voting on lunch.

_______________________________________________
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



_______________________________________________
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


  • Follow-Ups:
    • Re: Info.plist preprocessing in single-file tool? [SOLVED]
      • From: Philip Aker <email@hidden>
References: 
 >Re: Info.plist preprocessing in single-file tool? [SOLVED] (From: Karl Moskowski <email@hidden>)
 >Re: Info.plist preprocessing in single-file tool? [SOLVED] (From: Philip Aker <email@hidden>)

  • Prev by Date: Re: typedef enums are now unsigned?!
  • Next by Date: [error] Unit Test for PDE (Test rig ... with code 138)
  • Previous by thread: Re: Info.plist preprocessing in single-file tool? [SOLVED]
  • Next by thread: Re: Info.plist preprocessing in single-file tool? [SOLVED]
  • Index(es):
    • Date
    • Thread