Do not hardcode usr/
This commit is contained in:
+20
-7
@@ -934,10 +934,11 @@ void deployPlugins(const AppDirInfo &appDirInfo, const QString &pluginSourcePath
|
|||||||
QString dstResources;
|
QString dstResources;
|
||||||
QString dstTranslations;
|
QString dstTranslations;
|
||||||
if(fhsLikeMode){
|
if(fhsLikeMode){
|
||||||
// FIXME - do not hardcode "usr/" but take the directory above the main executable
|
QFileInfo qfi(appDirInfo.binaryPath);
|
||||||
dstLibexec = appDirInfo.path + "/usr/libexec";
|
QString qtTargetDir = qfi.absoluteDir().absolutePath() + "/../";
|
||||||
dstResources = appDirInfo.path + "/usr/resources";
|
dstLibexec = qtTargetDir + "/libexec";
|
||||||
dstTranslations = appDirInfo.path + "/usr/translations";
|
dstResources = qtTargetDir + "/resources";
|
||||||
|
dstTranslations = qtTargetDir + "/translations";
|
||||||
} else {
|
} else {
|
||||||
dstLibexec = appDirInfo.path + "/libexec";
|
dstLibexec = appDirInfo.path + "/libexec";
|
||||||
dstResources = appDirInfo.path + "/resources";
|
dstResources = appDirInfo.path + "/resources";
|
||||||
@@ -997,8 +998,9 @@ void deployPlugins(const QString &appDirPath, DeploymentInfo deploymentInfo)
|
|||||||
|
|
||||||
QString pluginDestinationPath;
|
QString pluginDestinationPath;
|
||||||
if(fhsLikeMode){
|
if(fhsLikeMode){
|
||||||
// FIXME - do not hardcode "usr/" but take the directory above the main executable
|
QFileInfo qfi(applicationBundle.binaryPath);
|
||||||
pluginDestinationPath = appDirPath + "/usr/" + "plugins";
|
QString qtTargetDir = qfi.absoluteDir().absolutePath() + "/../";
|
||||||
|
pluginDestinationPath = qtTargetDir + "/plugins";
|
||||||
} else {
|
} else {
|
||||||
pluginDestinationPath = appDirPath + "/" + "plugins";
|
pluginDestinationPath = appDirPath + "/" + "plugins";
|
||||||
}
|
}
|
||||||
@@ -1007,7 +1009,18 @@ void deployPlugins(const QString &appDirPath, DeploymentInfo deploymentInfo)
|
|||||||
|
|
||||||
void deployQmlImport(const QString &appDirPath, const QSet<QString> &rpaths, const QString &importSourcePath, const QString &importName)
|
void deployQmlImport(const QString &appDirPath, const QSet<QString> &rpaths, const QString &importSourcePath, const QString &importName)
|
||||||
{
|
{
|
||||||
QString importDestinationPath = appDirPath + "/qml/" + importName;
|
AppDirInfo applicationBundle;
|
||||||
|
applicationBundle.path = appDirPath;
|
||||||
|
applicationBundle.binaryPath = appBinaryPath;
|
||||||
|
|
||||||
|
QString importDestinationPath;
|
||||||
|
if(fhsLikeMode){
|
||||||
|
QFileInfo qfi(applicationBundle.binaryPath);
|
||||||
|
QString qtTargetDir = qfi.absoluteDir().absolutePath() + "/../";
|
||||||
|
importDestinationPath = qtTargetDir + "/qml/" + importName;
|
||||||
|
} else {
|
||||||
|
importDestinationPath = appDirPath + "/qml/" + importName;
|
||||||
|
}
|
||||||
|
|
||||||
// Skip already deployed imports. This can happen in cases like "QtQuick.Controls.Styles",
|
// Skip already deployed imports. This can happen in cases like "QtQuick.Controls.Styles",
|
||||||
// where deploying QtQuick.Controls will also deploy the "Styles" sub-import.
|
// where deploying QtQuick.Controls will also deploy the "Styles" sub-import.
|
||||||
|
|||||||
Reference in New Issue
Block a user