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");
|
||||
if (m_targetName.isEmpty())
|
||||
m_targetName = QFileInfo(m_proFilePath).baseName();
|
||||
|
||||
m_baseFileName = QDir::cleanPath(m_workingDir + QLatin1Char('/') + m_targetName);
|
||||
|
||||
if (pro->toolChainType(pro->activeBuildConfiguration()) == ToolChain::GCCE)
|
||||
|
||||
@@ -149,8 +149,12 @@ void S60EmulatorRunConfiguration::updateTarget()
|
||||
qmakeBuildConfig = "udeb";
|
||||
baseDir += "/epoc32/release/winscw/" + qmakeBuildConfig;
|
||||
|
||||
QString target = reader->value("TARGET");
|
||||
if (target.isEmpty())
|
||||
target = QFileInfo(m_proFilePath).baseName();
|
||||
|
||||
m_executable = QDir::toNativeSeparators(
|
||||
QDir::cleanPath(baseDir + QLatin1Char('/') + reader->value("TARGET")));
|
||||
QDir::cleanPath(baseDir + QLatin1Char('/') + target));
|
||||
m_executable += QLatin1String(".exe");
|
||||
|
||||
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 (reader->values("CONFIG").contains("app_bundle")) {
|
||||
m_workingDir += QLatin1Char('/')
|
||||
+ reader->value("TARGET")
|
||||
+ target
|
||||
+ QLatin1String(".app/Contents/MacOS");
|
||||
}
|
||||
#endif
|
||||
|
||||
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;
|
||||
|
||||
#if defined (Q_OS_WIN)
|
||||
|
||||
Reference in New Issue
Block a user