Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
3.0.1, 3.1.1
-
None
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!)