Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How to upgrade the program by itself
Forum Updated to NodeBB v4.3 + New Features

How to upgrade the program by itself

Scheduled Pinned Locked Moved Unsolved General and Desktop
5 Posts 3 Posters 426 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    tovax
    wrote on 11 Nov 2021, 03:06 last edited by
    #1

    Hi, all
    IFW is a great tool, but according to the user's needs (no installation page required), I have to use the silent installation mode OR decompressing the archive from USB flash drive. Because I don’t know enough about IFW, I want to upgrade the program by decompressing the archive.(Other tools should be able to implement silent installation, but extracting directly from the USB flash disk is the most suitable way for me.)
    In order to upgrade the program by itself, I must exit the app before decompressing the archive. But in this case, the copying, decompression and other operations related to the upgrade program will be destroyed.
    I don't know if I am expressing it clearly, I want to know how to achieve the self-upgrading of the program. Could you provide some ideas, please?
    Best regards!

    J 1 Reply Last reply 11 Nov 2021, 06:34
    0
    • T tovax
      11 Nov 2021, 03:06

      Hi, all
      IFW is a great tool, but according to the user's needs (no installation page required), I have to use the silent installation mode OR decompressing the archive from USB flash drive. Because I don’t know enough about IFW, I want to upgrade the program by decompressing the archive.(Other tools should be able to implement silent installation, but extracting directly from the USB flash disk is the most suitable way for me.)
      In order to upgrade the program by itself, I must exit the app before decompressing the archive. But in this case, the copying, decompression and other operations related to the upgrade program will be destroyed.
      I don't know if I am expressing it clearly, I want to know how to achieve the self-upgrading of the program. Could you provide some ideas, please?
      Best regards!

      J Offline
      J Offline
      jsulm
      Lifetime Qt Champion
      wrote on 11 Nov 2021, 06:34 last edited by
      #2

      @tovax You could have a script which you start in your app (QProcess), then exit the app. The script should wait a bit before doing its work.

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      T 1 Reply Last reply 11 Nov 2021, 08:03
      1
      • J jsulm
        11 Nov 2021, 06:34

        @tovax You could have a script which you start in your app (QProcess), then exit the app. The script should wait a bit before doing its work.

        T Offline
        T Offline
        tovax
        wrote on 11 Nov 2021, 08:03 last edited by
        #3

        @jsulm
        Hi, thank you very much for your answer, i get it.
        Best regards!

        J 1 Reply Last reply 11 Nov 2021, 14:53
        0
        • T tovax
          11 Nov 2021, 08:03

          @jsulm
          Hi, thank you very much for your answer, i get it.
          Best regards!

          J Online
          J Online
          JonB
          wrote on 11 Nov 2021, 14:53 last edited by
          #4

          @tovax
          In this case (script to continue running after parent Qt process exits) you should use QProcess::startDetached() method to run the script.

          T 1 Reply Last reply 13 Nov 2021, 09:33
          1
          • J JonB
            11 Nov 2021, 14:53

            @tovax
            In this case (script to continue running after parent Qt process exits) you should use QProcess::startDetached() method to run the script.

            T Offline
            T Offline
            tovax
            wrote on 13 Nov 2021, 09:33 last edited by
            #5

            @JonB Hi, thanks very much!
            In order to allow users to flexibly choose the version they want to upgrade, I decided to make a separate updater.exe. I'm debugging this gadget, and I will give you a reply when it's finished.

            1 Reply Last reply
            0

            1/5

            11 Nov 2021, 03:06

            • Login

            • Login or register to search.
            1 out of 5
            • First post
              1/5
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved