From 5df50f332b19310fd9ebd8937d49fe0cfc7bbf06 Mon Sep 17 00:00:00 2001 From: probonopd Date: Sun, 19 Feb 2017 11:42:44 +0100 Subject: [PATCH] No longer generate qt.conf since we use qt_prfxpath now --- linuxdeployqt/main.cpp | 1 - shared/shared.cpp | 71 ------------------------------------------ shared/shared.h | 2 -- 3 files changed, 74 deletions(-) diff --git a/linuxdeployqt/main.cpp b/linuxdeployqt/main.cpp index f02b013..48c75f8 100644 --- a/linuxdeployqt/main.cpp +++ b/linuxdeployqt/main.cpp @@ -217,7 +217,6 @@ int main(int argc, char **argv) if (deploymentInfo.pluginPath.isEmpty()) deploymentInfo.pluginPath = QDir::cleanPath(deploymentInfo.qtPath + "/../plugins"); deployPlugins(appDirPath, deploymentInfo); - createQtConf(appDirPath); } if (runStripEnabled) diff --git a/shared/shared.cpp b/shared/shared.cpp index debf7ed..9e74865 100644 --- a/shared/shared.cpp +++ b/shared/shared.cpp @@ -940,8 +940,6 @@ void deployPlugins(const AppDirInfo &appDirInfo, const QString &pluginSourcePath sourcePath = QDir::cleanPath(qtLibexecPath + "/QtWebEngineProcess"); destinationPath = QDir::cleanPath(dstLibexec + "/QtWebEngineProcess"); copyFilePrintStatus(sourcePath, destinationPath); - // put qt.conf file next to browser process so it can also make use of our local Qt resources - createQtConfForQtWebEngineProcess(dstLibexec); // Resources: sourcePath = QDir::cleanPath(qtDataPath + "/resources/qtwebengine_resources.pak"); destinationPath = QDir::cleanPath(dstResources + "/qtwebengine_resources.pak"); @@ -981,75 +979,6 @@ void deployPlugins(const AppDirInfo &appDirInfo, const QString &pluginSourcePath } } -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 - QByteArray contents = "# Generated by linuxdeployqt\n" - "# https://github.com/probonopd/linuxdeployqt/\n" - "[Paths]\n" - "Plugins = plugins\n" - "Imports = 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 fileName = QDir::cleanPath(appBinaryPath + "/../qt.conf"); - - QDir().mkpath(filePath); - - QFile qtconf(fileName); - 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"; - } -} - -void createQtConfForQtWebEngineProcess(const QString &appDirPath) -{ - QByteArray contents = "# Generated by linuxdeployqt\n" - "# https://github.com/probonopd/linuxdeployqt/\n" - "[Paths]\n" - "Prefix = ../\n"; - QString filePath = appDirPath + "/"; - QString fileName = filePath + "qt.conf"; - - QDir().mkpath(filePath); - - QFile qtconf(fileName); - if (qtconf.exists() && !alwaysOwerwriteEnabled) { - LogWarning() << fileName << "already exists, will not overwrite."; - return; - } - - qtconf.open(QIODevice::WriteOnly); - if (qtconf.write(contents) != -1) { - LogNormal() << "Created configuration file for Qt WebEngine process:" << fileName; - LogNormal() << "This file sets the prefix option to parent directory of browser process executable"; - } -} - void deployPlugins(const QString &appDirPath, DeploymentInfo deploymentInfo) { AppDirInfo applicationBundle; diff --git a/shared/shared.h b/shared/shared.h index 87338ba..eab4835 100644 --- a/shared/shared.h +++ b/shared/shared.h @@ -114,8 +114,6 @@ QList getQtLibraries(const QStringList &lddLines, const QString &ap QString copyLibrary(const LibraryInfo &library, const QString path); DeploymentInfo deployQtLibraries(const QString &appDirPath, const QStringList &additionalExecutables); DeploymentInfo deployQtLibraries(QList libraries,const QString &bundlePath, const QStringList &binaryPaths, bool useLoaderPath); -void createQtConf(const QString &appDirPath); -void createQtConfForQtWebEngineProcess(const QString &appDirPath); void deployPlugins(const QString &appDirPath, DeploymentInfo deploymentInfo); bool deployQmlImports(const QString &appDirPath, DeploymentInfo deploymentInfo, QStringList &qmlDirs); void changeIdentification(const QString &id, const QString &binaryPath);