[Interest] Qt Installer Framework 2.0.0 [ OS X ] - How to launch my.app on finish?

Kalinowski Maurice Maurice.Kalinowski at theqtcompany.com
Wed Apr 8 08:45:50 CEST 2015


> Subject: [Interest] Qt Installer Framework 2.0.0 [ OS X ] - How to launch
> my.app on finish?
> 
> "Open ReadMe Example” opens a README.TXT file on finish using script
> command:
> 
>  	QDesktopServices.openUrl("file:///" + installer.value("TargetDir") +
> "/README.txt”);
> 
> 		See: http://doc.qt.io/qtinstallerframework/qt-installer-
> framework-openreadme-example.html
> 
> Is there a way to launch the installed OS X app on finish?
> 
> The shell command would be:
> 	open -a /Application/my.app
> 
> I tried creating a script.  However QDesktopServices.openUrl opens it in an
> editor rather that executes it:
> 
>  QDesktopServices.openUrl("file:///" + installer.value("TargetDir") +
> "/run.sh”);
> 
> Are there alternatives for Qt Installer Framework to interact with the native
> shell ?

OpenUrl does what it says, it is meant to open documents with the default application. You want to use the Execute operation, see here: http://doc.qt.io/qtinstallerframework/operations.html

Maurice




More information about the Interest mailing list