Uploaded image for project: 'Qt Installer Framework'
  1. Qt Installer Framework
  2. QTIFW-1011

Qt Installer Framework 3.0 macOS returns $HOME/Applications instead of /Applications for @ApplicationsDir@

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • 4.4.0 Beta
    • 3.0.1, 3.1.1
    • General
    • None
    • macOS

    Description

      In 2.0.1, 2.0.5-2, @ApplicationsDir@ refers to /Applications as expected.

      In 3..0.1, @ApplicationsDir@ is implemented as follows:

      packagemanagercoredata.cpp: around line 114, commit # 7e91db5b1e01ffeeaa566ebb5b8230dcdc6b514f on GitHub in qtproject/installer-framework

      #elif defined (Q_OS_OSX)

          dir = QStandardPaths::standardLocations(QStandardPaths::ApplicationsLocation).value(0);

      #endif

      However, the first element of the list of application locations is $HOME/Applications, and the second element of the list is "/Applications".

       

      The documentation at http://doc.qt.io/qt-5/qstandardpaths.html#standardLocations indicates that some standard location queries return a list, in which the first location is writable. The documentation at http://doc.qt.io/qt-5/qstandardpaths.html#StandardLocation-enum is wrong (or imprecise at least) as it does not show that a list is returned for macOS. This can be seen easily: EG: Using PyQt 5.7 and Qt 5.7.1: 

      Python 3.5.3 (default, Jan 21 2017, 15:44:58)
      [GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.42.1)] on darwin
      Type "help", "copyright", "credits" or "license" for more information.
      >>> from PyQt5.QtCore import *
      >>> print ("Standard applications location ", QStandardPaths.standardLocations (QStandardPaths.ApplicationsLocation))
      >>> Standard applications location ['/Users/chrisc/Applications', '/Applications']

      quit ()

      My suggestion is that you add another ApplicationsDir-like variable to the installer, as you did for Windows x86 and x64 binaries. (That was helpful by the way!)

       

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            arttu.tarkiainen Arttu Tarkiainen
            chrischandler Christopher Chandler
            Votes:
            9 Vote for this issue
            Watchers:
            9 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes