On Windows I'd simply add an RC file with the right data. Do I need to assemble a bundle as usual with an info.plist/version.plist or is there a better, standard, way of doing things? This is for Snow Leopard and later if that is relevant.
Thx++
On Windows I'd simply add an RC file with the right data. Do I need to assemble a bundle as usual with an info.plist/version.plist or is there a better, standard, way of doing things? This is for Snow Leopard and later if that is relevant.
Thx++
If you have a command line application, then it's just a single file and not a traditional OSX app package (with a Contents folder and a MacOS + Resources folder underneath).
If you're not willing to do a full blown Macintosh application package (with a GUI and an info.plist embedded somewhere in there), there are a few different things I've seen done with command line apps on the Macintosh.
1)
Add a "-v" option for version. So if you app is named foo, typing in "
foo -v
" at the command line shows an output of "version 1.0
".2)
Put the version number in as part of the filename... so "foo" is actually "foo1.0".
Oof, that seems clunky. So...
3)
Some apps have a symbolic link pointing to the real binary. So
foo
points tofoo1.0
and if you were to do a "ls -l", you'd see something like:so typing in "foo" at the command line would actually run foo1.0.
I hope these opinions help you out!
It is possible to embed an Info.plist file in an executable as a special Mach-o section. See for example this question.