Results 1 to 11 of 11

Thread: Alert user when an update is available of my program

  1. #1
    Join Date
    Jun 2011
    Posts
    10
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Alert user when an update is available of my program

    Hi,

    I would like to know if it's possible with Qt to manage updates for my program. I mean : when an update is available, a window pop to advice the user, if he chooses to do it, the update is downloading. When it is done, the update is installing with or without an installation window.

    Well, I guess there is nothing to manage this, but just knowing the classes or tool doing that would be really helpful!

    Thanks off any clue!

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,360
    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: Alert user when an update is available of my program

    Quote Originally Posted by castors33 View Post
    I would like to know if it's possible with Qt to manage updates for my program.
    Yes, it's possible.
    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.


  3. #3
    Join Date
    Jun 2011
    Posts
    10
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Alert user when an update is available of my program

    can you help me by telling me where i should begin? I mean which classes I would use for that or anything else useful to be able to update my own made program

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,360
    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: Alert user when an update is available of my program

    Quote Originally Posted by castors33 View Post
    can you help me by telling me where i should begin?
    You should begin with developing an algorithm of the update. Then you can start searching for classes that will implement that algorithm. There is no single solution to "how do I update my program" problem. Everything depends on the program itself.
    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.


  5. #5
    Join Date
    Jun 2011
    Posts
    10
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Alert user when an update is available of my program

    But, to modify an executable, there must be more specific things to use

  6. #6
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,360
    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: Alert user when an update is available of my program

    You won't be able to modify an executable while it is being executed. You need some kind of solution to replace the executable before the application is relaunched or after it quits. Of course all that provided the main executable indeed needs updating. Otherwise you can just update the libraries/plugins. As I said, it all depends on the program itself.
    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.


  7. #7
    Join Date
    Jun 2011
    Posts
    10
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Alert user when an update is available of my program

    Ok, and one more thing, the executable is in a binary form, right?! So is it possible and raisonnable to modify it by the binary form or it would be better to recompile all the program at every update to get an new executable

  8. #8
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,360
    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: Alert user when an update is available of my program

    You can do it any way you prefer.
    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.


  9. #9
    Join Date
    Jun 2011
    Posts
    10
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Alert user when an update is available of my program

    to modify the executable, is there anything in Qt to help me or I have to code it all by myself? If yes, what more precisely

  10. #10
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,360
    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: Alert user when an update is available of my program

    Apart from QFile? No. You don't have to code it by yourself, there are ready tools available such as diff and patch.

    By the way, I think you are approaching the problem from the wrong end. Instead of thinking "how do I modify my binary" you should start by "how do I detect there is update available".
    Last edited by wysota; 16th March 2012 at 16:53.
    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.


  11. The following user says thank you to wysota for this useful post:

    castors33 (16th March 2012)

  12. #11
    Join Date
    Jun 2011
    Posts
    10
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Alert user when an update is available of my program

    ok I'll try it...thanks!


    Added after 1 45 minutes:


    Finally, I found somewhere else that it seems easier to have a second program that simply downloads the new executable and replace the old one, that's what I'll try to do
    Last edited by castors33; 16th March 2012 at 18:37.

Similar Threads

  1. Replies: 10
    Last Post: 1st July 2010, 10:59
  2. update the xml file from QT program
    By rk0747 in forum Newbie
    Replies: 5
    Last Post: 28th January 2010, 18:20
  3. Window alert
    By addu in forum Qt Programming
    Replies: 10
    Last Post: 11th August 2009, 13:28
  4. Replies: 4
    Last Post: 24th July 2009, 08:48
  5. execute sth before program exits (user closes window)
    By donglebob in forum Qt Programming
    Replies: 6
    Last Post: 9th December 2008, 23:24

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.