Qt Installer Framework - <AdminTargetDir> doesn't work
-
Can someone explain how <AdminTargetDir> works in config.xml file. The documentation is very poor in this regard.
My understanding was that if user running installer has Admin rights then <AdminTargetDir> directory should appear as a default installation directory, otherwise if user running installer doesn't have admin rights then <TargetDir> directory should appear as a default installation directory.
But after many experiments I figured out that for both regular and admin users only <TargetDir> directory appears as a default installation directory.
Can someone clarify what is going on and how <AdminTargetDir> should work.
-
Since no one replied to this thread I had to look into sources of QIF and here is what I found out in packagemanagercore_p.cpp file:
@#ifdef Q_OS_LINUX
if (m_launchedAsRoot)
m_data.setValue(scTargetDir, replaceVariables(m_data.settings().adminTargetDir()));
#endif@So it works properly only on Linux. So why it is not supported on Windows?
I think when installer run as Administrator ("Run as administrator") on Windows then <AdminTargetDir> value should be used. Is it a bug?