Results 1 to 3 of 3

Thread: How can we get file version information in Linux?

  1. #1
    Join Date
    Feb 2010
    Qt products

    Default How can we get file version information in Linux?


    I am porting one Qt appllication from windows to linux which is using Win32 functions like GetFileVersionInfoSize(),GetFileVersionInfo() and VerQueryValue() for getting file version information.

    is there any equivalent functions in linux to get file version information?

    I came to know that we are getting version info from version.dll in it possible to make use use of that dll by installing Winelib in Linux?

    Plz provide me some answers........


  2. #2
    Join Date
    Jan 2006
    Munich, Germany
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Unix/X11 Windows

    Default Re: How can we get file version information in Linux?

    I don't know for sure, but I don't think the linux file systems have such a thing as savaing file version info in them.
    The way I know is by naming the libs with their corresponding version numbers.
    If I am correct, then you better just put the code associated with these function under #ifdef WIN32.
    Another way could be to override these function to retrieve the version number from the lib file name.
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

  3. #3
    Join Date
    Jan 2010
    Thanked 8 Times in 8 Posts
    Qt products
    Unix/X11 Windows

    Default Re: How can we get file version information in Linux?

    My first thought was "I wonder how windows knows the file version information". Is this stored
    1. in extended attributes
    2. in the registry
    3. in the file itself

    I doubt that this is stored in extended attributes, because I believe that this works on file systems that do not support extended attributes. DLLs have version information stored in the file itself, so to function, the method must be able to look inside the DLL. I expect the same to be true of EXE files.

    Now, if you move to Linux, how do they store information? Check these links

Similar Threads

  1. QHttp file information
    By bunjee in forum Qt Programming
    Replies: 1
    Last Post: 31st May 2009, 21:39
  2. Replies: 1
    Last Post: 19th October 2008, 22:30
  3. how to add version information to my program?
    By yleesun in forum Qt Programming
    Replies: 6
    Last Post: 10th October 2008, 11:41
  4. How I can retrive information abt file.
    By safknw in forum General Programming
    Replies: 3
    Last Post: 2nd December 2006, 14:35
  5. Replies: 13
    Last Post: 1st June 2006, 15:01


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.