Thank you. Solved. It works great.
Component.prototype.installationFinished = function() { try { if (installer.isInstaller() && installer.status == QInstaller.Success) { /* http://doc.qt.io/qtinstallerframework/scripting-installer.html#execute-method */ var argList = ["-a", "@TargetDir@/my.app"]; installer.execute("open", argList); } } catch(e) { console.log(e); } } -Ed > On Apr 9, 2015, at 10:08 AM, Koehne Kai <kai.koe...@theqtcompany.com> wrote: > > > >> -----Original Message----- >> From: Eddie Sutton [mailto:edsut...@gmail.com] >> Sent: Thursday, April 09, 2015 3:45 PM >> To: Koehne Kai >> Cc: Kalinowski Maurice; Qt Project >> Subject: Re: [Interest] Qt Installer Framework 2.0.0 [ OS X ] - How to launch >> my.app on finish? >> >> Kai, >> >> The open openreadme example was what got me started down this path. >> >> 1 - QDesktopServices can not launch an app. >> 2 - I understand I must add an “Execute” operation in the createOperations() >> function. >> 3 - Can execution of an operation be deferred until installationFinished? > > No, but you can also directly call installer.execute() or > installer.executeDetached(): > > > https://doc.qt.io/qtinstallerframework/scripting-installer.html#execute-method > > >> Component.prototype.createOperations = function() { >> component.createOperations(); >> /* \todo Can execution of this operation be deferred until >> installationFinished()? */ >> component.addOperation("Execute", "open", "-a", >> "@TargetDir@/TSR.app"); } >> >> >> Just in case, I tried moving the addOperation() to installationFinished(). >> However it does not execute and has no effect. > > Right, that's too late to queue an operation. > > > Regards > > Kai > _______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest