summaryrefslogtreecommitdiffstats
path: root/qmake
diff options
context:
space:
mode:
authorJanne Anttila <janne.anttila@digia.com>2009-08-28 06:07:13 (GMT)
committerJanne Anttila <janne.anttila@digia.com>2009-08-28 06:10:16 (GMT)
commit6ae0b4848526719b526443b853bc95aa85cb6cb9 (patch)
tree69dd19b99e4e2a0d644983d81fbff1ba5a73523d /qmake
parent8c4c7cc111331256b2637e067298e1c93b2e8c3c (diff)
downloadQt-6ae0b4848526719b526443b853bc95aa85cb6cb9.zip
Qt-6ae0b4848526719b526443b853bc95aa85cb6cb9.tar.gz
Qt-6ae0b4848526719b526443b853bc95aa85cb6cb9.tar.bz2
Various small fixes and cleanups for symbian qmake generator.
The included fixes / cleanups: - QtLibs PKG filename changed - Component name in Qt libs pkg changed to "Qt for S60" * Done in order to make SISX upgrade possible after pre-release. - Removed passing of 'fixedTarget' member variable as an argument - Removed whitespaces from generated file names - Fixed 'make sisx' calling syntax when custom makefile name used - Fixed MAKEFILE variable content in generated makefiles - Changed names of environment variables used by 'make sisx' * Nee variables have 'QT_SISX_' prefix Reviewed-By: Miikka Heikkinen
Diffstat (limited to 'qmake')
-rw-r--r--qmake/generators/symbian/symmake.cpp59
-rw-r--r--qmake/generators/symbian/symmake.h6
-rw-r--r--qmake/generators/symbian/symmake_abld.cpp12
3 files changed, 40 insertions, 37 deletions
diff --git a/qmake/generators/symbian/symmake.cpp b/qmake/generators/symbian/symmake.cpp
index 5ce4304..aaa1903 100644
--- a/qmake/generators/symbian/symmake.cpp
+++ b/qmake/generators/symbian/symmake.cpp
@@ -246,9 +246,9 @@ bool SymbianMakefileGenerator::writeMakefile(QTextStream &t)
if (targetType == TypeExe) {
if (!project->values("CONFIG").contains("no_icon", Qt::CaseInsensitive)) {
- writeRegRssFile(fixedTarget, userRssRules);
- writeRssFile(fixedTarget, numberOfIcons, iconFile);
- writeLocFile(fixedTarget, symbianLangCodes);
+ writeRegRssFile(userRssRules);
+ writeRssFile(numberOfIcons, iconFile);
+ writeLocFile(symbianLangCodes);
}
}
@@ -261,7 +261,7 @@ bool SymbianMakefileGenerator::writeMakefile(QTextStream &t)
void SymbianMakefileGenerator::generatePkgFile(const QString &iconFile)
{
QString pkgFilename = QString("%1_template.%2")
- .arg(fileInfo(project->projectFile()).completeBaseName())
+ .arg(fixedTarget)
.arg("pkg");
QFile pkgFile(pkgFilename);
if (!pkgFile.open(QIODevice::WriteOnly | QIODevice::Text)) {
@@ -310,8 +310,11 @@ void SymbianMakefileGenerator::generatePkgFile(const QString &iconFile)
QString applicationVersion = project->first("VERSION").isEmpty() ? "1,0,0" : project->first("VERSION").replace('.', ',');
if (!containsStartWithItem('#', rawPkgPreRules)) {
+ QString visualTarget = escapeFilePath(fileFixify(project->first("TARGET")));
+ visualTarget = removePathSeparators(visualTarget);
+
t << "; SIS header: name, uid, version" << endl;
- t << QString("#{\"%1\"},(%2),%3").arg(fixedTarget).arg(uid3).arg(applicationVersion) << endl << endl;
+ t << QString("#{\"%1\"},(%2),%3").arg(visualTarget).arg(uid3).arg(applicationVersion) << endl << endl;
}
// Localized vendor name
@@ -466,6 +469,7 @@ void SymbianMakefileGenerator::init()
MakefileGenerator::init();
fixedTarget = escapeFilePath(fileFixify(project->first("TARGET")));
fixedTarget = removePathSeparators(fixedTarget);
+ removeSpecialCharacters(fixedTarget);
if (0 != project->values("QMAKE_PLATFORM").size())
platform = varGlue("QMAKE_PLATFORM", "", " ", "");
@@ -1182,9 +1186,9 @@ void SymbianMakefileGenerator::writeBldInfContent(QTextStream &t, bool addDeploy
}
}
-void SymbianMakefileGenerator::writeRegRssFile(QString &appName, QStringList &userItems)
+void SymbianMakefileGenerator::writeRegRssFile(QStringList &userItems)
{
- QString filename(appName);
+ QString filename(fixedTarget);
filename.append("_reg.rss");
QFile ft(filename);
if (ft.open(QIODevice::WriteOnly)) {
@@ -1197,7 +1201,7 @@ void SymbianMakefileGenerator::writeRegRssFile(QString &appName, QStringList &us
t << "// * user." << endl;
t << "// ============================================================================" << endl;
t << endl;
- t << "#include <" << appName << ".rsg>" << endl;
+ t << "#include <" << fixedTarget << ".rsg>" << endl;
t << "#include <appinfo.rh>" << endl;
t << endl;
//t << "#include <data_caging_paths.hrh>" << "\n" << endl;
@@ -1205,8 +1209,8 @@ void SymbianMakefileGenerator::writeRegRssFile(QString &appName, QStringList &us
t << "UID3 " << uid3 << endl << endl;
t << "RESOURCE APP_REGISTRATION_INFO" << endl;
t << "\t{" << endl;
- t << "\tapp_file=\"" << appName << "\";" << endl;
- t << "\tlocalisable_resource_file=\"" RESOURCE_DIRECTORY_RESOURCE << appName << "\";" << endl;
+ t << "\tapp_file=\"" << fixedTarget << "\";" << endl;
+ t << "\tlocalisable_resource_file=\"" RESOURCE_DIRECTORY_RESOURCE << fixedTarget << "\";" << endl;
t << endl;
foreach(QString item, userItems)
@@ -1217,9 +1221,9 @@ void SymbianMakefileGenerator::writeRegRssFile(QString &appName, QStringList &us
}
}
-void SymbianMakefileGenerator::writeRssFile(QString &appName, QString &numberOfIcons, QString &iconFile)
+void SymbianMakefileGenerator::writeRssFile(QString &numberOfIcons, QString &iconFile)
{
- QString filename(appName);
+ QString filename(fixedTarget);
filename.append(".rss");
QFile ft(filename);
if (ft.open(QIODevice::WriteOnly)) {
@@ -1233,7 +1237,7 @@ void SymbianMakefileGenerator::writeRssFile(QString &appName, QString &numberOfI
t << "// ============================================================================" << endl;
t << endl;
t << "#include <appinfo.rh>" << endl;
- t << "#include \"" << appName << ".loc\"" << endl;
+ t << "#include \"" << fixedTarget << ".loc\"" << endl;
t << endl;
t << "RESOURCE LOCALISABLE_APP_INFO r_localisable_app_info" << endl;
t << "\t{" << endl;
@@ -1260,9 +1264,9 @@ void SymbianMakefileGenerator::writeRssFile(QString &appName, QString &numberOfI
}
}
-void SymbianMakefileGenerator::writeLocFile(QString &appName, QStringList &symbianLangCodes)
+void SymbianMakefileGenerator::writeLocFile(QStringList &symbianLangCodes)
{
- QString filename(appName);
+ QString filename(fixedTarget);
filename.append(".loc");
QFile ft(filename);
if (ft.open(QIODevice::WriteOnly)) {
@@ -1276,18 +1280,16 @@ void SymbianMakefileGenerator::writeLocFile(QString &appName, QStringList &symbi
t << "// ============================================================================" << endl;
t << endl;
t << "#ifdef LANGUAGE_SC" << endl;
- //t << "#include \"" << appName << ".l01\"" << endl;
- t << "#define STRING_r_short_caption \"" << appName << "\"" << endl;
- t << "#define STRING_r_caption \"" << appName << "\"" << endl;
+ t << "#define STRING_r_short_caption \"" << fixedTarget << "\"" << endl;
+ t << "#define STRING_r_caption \"" << fixedTarget << "\"" << endl;
foreach(QString lang, symbianLangCodes) {
t << "#elif defined LANGUAGE_" << lang << endl;
- //t << "#include \"" << appName << ".l" << lang << "\"" << endl;
- t << "#define STRING_r_short_caption \"" << appName << "\"" << endl;
- t << "#define STRING_r_caption \"" << appName << "\"" << endl;
+ t << "#define STRING_r_short_caption \"" << fixedTarget << "\"" << endl;
+ t << "#define STRING_r_caption \"" << fixedTarget << "\"" << endl;
}
t << "#else" << endl;
- t << "#define STRING_r_short_caption \"" << appName << "\"" << endl;
- t << "#define STRING_r_caption \"" << appName << "\"" << endl;
+ t << "#define STRING_r_short_caption \"" << fixedTarget << "\"" << endl;
+ t << "#define STRING_r_caption \"" << fixedTarget << "\"" << endl;
t << "#endif" << endl;
} else {
PRINT_FILE_CREATE_ERROR(filename);
@@ -1633,8 +1635,10 @@ void SymbianMakefileGenerator::removeSpecialCharacters(QString& str)
void SymbianMakefileGenerator::writeSisxTargets(QTextStream &t)
{
t << SISX_TARGET ": " RESTORE_BUILD_TARGET << endl;
- QString sisxcommand = QString("\t$(if $(wildcard %1_template.%2),$(if $(wildcard %3),$(MAKE) -s %4,$(MAKE) -s %5),$(MAKE) -s %6)")
- .arg(fileInfo(project->projectFile()).completeBaseName())
+ QString sisxcommand = QString("\t$(if $(wildcard %1_template.%2),$(if $(wildcard %3)," \
+ "$(MAKE) -s -f $(MAKEFILE) %4,$(MAKE) -s -f $(MAKEFILE) %5)," \
+ "$(MAKE) -s -f $(MAKEFILE) %6)")
+ .arg(fixedTarget)
.arg("pkg")
.arg(MAKE_CACHE_NAME)
.arg(OK_SISX_TARGET)
@@ -1645,8 +1649,9 @@ void SymbianMakefileGenerator::writeSisxTargets(QTextStream &t)
t << OK_SISX_TARGET ":" << endl;
- QString pkgcommand = QString("\tcreatepackage.bat %1_template.%2 $(TARGET) $(PLATFORM) $(CERTIFICATE) $(KEY) $(PASSPHRASE)")
- .arg(fileInfo(project->projectFile()).completeBaseName())
+ QString pkgcommand = QString("\tcreatepackage.bat %1_template.%2 $(QT_SISX_TARGET) " \
+ "$(QT_SISX_PLATFORM) $(QT_SISX_CERTIFICATE) $(QT_SISX_KEY) $(QT_SISX_PASSPHRASE)")
+ .arg(fixedTarget)
.arg("pkg");
t << pkgcommand << endl;
t << endl;
diff --git a/qmake/generators/symbian/symmake.h b/qmake/generators/symbian/symmake.h
index b4b3022..ce65822 100644
--- a/qmake/generators/symbian/symmake.h
+++ b/qmake/generators/symbian/symmake.h
@@ -117,9 +117,9 @@ protected:
void writeCustomDefFile();
- void writeRegRssFile(QString &appname, QStringList &useritems);
- void writeRssFile(QString &appName, QString &numberOfIcons, QString &iconfile);
- void writeLocFile(QString &appName, QStringList &symbianLangCodes);
+ void writeRegRssFile(QStringList &useritems);
+ void writeRssFile(QString &numberOfIcons, QString &iconfile);
+ void writeLocFile(QStringList &symbianLangCodes);
void readRssRules(QString &numberOfIcons, QString &iconFile, QStringList &userRssRules);
QStringList symbianLangCodesFromTsFiles();
diff --git a/qmake/generators/symbian/symmake_abld.cpp b/qmake/generators/symbian/symmake_abld.cpp
index 975a20f..254bf9c 100644
--- a/qmake/generators/symbian/symmake_abld.cpp
+++ b/qmake/generators/symbian/symmake_abld.cpp
@@ -147,7 +147,7 @@ void SymbianAbldMakefileGenerator::writeMkFile(const QString& wrapperFileName, b
QString makefile(Option::fixPathToTargetOS(fileInfo(wrapperFileName).canonicalFilePath()));
foreach(QString target, wrapperTargets) {
t << target << " : " << makefile << endl;
- t << "\t-$(MAKE) -f \"" << makefile << "\" " << target << " PLATFORM=$(PLATFORM) TARGET=$(CFG)" << endl << endl;
+ t << "\t-$(MAKE) -f \"" << makefile << "\" " << target << " QT_SISX_PLATFORM=$(PLATFORM) QT_SISX_TARGET=$(CFG)" << endl << endl;
}
t << endl;
@@ -183,10 +183,8 @@ void SymbianAbldMakefileGenerator::writeWrapperMakefile(QFile& wrapperFile, bool
t << "#" << endl;
t << "# ==============================================================================" << "\n" << endl;
t << endl;
- QString ofile = Option::fixPathToTargetOS(Option::output.fileName());
- if (ofile.lastIndexOf(Option::dir_sep) != -1)
- ofile = ofile.right(ofile.length() - ofile.lastIndexOf(Option::dir_sep) - 1);
- t << "MAKEFILE = " << ofile << endl;
+
+ t << "MAKEFILE = " << wrapperFile.fileName() << endl;
t << "QMAKE = " << Option::fixPathToTargetOS(var("QMAKE_QMAKE")) << endl;
t << "DEL_FILE = " << var("QMAKE_DEL_FILE") << endl;
t << "DEL_DIR = " << var("QMAKE_DEL_DIR") << endl;
@@ -429,8 +427,8 @@ void SymbianAbldMakefileGenerator::writeStoreBuildTarget(QTextStream &t)
t << "\t@echo # >> " MAKE_CACHE_NAME << endl;
t << "\t@echo # ============================================================================== >> " MAKE_CACHE_NAME << endl;
t << "\t@echo. >> " MAKE_CACHE_NAME << endl;
- t << "\t@echo PLATFORM ?= $(PLATFORM) >> " MAKE_CACHE_NAME << endl;
- t << "\t@echo TARGET ?= $(TARGET) >> " MAKE_CACHE_NAME << endl;
+ t << "\t@echo QT_SISX_PLATFORM ?= $(QT_SISX_PLATFORM) >> " MAKE_CACHE_NAME << endl;
+ t << "\t@echo QT_SISX_TARGET ?= $(QT_SISX_TARGET) >> " MAKE_CACHE_NAME << endl;
t << endl;
generatedFiles << MAKE_CACHE_NAME;