You can also create your own helper tool compiled with GC support and,
that just preflight the bundle you pass as argument and return the
result.
It's a little more works, but it's cleaner too.
Le 9 août 08 à 03:32, André Pang a écrit :
On 08/08/2008, at 3:18 PM, Chris Suter wrote:
You want to look at the __image_info section in the __OBJC segment:
struct objc_image_info {
uint32_t version; // initially 0
uint32_t flags;
};
#define OBJC_IMAGE_SUPPORTS_GC 2
#define OBJC_IMAGE_GC_ONLY 4
Thanks for the heads-up Chris! Thanks to your tip, I settled for a
rather cheap solution that works just fine for me:
/usr/bin/otool -o $PATH | grep -q -2 '__OBJC.__image_info' | grep GC
:)
I'm not 100% sure that otool's installed without the BSD subsystem
being available, but I think that's mandatory now with Leopard. The
GC check is just used for displaying some extra informative text in
a sheet (which plugins aren't GC supported), so if anything fails,
it's not a disaster. I figured it'd be easier than trying to find
some libraries to read in the Mach-O format... considering the
tininess of the problem, it was far too much effort!
--
% Andre Pang : trust.in.love.to.save <http://www.algorithm.com.au/>
_______________________________________________
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/devlists%40shadowlab.org
This email sent to [EMAIL PROTECTED]
_______________________________________________
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com
This email sent to [EMAIL PROTECTED]