【问题标题】:Qt Installer framework - Customizing the UNINSTALLERQt 安装程序框架 - 自定义卸载程序
【发布时间】:2017-05-04 14:19:57
【问题描述】:

我无法自定义卸载过程,尽管我可以在某种程度上成功地自定义安装过程。当我注册信号“installationFinished”时,我在 installscript.qs 中的函数会被调用,但令人惊讶的是,如果我注册某些函数,信号“uninstallationStarted 和uninstallationFinished”就不会被调用。不知道为什么?同样在 qinstaller.h 中,我们有以下代码用于识别不同的安装状态/阶段,但我怎样才能获得类似的卸载信息?

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
};

【问题讨论】:

    标签: qt uninstallation qt-installer


    【解决方案1】:

    你试过了吗?

    function Controller()
    {
        installer.uninstallationStarted.connect(this, Controller.prototype.runMyFunc);
    }
    
    Controller.prototype.runMyFunc = function()
    {
     // your code here
    }
    

    【讨论】:

      猜你喜欢
      • 2017-01-13
      • 2015-02-02
      • 1970-01-01
      • 2011-01-05
      • 1970-01-01
      • 2018-08-05
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多