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 binary creator: Installation of own package on top of old version
Forum Updated to NodeBB v4.3 + New Features

Qt binary creator: Installation of own package on top of old version

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
4 Posts 2 Posters 1.0k Views 2 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.
  • K Offline
    K Offline
    KalleQt
    wrote on last edited by
    #1

    I use Qt binary creator with a command like

    binarycreator.exe -v -f -p packages -c config/config.xml myTool.exe
    

    to create an installer with my software version 1.0.

    If I create a new version 1.1 of my software and a new myTool.exe file, then during the installation of this new version 1.1 I am told that an old version already exists in that directory and that the installation cannot proceed. Of course there is an old version 1.0 in that installation directory, but I want to overwrite it with this new version 1.1. How can I do it? I want that this one installer does an update of the installed software if there is an older version or a new install if there is no version installed.

    Thanks.

    1 Reply Last reply
    0
    • mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to the forums
      Seems like you can do

      function Controller()
      {
          installer.autoRejectMessageBoxes();
          installer.setMessageBoxAutomaticAnswer( "OverwriteTargetDirectory", QMessageBox.Yes );
      
          // ...
      }
      

      https://stackoverflow.com/questions/37940198/qt-installer-overwrite-previous-version

      1 Reply Last reply
      0
      • K Offline
        K Offline
        KalleQt
        wrote on last edited by
        #3

        Hi,

        that doesn't seem to work, and stackoverflow comments seem to back that up, my install script is now this

        function Component()
        {
            // default constructor
        }
        
        Component.prototype.createOperations = function()
        {
            // call default implementation to actually install README.txt!
            component.createOperations();
        
        
        
        
            if (systemInfo.productType === "windows") 
        	{
        component.addOperation("CreateShortcut", "@TargetDir@/start.bat", "@StartMenuDir@/start.lnk", "workingDirectory=@TargetDir@", "iconPath=@TargetDir@/start.ico");
        
        component.addOperation("CreateShortcut", "@TargetDir@/start2.bat", "@StartMenuDir@/start2.lnk", "workingDirectory=@TargetDir@", "iconPath=@TargetDir@/start2.ico");
        
        component.addOperation("CreateShortcut", "@TargetDir@/Config.exe", "@StartMenuDir@/Setup.lnk", "workingDirectory=@TargetDir@", "iconPath=@TargetDir@/setup.ico");
        
           }
           
        
        
        
        }
        
           function Controller()
        {
            installer.autoRejectMessageBoxes();
            installer.setMessageBoxAutomaticAnswer( "OverwriteTargetDirectory", QMessageBox.Yes );
        
            // ...
        }
        

        The error I see is

        0_1545145516562_qt-installer-error.jpg

        My assumption is that I am asking for a very basic feature. The error report linked to stackoverflow doesn't make much hope, 4 years old...

        mrjjM 1 Reply Last reply
        0
        • K KalleQt

          Hi,

          that doesn't seem to work, and stackoverflow comments seem to back that up, my install script is now this

          function Component()
          {
              // default constructor
          }
          
          Component.prototype.createOperations = function()
          {
              // call default implementation to actually install README.txt!
              component.createOperations();
          
          
          
          
              if (systemInfo.productType === "windows") 
          	{
          component.addOperation("CreateShortcut", "@TargetDir@/start.bat", "@StartMenuDir@/start.lnk", "workingDirectory=@TargetDir@", "iconPath=@TargetDir@/start.ico");
          
          component.addOperation("CreateShortcut", "@TargetDir@/start2.bat", "@StartMenuDir@/start2.lnk", "workingDirectory=@TargetDir@", "iconPath=@TargetDir@/start2.ico");
          
          component.addOperation("CreateShortcut", "@TargetDir@/Config.exe", "@StartMenuDir@/Setup.lnk", "workingDirectory=@TargetDir@", "iconPath=@TargetDir@/setup.ico");
          
             }
             
          
          
          
          }
          
             function Controller()
          {
              installer.autoRejectMessageBoxes();
              installer.setMessageBoxAutomaticAnswer( "OverwriteTargetDirectory", QMessageBox.Yes );
          
              // ...
          }
          

          The error I see is

          0_1545145516562_qt-installer-error.jpg

          My assumption is that I am asking for a very basic feature. The error report linked to stackoverflow doesn't make much hope, 4 years old...

          mrjjM Offline
          mrjjM Offline
          mrjj
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @KalleQt
          yep seems to be unresolved. :(
          I wonder if the other solution does work.
          https://stackoverflow.com/questions/46455360/workaround-for-qt-installer-framework-not-overwriting-existing-installation/46614107#46614107

          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