summaryrefslogtreecommitdiffstats
path: root/qmake/generators/symbian
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@nokia.com>2010-02-12 10:49:50 (GMT)
committerThiago Macieira <thiago.macieira@nokia.com>2010-02-12 10:49:50 (GMT)
commit8e309899b8287b67905072927df1e00effc2a13e (patch)
tree6c7bff1a77090c5b39b35a13c88ef876c2535e09 /qmake/generators/symbian
parentf74029e286e97067ac39086955481bf979af69dc (diff)
parent01245bcabf97dfdfdd23a2ec075b8de3e78bdeb2 (diff)
downloadQt-8e309899b8287b67905072927df1e00effc2a13e.zip
Qt-8e309899b8287b67905072927df1e00effc2a13e.tar.gz
Qt-8e309899b8287b67905072927df1e00effc2a13e.tar.bz2
Merge remote branch 'origin/4.6' into qt-master-from-4.6
Diffstat (limited to 'qmake/generators/symbian')
-rw-r--r--qmake/generators/symbian/initprojectdeploy_symbian.cpp2
-rw-r--r--qmake/generators/symbian/symmake.cpp35
2 files changed, 34 insertions, 3 deletions
diff --git a/qmake/generators/symbian/initprojectdeploy_symbian.cpp b/qmake/generators/symbian/initprojectdeploy_symbian.cpp
index 7ccce00..7279a4c 100644
--- a/qmake/generators/symbian/initprojectdeploy_symbian.cpp
+++ b/qmake/generators/symbian/initprojectdeploy_symbian.cpp
@@ -207,7 +207,7 @@ QString generate_uid(const QString& target)
return tmp;
}
- unsigned long hash = 5381;
+ quint32 hash = 5381;
int c;
for (int i = 0; i < target.size(); ++i) {
diff --git a/qmake/generators/symbian/symmake.cpp b/qmake/generators/symbian/symmake.cpp
index 5e27af5..ee7a1dd 100644
--- a/qmake/generators/symbian/symmake.cpp
+++ b/qmake/generators/symbian/symmake.cpp
@@ -94,7 +94,9 @@
#define MMP_END_RESOURCE "END"
#define SIS_TARGET "sis"
+#define INSTALLER_SIS_TARGET "installer_sis"
#define OK_SIS_TARGET "ok_sis"
+#define OK_INSTALLER_SIS_TARGET "ok_installer_sis"
#define FAIL_SIS_NOPKG_TARGET "fail_sis_nopkg"
#define FAIL_SIS_NOCACHE_TARGET "fail_sis_nocache"
@@ -302,6 +304,9 @@ void SymbianMakefileGenerator::generatePkgFile(const QString &iconFile, Deployme
QTextStream t(&pkgFile);
QString installerSisHeader = project->values("DEPLOYMENT.installer_header").join("\n");
+ if (installerSisHeader.isEmpty())
+ installerSisHeader = "0xA000D7CE"; // Use default self-signable UID if not defined
+
QString wrapperStreamBuffer;
QTextStream tw(&wrapperStreamBuffer);
@@ -524,7 +529,7 @@ void SymbianMakefileGenerator::generatePkgFile(const QString &iconFile, Deployme
twf << "\"" << currentPath << "/" << sisName << "\" - \"c:\\adm\\" << sisName << "\"" << endl;
QString bootStrapPath = QLibraryInfo::location(QLibraryInfo::PrefixPath);
- bootStrapPath.append("/bootstrap.sis");
+ bootStrapPath.append("/smartinstaller.sis");
QFileInfo fi(fileInfo(bootStrapPath));
twf << "@\"" << fi.absoluteFilePath() << "\",(0x2002CCCD)" << endl;
}
@@ -1908,8 +1913,34 @@ void SymbianMakefileGenerator::writeSisTargets(QTextStream &t)
t << pkgcommand << endl;
t << endl;
+ QString sisName = fixedTarget;
+ sisName += ".sis";
+
+ t << sisName << ":" << endl;
+ t << "\t$(MAKE) -s -f $(MAKEFILE) " SIS_TARGET << endl << endl;
+
+ t << INSTALLER_SIS_TARGET ": " << sisName << endl;
+ siscommand = QString("\t$(if $(wildcard %1_installer.%2)," \
+ "$(MAKE) -s -f $(MAKEFILE) %3," \
+ "$(MAKE) -s -f $(MAKEFILE) %4)")
+ .arg(fixedTarget)
+ .arg("pkg")
+ .arg(OK_INSTALLER_SIS_TARGET)
+ .arg(FAIL_SIS_NOPKG_TARGET);
+ t << siscommand << endl;
+ t << endl;
+
+ t << OK_INSTALLER_SIS_TARGET ": " << endl;
+
+ pkgcommand = QString("\tcreatepackage.bat $(QT_SIS_OPTIONS) %1_installer.%2 - " \
+ "$(QT_SIS_CERTIFICATE) $(QT_SIS_KEY) $(QT_SIS_PASSPHRASE)")
+ .arg(fixedTarget)
+ .arg("pkg");
+ t << pkgcommand << endl;
+ t << endl;
+
t << FAIL_SIS_NOPKG_TARGET ":" << endl;
- t << "\t$(error PKG file does not exist, 'SIS' target is only supported for executables or projects with DEPLOYMENT statement)" << endl;
+ t << "\t$(error PKG file does not exist, '" SIS_TARGET "' and '" INSTALLER_SIS_TARGET "' target are only supported for executables or projects with DEPLOYMENT statement)" << endl;
t << endl;
t << FAIL_SIS_NOCACHE_TARGET ":" << endl;