How to download update installation automatically
-
The answer depends heavily on the platform, on some it is impossible to update silently (Android for example). Check how Chrome and Firefox are doing it.
-
The answer depends heavily on the platform, on some it is impossible to update silently (Android for example). Check how Chrome and Firefox are doing it.
-
On Windows it should be enough to run the installer with QProcess, passing silent flag with it.
The problem is, of course, when the installer replaces the executable (which is in use). I don't know what is the recommended way to work around it. You probably need to start a detached QProcess, then programmatically exit the application, then the installer should re-open the app.
-
On Windows it should be enough to run the installer with QProcess, passing silent flag with it.
The problem is, of course, when the installer replaces the executable (which is in use). I don't know what is the recommended way to work around it. You probably need to start a detached QProcess, then programmatically exit the application, then the installer should re-open the app.
-
@canid said in How to download update installation automatically:
@sierdzio
Yes,How does QProcess pass the silent flag? thanksThat's a question to your installer, not me :-) Each installer technology handles it differently. And you can cook up a custom installer, too.
-
@canid said in How to download update installation automatically:
@sierdzio
Yes,How does QProcess pass the silent flag? thanksThat's a question to your installer, not me :-) Each installer technology handles it differently. And you can cook up a custom installer, too.
-
@sierdzio
I use QProcess:: Start () to get the upgrade installed automatically, but how do I get the callback to restart after it's installed -
Does your installing include upgrading this currently running executable file and other files being used by it like the dlls?
If yes you can't wait the process to be finished, but exit immediately after starting the process detached, otherwise those files can never be upgraded. -
Does your installing include upgrading this currently running executable file and other files being used by it like the dlls?
If yes you can't wait the process to be finished, but exit immediately after starting the process detached, otherwise those files can never be upgraded.@Bonnie
My code writes like this, the installation program also started, but did not output "started". What's wrong with it?QProcess *process = new QProcess(this); process->start("D:\\mysoft.exe", QStringList()<<"/SILENT"); connect(process,&QProcess::started,this,[](){ qDebug()<<"started"; }); -
@Bonnie
My code writes like this, the installation program also started, but did not output "started". What's wrong with it?QProcess *process = new QProcess(this); process->start("D:\\mysoft.exe", QStringList()<<"/SILENT"); connect(process,&QProcess::started,this,[](){ qDebug()<<"started"; });