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



  • 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.


  • Lifetime Qt Champion

    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



  • 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...


  • Lifetime Qt Champion


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.