[Interest] QT Installer Framework - Post Install operations

Sandeep sandeep at b-one.net
Tue Mar 25 14:28:04 CET 2014


Hi,

 

I had asked this question earlier in a different way (Subject line: Qt
Installer Framework - Running more than 1 command after the installation is
finished), but the motive is same.

As I understand after the application installer is completed, if I choose to
run my program (when the checkbox is ticked), my program will be launched.

But there can be some actions/operations that I would want to perform just
before the starting my program (but after the program is installed). For
example, I might want to restart nautilus in ubuntu before running my
program.

Ofcourse I can do it outside QT IFW through other means, but I thought as I
am already relying on Qt IFW to launch my application I can also use it to
do some post install operations.

 

Any operations while/during installation can be done using
Component.prototype.createOperations = function(), using addOperation, but
how to do any post install operations?

I tried to connect to finishButtonClicked/installationFinished signals and
tried to do the operations there, but what I observed is the callbacks are
called when the signal fires, but within the callback if I do
"addOperation", nothing really happens. Looks like addOperation is only
supported while/during installation not post installation. I am not sure if
that is the way it is!! If not then it is a bug, is there any work around to
do post install operations?

 

Script that I tried is as below:

 

function Component()

{

  

    installer.setDefaultPageVisible(QInstaller.TargetDirectory, false);

    installer.setDefaultPageVisible(QInstaller.ReadyForInstallation, false);

    installer.setDefaultPageVisible(QInstaller.ComponentSelection, false);

 

    installer.installationFinished.connect(this,
Component.prototype.installationFinishedPageIsShown);

}

 

Component.prototype.createOperations = function()

{

    // call default implementation to actually install README.txt!

    component.createOperations();

 

     component.addOperation("Execute", "cat",
"/home/sandeep/preinstallcontent");                      ////////Note, this
is getting called

        

}

 

Component.prototype.installationFinishedPageIsShown = function()

{

    var result = QMessageBox["question"]("clouddrive.installer",
"Installer", "Installation finished, Performing some post-install stuff"

        , QMessageBox.Yes | QMessageBox.No);
//////////////////////////////////// Note: Message box is poping up once the
signal is fired.

 

     component.addOperation("Execute", "cat",
"/home/sandeep/post-installcontent"); //////////// BUT this is not
called!!!!

}

 

Thanks,

-Sandeep

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20140325/ea3241a7/attachment.html>


More information about the Interest mailing list