summaryrefslogtreecommitdiffstats
path: root/qmake/generators/symbian
diff options
context:
space:
mode:
authoraxis <qt-info@nokia.com>2010-02-23 15:23:05 (GMT)
committeraxis <qt-info@nokia.com>2010-02-23 15:23:05 (GMT)
commitf67062af3a076468442c29127cb48bb13937ce0e (patch)
treea12cd4c644fb528dd5f95cb58559732a0b8b6311 /qmake/generators/symbian
parenta670009fd378d48ff891602ec31204614e8a476f (diff)
parentc15307e9e916aa613096275919ca91deba64454f (diff)
downloadQt-f67062af3a076468442c29127cb48bb13937ce0e.zip
Qt-f67062af3a076468442c29127cb48bb13937ce0e.tar.gz
Qt-f67062af3a076468442c29127cb48bb13937ce0e.tar.bz2
Merge branch 'master' of scm.dev.nokia.troll.no:qt/qt-s60-public
Conflicts: mkspecs/features/symbian/qt.prf qmake/Makefile.unix qmake/Makefile.win32 qmake/Makefile.win32-g++ qmake/Makefile.win32-g++-sh qmake/generators/symbian/initprojectdeploy_symbian.cpp src/src.pro
Diffstat (limited to 'qmake/generators/symbian')
-rw-r--r--qmake/generators/symbian/epocroot.h51
-rw-r--r--qmake/generators/symbian/initprojectdeploy_symbian.cpp96
-rw-r--r--qmake/generators/symbian/initprojectdeploy_symbian.h2
-rw-r--r--qmake/generators/symbian/symmake.cpp9
-rw-r--r--qmake/generators/symbian/symmake_abld.cpp3
-rw-r--r--qmake/generators/symbian/symmake_sbsv2.cpp3
6 files changed, 12 insertions, 152 deletions
diff --git a/qmake/generators/symbian/epocroot.h b/qmake/generators/symbian/epocroot.h
deleted file mode 100644
index be26438..0000000
--- a/qmake/generators/symbian/epocroot.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/****************************************************************************
-**
-** 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 the qmake application of the Qt Toolkit.
-**
-** $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$
-**
-****************************************************************************/
-
-#ifndef EPOCROOT_H
-#define EPOCROOT_H
-
-#include <qstring.h>
-
-// Implementation of epocRoot method is in initprojectdeploy_symbian.cpp
-// Defined in separate header for inclusion clarity
-extern QString epocRoot();
-
-#endif // EPOCROOT_H
diff --git a/qmake/generators/symbian/initprojectdeploy_symbian.cpp b/qmake/generators/symbian/initprojectdeploy_symbian.cpp
index 6a7f128..6087605 100644
--- a/qmake/generators/symbian/initprojectdeploy_symbian.cpp
+++ b/qmake/generators/symbian/initprojectdeploy_symbian.cpp
@@ -46,6 +46,9 @@
#include <qsettings.h>
#include <qdebug.h>
+// Included from tools/shared
+#include <symbian/epocroot.h>
+
#define SYSBIN_DIR "/sys/bin"
#define SUFFIX_DLL "dll"
@@ -58,99 +61,6 @@ static QString fixPathToEpocOS(const QString &src)
return ret.replace('/', '\\');
}
-static void fixEpocRootStr(QString& path)
-{
- path.replace("\\", "/");
-
- if (path.size() > 1 && path[1] == QChar(':')) {
- path = path.mid(2);
- }
-
- if (!path.size() || path[path.size()-1] != QChar('/')) {
- path += QChar('/');
- }
-}
-
-#define SYMBIAN_SDKS_KEY "HKEY_LOCAL_MACHINE\\Software\\Symbian\\EPOC SDKs"
-
-static QString epocRootStr;
-
-QString epocRoot()
-{
- if (!epocRootStr.isEmpty()) {
- return epocRootStr;
- }
-
- // First, check the env variable
- epocRootStr = qgetenv("EPOCROOT");
-
- if (epocRootStr.isEmpty()) {
- // No EPOCROOT set, check the default device
- // First check EPOCDEVICE env variable
- QString defaultDevice = qgetenv("EPOCDEVICE");
-
- // Check the windows registry via QSettings for devices.xml path
- QSettings settings(SYMBIAN_SDKS_KEY, QSettings::NativeFormat);
- QString devicesXmlPath = settings.value("CommonPath").toString();
-
- if (!devicesXmlPath.isEmpty()) {
- // Parse xml for correct device
- devicesXmlPath += "/devices.xml";
- QFile devicesFile(devicesXmlPath);
- if (devicesFile.open(QIODevice::ReadOnly)) {
- QXmlStreamReader xml(&devicesFile);
- while (!xml.atEnd()) {
- xml.readNext();
- if (xml.isStartElement() && xml.name() == "devices") {
- if (xml.attributes().value("version") == "1.0") {
- // Look for correct device
- while (!(xml.isEndElement() && xml.name() == "devices") && !xml.atEnd()) {
- xml.readNext();
- if (xml.isStartElement() && xml.name() == "device") {
- if ((defaultDevice.isEmpty() && xml.attributes().value("default") == "yes") ||
- (!defaultDevice.isEmpty() && (xml.attributes().value("id").toString() + QString(":") + xml.attributes().value("name").toString()) == defaultDevice)) {
- // Found the correct device
- while (!(xml.isEndElement() && xml.name() == "device") && !xml.atEnd()) {
- xml.readNext();
- if (xml.isStartElement() && xml.name() == "epocroot") {
- epocRootStr = xml.readElementText();
- fixEpocRootStr(epocRootStr);
- return epocRootStr;
- }
- }
- xml.raiseError("No epocroot element found");
- }
- }
- }
- } else {
- xml.raiseError("Invalid 'devices' element version");
- }
- }
- }
- if (xml.hasError()) {
- fprintf(stderr, "ERROR: \"%s\" when parsing devices.xml\n", qPrintable(xml.errorString()));
- }
- } else {
- fprintf(stderr, "Could not open devices.xml (%s)\n", qPrintable(devicesXmlPath));
- }
- } else {
- fprintf(stderr, "Could not retrieve " SYMBIAN_SDKS_KEY " setting\n");
- }
-
- fprintf(stderr, "Failed to determine epoc root.\n");
- if (!defaultDevice.isEmpty())
- fprintf(stderr, "The device indicated by EPOCDEVICE environment variable (%s) could not be found.\n", qPrintable(defaultDevice));
- fprintf(stderr, "Either set EPOCROOT or EPOCDEVICE environment variable to a valid value, or provide a default Symbian device.\n");
-
- // No valid device found; set epocroot to "/"
- epocRootStr = QLatin1String("/");
- }
-
- fixEpocRootStr(epocRootStr);
- return epocRootStr;
-}
-
-
static bool isPlugin(const QFileInfo& info, const QString& devicePath)
{
// Libraries are plugins if deployment path is something else than
diff --git a/qmake/generators/symbian/initprojectdeploy_symbian.h b/qmake/generators/symbian/initprojectdeploy_symbian.h
index 3c515d6..be78a27 100644
--- a/qmake/generators/symbian/initprojectdeploy_symbian.h
+++ b/qmake/generators/symbian/initprojectdeploy_symbian.h
@@ -50,8 +50,6 @@
#include <qfile.h>
#include <stdlib.h>
-#include "epocroot.h"
-
#define PLUGIN_STUB_DIR "qmakepluginstubs"
struct CopyItem
diff --git a/qmake/generators/symbian/symmake.cpp b/qmake/generators/symbian/symmake.cpp
index 75b9a6d..5283bfa 100644
--- a/qmake/generators/symbian/symmake.cpp
+++ b/qmake/generators/symbian/symmake.cpp
@@ -49,11 +49,8 @@
#include <stdlib.h>
#include <qdebug.h>
-#ifdef Q_OS_WIN
-#define SCRIPT_EXT ".bat"
-#else
-#define SCRIPT_EXT ".sh"
-#endif
+// Included from tools/shared
+#include <symbian/epocroot.h>
#define RESOURCE_DIRECTORY_MMP "/resource/apps"
#define REGISTRATION_RESOURCE_DIRECTORY_HW "/private/10003a3f/import/apps"
@@ -1038,7 +1035,7 @@ void SymbianMakefileGenerator::writeBldInfContent(QTextStream &t, bool addDeploy
removeSpecialCharacters(bldinfDefine);
t << "#ifndef " << bldinfDefine << endl;
- t << "\t#include \"" << QDir::toNativeSeparators(bldinfFilename) << "\"" << endl;
+ t << "\t#include \"" << bldinfFilename << "\"" << endl;
t << "#endif // " << bldinfDefine << endl;
}
diff --git a/qmake/generators/symbian/symmake_abld.cpp b/qmake/generators/symbian/symmake_abld.cpp
index 5dfdacc..b620258 100644
--- a/qmake/generators/symbian/symmake_abld.cpp
+++ b/qmake/generators/symbian/symmake_abld.cpp
@@ -48,6 +48,9 @@
#include <qdatetime.h>
#include <qdebug.h>
+// Included from tools/shared
+#include <symbian/epocroot.h>
+
#define DO_NOTHING_TARGET "do_nothing"
#define CREATE_TEMPS_TARGET "create_temps"
#define EXTENSION_CLEAN "extension_clean"
diff --git a/qmake/generators/symbian/symmake_sbsv2.cpp b/qmake/generators/symbian/symmake_sbsv2.cpp
index 421ba15..7bbc73e 100644
--- a/qmake/generators/symbian/symmake_sbsv2.cpp
+++ b/qmake/generators/symbian/symmake_sbsv2.cpp
@@ -48,6 +48,9 @@
#include <qdatetime.h>
#include <qdebug.h>
+// Included from tools/shared
+#include <symbian/epocroot.h>
+
SymbianSbsv2MakefileGenerator::SymbianSbsv2MakefileGenerator() : SymbianMakefileGenerator() { }
SymbianSbsv2MakefileGenerator::~SymbianSbsv2MakefileGenerator() { }