Pierluigi
Pierluigi

Reputation: 2294

Run shell process during QT Install Framework and wait for the result

I would like to run some shell commands during using the QT Install Framework in order to recover information required to configure the installation itself (e.g listing the network adapter).

Currently IFW seems to allow one to prepare canned shell operations (addOperation, addElevatedOperation) that run only after the installer configuration process.

I would like, instead, to run them during the installation set-up. E.g. running an operation in one of the installer page and retrieve the result. Something like:

Component.prototype.pageChanged = function (page) {
  if (page === QInstaller.ReadyForInstallation) {
    component.runOperation(...)
 }
};

Upvotes: 0

Views: 1925

Answers (2)

Pierluigi
Pierluigi

Reputation: 2294

QT Installation Framework installer provides a way to solve this issue.

You can use installer.performOperation running a ConsumeOutput operation.

ConsumeOutput allows one to run an external process and store the process output into an installer key.

Upvotes: 2

Alexander V
Alexander V

Reputation: 8718

I would like to run an external process and wait on its result in my installer based on Qt Installer Framework. How can I do that?

This can be resolved either with native API (Windows example) or with Qt QProcess::WaitOnFinish (more universal). So, likely you need to somehow work around the installer's API with C++ code.

Upvotes: 0

Related Questions