Update shared.cpp

This commit is contained in:
probonopd
2017-02-18 15:05:59 +01:00
committed by GitHub
parent 8eef3f66be
commit 342524d2d1
+13 -1
View File
@@ -976,7 +976,8 @@ void deployPlugins(const AppDirInfo &appDirInfo, const QString &pluginSourcePath
void createQtConf(const QString &appDirPath) void createQtConf(const QString &appDirPath)
{ {
// Set Plugins and imports paths. These are relative to App.app/Contents. // 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
QByteArray contents = "# Generated by linuxdeployqt\n" QByteArray contents = "# Generated by linuxdeployqt\n"
"# https://github.com/probonopd/linuxdeployqt/\n" "# https://github.com/probonopd/linuxdeployqt/\n"
"[Paths]\n" "[Paths]\n"
@@ -984,6 +985,17 @@ void createQtConf(const QString &appDirPath)
"Imports = qml\n" "Imports = qml\n"
"Qml2Imports = qml\n"; "Qml2Imports = qml\n";
// Workaround for: https://github.com/probonopd/linuxdeployqt/issues/75
if(fhsLikeMode == true){
QByteArray contents = "# Generated by linuxdeployqt\n"
"# https://github.com/probonopd/linuxdeployqt/\n"
"[Paths]\n"
"Prefix = ../../\n"
"Plugins = plugins\n"
"Imports = qml\n"
"Qml2Imports = qml\n";
}
QString filePath = appDirPath + "/"; // Is picked up when placed next to the main executable QString filePath = appDirPath + "/"; // Is picked up when placed next to the main executable
QString fileName = QDir::cleanPath(appBinaryPath + "/../qt.conf"); QString fileName = QDir::cleanPath(appBinaryPath + "/../qt.conf");