summaryrefslogtreecommitdiffstats
path: root/qmake/generators/symbian
diff options
context:
space:
mode:
Diffstat (limited to 'qmake/generators/symbian')
-rw-r--r--qmake/generators/symbian/initprojectdeploy_symbian.cpp2
-rw-r--r--qmake/generators/symbian/symmake.cpp65
-rw-r--r--qmake/generators/symbian/symmake_abld.cpp17
3 files changed, 67 insertions, 17 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..69668ab 100644
--- a/qmake/generators/symbian/symmake.cpp
+++ b/qmake/generators/symbian/symmake.cpp
@@ -94,7 +94,11 @@
#define MMP_END_RESOURCE "END"
#define SIS_TARGET "sis"
+#define INSTALLER_SIS_TARGET "installer_sis"
+#define ROM_STUB_SIS_TARGET "stub_sis"
#define OK_SIS_TARGET "ok_sis"
+#define OK_INSTALLER_SIS_TARGET "ok_installer_sis"
+#define OK_ROM_STUB_SIS_TARGET "ok_stub_sis"
#define FAIL_SIS_NOPKG_TARGET "fail_sis_nopkg"
#define FAIL_SIS_NOCACHE_TARGET "fail_sis_nocache"
@@ -302,6 +306,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 +531,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;
}
@@ -1885,7 +1892,7 @@ void SymbianMakefileGenerator::writeSisTargets(QTextStream &t)
t << endl;
t << SIS_TARGET ":" << endl;
- QString siscommand = QString("\t$(if $(wildcard %1_template.%2),$(if $(wildcard %3)," \
+ QString siscommand = QString::fromLatin1("\t$(if $(wildcard %1_template.%2),$(if $(wildcard %3)," \
"$(MAKE) -s -f $(MAKEFILE) %4," \
"$(if $(QT_SIS_TARGET),$(MAKE) -s -f $(MAKEFILE) %4," \
"$(MAKE) -s -f $(MAKEFILE) %5))," \
@@ -1901,15 +1908,65 @@ void SymbianMakefileGenerator::writeSisTargets(QTextStream &t)
t << OK_SIS_TARGET ":" << endl;
- QString pkgcommand = QString("\tcreatepackage" SCRIPT_EXT " $(QT_SIS_OPTIONS) %1_template.%2 $(QT_SIS_TARGET) " \
+ QString pkgcommand = QString::fromLatin1("\tcreatepackage" SCRIPT_EXT " $(QT_SIS_OPTIONS) %1_template.%2 $(QT_SIS_TARGET) " \
+ "$(QT_SIS_CERTIFICATE) $(QT_SIS_KEY) $(QT_SIS_PASSPHRASE)")
+ .arg(fixedTarget)
+ .arg("pkg");
+ t << pkgcommand << endl;
+ t << endl;
+
+ QString sisName = fixedTarget;
+ sisName += ".sis";
+
+ t << sisName << ":" << endl;
+ t << "\t$(MAKE) -s -f $(MAKEFILE) " SIS_TARGET << endl << endl;
+
+ t << ROM_STUB_SIS_TARGET ":" << endl;
+ QString stubsiscommand = QString::fromLatin1("\t$(if $(wildcard %1_template.%2),$(if $(wildcard %3)," \
+ "$(MAKE) -s -f $(MAKEFILE) %4," \
+ "$(if $(QT_SIS_TARGET),$(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_ROM_STUB_SIS_TARGET)
+ .arg(FAIL_SIS_NOCACHE_TARGET)
+ .arg(FAIL_SIS_NOPKG_TARGET);
+ t << stubsiscommand << endl;
+ t << endl;
+
+ t << OK_ROM_STUB_SIS_TARGET ":" << endl;
+
+ QString stubpkgcommand = QString::fromLatin1("\tcreatepackage.bat -s $(QT_SIS_OPTIONS) %1_template.%2 $(QT_SIS_TARGET) " \
"$(QT_SIS_CERTIFICATE) $(QT_SIS_KEY) $(QT_SIS_PASSPHRASE)")
.arg(fixedTarget)
.arg("pkg");
+ t << stubpkgcommand << endl;
+ t << endl;
+
+ t << INSTALLER_SIS_TARGET ": " << sisName << endl;
+ siscommand = QString::fromLatin1("\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::fromLatin1("\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;
diff --git a/qmake/generators/symbian/symmake_abld.cpp b/qmake/generators/symbian/symmake_abld.cpp
index 26dd3fd..a3a504f 100644
--- a/qmake/generators/symbian/symmake_abld.cpp
+++ b/qmake/generators/symbian/symmake_abld.cpp
@@ -303,19 +303,16 @@ void SymbianAbldMakefileGenerator::writeWrapperMakefile(QFile& wrapperFile, bool
// generate command lines like this ...
// -@ if NOT EXIST ".\somedir" mkdir ".\somedir"
QStringList dirsToClean;
+ QString dirExists = var("QMAKE_CHK_DIR_EXISTS");
+ QString mkdir = var("QMAKE_MKDIR");
for (QMap<QString, QStringList>::iterator it = systeminclude.begin(); it != systeminclude.end(); ++it) {
QStringList values = it.value();
for (int i = 0; i < values.size(); ++i) {
if (values.at(i).endsWith("/" QT_EXTRA_INCLUDE_DIR)) {
QString fixedValue(QDir::toNativeSeparators(values.at(i)));
dirsToClean << fixedValue;
-#ifdef Q_OS_WIN32
- t << "\t-@ if NOT EXIST \"" << fixedValue << "\" mkdir \""
- << fixedValue << "\"" << endl;
-#else
- t << "\t-@ if test ! -d \"" << fixedValue << "\"; then mkdir \""
- << fixedValue << "\"" << "; fi" <<endl;
-#endif
+ t << "\t-@ " << dirExists << " \"" << fixedValue << "\" "
+ << mkdir << " \"" << fixedValue << "\"" << endl;
}
}
}
@@ -324,11 +321,7 @@ void SymbianAbldMakefileGenerator::writeWrapperMakefile(QFile& wrapperFile, bool
// Note: EXTENSION_CLEAN will get called many times when doing reallyclean
// This is why the "2> NUL" gets appended to generated clean targets in makefile.cpp.
t << EXTENSION_CLEAN ": " COMPILER_CLEAN_TARGET << endl;
-#ifdef Q_OS_WIN32
- generateCleanCommands(t, dirsToClean, var("QMAKE_DEL_DIR"), " /S /Q ", "", "");
-#else
- generateCleanCommands(t, dirsToClean, "rm", " -rf ", "", "");
-#endif
+ generateCleanCommands(t, dirsToClean, var("QMAKE_DEL_TREE"), "", "", "");
t << endl;
t << PRE_TARGETDEPS_TARGET ":"