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

Eddie Sutton edsutton at gmail.com
Wed Apr 8 17:16:07 CEST 2015


Thank you Maurice, that works well.

Is there a way to control when it executes?  For example after user presses Done?


Component.prototype.createOperations = function()
{
    component.createOperations();
    component.addOperation("Execute", "open", "-a", "@TargetDir@/my.app");
}

-Ed


> On Apr 8, 2015, at 1:45 AM, Kalinowski Maurice <Maurice.Kalinowski at theqtcompany.com> wrote:
> 
>> 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