How to distinguish per-user vs. system-wide installation in QT installer framework?

前端 未结 1 1863
离开以前
离开以前 2021-01-29 03:21

I\'m using some app called pgModeler and it\'s current version provides an installer based on QT installer framework. The problem with that installer on Windows is that it insta

相关标签:
1条回答
  • 2021-01-29 03:52

    Switching between installation for current and all users can be done using a setting called AllUsers, which supports true and false. The important things are where and when to provide that: One way is really early when invoking the installer using the following:

    installer.exe AllUsers=true
    

    That way the GUI to select a start menu group really already shows all entries available to all users, not only those of the user-private start menu, like has been before. Another way is setting values on the installer at runtime. But it's important that this needs to happen BEFORE paths get resolved as well. An example can be seen at the following place:

    function Controller()
    {
        [...]
            //store all users and online/offline info
            installer.setValue("allUsers", isAdmin ? "true" : "false");
            installer.setValue("isOffline", installer.isOfflineOnly() ? "true" : "false");
        [...]
    }
    

    https://github.com/Skycoder42/QtIFW-Advanced-Setup/blob/master/installer/config/controller.js

    These things have been enhanced in the past as well, even though I didn't find any explanation about what exactly and how to use it in the docs yet.

    https://bugreports.qt.io/browse/QTIFW-124

    Additionally, the software is not properly registered in Programs and Features, it only occurs admin-only:

    0 讨论(0)
提交回复
热议问题