How to launch my software when the installation is finished? (Qt Installer Framework)
-
Hi All,
I would like to execute my application after the installation for Windows throught Qt Framework Installer. My goal is to update my software when an update is available like that https://stackoverflow.com/questions/34318934/qt-installer-framework-auto-update .
There are the steps :
- Click on the shortcut and launch my software
- Check if an update is available
- If no update available, continue
- If an update is available, call "maintenancetool --updater"
- Quit my software
- Install my update (Qt Installer Framework based)
- At the end of my installation and the installation window is closed, I would like to launch my software???
My question is : how to launch my software when the installation is finished??
-
Hi All,
I would like to execute my application after the installation for Windows throught Qt Framework Installer. My goal is to update my software when an update is available like that https://stackoverflow.com/questions/34318934/qt-installer-framework-auto-update .
There are the steps :
- Click on the shortcut and launch my software
- Check if an update is available
- If no update available, continue
- If an update is available, call "maintenancetool --updater"
- Quit my software
- Install my update (Qt Installer Framework based)
- At the end of my installation and the installation window is closed, I would like to launch my software???
My question is : how to launch my software when the installation is finished??
-
@koahnig
I would like that my software does a software update itself. I need to stop my software before to do a software update (with my installer) cuz in Windows, you cannot delete an executed program. And at this point, you must to launch the software in the installer script.I would like to know how to do that in the installer script (not in my software/c++)
-
@koahnig
I would like that my software does a software update itself. I need to stop my software before to do a software update (with my installer) cuz in Windows, you cannot delete an executed program. And at this point, you must to launch the software in the installer script.I would like to know how to do that in the installer script (not in my software/c++)
-
The answer (I think) is see
RunItCheckBox
in topic Finished Page on page http://doc.qt.io/qtinstallerframework/noninteractive.htmlThe source code at https://github.com/qtproject/installer-framework/blob/master/src/libs/installer/packagemanagergui.cpp shows that if it's checked it does:
3202 qDebug() << "starting" << program << args; 3203 QProcess::startDetached(program, args);
-
I made it by controller script
function Controller() { installer.installationFinished.connect(function() { var isUpdate = installer.isUpdater(); if(isUpdate) { var targetDir = installer.value("TargetDir"); console.log("targetDir: " + targetDir); installer.executeDetached(targetDir+"/WebSourceManager.exe"); }else{ var result = QMessageBox.question("quit.question", "Start Program", "Do you want to start the installed application?",QMessageBox.Yes | QMessageBox.No); if( result == QMessageBox.Yes) { var targetDir = installer.value("TargetDir"); console.log("targetDir: " + targetDir); console.log("Is Updater: " + installer.isUpdater()); console.log("Is Uninstaller: " + installer.isUninstaller()); console.log("Is Package Manager: " + installer.isPackageManager()); installer.executeDetached(targetDir+"/WebSourceManager.exe"); } } }); installer.updateFinished.connect(function(){ var targetDir = installer.value("TargetDir"); console.log("targetDir: " + targetDir); installer.executeDetached(targetDir+"/WebSourceManager.exe"); }); }