summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoraxis <qt-info@nokia.com>2010-06-04 09:32:40 (GMT)
committeraxis <qt-info@nokia.com>2010-06-04 10:06:43 (GMT)
commitcb59e56bc9f34c50dc4a2d01d2ea506c5d735225 (patch)
tree529eb4b8035490d1456320fd2489112a8d2c0b5b
parentbc11da163dc53860cf728b76dbb472bb2c9dadbf (diff)
downloadQt-cb59e56bc9f34c50dc4a2d01d2ea506c5d735225.zip
Qt-cb59e56bc9f34c50dc4a2d01d2ea506c5d735225.tar.gz
Qt-cb59e56bc9f34c50dc4a2d01d2ea506c5d735225.tar.bz2
Fixed def file usage for Qt plugins under the makefile build system.
Previously it would not use the autogenerated def files. RevBy: Thomas Zander
-rw-r--r--.gitignore2
-rw-r--r--mkspecs/features/symbian/def_files.prf2
-rw-r--r--mkspecs/features/symbian/symbian_building.prf3
-rw-r--r--qmake/generators/symbian/symbian_makefile.h2
-rw-r--r--qmake/generators/symbian/symbiancommon.cpp36
-rw-r--r--qmake/generators/symbian/symbiancommon.h2
-rw-r--r--qmake/generators/symbian/symmake.cpp35
-rw-r--r--qmake/generators/symbian/symmake.h2
8 files changed, 45 insertions, 39 deletions
diff --git a/.gitignore b/.gitignore
index 4e3b130..d88e69a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -205,7 +205,7 @@ bld.inf
*.loc
!s60main.rss
*.pkg
-plugin_commonU.def
+plugin_commonu.def
*.qtplugin
*.sis
*.sisx
diff --git a/mkspecs/features/symbian/def_files.prf b/mkspecs/features/symbian/def_files.prf
index eb17402..6a95763 100644
--- a/mkspecs/features/symbian/def_files.prf
+++ b/mkspecs/features/symbian/def_files.prf
@@ -41,7 +41,7 @@ symbian-abld|symbian-sbsv2 {
}
}
-} else:contains(TEMPLATE, lib):!contains(CONFIG, static):!contains(CONFIG, staticlib) {
+} else:contains(TEMPLATE, lib):!contains(CONFIG, static):!contains(CONFIG, staticlib):!contains(CONFIG, plugin) {
!isEmpty(DEF_FILE) {
defFile = $$DEF_FILE
} else {
diff --git a/mkspecs/features/symbian/symbian_building.prf b/mkspecs/features/symbian/symbian_building.prf
index c230272..92988aa 100644
--- a/mkspecs/features/symbian/symbian_building.prf
+++ b/mkspecs/features/symbian/symbian_building.prf
@@ -96,6 +96,9 @@ contains(TEMPLATE, lib):!contains(CONFIG, static):!contains(CONFIG, staticlib) {
QMAKE_POST_LINK = $$replace(QMAKE_POST_LINK, "^@", "")
QMAKE_POST_LINK = && $$QMAKE_POST_LINK
}
+
+ contains(CONFIG, plugin):QMAKE_ELF2E32_FLAGS += --definput=plugin_commonu.def
+
# The tee and grep at the end work around the issue that elf2e32 doesn't return non-null on error.
# The comparison of dso files is to avoid extra building of modules that depend on this dso, in
# case it has not changed.
diff --git a/qmake/generators/symbian/symbian_makefile.h b/qmake/generators/symbian/symbian_makefile.h
index 061866a..94f0145 100644
--- a/qmake/generators/symbian/symbian_makefile.h
+++ b/qmake/generators/symbian/symbian_makefile.h
@@ -94,6 +94,8 @@ public:
}
}
+ writeCustomDefFile();
+
return T::writeMakefile(t);
}
};
diff --git a/qmake/generators/symbian/symbiancommon.cpp b/qmake/generators/symbian/symbiancommon.cpp
index aa44afc..f8b3aa5 100644
--- a/qmake/generators/symbian/symbiancommon.cpp
+++ b/qmake/generators/symbian/symbiancommon.cpp
@@ -58,6 +58,8 @@
#define RSS_TAG_FOOTER "footer"
#define RSS_TAG_DEFAULT "default_rules" // Same as just giving rules without tag
+#define PLUGIN_COMMON_DEF_FILE_ACTUAL "plugin_commonu.def"
+
#define MANUFACTURER_NOTE_FILE "manufacturer_note.txt"
#define DEFAULT_MANUFACTURER_NOTE \
"The package is not supported for devices from this manufacturer. Please try the selfsigned " \
@@ -775,6 +777,40 @@ void SymbianCommonGenerator::readRssRules(QString &numberOfIcons,
}
}
+void SymbianCommonGenerator::writeCustomDefFile()
+{
+ if (targetType == TypePlugin && !generator->project->isActiveConfig("stdbinary")) {
+ // Create custom def file for plugin
+ QFile ft(Option::output_dir + QLatin1Char('/') + QLatin1String(PLUGIN_COMMON_DEF_FILE_ACTUAL));
+
+ if (ft.open(QIODevice::WriteOnly)) {
+ generatedFiles << ft.fileName();
+ QTextStream t(&ft);
+
+ t << "; ==============================================================================" << endl;
+ t << "; Generated by qmake (" << qmake_version() << ") (Qt " QT_VERSION_STR ") on: ";
+ t << QDateTime::currentDateTime().toString(Qt::ISODate) << endl;
+ t << "; This file is generated by qmake and should not be modified by the" << endl;
+ t << "; user." << endl;
+ t << "; Name : " PLUGIN_COMMON_DEF_FILE_ACTUAL << endl;
+ t << "; Part of : " << generator->project->values("TARGET").join(" ") << endl;
+ t << "; Description : Fixes common plugin symbols to known ordinals" << endl;
+ t << "; Version : " << endl;
+ t << ";" << endl;
+ t << "; ==============================================================================" << "\n" << endl;
+
+ t << endl;
+
+ t << "EXPORTS" << endl;
+ t << "\tqt_plugin_query_verification_data @ 1 NONAME" << endl;
+ t << "\tqt_plugin_instance @ 2 NONAME" << endl;
+ t << endl;
+ } else {
+ PRINT_FILE_CREATE_ERROR(QString(PLUGIN_COMMON_DEF_FILE_ACTUAL))
+ }
+ }
+}
+
QStringList SymbianCommonGenerator::symbianLangCodesFromTsFiles()
{
QStringList tsfiles;
diff --git a/qmake/generators/symbian/symbiancommon.h b/qmake/generators/symbian/symbiancommon.h
index 3efe5a4..dae1e4a 100644
--- a/qmake/generators/symbian/symbiancommon.h
+++ b/qmake/generators/symbian/symbiancommon.h
@@ -81,6 +81,8 @@ protected:
QString &iconFile,
QMap<QString, QStringList> &userRssRules);
+ void writeCustomDefFile();
+
QStringList symbianLangCodesFromTsFiles();
void fillQt2S60LangMapTable();
diff --git a/qmake/generators/symbian/symmake.cpp b/qmake/generators/symbian/symmake.cpp
index 1006e39..6082aeb 100644
--- a/qmake/generators/symbian/symmake.cpp
+++ b/qmake/generators/symbian/symmake.cpp
@@ -55,7 +55,6 @@
#define RESOURCE_DIRECTORY_MMP "/resource/apps"
#define REGISTRATION_RESOURCE_DIRECTORY_HW "/private/10003a3f/import/apps"
#define PLUGIN_COMMON_DEF_FILE_FOR_MMP "./plugin_common.def"
-#define PLUGIN_COMMON_DEF_FILE_ACTUAL "plugin_commonu.def"
#define BLD_INF_FILENAME_LEN (sizeof(BLD_INF_FILENAME) - 1)
#define BLD_INF_RULES_BASE "BLD_INF_RULES."
@@ -264,40 +263,6 @@ bool SymbianMakefileGenerator::writeMakefile(QTextStream &t)
return true;
}
-void SymbianMakefileGenerator::writeCustomDefFile()
-{
- if (targetType == TypePlugin && !project->isActiveConfig("stdbinary")) {
- // Create custom def file for plugin
- QFile ft(Option::output_dir + QLatin1Char('/') + QLatin1String(PLUGIN_COMMON_DEF_FILE_ACTUAL));
-
- if (ft.open(QIODevice::WriteOnly)) {
- generatedFiles << ft.fileName();
- QTextStream t(&ft);
-
- t << "; ==============================================================================" << endl;
- t << "; Generated by qmake (" << qmake_version() << ") (Qt " QT_VERSION_STR ") on: ";
- t << QDateTime::currentDateTime().toString(Qt::ISODate) << endl;
- t << "; This file is generated by qmake and should not be modified by the" << endl;
- t << "; user." << endl;
- t << "; Name : " PLUGIN_COMMON_DEF_FILE_ACTUAL << endl;
- t << "; Part of : " << project->values("TARGET").join(" ") << endl;
- t << "; Description : Fixes common plugin symbols to known ordinals" << endl;
- t << "; Version : " << endl;
- t << ";" << endl;
- t << "; ==============================================================================" << "\n" << endl;
-
- t << endl;
-
- t << "EXPORTS" << endl;
- t << "\tqt_plugin_query_verification_data @ 1 NONAME" << endl;
- t << "\tqt_plugin_instance @ 2 NONAME" << endl;
- t << endl;
- } else {
- PRINT_FILE_CREATE_ERROR(QString(PLUGIN_COMMON_DEF_FILE_ACTUAL))
- }
- }
-}
-
void SymbianMakefileGenerator::init()
{
MakefileGenerator::init();
diff --git a/qmake/generators/symbian/symmake.h b/qmake/generators/symbian/symmake.h
index a584a9a..c5b6907 100644
--- a/qmake/generators/symbian/symmake.h
+++ b/qmake/generators/symbian/symmake.h
@@ -117,8 +117,6 @@ protected:
void writeMmpFileBinaryVersionPart(QTextStream& t);
void writeMmpFileRulesPart(QTextStream& t);
- void writeCustomDefFile();
-
void appendIfnotExist(QStringList &list, QString value);
void appendIfnotExist(QStringList &list, QStringList values);