genstrings doesn't appear to read stdin, but you could run the C preprocessor on your source file, send it to a temp file, and then run genstrings on that.

cpp -DSYS_DARWIN mysource.c >/tmp/foo.c
genstrings /tmp/foo.c >outputfile

Deborah Goldsmith
Apple Inc.
[EMAIL PROTECTED]

On Mar 3, 2008, at 6:53 PM, Mitchell Livingston wrote:

Hello,

I have C code that I want to generate a strings file for use on Mac. I use:

#if defined(SYS_DARWIN)
 #include <CoreFoundation/CFBundle.h>
 #define _(a) CFStringGetCStringPtr(CFCopyLocalizedStringFromTable( \
CFSTR( a ), CFSTR("LibraryLocalizable"), "comment" ), kCFStringEncodingMacRoman)
#else
...

Unfortunately genstrings does not seem to compile the code before attempting to create the strings file. Is there some way to generate a string file while still considering that the code will also be run on other operating systems that generate localizable strings in different ways?

Thanks,
Mitchell Livingston
_______________________________________________

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/goldsmit%40apple.com

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]

Reply via email to