Michael Sternberg wrote: > > Hello everybody. > > Is it any way to attach a verion number to executable file ? In > Windows "right click -> properties -> Version" style ? Maybe as output > of "file" command ? Of course I always can implement "-v" or > "--version" switch to my executable, but do we have something more > standard ? No.
Windows uses "resources" to attach external data to the programs. This external data can be bitmaps, dialog templates, icons (that's where the program's icon come from), strings, version information, or just anything else. The idea behind resources is that you can add languages to a program by simply using a resource editor to change the resources. It's a nice idea, but the more I work with it, the more I'm convinced that the gettext approach is better. In particular, ELF files do not have resource sections, and thus do not have any standard location to place the version information in. You can save such data outside of the file itself. One such place can be the xattr (extra attributes) that most modern FS support (ext3, xfs and to some limited extent, also reiser). This has the disadvantage that many programs (including tar and all current packaging formats) do not copy these attributes around with the file itself, which probably means that it's not going to do what you want it to do. I'm afraid that -v IS the standard thing to do in such a case. Shachar -- Shachar Shemesh Lingnu Open Source Consulting ltd. Have you backed up today's work? http://www.lingnu.com/backup.html ================================================================= To unsubscribe, send mail to [EMAIL PROTECTED] with the word "unsubscribe" in the message body, e.g., run the command echo unsubscribe | mail [EMAIL PROTECTED]
