forked from qt-creator/qt-creator
Maemo: Fix default deployment paths.
Applications must live in /opt/<project name> on Harmattan & Meego. Reviewed-by: Alessandro Portale
This commit is contained in:
@@ -58,12 +58,13 @@ QString QmlApplicationViewerPrivate::adjustPath(const QString &path)
|
|||||||
return QCoreApplication::applicationDirPath()
|
return QCoreApplication::applicationDirPath()
|
||||||
+ QLatin1String("/../Resources/") + path;
|
+ QLatin1String("/../Resources/") + path;
|
||||||
#else
|
#else
|
||||||
const QString pathInShareDir = QCoreApplication::applicationDirPath()
|
const QString pathInInstallDir = QCoreApplication::applicationDirPath()
|
||||||
+ QLatin1String("/../share/")
|
+ QLatin1String("/../") + path;
|
||||||
+ QFileInfo(QCoreApplication::applicationFilePath()).fileName()
|
if (pathInInstallDir.contains(QLatin1String("opt"))
|
||||||
+ QLatin1Char('/') + path;
|
&& pathInInstallDir.contains(QLatin1String("bin"))
|
||||||
if (QFileInfo(pathInShareDir).exists())
|
&& QFileInfo(pathInInstallDir).exists()) {
|
||||||
return pathInShareDir;
|
return pathInInstallDir;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
return path;
|
return path;
|
||||||
|
|||||||
@@ -44,10 +44,8 @@ symbian {
|
|||||||
}
|
}
|
||||||
} else:unix {
|
} else:unix {
|
||||||
maemo5 {
|
maemo5 {
|
||||||
installPrefix = /opt/usr
|
|
||||||
desktopfile.path = /usr/share/applications/hildon
|
desktopfile.path = /usr/share/applications/hildon
|
||||||
} else {
|
} else {
|
||||||
installPrefix = /usr
|
|
||||||
desktopfile.path = /usr/share/applications
|
desktopfile.path = /usr/share/applications
|
||||||
copyCommand =
|
copyCommand =
|
||||||
for(deploymentfolder, DEPLOYMENTFOLDERS) {
|
for(deploymentfolder, DEPLOYMENTFOLDERS) {
|
||||||
@@ -76,12 +74,13 @@ symbian {
|
|||||||
QMAKE_EXTRA_TARGETS += first copydeploymentfolders
|
QMAKE_EXTRA_TARGETS += first copydeploymentfolders
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
installPrefix = /opt/$${TARGET}
|
||||||
for(deploymentfolder, DEPLOYMENTFOLDERS) {
|
for(deploymentfolder, DEPLOYMENTFOLDERS) {
|
||||||
item = item$${deploymentfolder}
|
item = item$${deploymentfolder}
|
||||||
itemfiles = $${item}.files
|
itemfiles = $${item}.files
|
||||||
$$itemfiles = $$eval($${deploymentfolder}.source)
|
$$itemfiles = $$eval($${deploymentfolder}.source)
|
||||||
itempath = $${item}.path
|
itempath = $${item}.path
|
||||||
$$itempath = $${installPrefix}/share/$${TARGET}/$$eval($${deploymentfolder}.target)
|
$$itempath = $${installPrefix}/$$eval($${deploymentfolder}.target)
|
||||||
export($$itemfiles)
|
export($$itemfiles)
|
||||||
export($$itempath)
|
export($$itempath)
|
||||||
INSTALLS += $$item
|
INSTALLS += $$item
|
||||||
|
|||||||
@@ -360,10 +360,7 @@ QString MaemoDeployableListModel::proFileScope() const
|
|||||||
|
|
||||||
QString MaemoDeployableListModel::installPrefix() const
|
QString MaemoDeployableListModel::installPrefix() const
|
||||||
{
|
{
|
||||||
const QtVersion *const qv = qtVersion();
|
return QLatin1String("/opt/") + m_projectName;
|
||||||
QTC_ASSERT(qv, return QString());
|
|
||||||
return QLatin1String(MaemoGlobal::version(qv) == MaemoGlobal::Maemo5
|
|
||||||
? "/opt/usr" : "/usr");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace Qt4ProjectManager
|
} // namespace Qt4ProjectManager
|
||||||
|
|||||||
Reference in New Issue
Block a user