Workaround to deploy Qt diretory to qt/ in FHS-like mode
This commit is contained in:
+21
-6
@@ -930,9 +930,19 @@ void deployPlugins(const AppDirInfo &appDirInfo, const QString &pluginSourcePath
|
|||||||
QString qtDataPath = qtToBeBundledInfo.value("QT_INSTALL_DATA");
|
QString qtDataPath = qtToBeBundledInfo.value("QT_INSTALL_DATA");
|
||||||
QString qtTranslationsPath = qtToBeBundledInfo.value("QT_INSTALL_TRANSLATIONS");
|
QString qtTranslationsPath = qtToBeBundledInfo.value("QT_INSTALL_TRANSLATIONS");
|
||||||
// create destination directories:
|
// create destination directories:
|
||||||
QString dstLibexec = appDirInfo.path + "/libexec";
|
QString dstLibexec;
|
||||||
QString dstResources = appDirInfo.path + "/resources";
|
QString dstResources;
|
||||||
QString dstTranslations = appDirInfo.path + "/translations";
|
QString dstTranslations;
|
||||||
|
if(fhsLikeMode){
|
||||||
|
// FIXME - do not hardcode "usr/" but take the directory above the main executable
|
||||||
|
dstLibexec = appDirInfo.path + "/usr/libexec";
|
||||||
|
dstResources = appDirInfo.path + "/usr/resources";
|
||||||
|
dstTranslations = appDirInfo.path + "/usr/translations";
|
||||||
|
} else {
|
||||||
|
dstLibexec = appDirInfo.path + "/libexec";
|
||||||
|
dstResources = appDirInfo.path + "/resources";
|
||||||
|
dstTranslations = appDirInfo.path + "/translations";
|
||||||
|
}
|
||||||
QDir().mkpath(dstLibexec);
|
QDir().mkpath(dstLibexec);
|
||||||
QDir().mkpath(dstResources);
|
QDir().mkpath(dstResources);
|
||||||
QDir().mkpath(dstTranslations);
|
QDir().mkpath(dstTranslations);
|
||||||
@@ -985,7 +995,13 @@ void deployPlugins(const QString &appDirPath, DeploymentInfo deploymentInfo)
|
|||||||
applicationBundle.path = appDirPath;
|
applicationBundle.path = appDirPath;
|
||||||
applicationBundle.binaryPath = appBinaryPath;
|
applicationBundle.binaryPath = appBinaryPath;
|
||||||
|
|
||||||
const QString pluginDestinationPath = appDirPath + "/" + "plugins";
|
QString pluginDestinationPath;
|
||||||
|
if(fhsLikeMode){
|
||||||
|
// FIXME - do not hardcode "usr/" but take the directory above the main executable
|
||||||
|
pluginDestinationPath = appDirPath + "/usr/" + "plugins";
|
||||||
|
} else {
|
||||||
|
pluginDestinationPath = appDirPath + "/" + "plugins";
|
||||||
|
}
|
||||||
deployPlugins(applicationBundle, deploymentInfo.pluginPath, pluginDestinationPath, deploymentInfo);
|
deployPlugins(applicationBundle, deploymentInfo.pluginPath, pluginDestinationPath, deploymentInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1144,8 +1160,7 @@ void changeQtLibraries(const QList<LibraryInfo> libraries, const QStringList &bi
|
|||||||
LogNormal() << "Qt in" << absoluteQtPath;
|
LogNormal() << "Qt in" << absoluteQtPath;
|
||||||
QString finalQtPath = absoluteQtPath;
|
QString finalQtPath = absoluteQtPath;
|
||||||
|
|
||||||
if (!absoluteQtPath.startsWith("/Library/Libraries"))
|
finalQtPath += "/lib/";
|
||||||
finalQtPath += "/lib/";
|
|
||||||
|
|
||||||
foreach (LibraryInfo library, libraries) {
|
foreach (LibraryInfo library, libraries) {
|
||||||
const QString oldBinaryId = library.installName;
|
const QString oldBinaryId = library.installName;
|
||||||
|
|||||||
@@ -29,7 +29,6 @@ killall QtWidgetsApplication && echo "SUCCESS"
|
|||||||
|
|
||||||
cp QtWidgetsApplication fhs/usr/bin/
|
cp QtWidgetsApplication fhs/usr/bin/
|
||||||
../../../linuxdeployqt-*-x86_64.AppImage fhs/usr/bin/QtWidgetsApplication
|
../../../linuxdeployqt-*-x86_64.AppImage fhs/usr/bin/QtWidgetsApplication
|
||||||
mv fhs/plugins fhs/usr/ # FIXME, quick and dirty workaround for https://github.com/probonopd/linuxdeployqt/issues/75
|
|
||||||
ldd fhs/usr/bin/QtWidgetsApplication
|
ldd fhs/usr/bin/QtWidgetsApplication
|
||||||
find fhs/
|
find fhs/
|
||||||
LD_DEBUG=libs fhs/usr/bin/QtWidgetsApplication &
|
LD_DEBUG=libs fhs/usr/bin/QtWidgetsApplication &
|
||||||
|
|||||||
Reference in New Issue
Block a user