[Interest] QT Installer framework - Customize Pages
Karsten Heimrich
karsten.heimrich at digia.com
Tue Mar 25 12:00:27 CET 2014
Hi,
On 13.03.2014 14:46, Sandeep wrote:
>
> Hello,
>
> I went through the Qt-IF documentation may be 3 to 4 times, went
> through all the examples, did some trial and error but still not able
> to get hold of few things, in fact many things. Hoping to get some
> answers from the experts.
>
> Question1: I want to get rid of the Header part of the Introduction
> Page, how do I do it?
>
> The documentation at this link
> http://doc-snapshot.qt-project.org/qtifw-1.3/noninteractive.html talks
> about only selected widgets, for example, the Introduction Page has
> only access to 2 widgets, "Next", "Cancel" buttons, but what if I
> decide to not have the Header section (which has the title and the
> logo). Is there a way to disable? I am not talking about empty Title,
> I am talking about the getting rid of the whole Header part.
>
> Question2: What is the difference between "function Component" and
> "function Controller" in the installer.qs scripts used in examples?
> Basically what are they? I tried registering for the
> IntroductionPageCallback but never got called.
>
> function Component()
>
> {
>
> }
>
> Component.prototype.IntroductionPageCallback=function()
>
> {
>
> }
>
> Or?
>
> function Controller()
>
> {
>
> }
>
> Controller.prototype.IntroductionPageCallback = function()
>
> {
>
> }
>
> Neither of them worked for me, Callbacks are not even called. what is
> the correct way to get a callback?
>
Just as an short explanation, once we put "your" script inside the
script engine, we wrap it inside a closure, so it will look like this:
(function()
var component = installer.componentByName("your.component.name");
function Component()
{
};
// other stuff goes here
return new Component;
)();
Same goes for the Controller stuff. The Controller stuff is supposed to
work with a script you pass as argument to the the installer binary,
basically to support headless automated installations. I will come back
to you ASAP on how to use that.
> Question3: If I choose to run my application after the installation
> using the "<RunProgram>my app binary</RunProgram> , I get a checkbox
> with a tick mark after my installation, asking if I want to run my
> application, I can either check or uncheck the checkbox and say Next.
> This makes sense during installation flow. But this checkbox also
> appears after my uninstallation (last screen during uninstallation),
> asking "Do you want to run my app binary", which does not makes sense.
> How do I make sure the checkbox (run my app binary)does not come in
> the uninstallation flow.
>
This shouldn't happen, after looking at the code it will only show up if
the binary is not running as installer and the run program is not empty.
So i would recommend to open a bug report on
https://bugreports.qt-project.org/secure/Dashboard.jspa and attach a
sample script to show the broken behavior.
> Question 4: When I register for the signals "installationFinished" my
> functions in the installscript.qs gets called, but surprisingly the
> signals "uninstallationStarted and uninstallationFinished" never gets
> called if I register some functions.
>
Same here, please open an issue and attach a script that shows the
broken behavior.
> Not sure why? Also in qinstaller.h we have the below code for
> identifying different state/stages of installation, but how can I get
> similar information for un-installation?
>
You can ask the installer about its run mode, like this:
function Component()
{
component.loaded.connect(this, Component.prototype.loaded);
installer.installationFinished.connect(this,
Component.prototype.installationFinishedPageIsShown);
/*
NOTE: you have access to the following global variables:
component // like: component.userInterface(...)
QInstaller // like: QInstaller.Success
installer // like installer.isInstaller()
QFileDialog, buttons, QMessageBox, QDesktopServices
*/
}
Component.prototype.loaded = function()
{
var foo = installer.isInstaller();
var bar = installer.isUninstaller();
}
Component.prototype.installationFinishedPageIsShown = function()
{
if (installer.isInstaller() && installer.status == QInstaller.Success)
installer.addWizardPageItem( component,
"YourCheckBoxToStartAnApp", QInstaller.InstallationFinished);
}
> enum Status {
>
> InstallerUnfinished,
>
> InstallerCanceledByUser,
>
> InstallerRunning,
>
> InstallerFailed,
>
> InstallerSucceeded,
>
> };
>
> int status() const;
>
> enum WizardPage {
>
> Introduction = 0x1000,
>
> TargetDirectory = 0x2000,
>
> ComponentSelection = 0x3000,
>
> LicenseCheck = 0x4000,
>
> StartMenuSelection = 0x5000,
>
> ReadyForInstallation = 0x6000,
>
> PerformInstallation = 0x7000,
>
> InstallationFinished = 0x8000,
>
> End = 0xffff
>
> };
>
> Thanks,
>
> -Sandeep
>
>
>
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest
-- Karsten
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20140325/c0210277/attachment.html>
More information about the Interest
mailing list