Results 1 to 6 of 6

Thread: how to check the application product version??

  1. #1
    Join Date
    Mar 2009
    Location
    Malaysia
    Posts
    25
    Thanks
    5
    Qt products
    Qt4
    Platforms
    Windows

    Default how to check the application product version??

    Hi all,

    Let say, I have a application called testing.exe.

    And for this EXE file, it got production version.

    So how I going to read the production version? I going to create a application to read it, but in Qt which function allow me to do that?

    thanks

  2. #2
    Join Date
    Jan 2006
    Location
    Alingsås, Sweden
    Posts
    437
    Thanks
    3
    Thanked 39 Times in 39 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: how to check the application product version??

    I'm not sure what you mean. Where do you put your version? Into the exe? In that case I suppose that you'll have to parse through it and have a look

  3. #3
    Join Date
    Jun 2007
    Location
    India
    Posts
    1,042
    Thanks
    8
    Thanked 133 Times in 128 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: how to check the application product version??

    i use my application's return value to determine various things

    MyApp
    Qt Code:
    1. #define VERSION 142 //version 1.4.2
    2.  
    3. int main(int argc,char** argv)
    4. {
    5. QApplication app(argc,argv);
    6. if(argc>1)
    7. {
    8. if(!strcmp(argv[1],"ReturnVersionAndExit");
    9. return VERSION;
    10. }
    11.  
    12. ....
    13. ....
    14. }
    To copy to clipboard, switch view to plain text mode 


    now your other qt application can start the QProcess with your application and check the code.

    check App

    Qt Code:
    1. QString program="myapp.exe";
    2. args<<"ReturnVersionAndExit";
    3.  
    4. int version=QProcess::execute(program,args);
    5. //voila!! u got the version.:D
    To copy to clipboard, switch view to plain text mode 

  4. The following user says thank you to nish for this useful post:

    Cantora (5th June 2009)

  5. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: how to check the application product version??

    I think he's talking about a possibility to embed the version of the application into the application executable (or the manifest, I don't know) on Windows that can be later read by Windows Explorer and displayed in the properties dialog of the application. If so, then this can only be retrieved using WinAPI (or by parsing the exe as Johan suggested).
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  6. #5
    Join Date
    Jun 2007
    Location
    India
    Posts
    1,042
    Thanks
    8
    Thanked 133 Times in 128 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: how to check the application product version??

    Quote Originally Posted by wysota View Post
    I think he's talking about a possibility to embed the version of the application into the application executable (or the manifest, I don't know) on Windows that can be later read by Windows Explorer and displayed in the properties dialog of the application. If so, then this can only be retrieved using WinAPI (or by parsing the exe as Johan suggested).
    oh.. u r rite.

  7. #6
    Join Date
    Jun 2007
    Location
    India
    Posts
    1,042
    Thanks
    8
    Thanked 133 Times in 128 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Smile Re: how to check the application product version??

    looks like i was rite

Similar Threads

  1. Deploy Qt application on Mac OS X
    By giandrea77 in forum Installation and Deployment
    Replies: 3
    Last Post: 11th February 2009, 09:34
  2. Designer doesn't load wwWidgets plugin
    By reimer in forum Installation and Deployment
    Replies: 21
    Last Post: 7th February 2009, 03:23
  3. Problem with application version and icon
    By cutie.monkey in forum Qt Programming
    Replies: 3
    Last Post: 18th December 2008, 01:22
  4. Distributing QT application for Mac OS
    By mb0 in forum Qt Programming
    Replies: 1
    Last Post: 31st May 2007, 18:59
  5. Replies: 15
    Last Post: 21st April 2007, 17:46

Bookmarks

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.