Update shared.cpp
This commit is contained in:
+4
-8
@@ -1156,9 +1156,9 @@ void createQtConf(const QString &appDirPath)
|
||||
// Set Plugins and imports paths. These are relative to QCoreApplication::applicationDirPath()
|
||||
// which is where the main executable resides; see http://doc.qt.io/qt-5/qt-conf.html
|
||||
// See https://github.com/probonopd/linuxdeployqt/issues/ 75, 98, 99
|
||||
|
||||
QByteArray contents;
|
||||
if(fhsLikeMode){
|
||||
QByteArray contents = "# Generated by linuxdeployqt\n"
|
||||
contents = "# Generated by linuxdeployqt\n"
|
||||
"# https://github.com/probonopd/linuxdeployqt/\n"
|
||||
"[Paths]\n"
|
||||
"Prefix = ../\n"
|
||||
@@ -1166,9 +1166,10 @@ void createQtConf(const QString &appDirPath)
|
||||
"Imports = qml\n"
|
||||
"Qml2Imports = qml\n";
|
||||
} else {
|
||||
QByteArray contents = "# Generated by linuxdeployqt\n"
|
||||
contents = "# Generated by linuxdeployqt\n"
|
||||
"# https://github.com/probonopd/linuxdeployqt/\n"
|
||||
"[Paths]\n"
|
||||
"Prefix = ./\n"
|
||||
"Plugins = plugins\n"
|
||||
"Imports = qml\n"
|
||||
"Qml2Imports = qml\n";
|
||||
@@ -1183,17 +1184,12 @@ void createQtConf(const QString &appDirPath)
|
||||
if (qtconf.exists() && !alwaysOwerwriteEnabled) {
|
||||
|
||||
LogWarning() << fileName << "already exists, will not overwrite.";
|
||||
LogWarning() << "To make sure the plugins are loaded from the correct location,";
|
||||
LogWarning() << "please make sure qt.conf contains the following lines:";
|
||||
LogWarning() << "[Paths]";
|
||||
LogWarning() << " Plugins = plugins";
|
||||
return;
|
||||
}
|
||||
|
||||
qtconf.open(QIODevice::WriteOnly);
|
||||
if (qtconf.write(contents) != -1) {
|
||||
LogNormal() << "Created configuration file:" << fileName;
|
||||
LogNormal() << "This file sets the plugin search path to" << appDirPath + "/plugins";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user