2010-04-06 16:56:47 +02:00
|
|
|
/****************************************************************************
|
|
|
|
|
**
|
|
|
|
|
** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
|
|
|
|
|
** All rights reserved.
|
|
|
|
|
** Contact: Nokia Corporation (qt-info@nokia.com)
|
|
|
|
|
**
|
|
|
|
|
** This file is part of Qt Creator.
|
|
|
|
|
**
|
|
|
|
|
** $QT_BEGIN_LICENSE:LGPL$
|
|
|
|
|
** No Commercial Usage
|
|
|
|
|
** This file contains pre-release code and may not be distributed.
|
|
|
|
|
** You may use this file in accordance with the terms and conditions
|
|
|
|
|
** contained in the Technology Preview License Agreement accompanying
|
|
|
|
|
** this package.
|
|
|
|
|
**
|
|
|
|
|
** GNU Lesser General Public License Usage
|
|
|
|
|
** Alternatively, this file may be used under the terms of the GNU Lesser
|
|
|
|
|
** General Public License version 2.1 as published by the Free Software
|
|
|
|
|
** Foundation and appearing in the file LICENSE.LGPL included in the
|
|
|
|
|
** packaging of this file. Please review the following information to
|
|
|
|
|
** ensure the GNU Lesser General Public License version 2.1 requirements
|
|
|
|
|
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
|
|
|
|
**
|
|
|
|
|
** In addition, as a special exception, Nokia gives you certain additional
|
|
|
|
|
** rights. These rights are described in the Nokia Qt LGPL Exception
|
|
|
|
|
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
|
|
|
|
|
**
|
|
|
|
|
** If you have questions regarding the use of this file, please contact
|
|
|
|
|
** Nokia at qt-info@nokia.com.
|
|
|
|
|
**
|
|
|
|
|
**
|
|
|
|
|
**
|
|
|
|
|
**
|
|
|
|
|
**
|
|
|
|
|
**
|
|
|
|
|
**
|
|
|
|
|
**
|
|
|
|
|
** $QT_END_LICENSE$
|
|
|
|
|
**
|
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
|
|
#include "maemopackagecreationstep.h"
|
|
|
|
|
|
2010-04-09 18:24:43 +02:00
|
|
|
#include "maemoconstants.h"
|
2010-04-14 09:48:41 +02:00
|
|
|
#include "maemopackagecreationwidget.h"
|
2010-04-20 17:02:31 +02:00
|
|
|
#include "maemopackagecontents.h"
|
2010-04-07 17:10:00 +02:00
|
|
|
#include "maemotoolchain.h"
|
2010-04-09 18:24:43 +02:00
|
|
|
|
2010-04-15 14:46:15 +02:00
|
|
|
#include <projectexplorer/projectexplorerconstants.h>
|
2010-04-07 17:10:00 +02:00
|
|
|
#include <qt4buildconfiguration.h>
|
|
|
|
|
#include <qt4project.h>
|
|
|
|
|
#include <qt4target.h>
|
|
|
|
|
|
2010-04-15 14:46:15 +02:00
|
|
|
#include <QtCore/QDir>
|
2010-04-07 17:10:00 +02:00
|
|
|
#include <QtCore/QFile>
|
|
|
|
|
#include <QtCore/QFileInfo>
|
|
|
|
|
#include <QtCore/QProcess>
|
|
|
|
|
#include <QtCore/QProcessEnvironment>
|
|
|
|
|
#include <QtCore/QStringBuilder>
|
2010-04-06 16:56:47 +02:00
|
|
|
#include <QtGui/QWidget>
|
|
|
|
|
|
2010-06-28 11:59:36 +02:00
|
|
|
namespace {
|
|
|
|
|
const QLatin1String PackagingEnabledKey("Packaging Enabled");
|
|
|
|
|
const QLatin1String DefaultVersionNumber("0.0.1");
|
|
|
|
|
const QLatin1String VersionNumberKey("Version Number");
|
|
|
|
|
}
|
2010-06-11 11:58:12 +02:00
|
|
|
|
2010-04-15 14:46:15 +02:00
|
|
|
using namespace ProjectExplorer::Constants;
|
2010-04-06 16:56:47 +02:00
|
|
|
using ProjectExplorer::BuildConfiguration;
|
|
|
|
|
using ProjectExplorer::BuildStepConfigWidget;
|
2010-04-15 14:46:15 +02:00
|
|
|
using ProjectExplorer::Task;
|
2010-04-06 16:56:47 +02:00
|
|
|
|
|
|
|
|
namespace Qt4ProjectManager {
|
|
|
|
|
namespace Internal {
|
|
|
|
|
|
|
|
|
|
MaemoPackageCreationStep::MaemoPackageCreationStep(BuildConfiguration *buildConfig)
|
2010-04-20 17:02:31 +02:00
|
|
|
: ProjectExplorer::BuildStep(buildConfig, CreatePackageId),
|
2010-06-11 11:58:12 +02:00
|
|
|
m_packageContents(new MaemoPackageContents(this)),
|
2010-06-28 11:59:36 +02:00
|
|
|
m_packagingEnabled(true),
|
|
|
|
|
m_versionString(DefaultVersionNumber)
|
2010-04-06 16:56:47 +02:00
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
MaemoPackageCreationStep::MaemoPackageCreationStep(BuildConfiguration *buildConfig,
|
|
|
|
|
MaemoPackageCreationStep *other)
|
2010-04-20 17:02:31 +02:00
|
|
|
: BuildStep(buildConfig, other),
|
2010-06-11 11:58:12 +02:00
|
|
|
m_packageContents(new MaemoPackageContents(this)),
|
2010-06-28 11:59:36 +02:00
|
|
|
m_packagingEnabled(other->m_packagingEnabled),
|
|
|
|
|
m_versionString(other->m_versionString)
|
2010-04-06 16:56:47 +02:00
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool MaemoPackageCreationStep::init()
|
|
|
|
|
{
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
2010-05-03 15:50:15 +02:00
|
|
|
QVariantMap MaemoPackageCreationStep::toMap() const
|
|
|
|
|
{
|
|
|
|
|
QVariantMap map(ProjectExplorer::BuildStep::toMap());
|
2010-06-11 11:58:12 +02:00
|
|
|
map.insert(PackagingEnabledKey, m_packagingEnabled);
|
2010-06-28 11:59:36 +02:00
|
|
|
map.insert(VersionNumberKey, m_versionString);
|
2010-05-03 15:50:15 +02:00
|
|
|
return map.unite(m_packageContents->toMap());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool MaemoPackageCreationStep::fromMap(const QVariantMap &map)
|
|
|
|
|
{
|
|
|
|
|
m_packageContents->fromMap(map);
|
2010-06-11 11:58:12 +02:00
|
|
|
m_packagingEnabled = map.value(PackagingEnabledKey, true).toBool();
|
2010-06-28 11:59:36 +02:00
|
|
|
m_versionString = map.value(VersionNumberKey, DefaultVersionNumber).toString();
|
2010-05-03 15:50:15 +02:00
|
|
|
return ProjectExplorer::BuildStep::fromMap(map);
|
|
|
|
|
}
|
|
|
|
|
|
2010-04-06 16:56:47 +02:00
|
|
|
void MaemoPackageCreationStep::run(QFutureInterface<bool> &fi)
|
|
|
|
|
{
|
2010-06-11 11:58:12 +02:00
|
|
|
fi.reportResult(m_packagingEnabled ? createPackage() : true);
|
2010-04-06 16:56:47 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
BuildStepConfigWidget *MaemoPackageCreationStep::createConfigWidget()
|
|
|
|
|
{
|
|
|
|
|
return new MaemoPackageCreationWidget(this);
|
|
|
|
|
}
|
|
|
|
|
|
2010-04-07 17:10:00 +02:00
|
|
|
bool MaemoPackageCreationStep::createPackage()
|
|
|
|
|
{
|
|
|
|
|
if (!packagingNeeded())
|
|
|
|
|
return true;
|
|
|
|
|
|
2010-06-08 15:04:42 +02:00
|
|
|
QTextCharFormat textCharFormat;
|
|
|
|
|
emit addOutput(tr("Creating package file ..."), textCharFormat);
|
2010-04-07 17:10:00 +02:00
|
|
|
QFile configFile(targetRoot() % QLatin1String("/config.sh"));
|
|
|
|
|
if (!configFile.open(QIODevice::ReadOnly)) {
|
2010-04-15 14:46:15 +02:00
|
|
|
raiseError(tr("Cannot open MADDE config file '%1'.")
|
|
|
|
|
.arg(nativePath(configFile)));
|
2010-04-07 17:10:00 +02:00
|
|
|
return false;
|
|
|
|
|
}
|
2010-04-09 17:13:33 +02:00
|
|
|
|
2010-04-07 17:10:00 +02:00
|
|
|
QProcessEnvironment env = QProcessEnvironment::systemEnvironment();
|
2010-04-09 17:13:33 +02:00
|
|
|
const QString &path = QDir::toNativeSeparators(maddeRoot() + QLatin1Char('/'));
|
|
|
|
|
|
|
|
|
|
const QLatin1String key("PATH");
|
2010-04-09 18:24:43 +02:00
|
|
|
QString colon = QLatin1String(":");
|
2010-04-09 17:13:33 +02:00
|
|
|
#ifdef Q_OS_WIN
|
2010-04-09 18:24:43 +02:00
|
|
|
colon = QLatin1String(";");
|
|
|
|
|
env.insert(key, targetRoot() % "/bin" % colon % env.value(key));
|
|
|
|
|
env.insert(key, path % QLatin1String("bin") % colon % env.value(key));
|
2010-04-09 17:13:33 +02:00
|
|
|
#endif
|
|
|
|
|
env.insert(key, path % QLatin1String("madbin") % colon % env.value(key));
|
|
|
|
|
env.insert(QLatin1String("PERL5LIB"), path % QLatin1String("madlib/perl5"));
|
|
|
|
|
|
2010-06-29 13:39:30 +02:00
|
|
|
const QString buildDir = buildDirectory();
|
2010-05-03 14:47:40 +02:00
|
|
|
env.insert(QLatin1String("PWD"), buildDir);
|
2010-04-09 17:13:33 +02:00
|
|
|
|
|
|
|
|
const QRegExp envPattern(QLatin1String("([^=]+)=[\"']?([^;\"']+)[\"']? ;.*"));
|
2010-04-07 17:10:00 +02:00
|
|
|
QByteArray line;
|
|
|
|
|
do {
|
|
|
|
|
line = configFile.readLine(200);
|
|
|
|
|
if (envPattern.exactMatch(line))
|
|
|
|
|
env.insert(envPattern.cap(1), envPattern.cap(2));
|
|
|
|
|
} while (!line.isEmpty());
|
2010-04-09 17:13:33 +02:00
|
|
|
|
2010-04-07 17:10:00 +02:00
|
|
|
QProcess buildProc;
|
|
|
|
|
buildProc.setProcessEnvironment(env);
|
2010-05-03 14:47:40 +02:00
|
|
|
buildProc.setWorkingDirectory(buildDir);
|
2010-04-07 17:10:00 +02:00
|
|
|
|
2010-05-03 14:47:40 +02:00
|
|
|
if (!QFileInfo(buildDir + QLatin1String("/debian")).exists()) {
|
2010-04-07 17:10:00 +02:00
|
|
|
const QString command = QLatin1String("dh_make -s -n -p ")
|
2010-06-28 11:59:36 +02:00
|
|
|
% executableFileName().toLower() % QLatin1Char('_') % versionString();
|
2010-04-07 17:10:00 +02:00
|
|
|
if (!runCommand(buildProc, command))
|
|
|
|
|
return false;
|
2010-06-28 11:59:36 +02:00
|
|
|
|
2010-05-03 14:47:40 +02:00
|
|
|
QFile rulesFile(buildDir + QLatin1String("/debian/rules"));
|
2010-04-07 17:10:00 +02:00
|
|
|
if (!rulesFile.open(QIODevice::ReadWrite)) {
|
2010-04-15 14:46:15 +02:00
|
|
|
raiseError(tr("Packaging Error: Cannot open file '%1'.")
|
|
|
|
|
.arg(nativePath(rulesFile)));
|
2010-04-07 17:10:00 +02:00
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
QByteArray rulesContents = rulesFile.readAll();
|
|
|
|
|
rulesContents.replace("DESTDIR", "INSTALL_ROOT");
|
|
|
|
|
rulesFile.resize(0);
|
|
|
|
|
rulesFile.write(rulesContents);
|
|
|
|
|
if (rulesFile.error() != QFile::NoError) {
|
2010-04-15 14:46:15 +02:00
|
|
|
raiseError(tr("Packaging Error: Cannot write file '%1'.")
|
|
|
|
|
.arg(nativePath(rulesFile)));
|
2010-04-07 17:10:00 +02:00
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2010-06-28 11:59:36 +02:00
|
|
|
{
|
|
|
|
|
QFile changeLog(buildDir + QLatin1String("/debian/changelog"));
|
|
|
|
|
if (changeLog.open(QIODevice::ReadWrite)) {
|
|
|
|
|
QString content = QString::fromUtf8(changeLog.readAll());
|
|
|
|
|
content.replace(QRegExp("\\([a-zA-Z0-9_\\.]+\\)"),
|
|
|
|
|
QLatin1Char('(') % versionString() % QLatin1Char(')'));
|
|
|
|
|
changeLog.resize(0);
|
|
|
|
|
changeLog.write(content.toUtf8());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2010-04-07 17:10:00 +02:00
|
|
|
if (!runCommand(buildProc, QLatin1String("dh_installdirs")))
|
|
|
|
|
return false;
|
2010-04-09 18:24:43 +02:00
|
|
|
|
2010-05-03 14:47:40 +02:00
|
|
|
const QDir debianRoot = QDir(buildDir % QLatin1String("/debian/")
|
|
|
|
|
% executableFileName().toLower());
|
|
|
|
|
for (int i = 0; i < m_packageContents->rowCount(); ++i) {
|
2010-06-22 14:40:08 +02:00
|
|
|
const MaemoDeployable &d = m_packageContents->deployableAt(i);
|
2010-05-03 14:47:40 +02:00
|
|
|
const QString targetFile = debianRoot.path() + '/' + d.remoteFilePath;
|
|
|
|
|
const QString absTargetDir = QFileInfo(targetFile).dir().path();
|
|
|
|
|
const QString relTargetDir = debianRoot.relativeFilePath(absTargetDir);
|
|
|
|
|
if (!debianRoot.exists(relTargetDir)
|
|
|
|
|
&& !debianRoot.mkpath(relTargetDir)) {
|
|
|
|
|
raiseError(tr("Packaging Error: Could not create directory '%1'.")
|
|
|
|
|
.arg(QDir::toNativeSeparators(absTargetDir)));
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
if (QFile::exists(targetFile) && !QFile::remove(targetFile)) {
|
2010-04-15 14:46:15 +02:00
|
|
|
raiseError(tr("Packaging Error: Could not replace file '%1'.")
|
|
|
|
|
.arg(QDir::toNativeSeparators(targetFile)));
|
2010-04-07 17:10:00 +02:00
|
|
|
return false;
|
|
|
|
|
}
|
2010-05-03 14:47:40 +02:00
|
|
|
|
|
|
|
|
if (!QFile::copy(d.localFilePath, targetFile)) {
|
|
|
|
|
raiseError(tr("Packaging Error: Could not copy '%1' to '%2'.")
|
|
|
|
|
.arg(QDir::toNativeSeparators(d.localFilePath))
|
|
|
|
|
.arg(QDir::toNativeSeparators(targetFile)));
|
|
|
|
|
return false;
|
|
|
|
|
}
|
2010-04-07 17:10:00 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const QStringList commands = QStringList() << QLatin1String("dh_link")
|
|
|
|
|
<< QLatin1String("dh_fixperms") << QLatin1String("dh_installdeb")
|
|
|
|
|
<< QLatin1String("dh_shlibdeps") << QLatin1String("dh_gencontrol")
|
|
|
|
|
<< QLatin1String("dh_md5sums") << QLatin1String("dh_builddeb --destdir=.");
|
|
|
|
|
foreach (const QString &command, commands) {
|
|
|
|
|
if (!runCommand(buildProc, command))
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
2010-06-08 15:04:42 +02:00
|
|
|
emit addOutput(tr("Package created."), textCharFormat);
|
2010-04-20 17:02:31 +02:00
|
|
|
m_packageContents->setUnModified();
|
2010-04-07 17:10:00 +02:00
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
2010-04-09 18:24:43 +02:00
|
|
|
bool MaemoPackageCreationStep::runCommand(QProcess &proc, const QString &command)
|
2010-04-07 17:10:00 +02:00
|
|
|
{
|
2010-06-08 15:04:42 +02:00
|
|
|
QTextCharFormat textCharFormat;
|
|
|
|
|
emit addOutput(tr("Package Creation: Running command '%1'.").arg(command), textCharFormat);
|
2010-04-09 18:24:43 +02:00
|
|
|
QString perl;
|
|
|
|
|
#ifdef Q_OS_WIN
|
|
|
|
|
perl = maddeRoot() + QLatin1String("/bin/perl.exe ");
|
|
|
|
|
#endif
|
|
|
|
|
proc.start(perl + maddeRoot() % QLatin1String("/madbin/") % command);
|
2010-05-19 15:59:02 +02:00
|
|
|
if (!proc.waitForStarted()) {
|
|
|
|
|
raiseError(tr("Packaging failed."),
|
|
|
|
|
tr("Packaging error: Could not start command '%1'. Reason: %2")
|
|
|
|
|
.arg(command).arg(proc.errorString()));
|
|
|
|
|
return false;
|
|
|
|
|
}
|
2010-04-07 17:10:00 +02:00
|
|
|
proc.write("\n"); // For dh_make
|
2010-06-17 12:23:26 +02:00
|
|
|
proc.waitForFinished(-1);
|
2010-05-19 15:59:02 +02:00
|
|
|
if (proc.error() != QProcess::UnknownError || proc.exitCode() != 0) {
|
|
|
|
|
QString mainMessage = tr("Packaging Error: Command '%1' failed.")
|
|
|
|
|
.arg(command);
|
|
|
|
|
if (proc.error() != QProcess::UnknownError)
|
|
|
|
|
mainMessage += tr(" Reason: %1").arg(proc.errorString());
|
|
|
|
|
raiseError(mainMessage, mainMessage + QLatin1Char('\n')
|
2010-04-19 10:06:50 +02:00
|
|
|
+ tr("Output was: ") + proc.readAllStandardError()
|
|
|
|
|
+ QLatin1Char('\n') + proc.readAllStandardOutput());
|
2010-04-07 17:10:00 +02:00
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const Qt4BuildConfiguration *MaemoPackageCreationStep::qt4BuildConfiguration() const
|
|
|
|
|
{
|
|
|
|
|
return static_cast<Qt4BuildConfiguration *>(buildConfiguration());
|
|
|
|
|
}
|
|
|
|
|
|
2010-04-20 17:02:31 +02:00
|
|
|
QString MaemoPackageCreationStep::localExecutableFilePath() const
|
2010-04-07 17:10:00 +02:00
|
|
|
{
|
2010-04-09 11:54:57 +02:00
|
|
|
const TargetInformation &ti = qt4BuildConfiguration()->qt4Target()
|
|
|
|
|
->qt4Project()->rootProjectNode()->targetInformation();
|
|
|
|
|
if (!ti.valid)
|
|
|
|
|
return QString();
|
|
|
|
|
|
|
|
|
|
return QDir::toNativeSeparators(QDir::cleanPath(ti.workingDir
|
|
|
|
|
+ QLatin1Char('/') + ti.target));
|
2010-04-07 17:10:00 +02:00
|
|
|
}
|
|
|
|
|
|
2010-06-29 13:39:30 +02:00
|
|
|
QString MaemoPackageCreationStep::buildDirectory() const
|
|
|
|
|
{
|
|
|
|
|
const TargetInformation &ti = qt4BuildConfiguration()->qt4Target()
|
|
|
|
|
->qt4Project()->rootProjectNode()->targetInformation();
|
|
|
|
|
return ti.valid ? ti.buildDir : QString();
|
|
|
|
|
}
|
|
|
|
|
|
2010-04-07 17:10:00 +02:00
|
|
|
QString MaemoPackageCreationStep::executableFileName() const
|
|
|
|
|
{
|
2010-04-20 17:02:31 +02:00
|
|
|
return QFileInfo(localExecutableFilePath()).fileName();
|
2010-04-07 17:10:00 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const MaemoToolChain *MaemoPackageCreationStep::maemoToolChain() const
|
|
|
|
|
{
|
|
|
|
|
return static_cast<MaemoToolChain *>(qt4BuildConfiguration()->toolChain());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
QString MaemoPackageCreationStep::maddeRoot() const
|
|
|
|
|
{
|
|
|
|
|
return maemoToolChain()->maddeRoot();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
QString MaemoPackageCreationStep::targetRoot() const
|
|
|
|
|
{
|
|
|
|
|
return maemoToolChain()->targetRoot();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool MaemoPackageCreationStep::packagingNeeded() const
|
|
|
|
|
{
|
2010-04-15 12:47:02 +02:00
|
|
|
QFileInfo packageInfo(packageFilePath());
|
2010-04-20 17:02:31 +02:00
|
|
|
if (!packageInfo.exists() || m_packageContents->isModified())
|
|
|
|
|
return true;
|
|
|
|
|
|
|
|
|
|
for (int i = 0; i < m_packageContents->rowCount(); ++i) {
|
|
|
|
|
if (packageInfo.lastModified()
|
|
|
|
|
<= QFileInfo(m_packageContents->deployableAt(i).localFilePath)
|
|
|
|
|
.lastModified())
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return false;
|
2010-04-07 17:10:00 +02:00
|
|
|
}
|
|
|
|
|
|
2010-04-15 12:47:02 +02:00
|
|
|
QString MaemoPackageCreationStep::packageFilePath() const
|
|
|
|
|
{
|
2010-06-29 13:39:30 +02:00
|
|
|
return buildDirectory() % QDir::separator() % executableFileName().toLower()
|
2010-06-28 11:59:36 +02:00
|
|
|
% QLatin1Char('_') % versionString() % QLatin1String("_armel.deb");
|
2010-04-15 12:47:02 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
QString MaemoPackageCreationStep::versionString() const
|
2010-04-14 14:45:04 +02:00
|
|
|
{
|
2010-06-28 11:59:36 +02:00
|
|
|
return m_versionString;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void MaemoPackageCreationStep::setVersionString(const QString &version)
|
|
|
|
|
{
|
|
|
|
|
m_versionString = version;
|
2010-04-14 14:45:04 +02:00
|
|
|
}
|
|
|
|
|
|
2010-04-15 14:46:15 +02:00
|
|
|
QString MaemoPackageCreationStep::nativePath(const QFile &file) const
|
|
|
|
|
{
|
|
|
|
|
return QDir::toNativeSeparators(QFileInfo(file).filePath());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void MaemoPackageCreationStep::raiseError(const QString &shortMsg,
|
|
|
|
|
const QString &detailedMsg)
|
|
|
|
|
{
|
2010-06-08 15:04:42 +02:00
|
|
|
QTextCharFormat textCharFormat;
|
|
|
|
|
emit addOutput(detailedMsg.isNull() ? shortMsg : detailedMsg, textCharFormat);
|
2010-04-15 14:46:15 +02:00
|
|
|
emit addTask(Task(Task::Error, shortMsg, QString(), -1,
|
|
|
|
|
TASK_CATEGORY_BUILDSYSTEM));
|
|
|
|
|
}
|
|
|
|
|
|
2010-04-06 16:56:47 +02:00
|
|
|
const QLatin1String MaemoPackageCreationStep::CreatePackageId("Qt4ProjectManager.MaemoPackageCreationStep");
|
|
|
|
|
|
|
|
|
|
} // namespace Internal
|
|
|
|
|
} // namespace Qt4ProjectManager
|