summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiikka Heikkinen <miikka.heikkinen@digia.com>2010-11-18 13:23:03 (GMT)
committerMiikka Heikkinen <miikka.heikkinen@digia.com>2010-11-18 14:42:58 (GMT)
commitbc09d5b11cd45e975ec745b508c703b75b019a4e (patch)
tree70deb85b696c64ad8b2e487deb5e9ae55a06a310
parentdfd5ee41532b55ef6aaa5fb7ed3b586fbac80fce (diff)
downloadQt-bc09d5b11cd45e975ec745b508c703b75b019a4e.zip
Qt-bc09d5b11cd45e975ec745b508c703b75b019a4e.tar.gz
Qt-bc09d5b11cd45e975ec745b508c703b75b019a4e.tar.bz2
Resolve EPOCROOT in qt.conf using same logic as in .pro
Previously it was only possible to use EPOCROOT in qt.conf via env variable, while qmake & configure could resolve it also via devices.xml. Changed qt.conf parsing to support $${EPOCROOT} tag and use same resolving logic as qmake & configure. Task-number: QTBUG-15393 Reviewed-by: axis
-rw-r--r--qmake/Makefile.unix2
-rw-r--r--qmake/Makefile.win323
-rw-r--r--qmake/Makefile.win32-g++2
-rw-r--r--qmake/Makefile.win32-g++-sh2
-rw-r--r--qmake/qmake.pri2
-rw-r--r--src/corelib/global/global.pri2
-rw-r--r--src/corelib/global/qlibraryinfo.cpp12
-rw-r--r--tools/linguist/lrelease/lrelease.pro1
-rw-r--r--tools/shared/symbian/epocroot.pri11
9 files changed, 32 insertions, 5 deletions
diff --git a/qmake/Makefile.unix b/qmake/Makefile.unix
index 8d56fc8..d941dc4 100644
--- a/qmake/Makefile.unix
+++ b/qmake/Makefile.unix
@@ -68,7 +68,7 @@ CPPFLAGS = -I. -Igenerators -Igenerators/unix -Igenerators/win32 -Igenerators/ma
-I$(BUILD_PATH)/src/corelib/global -I$(BUILD_PATH)/src/corelib/xml \
-I$(SOURCE_PATH)/tools/shared \
-DQT_NO_PCRE \
- -DQT_BUILD_QMAKE -DQT_BOOTSTRAPPED \
+ -DQT_BUILD_QMAKE -DQT_BOOTSTRAPPED -DQLIBRARYINFO_EPOCROOT \
-DQT_NO_TEXTCODEC -DQT_NO_UNICODETABLES -DQT_NO_COMPONENT -DQT_NO_STL \
-DQT_NO_COMPRESS -I$(QMAKESPEC) -DHAVE_QCONFIG_CPP -DQT_NO_THREAD -DQT_NO_QOBJECT \
-DQT_NO_GEOM_VARIANT $(OPENSOURCE_CXXFLAGS)
diff --git a/qmake/Makefile.win32 b/qmake/Makefile.win32
index 4d0121c..c04bcb2 100644
--- a/qmake/Makefile.win32
+++ b/qmake/Makefile.win32
@@ -40,7 +40,8 @@ CFLAGS_BARE = -c -Fo./ \
-I$(SOURCE_PATH)\tools\shared \
-DQT_NO_TEXTCODEC -DQT_NO_UNICODETABLES -DQT_LITE_COMPONENT -DQT_NODLL -DQT_NO_STL \
-DQT_NO_COMPRESS -DUNICODE -DHAVE_QCONFIG_CPP -DQT_BUILD_QMAKE -DQT_NO_THREAD \
- -DQT_NO_QOBJECT -DQT_NO_GEOM_VARIANT -DQT_NO_DATASTREAM -DQT_NO_PCRE -DQT_BOOTSTRAPPED
+ -DQT_NO_QOBJECT -DQT_NO_GEOM_VARIANT -DQT_NO_DATASTREAM -DQT_NO_PCRE -DQT_BOOTSTRAPPED \
+ -DQLIBRARYINFO_EPOCROOT
CFLAGS = -Yuqmake_pch.h -FIqmake_pch.h -Fpqmake_pch.pch $(CFLAGS_BARE) $(CFLAGS)
CXXFLAGS_BARE = $(CFLAGS_BARE)
diff --git a/qmake/Makefile.win32-g++ b/qmake/Makefile.win32-g++
index f313f9e..29fbd0a 100644
--- a/qmake/Makefile.win32-g++
+++ b/qmake/Makefile.win32-g++
@@ -25,7 +25,7 @@ CFLAGS = -c -o$@ -O \
-DQT_NO_TEXTCODEC -DQT_NO_UNICODETABLES -DQT_LITE_COMPONENT -DQT_NO_PCRE \
-DQT_NODLL -DQT_NO_STL -DQT_NO_COMPRESS -DUNICODE -DHAVE_QCONFIG_CPP \
-DQT_BUILD_QMAKE -DQT_NO_THREAD -DQT_NO_QOBJECT -DQT_NO_GEOM_VARIANT -DQT_NO_DATASTREAM \
- -DQT_BOOTSTRAPPED
+ -DQT_BOOTSTRAPPED -DQLIBRARYINFO_EPOCROOT
CXXFLAGS = $(CFLAGS)
LFLAGS = -static-libgcc -static-libstdc++ -s
LIBS = -lole32 -luuid
diff --git a/qmake/Makefile.win32-g++-sh b/qmake/Makefile.win32-g++-sh
index af54288..9c7942c 100644
--- a/qmake/Makefile.win32-g++-sh
+++ b/qmake/Makefile.win32-g++-sh
@@ -25,7 +25,7 @@ CFLAGS = -c -o$@ -O \
-DQT_NO_TEXTCODEC -DQT_NO_UNICODETABLES -DQT_LITE_COMPONENT -DQT_NO_PCRE \
-DQT_NODLL -DQT_NO_STL -DQT_NO_COMPRESS -DUNICODE -DHAVE_QCONFIG_CPP \
-DQT_BUILD_QMAKE -DQT_NO_THREAD -DQT_NO_QOBJECT -DQT_NO_GEOM_VARIANT -DQT_NO_DATASTREAM \
- -DQT_BOOTSTRAPPED
+ -DQT_BOOTSTRAPPED -DQLIBRARYINFO_EPOCROOT
CXXFLAGS = $(CFLAGS)
LFLAGS = -static-libgcc -static-libstdc++ -s
LIBS = -lole32 -luuid
diff --git a/qmake/qmake.pri b/qmake/qmake.pri
index 36c5d36..7cf94cb 100644
--- a/qmake/qmake.pri
+++ b/qmake/qmake.pri
@@ -3,7 +3,7 @@ CONFIG += depend_includepath
QMAKE_INCREMENTAL =
SKIP_DEPENDS += qconfig.h qmodules.h
DEFINES += QT_NO_TEXTCODEC QT_NO_LIBRARY QT_NO_STL QT_NO_COMPRESS QT_NO_UNICODETABLES \
- QT_NO_GEOM_VARIANT QT_NO_DATASTREAM
+ QT_NO_GEOM_VARIANT QT_NO_DATASTREAM QLIBRARYINFO_EPOCROOT
#qmake code
SOURCES += project.cpp property.cpp main.cpp generators/makefile.cpp \
diff --git a/src/corelib/global/global.pri b/src/corelib/global/global.pri
index 4800716..86800ef 100644
--- a/src/corelib/global/global.pri
+++ b/src/corelib/global/global.pri
@@ -27,3 +27,5 @@ linux*:!static:!linux-armcc:!linux-gcce {
# Compensate for lack of platform defines in Symbian3 and Symbian4
symbian: DEFINES += SYMBIAN_VERSION_$$upper($$replace(SYMBIAN_VERSION,\\.,_))
+
+include(../../../tools/shared/symbian/epocroot.pri)
diff --git a/src/corelib/global/qlibraryinfo.cpp b/src/corelib/global/qlibraryinfo.cpp
index 957abbf..acacf7c 100644
--- a/src/corelib/global/qlibraryinfo.cpp
+++ b/src/corelib/global/qlibraryinfo.cpp
@@ -62,6 +62,10 @@ QT_END_NAMESPACE
# include "private/qcore_mac_p.h"
#endif
+#ifdef QLIBRARYINFO_EPOCROOT
+# include "symbian/epocroot.h"
+#endif
+
#include "qconfig.cpp"
QT_BEGIN_NAMESPACE
@@ -433,6 +437,14 @@ QLibraryInfo::location(LibraryLocation loc)
QString::fromLocal8Bit(qgetenv(ret.mid(rep + 2,
reg_var.matchedLength() - 3).toLatin1().constData()).constData()));
}
+
+#ifdef QLIBRARYINFO_EPOCROOT
+ // $${EPOCROOT} is a special case, resolve it similarly to qmake.
+ QRegExp epocrootMatcher(QLatin1String("\\$\\$\\{EPOCROOT\\}"));
+ if ((rep = epocrootMatcher.indexIn(ret)) != -1)
+ ret.replace(rep, epocrootMatcher.matchedLength(), epocRoot());
+#endif
+
config->endGroup();
}
}
diff --git a/tools/linguist/lrelease/lrelease.pro b/tools/linguist/lrelease/lrelease.pro
index 6beafa3..89694be 100644
--- a/tools/linguist/lrelease/lrelease.pro
+++ b/tools/linguist/lrelease/lrelease.pro
@@ -15,6 +15,7 @@ macx:SOURCES += $$QT_SOURCE_TREE/src/corelib/io/qsettings_mac.cpp
include(../../../src/tools/bootstrap/bootstrap.pri)
include(../shared/formats.pri)
include(../shared/proparser.pri)
+include(../../shared/symbian/epocroot.pri)
win32:LIBS += -ladvapi32 # for qsettings_win.cpp
diff --git a/tools/shared/symbian/epocroot.pri b/tools/shared/symbian/epocroot.pri
new file mode 100644
index 0000000..117836e
--- /dev/null
+++ b/tools/shared/symbian/epocroot.pri
@@ -0,0 +1,11 @@
+# Epocroot resolving is only required for tools, so omit it from all mobile/embedded builds
+!symbian:!wince*:!embedded {
+HEADERS += \
+ $$QT_SOURCE_TREE/tools/shared/symbian/epocroot.h \
+ $$QT_SOURCE_TREE/tools/shared/windows/registry.h
+SOURCES += \
+ $$QT_SOURCE_TREE/tools/shared/symbian/epocroot.cpp \
+ $$QT_SOURCE_TREE/tools/shared/windows/registry.cpp
+INCLUDEPATH += $$QT_SOURCE_TREE/tools/shared
+DEFINES += QLIBRARYINFO_EPOCROOT
+}