views:

97

answers:

1

I have a C/C++ program which is a Firefox plugin. I'm trying to find the version number resource.

In my plist I have: Bundle versions string, short set to 5.09b and bundle version to 1.0

In my .rsrc file (yes, I'm still using rsrc files, it's not my fault.) my vers resource has a short string of 4.70

When I compile, the version on the .app file is 5.09b

When I run the program, I do:

CFBundleRef myAppsBundle = CFBundleGetMainBundle();
bundleVersion = (CFStringRef) CFBundleGetValueForInfoDictionaryKey(myAppsBundle, CFSTR("CFBundleShortVersionString"));

CFStringGetCString(bundleVersion, verString, sizeof(verString), kCFStringEncodingMacRoman);
printf("bundleversion is %s\n", verString);

and it gives me 3.5.6. previously, it was giving me 3.5.5.

I've done a bunch of searches through my code, and can't find "3.5.5" anywhere. And the code above works in other projects.

+4  A: 

3.5.6 and 3.5.5 just happen to be the latest two Firefox releases. Perhaps since you're building a plugin, you are picking up the Firefox version with that snippet instead of your plugin's version as you are expecting? If that's the case, no matter how much you fudge with the version number in your bundle it's not going to do what you want...

Steven Schlansker
Yes. Your plugin is most likely not the main bundle.
Azeem.Butt
oh. my. yes. that ... that explains everything! I wonder if I can get access to MY plist... hrm... well, that's another question. thanks!
Brian Postow