Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. QTIFW - How to update maintenancetool.exe?
Forum Updated to NodeBB v4.3 + New Features

QTIFW - How to update maintenancetool.exe?

Scheduled Pinned Locked Moved Unsolved Qt Creator and other tools
4 Posts 4 Posters 1.3k Views 1 Watching
  • 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.
  • S Offline
    S Offline
    SebastienB
    wrote on last edited by
    #1

    Hello,

    We use Qt Installer Frameworks version 3.2 since several months to deploy our updates and everything works fine :)
    In our case we have an online server that hosts our repositories and our application automatically detects if an update if available when we launch it.

    It works fine but we'd like to use the last version now: Qt Installer Frameworks version 4.1.0
    I tried to generate a new reposity with repogen.exe 4.1.0, but if I try to update my own application which uses maintenancetool.exe 3.2 my app is well updated but maintenancetool.exe is still in version 3.2.

    How do I have to do to automatically update maintenancetool (in my application folder) from version 3.2 to 4.1.0 for my customers?

    Thanks a lot.

    1 Reply Last reply
    0
    • K Offline
      K Offline
      Katja Marttila
      wrote on last edited by
      #2

      You need to put installerbase(.exe) from bin folder to repository, mark the component as Essential and as ForcedInstallation (https://doc.qt.io/qtinstallerframework/ifw-component-description.html) and use the following script. In case you don't need to update the resource file you can skip the update.rcc part, in case those have changed you can get the updated resource by running binarycreator with -rcc -parameter.

      function Component()
      {
          installer.installationStarted.connect(this, Component.prototype.onInstallationStarted);
      }
      
      Component.prototype.onInstallationStarted = function()
      {
          if (component.updateRequested() || component.installationRequested()) {
              if (installer.value("os") == "win")
                  component.installerbaseBinaryPath = "@TargetDir@/installerbase.exe";
              else if (installer.value("os") == "x11" || installer.value("os") == "mac")
                  component.installerbaseBinaryPath = "@TargetDir@/.installerbase";
              installer.setInstallerBaseBinary(component.installerbaseBinaryPath);
      
              // update resource file if exists in the archive
              var updateResourceFilePath = "@TargetDir@/update.rcc";
              var normalizedUpdateResourceFilePath = updateResourceFilePath.replace(/@TargetDir@/, installer.value("TargetDir"));
              
              print("Updating resource file: " + normalizedUpdateResourceFilePath);
              installer.setValue("DefaultResourceReplacement", normalizedUpdateResourceFilePath);
              
          }
      }
      
      1 Reply Last reply
      1
      • N Offline
        N Offline
        ndejohn
        wrote on last edited by
        #3

        Hello. I'm having the same issue. Could you please elaborate more about putting installerbase.exe into the repository? I'm trying to do this at the root level just to test. Exactly what folder does installerbase need to be in? Thanks!

        A 1 Reply Last reply
        0
        • N ndejohn

          Hello. I'm having the same issue. Could you please elaborate more about putting installerbase.exe into the repository? I'm trying to do this at the root level just to test. Exactly what folder does installerbase need to be in? Thanks!

          A Offline
          A Offline
          artarkia
          wrote on last edited by
          #4

          @ndejohn Hi,

          We recently added a documentation section about providing updates to the maintenance tool. You can already check it from the online doc snapshot: https://doc-snapshots.qt.io/qtifw-master/ifw-updates.html#promoting-updates-for-the-maintenance-tool.

          Hope this helps!

          1 Reply Last reply
          0

          • Login

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