Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Qt Installer Framework - update remote repo for existing installation

Qt Installer Framework - update remote repo for existing installation

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
5 Posts 3 Posters 396 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.
  • L Offline
    L Offline
    luca
    wrote on last edited by
    #1

    Hi all,
    I have an application deployed to users using QTIFW online installer.
    Now I need to change the remote repo used to deploy updates but I can't find how to do that for existing installation.

    I know I can add a Repository on config.xml but it add the repo only for new installations.

    How to handle this for existing users?

    Thanks

    1 Reply Last reply
    0
    • J.HilkJ Offline
      J.HilkJ Offline
      J.Hilk
      Moderators
      wrote on last edited by
      #2

      Hi

      you're extremely lucky just this/last week I was forced to deal with the exact same situation!

      what you want to do is use the --rcc argument for the binarycreator
      That will create an update.rcc file that basically contains your changes config/config.xml and control script

      Than you add a new package e.g com.mycompany.maintenancetool and in the data part you package this update.rcc

      in the corresponding install script, hook into the installationStarted "signal" and in there you use DefaultResourceReplacement to overwrite the xml and controllscript of your maintenance tool

      installer.setValue("DefaultResourceReplacement", updateRcc);
      

      here for more information, the official documentation:
      https://doc.qt.io/qtinstallerframework/ifw-updates.html


      Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


      Q: What's that?
      A: It's blue light.
      Q: What does it do?
      A: It turns blue.

      1 Reply Last reply
      3
      • L Offline
        L Offline
        luca
        wrote on last edited by
        #3

        Hi,
        thanks, this is what I've done but it seems ignored.

        changed the remote repo endpoint in config.xml:

        <RemoteRepositories>
             <Repository>
                     <Url>https://myrepo.it/repo_2/</Url>
                     <Enabled>1</Enabled>
                     <DisplayName>Repository</DisplayName>
             </Repository>
            </RemoteRepositories>
        

        Old repo was https://myrepo.it/repo_1/ .

        generate the rcc:

        binarycreator -c installer/mac/config/config.xml  -rcc
        

        Created a new component com.company.config and copied on it's data dir the update.rcc file .
        create the installscript.qs on meta dir:

        function Component()
        {
            component.ifwVersion = installer.value("FrameworkVersion");
            installer.installationStarted.connect(this, Component.prototype.onInstallationStarted);
        }
        
        Component.prototype.onInstallationStarted = function()
        {
            if (component.updateRequested() || component.installationRequested()) {
        
                var updateResourceFilePath = installer.value("TargetDir") + "/update.rcc";
                installer.setValue("DefaultResourceReplacement", updateResourceFilePath);
            }
        }
        

        Then I created the repo as always using repogen pointing to config.xml and package dir:

        repogen -r -p installer/packages $DIR/installer/repo_2
        

        and deployed it on old repo_1 url.

        After updating I can see it install the config component but at the end it seems it still point to repo_1 while I expected it to point repo_2 .

        Where do I wrong?

        1 Reply Last reply
        0
        • L Offline
          L Offline
          luca
          wrote on last edited by
          #4

          I seems that updating the conf via rcc update maintenancetool.dat but keep the old maintenancetool.ini and the ini file still contains the old repo.

          1 Reply Last reply
          0
          • M Offline
            M Offline
            mbaudot
            wrote last edited by
            #5

            Hello @luca
            I just faced the same situation where I thought that updating the maintenance tool using the update.rcc file would replace the default repositories on the system, but it doesn't...
            I'm wondering if you ended up finding a solution to your problem.

            Thanks in advance.

            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