forked from qt-creator/qt-creator
Fix "TARGET=" in .pro files
Default to the baseName() of the .pro file.
This commit is contained in:
@@ -221,6 +221,9 @@ void S60DeviceRunConfiguration::updateTarget()
|
|||||||
}
|
}
|
||||||
|
|
||||||
m_targetName = reader->value("TARGET");
|
m_targetName = reader->value("TARGET");
|
||||||
|
if (m_targetName.isEmpty())
|
||||||
|
m_targetName = QFileInfo(m_proFilePath).baseName();
|
||||||
|
|
||||||
m_baseFileName = QDir::cleanPath(m_workingDir + QLatin1Char('/') + m_targetName);
|
m_baseFileName = QDir::cleanPath(m_workingDir + QLatin1Char('/') + m_targetName);
|
||||||
|
|
||||||
if (pro->toolChainType(pro->activeBuildConfiguration()) == ToolChain::GCCE)
|
if (pro->toolChainType(pro->activeBuildConfiguration()) == ToolChain::GCCE)
|
||||||
|
|||||||
@@ -149,8 +149,12 @@ void S60EmulatorRunConfiguration::updateTarget()
|
|||||||
qmakeBuildConfig = "udeb";
|
qmakeBuildConfig = "udeb";
|
||||||
baseDir += "/epoc32/release/winscw/" + qmakeBuildConfig;
|
baseDir += "/epoc32/release/winscw/" + qmakeBuildConfig;
|
||||||
|
|
||||||
|
QString target = reader->value("TARGET");
|
||||||
|
if (target.isEmpty())
|
||||||
|
target = QFileInfo(m_proFilePath).baseName();
|
||||||
|
|
||||||
m_executable = QDir::toNativeSeparators(
|
m_executable = QDir::toNativeSeparators(
|
||||||
QDir::cleanPath(baseDir + QLatin1Char('/') + reader->value("TARGET")));
|
QDir::cleanPath(baseDir + QLatin1Char('/') + target));
|
||||||
m_executable += QLatin1String(".exe");
|
m_executable += QLatin1String(".exe");
|
||||||
|
|
||||||
delete reader;
|
delete reader;
|
||||||
|
|||||||
@@ -592,16 +592,20 @@ void Qt4RunConfiguration::updateTarget()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QString target = reader->value("TARGET");
|
||||||
|
if (target.isEmpty())
|
||||||
|
target = QFileInfo(m_proFilePath).baseName();
|
||||||
|
|
||||||
#if defined (Q_OS_MAC)
|
#if defined (Q_OS_MAC)
|
||||||
if (reader->values("CONFIG").contains("app_bundle")) {
|
if (reader->values("CONFIG").contains("app_bundle")) {
|
||||||
m_workingDir += QLatin1Char('/')
|
m_workingDir += QLatin1Char('/')
|
||||||
+ reader->value("TARGET")
|
+ target
|
||||||
+ QLatin1String(".app/Contents/MacOS");
|
+ QLatin1String(".app/Contents/MacOS");
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
m_workingDir = QDir::cleanPath(m_workingDir);
|
m_workingDir = QDir::cleanPath(m_workingDir);
|
||||||
m_executable = QDir::cleanPath(m_workingDir + QLatin1Char('/') + reader->value("TARGET"));
|
m_executable = QDir::cleanPath(m_workingDir + QLatin1Char('/') + target);
|
||||||
//qDebug()<<"##### updateTarget sets:"<<m_workingDir<<m_executable;
|
//qDebug()<<"##### updateTarget sets:"<<m_workingDir<<m_executable;
|
||||||
|
|
||||||
#if defined (Q_OS_WIN)
|
#if defined (Q_OS_WIN)
|
||||||
|
|||||||
Reference in New Issue
Block a user