Results 1 to 20 of 21

Thread: Add "Check for updates" feature

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #2
    Join Date
    Nov 2007
    Posts
    89
    Qt products
    Qt4
    Platforms
    Windows
    Thanked 21 Times in 18 Posts

    Default Re: Add "Check for updates" feature

    Quote Originally Posted by jiveaxe View Post
    1) Check if there is an active internet connection: obviously the first step. What is the simplest way? A ping to the server is sufficient? Which qt4 method should I use?
    Just try to connect. If it fails, then there is no active connection.

    2b) Which compression method should I use for packaging the updates. In linux it's not a problem, what about windows? I don't want more dependencies other than qt4. Maybe a self extracting package?
    Try looking to QByteArray::qCompress and QByteArray::qUncompress.

    3b) Which method I have to use for downloading?
    You can use QHttp or QFtp.

    3c) Where I have to download the files? In a tmp folder, obviously; in linux is /tmp but in windows it can change: which qt4 method gives the current system temp folder?
    You can use QTemporaryFile.


    4b) In windows: thanks to QApplication::applicationDirPath() I know where the application is installed; and there extract the binary. Where I have to put the data files? In the same directory is ok, or in the user profile subfolder? Which qt4 method gives the current user directory?
    User data should be in AppData directory. You can obtain it with SHGetSpecialFolderPath, or with %APPDATA% env variable.

  2. The following user says thank you to bender86 for this useful post:

    wendelmaques (19th September 2010)

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
  •  
Qt is a trademark of The Qt Company.