summaryrefslogtreecommitdiffstats
path: root/qmake/generators/symbian
diff options
context:
space:
mode:
authorJanne Anttila <janne.anttila@digia.com>2009-08-27 05:04:32 (GMT)
committerJanne Anttila <janne.anttila@digia.com>2009-08-27 05:04:32 (GMT)
commitf189e00fb98f3f5cf5353c69ffe77f206304666b (patch)
tree0293b39422ff6ef9123da47ed8cd4fdb7d30178d /qmake/generators/symbian
parent8c71456e2fdeba68978895d5c38f7fd251ab7808 (diff)
downloadQt-f189e00fb98f3f5cf5353c69ffe77f206304666b.zip
Qt-f189e00fb98f3f5cf5353c69ffe77f206304666b.tar.gz
Qt-f189e00fb98f3f5cf5353c69ffe77f206304666b.tar.bz2
Support for template PKG file.
This commit changes qmake to generate only one template pkg file, instead of one for each supported platform and build. Due to this change createpackage.bat script now need to be called with two additional parameters - platform and target. Example of needed changes: Instead of old way: >createpackage.bat [-i] pkgfile [certificate key [passphrase]] The new implementation works as: >createpackage.bat [-i] pkgfile platform build [certificate key [passphrase]] In addition createpackage.bat backend is replaced by createpackage.pl, it takes care of preprocesing the pkg file, i.e. expanding the variables with their values and calling the makesis and signsis with right parameters. Perl is used to make implementation more cross-platform. Task: 259037 RevBy: Miikka Heikkinen
Diffstat (limited to 'qmake/generators/symbian')
-rw-r--r--qmake/generators/symbian/initprojectdeploy_symbian.cpp2
-rw-r--r--qmake/generators/symbian/symmake.cpp23
-rw-r--r--qmake/generators/symbian/symmake.h2
3 files changed, 8 insertions, 19 deletions
diff --git a/qmake/generators/symbian/initprojectdeploy_symbian.cpp b/qmake/generators/symbian/initprojectdeploy_symbian.cpp
index e903fc1..3bc2391 100644
--- a/qmake/generators/symbian/initprojectdeploy_symbian.cpp
+++ b/qmake/generators/symbian/initprojectdeploy_symbian.cpp
@@ -331,7 +331,7 @@ void initProjectDeploySymbian(QMakeProject* project,
if (deployBinaries) {
// Executables and libraries are deployed to \sys\bin
QFileInfo releasePath(epocRoot() + "epoc32\\release\\" + platform + "\\" + build + "\\");
- deploymentList.append(CopyItem(Option::fixPathToLocalOS(releasePath.absolutePath() + "\\" + info.fileName()),
+ deploymentList.append(CopyItem(Option::fixPathToLocalOS(releasePath.absolutePath() + "\\" + info.fileName(), false, true),
Option::fixPathToLocalOS(deploymentDrive + QLatin1String(SYSBIN_DIR "\\") + info.fileName())));
}
if (isPlugin(info, devicePath)) {
diff --git a/qmake/generators/symbian/symmake.cpp b/qmake/generators/symbian/symmake.cpp
index c20ecf3..b4d693c 100644
--- a/qmake/generators/symbian/symmake.cpp
+++ b/qmake/generators/symbian/symmake.cpp
@@ -194,13 +194,7 @@ bool SymbianMakefileGenerator::writeMakefile(QTextStream &t)
}
if (generatePkg) {
- QStringList platformList = project->values("SYMBIAN_PLATFORMS");
- foreach(QString platform, platformList) {
- if (platform.compare("WINSCW", Qt::CaseInsensitive)) {
- generatePkgFile(platform.toLower(), "udeb", iconFile);
- generatePkgFile(platform.toLower(), "urel", iconFile);
- }
- }
+ generatePkgFile(iconFile);
}
writeBldInfContent(t, generatePkg);
@@ -258,13 +252,10 @@ bool SymbianMakefileGenerator::writeMakefile(QTextStream &t)
return true;
}
-void SymbianMakefileGenerator::generatePkgFile(const QString &compiler, const QString &config, const QString &iconFile)
+void SymbianMakefileGenerator::generatePkgFile(const QString &iconFile)
{
- QString build = (config == "udeb") ? "debug" : "release";
- QString pkgFilename = QString("%1_%2-%3.%4")
+ QString pkgFilename = QString("%1_template.%2")
.arg(fileInfo(project->projectFile()).completeBaseName())
- .arg(build)
- .arg(compiler)
.arg("pkg");
QFile pkgFile(pkgFilename);
if (!pkgFile.open(QIODevice::WriteOnly | QIODevice::Text)) {
@@ -344,10 +335,8 @@ void SymbianMakefileGenerator::generatePkgFile(const QString &compiler, const QS
QString installPathRegResource = "!:\\private\\10003a3f\\import\\apps";
// Find location of builds
- QString epocReleasePath = QString("%1epoc32/release/%2/%3")
- .arg(epocRoot())
- .arg(compiler)
- .arg(config);
+ QString epocReleasePath = QString("%1epoc32/release/$(PLATFORM)/$(TARGET)")
+ .arg(epocRoot());
if (targetType == TypeExe) {
@@ -391,7 +380,7 @@ void SymbianMakefileGenerator::generatePkgFile(const QString &compiler, const QS
QString remoteTestPath;
remoteTestPath = QString("!:\\private\\%1").arg(privateDirUid);
- initProjectDeploySymbian(project, depList, remoteTestPath, true, compiler, config, generatedDirs, generatedFiles);
+ initProjectDeploySymbian(project, depList, remoteTestPath, true, "$(PLATFORM)", "$(TARGET)", generatedDirs, generatedFiles);
if (depList.size())
t << "; DEPLOYMENT" << endl;
for (int i = 0; i < depList.size(); ++i) {
diff --git a/qmake/generators/symbian/symmake.h b/qmake/generators/symbian/symmake.h
index 22dc4c9..2fea29b 100644
--- a/qmake/generators/symbian/symmake.h
+++ b/qmake/generators/symbian/symmake.h
@@ -84,7 +84,7 @@ protected:
QString canonizePath(const QString& origPath);
virtual bool writeMakefile(QTextStream &t);
- void generatePkgFile(const QString &compiler, const QString &config, const QString &iconFile);
+ void generatePkgFile(const QString &iconFile);
bool containsStartWithItem(const QChar &c, const QStringList& src);
virtual void init();