From b37ac454832a23c17418f5ebca8928b63fe02289 Mon Sep 17 00:00:00 2001 From: Miikka Heikkinen Date: Mon, 8 Feb 2010 18:19:19 +0200 Subject: Streamlined smart installer package creation in Symbian - Added make target for creating smart installer packages - Application sis is automatically generated if missing when "make installer_sis" is invoked - No need to specify installer pkg UID if self signing is enough - Related docs fixed - Fixed smartinstaller.sis name to be correct Task-number: QTBUG-8026 Reviewed-by: axis --- bin/createpackage.pl | 16 ++++++++---- doc/src/deployment/deployment.qdoc | 17 +++---------- doc/src/getting-started/installation.qdoc | 2 +- doc/src/platforms/symbian-introduction.qdoc | 4 +++ doc/src/snippets/code/doc_src_deployment.qdoc | 17 +++---------- qmake/generators/symbian/symmake.cpp | 35 +++++++++++++++++++++++++-- 6 files changed, 56 insertions(+), 35 deletions(-) diff --git a/bin/createpackage.pl b/bin/createpackage.pl index 460df31..6d4614e 100755 --- a/bin/createpackage.pl +++ b/bin/createpackage.pl @@ -95,10 +95,10 @@ Example with certfile: # This is comment line, also the empty lines are ignored rd.cer;rd-key.pem .\\cert\\mycert.cer;.\\cert\\mykey.key;yourpassword - X:\\QtS60\\selfsigned.cer;X:\\QtS60\\selfsigned.key + X:\\QtS60\\s60installs\\selfsigned.cer;X:\\QtS60\\s60installs\\selfsigned.key If no certificate and key files are provided, either a RnD certificate or -a self-signed certificate from Qt installation root directory is used. +a self-signed certificate from QtDir\\src\\s60installs directory is used. ============================================================================================== ENDUSAGESTRING @@ -149,8 +149,10 @@ $pkgoutputbasename = lc($pkgoutputbasename); # Store output file names to variables my $pkgoutput = lc($pkgoutputbasename.".pkg"); -my $unsigned_sis_name = $pkgoutputbasename."_unsigned.sis"; -my $signed_sis_name = $pkgoutputbasename.".sis"; +my $sisoutputbasename = lc($pkgoutputbasename); +$sisoutputbasename =~ s/_$targetplatform//g; +my $unsigned_sis_name = $sisoutputbasename."_unsigned.sis"; +my $signed_sis_name = $sisoutputbasename.".sis"; # Store some utility variables my $scriptpath = dirname(__FILE__); @@ -263,7 +265,11 @@ system ("signsis $unsigned_sis_name $signed_sis_name $certificate $key $passphra # Check if creating signed SIS Succeeded stat($signed_sis_name); if( -e _ ) { - print ("\nSuccessfully created $signed_sis_name using certificate: $certtext!\n"); + my $targetInsert = ""; + if ($targetplatform ne "-") { + $targetInsert = "for $targetplatform "; + } + print ("\nSuccessfully created $signed_sis_name ${targetInsert}using certificate: $certtext!\n"); # Sign with additional certificates & keys for my $row ( @certificates ) { diff --git a/doc/src/deployment/deployment.qdoc b/doc/src/deployment/deployment.qdoc index 575a6dc..41babd9 100644 --- a/doc/src/deployment/deployment.qdoc +++ b/doc/src/deployment/deployment.qdoc @@ -1573,28 +1573,17 @@ By default \c .pkg file generated by \c qmake adds support for all S60 3rd edition FP1, S60 3rd edition FP2 and S60 5th edition devices. - As a last step we will instruct qmake to generate smart installer \c .pkg file by defining - the UID of the installation package. The UID needs to be different than the application UID, - and should be reserved via normal Symbian mechanisms. You can use a random UID starting with - \c 0xE for testing purposes: - - \snippet doc/src/snippets/code/doc_src_deployment.qdoc 58 - Now we are ready to compile the application and create the application deployment file. Run \c qmake to create Symbian specific makefiles, resources (\.rss) and deployment packaging files (\c .pkg). And do build to create the application binaries and resources. - \snippet doc/src/snippets/code/doc_src_deployment.qdoc 59 + \snippet doc/src/snippets/code/doc_src_deployment.qdoc 58 If everything compiled and linked without any errors, we are now ready to create - an application package (\c wiggly.sis): - - \snippet doc/src/snippets/code/doc_src_deployment.qdoc 60 + an application installation package (\c wiggly_installer.sis): - Now you can create the smart installer package for the application: - - \snippet doc/src/snippets/code/doc_src_deployment.qdoc 61 + \snippet doc/src/snippets/code/doc_src_deployment.qdoc 59 If all binaries and dependencies were found, you should now have a self signed \c wiggly_installer.sis ready to be installed on a device. The smart installer diff --git a/doc/src/getting-started/installation.qdoc b/doc/src/getting-started/installation.qdoc index b679250..abdfcd2 100644 --- a/doc/src/getting-started/installation.qdoc +++ b/doc/src/getting-started/installation.qdoc @@ -677,7 +677,7 @@ If you are using pre-built binaries, follow the instructions given in the \snippet doc/src/snippets/code/doc_src_installation.qdoc 30 - This will create a self-signed \c fluidlauncher_armv5_urel.sis and + This will create a self-signed \c fluidlauncher.sis and install it to your device. To run the demos on the emulator simply navigate to the directory of the demo diff --git a/doc/src/platforms/symbian-introduction.qdoc b/doc/src/platforms/symbian-introduction.qdoc index 427f45a..94075f5 100644 --- a/doc/src/platforms/symbian-introduction.qdoc +++ b/doc/src/platforms/symbian-introduction.qdoc @@ -127,6 +127,10 @@ \row \o \c run \o Run the application on the emulator. \row \o \c runonphone \o Run the application on a device. \row \o \c sis \o Create signed \c .sis file for project. + \row \o \c installer_sis \o Create signed smart installer \c .sis file for project. + Smart installer will attempt to download + missing dependencies in addition to + just installing the application. \endtable The following lines perform a debug build for the emulator diff --git a/doc/src/snippets/code/doc_src_deployment.qdoc b/doc/src/snippets/code/doc_src_deployment.qdoc index 9c00681..3b0cda1 100644 --- a/doc/src/snippets/code/doc_src_deployment.qdoc +++ b/doc/src/snippets/code/doc_src_deployment.qdoc @@ -475,19 +475,10 @@ default_deployment.pkg_prerules += supported_platforms //! [57] //! [58] -DEPLOYMENT.installer_header = 0xE2345678 -//! [58] - -//! [59] qmake make release-gcce -//! [59] - -//! [60] -make sis -ren wiggly_release-gcce.sis wiggly.sis -//! [60] +//! [58] -//! [61] -createpackage wiggly_installer.pkg -//! [61] \ No newline at end of file +//! [59] +make installer_sis +//! [59] \ No newline at end of file diff --git a/qmake/generators/symbian/symmake.cpp b/qmake/generators/symbian/symmake.cpp index 6c44f0b..3ee3b3a 100644 --- a/qmake/generators/symbian/symmake.cpp +++ b/qmake/generators/symbian/symmake.cpp @@ -87,7 +87,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" @@ -295,6 +297,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); @@ -517,7 +522,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; } @@ -1901,8 +1906,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; -- cgit v0.12 From 709238ecfefdea82ec192267a4a33180078dbad8 Mon Sep 17 00:00:00 2001 From: Aleksandar Sasha Babic Date: Tue, 9 Feb 2010 11:58:08 +0100 Subject: Setting some parameters to reliably run on Tb9.2, Tb 9.2 ATM is more memory sensitive. Reviewed-by: TrustMe --- .../benchmarks/qgraphicsview/tst_qgraphicsview.cpp | 28 ++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/tests/benchmarks/qgraphicsview/tst_qgraphicsview.cpp b/tests/benchmarks/qgraphicsview/tst_qgraphicsview.cpp index 4cb07db..10e00a6 100644 --- a/tests/benchmarks/qgraphicsview/tst_qgraphicsview.cpp +++ b/tests/benchmarks/qgraphicsview/tst_qgraphicsview.cpp @@ -555,7 +555,11 @@ void tst_QGraphicsView::imageRiver() QFile file(":/random.data"); QVERIFY(file.open(QIODevice::ReadOnly)); QDataStream str(&file); +#if defined(Q_OS_SYMBIAN) + for (int i = 0; i < 50; ++i) { +#else for (int i = 0; i < 100; ++i) { +#endif AnimatedPixmapItem *item; if (direction == 0) item = new AnimatedPixmapItem((i % 4) + 1, 0, rotation, scale); if (direction == 1) item = new AnimatedPixmapItem(0, (i % 4) + 1, rotation, scale); @@ -574,7 +578,11 @@ void tst_QGraphicsView::imageRiver() #ifdef CALLGRIND_DEBUG CALLGRIND_START_INSTRUMENTATION #endif +#if defined(Q_OS_SYMBIAN) + for (int i = 0; i < 50; ++i) { +#else for (int i = 0; i < 100; ++i) { +#endif scene.advance(); while (view.count < (i+1)) qApp->processEvents(); @@ -669,7 +677,11 @@ void tst_QGraphicsView::textRiver() QFile file(":/random.data"); QVERIFY(file.open(QIODevice::ReadOnly)); QDataStream str(&file); +#if defined(Q_OS_SYMBIAN) + for (int i = 0; i < 50; ++i) { +#else for (int i = 0; i < 100; ++i) { +#endif AnimatedTextItem *item; if (direction == 0) item = new AnimatedTextItem((i % 4) + 1, 0, rotation, scale); if (direction == 1) item = new AnimatedTextItem(0, (i % 4) + 1, rotation, scale); @@ -687,7 +699,11 @@ void tst_QGraphicsView::textRiver() #ifdef CALLGRIND_DEBUG CALLGRIND_START_INSTRUMENTATION #endif +#if defined(Q_OS_SYMBIAN) + for (int i = 0; i < 50; ++i) { +#else for (int i = 0; i < 100; ++i) { +#endif scene.advance(); while (view.count < (i+1)) qApp->processEvents(); @@ -771,7 +787,11 @@ void tst_QGraphicsView::moveItemCache() QFile file(":/random.data"); QVERIFY(file.open(QIODevice::ReadOnly)); QDataStream str(&file); +#if defined(Q_OS_SYMBIAN) + for (int i = 0; i < 5; ++i) { +#else for (int i = 0; i < 50; ++i) { +#endif AnimatedPixmapCacheItem *item; if (direction == 0) item = new AnimatedPixmapCacheItem((i % 4) + 1, 0); if (direction == 1) item = new AnimatedPixmapCacheItem(0, (i % 4) + 1); @@ -793,7 +813,11 @@ void tst_QGraphicsView::moveItemCache() #ifdef CALLGRIND_DEBUG CALLGRIND_START_INSTRUMENTATION #endif +#if defined(Q_OS_SYMBIAN) + for (int i = 0; i < 50; ++i) { +#else for (int i = 0; i < 100; ++i) { +#endif scene.advance(); while (view.count < (i+1)) qApp->processEvents(); @@ -893,7 +917,11 @@ void tst_QGraphicsView::paintItemCache() #ifdef CALLGRIND_DEBUG CALLGRIND_START_INSTRUMENTATION #endif +#if defined(Q_OS_SYMBIAN) + for (int i = 0; i < 5; ++i) { +#else for (int i = 0; i < 50; ++i) { +#endif scene.advance(); while (view.count < (i+1)) qApp->processEvents(); -- cgit v0.12