Code verison in executable file

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • j0hnb
    New Member
    • Apr 2008
    • 2

    Code verison in executable file

    Hi,

    is there a straight forward way to have version information embedded in an executable? What I would like is to release a file and when the user does something like "program -v" they will be presented with the version information. The only way I can see just now to do it would be to parse the command line arguments looking for the -v option.

    Is there any other ways of doing it - maybe by embedding something into the executable so that another command can help, such as 'file'?

    Regards,

    John.
  • micmast
    New Member
    • Mar 2008
    • 144

    #2
    looks doubtfull to me, I could be wrong, but I don't think file or any other file could do that.

    Comment

    • pronerd
      Recognized Expert Contributor
      • Nov 2006
      • 392

      #3
      Originally posted by j0hnb
      is there a straight forward way to have version information embedded in an executable?
      Sure, but the way it would be done would depend on the language the executable was compiled from.



      Originally posted by j0hnb
      What I would like is to release a file and when the user does something like "program -v" they will be presented with the version information. The only way I can see just now to do it would be to parse the command line arguments looking for the -v option.
      Yep that is the way it works. Generally any executable should be parsing and validating any arguments passed to it.

      Comment

      Working...