Commit 08aaad92 authored by Christian Kandeler's avatar Christian Kandeler
Browse files

Maemo: Fix default deployment paths.

Applications must live in /opt/<project name> on Harmattan & Meego.

Reviewed-by: Alessandro Portale
parent 5720bc7f
......@@ -58,12 +58,13 @@ QString QmlApplicationViewerPrivate::adjustPath(const QString &path)
return QCoreApplication::applicationDirPath()
+ QLatin1String("/../Resources/") + path;
#else
const QString pathInShareDir = QCoreApplication::applicationDirPath()
+ QLatin1String("/../share/")
+ QFileInfo(QCoreApplication::applicationFilePath()).fileName()
+ QLatin1Char('/') + path;
if (QFileInfo(pathInShareDir).exists())
return pathInShareDir;
const QString pathInInstallDir = QCoreApplication::applicationDirPath()
+ QLatin1String("/../") + path;
if (pathInInstallDir.contains(QLatin1String("opt"))
&& pathInInstallDir.contains(QLatin1String("bin"))
&& QFileInfo(pathInInstallDir).exists()) {
return pathInInstallDir;
}
#endif
#endif
return path;
......
......@@ -44,10 +44,8 @@ symbian {
}
} else:unix {
maemo5 {
installPrefix = /opt/usr
desktopfile.path = /usr/share/applications/hildon
} else {
installPrefix = /usr
desktopfile.path = /usr/share/applications
copyCommand =
for(deploymentfolder, DEPLOYMENTFOLDERS) {
......@@ -76,12 +74,13 @@ symbian {
QMAKE_EXTRA_TARGETS += first copydeploymentfolders
}
}
installPrefix = /opt/$${TARGET}
for(deploymentfolder, DEPLOYMENTFOLDERS) {
item = item$${deploymentfolder}
itemfiles = $${item}.files
$$itemfiles = $$eval($${deploymentfolder}.source)
itempath = $${item}.path
$$itempath = $${installPrefix}/share/$${TARGET}/$$eval($${deploymentfolder}.target)
$$itempath = $${installPrefix}/$$eval($${deploymentfolder}.target)
export($$itemfiles)
export($$itempath)
INSTALLS += $$item
......
......@@ -360,10 +360,7 @@ QString MaemoDeployableListModel::proFileScope() const
QString MaemoDeployableListModel::installPrefix() const
{
const QtVersion *const qv = qtVersion();
QTC_ASSERT(qv, return QString());
return QLatin1String(MaemoGlobal::version(qv) == MaemoGlobal::Maemo5
? "/opt/usr" : "/usr");
return QLatin1String("/opt/") + m_projectName;
}
} // namespace Qt4ProjectManager
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment