diff options
author | Shane Kearns <shane.kearns@accenture.com> | 2010-02-12 12:59:37 (GMT) |
---|---|---|
committer | Shane Kearns <shane.kearns@accenture.com> | 2010-02-12 14:07:22 (GMT) |
commit | 4d1be3f07428651f3e366e4c09f26cff3b52d91f (patch) | |
tree | 357c58a6f082a09ee793bddf7f7c4e18dd02482b | |
parent | f25119cb0406341e7cbb6ac679662f28fc7ab431 (diff) | |
download | Qt-4d1be3f07428651f3e366e4c09f26cff3b52d91f.zip Qt-4d1be3f07428651f3e366e4c09f26cff3b52d91f.tar.gz Qt-4d1be3f07428651f3e366e4c09f26cff3b52d91f.tar.bz2 |
Add make stub_sis target, and add webkit stub to qt.iby
qmake - add targets to wrapper make file
make stub_sis
createpackage - use -s or --stub to run makesis with the -s argument
also copies the file to the right place in epoc32\data\system\installs
qt.iby - add qt_stub.sis and qt_webkit_stub.sis
Task-number: QTBUG-6570
Reviewed-by: Miikka Heikkinen
-rwxr-xr-x | bin/createpackage.pl | 90 | ||||
-rw-r--r-- | doc/src/platforms/symbian-introduction.qdoc | 2 | ||||
-rw-r--r-- | qmake/generators/symbian/symmake.cpp | 34 | ||||
-rw-r--r-- | src/s60installs/qt.iby | 3 |
4 files changed, 86 insertions, 43 deletions
diff --git a/bin/createpackage.pl b/bin/createpackage.pl index 6d4614e..7f803fd 100755 --- a/bin/createpackage.pl +++ b/bin/createpackage.pl @@ -54,6 +54,8 @@ use Getopt::Long; use File::Basename; # Use File::Spec services mainly rel2abs use File::Spec; +# Use File::Path - to make stub sis target directory +use File::Path; # use CWD abs_bath, which is exported only on request use Cwd 'abs_path'; @@ -111,11 +113,13 @@ my $install = ""; my $preprocessonly = ""; my $certfile = ""; my $preserveUnsigned = ""; +my $stub = ""; unless (GetOptions('i|install' => \$install, 'p|preprocess' => \$preprocessonly, 'c|certfile=s' => \$certfile, - 'u|unsigned' => \$preserveUnsigned,)){ + 'u|unsigned' => \$preserveUnsigned, + 's|stub' => \$stub,)){ Usage(); } @@ -153,6 +157,7 @@ my $sisoutputbasename = lc($pkgoutputbasename); $sisoutputbasename =~ s/_$targetplatform//g; my $unsigned_sis_name = $sisoutputbasename."_unsigned.sis"; my $signed_sis_name = $sisoutputbasename.".sis"; +my $stub_sis_name = $sisoutputbasename."_stub.sis"; # Store some utility variables my $scriptpath = dirname(__FILE__); @@ -256,48 +261,57 @@ if ($preprocessonly) { exit; } -# Create SIS. -system ("makesis $pkgoutput $unsigned_sis_name"); - -# Sign SIS with certificate info given as an argument. -system ("signsis $unsigned_sis_name $signed_sis_name $certificate $key $passphrase"); - -# Check if creating signed SIS Succeeded -stat($signed_sis_name); -if( -e _ ) { - my $targetInsert = ""; - if ($targetplatform ne "-") { - $targetInsert = "for $targetplatform "; - } - print ("\nSuccessfully created $signed_sis_name ${targetInsert}using certificate: $certtext!\n"); +if($stub) { + if(!($ENV{EPOCROOT})) { die("EPOCROOT must be set to create stub sis files"); } + my $systeminstall = "$ENV{EPOCROOT}epoc32/data/z/system/install"; + mkpath($systeminstall); + my $stub_sis_name = $systeminstall."/".$stub_sis_name; + # Create stub SIS. + system ("makesis -s $pkgoutput $stub_sis_name"); +} else { + # Create SIS. + system ("makesis $pkgoutput $unsigned_sis_name"); + print("\n"); + + # Sign SIS with certificate info given as an argument. + system ("signsis $unsigned_sis_name $signed_sis_name $certificate $key $passphrase"); + + # Check if creating signed SIS Succeeded + stat($signed_sis_name); + if( -e _ ) { + my $targetInsert = ""; + if ($targetplatform ne "-") { + $targetInsert = "for $targetplatform "; + } + print ("Successfully created $signed_sis_name ${targetInsert}using certificate: $certtext!\n"); - # Sign with additional certificates & keys - for my $row ( @certificates ) { - # Get certificate absolute file names, relative paths are relative to certfilepath - my $abscert = File::Spec->rel2abs( $row->[0], $certfilepath); - my $abskey = File::Spec->rel2abs( $row->[1], $certfilepath); + # Sign with additional certificates & keys + for my $row ( @certificates ) { + # Get certificate absolute file names, relative paths are relative to certfilepath + my $abscert = File::Spec->rel2abs( $row->[0], $certfilepath); + my $abskey = File::Spec->rel2abs( $row->[1], $certfilepath); - system ("signsis $signed_sis_name $signed_sis_name $abscert $abskey $row->[2]"); - print ("\tAdditionally signed the SIS with certificate: $row->[0]!\n"); - } + system ("signsis $signed_sis_name $signed_sis_name $abscert $abskey $row->[2]"); + print ("\tAdditionally signed the SIS with certificate: $row->[0]!\n"); + } - # remove temporary pkg and unsigned sis - if (!$preservePkgOutput) { - unlink $pkgoutput; - } - if (!$preserveUnsigned) { - unlink $unsigned_sis_name; - } + # remove temporary pkg and unsigned sis + if (!$preservePkgOutput) { + unlink $pkgoutput; + } + if (!$preserveUnsigned) { + unlink $unsigned_sis_name; + } - # Install the sis if requested - if ($install) { - print ("\nInstalling $signed_sis_name...\n"); - system ("$signed_sis_name"); + # Install the sis if requested + if ($install) { + print ("\nInstalling $signed_sis_name...\n"); + system ("$signed_sis_name"); + } + } else { + # Lets leave the generated PKG for problem solving purposes + print ("\nSIS creation failed!\n"); } -} else { - # Lets leave the generated PKG for problem solving purposes - print ("\nSIS creation failed!\n"); } - #end of file diff --git a/doc/src/platforms/symbian-introduction.qdoc b/doc/src/platforms/symbian-introduction.qdoc index 5cebee3..591d6f1 100644 --- a/doc/src/platforms/symbian-introduction.qdoc +++ b/doc/src/platforms/symbian-introduction.qdoc @@ -132,6 +132,8 @@ Smart installer will attempt to download missing dependencies in addition to just installing the application. + \row \o \c stub_sis \o Create a stub sis to allow upgradability of projects + that are deployed in ROM \endtable The following lines perform a debug build for the emulator diff --git a/qmake/generators/symbian/symmake.cpp b/qmake/generators/symbian/symmake.cpp index 3ee3b3a..61988d3 100644 --- a/qmake/generators/symbian/symmake.cpp +++ b/qmake/generators/symbian/symmake.cpp @@ -88,8 +88,10 @@ #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" @@ -1883,7 +1885,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))," \ @@ -1899,7 +1901,7 @@ void SymbianMakefileGenerator::writeSisTargets(QTextStream &t) t << OK_SIS_TARGET ":" << endl; - QString pkgcommand = QString("\tcreatepackage.bat $(QT_SIS_OPTIONS) %1_template.%2 $(QT_SIS_TARGET) " \ + QString pkgcommand = QString::fromLatin1("\tcreatepackage.bat $(QT_SIS_OPTIONS) %1_template.%2 $(QT_SIS_TARGET) " \ "$(QT_SIS_CERTIFICATE) $(QT_SIS_KEY) $(QT_SIS_PASSPHRASE)") .arg(fixedTarget) .arg("pkg"); @@ -1912,8 +1914,32 @@ void SymbianMakefileGenerator::writeSisTargets(QTextStream &t) 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("\t$(if $(wildcard %1_installer.%2)," \ + siscommand = QString::fromLatin1("\t$(if $(wildcard %1_installer.%2)," \ "$(MAKE) -s -f $(MAKEFILE) %3," \ "$(MAKE) -s -f $(MAKEFILE) %4)") .arg(fixedTarget) @@ -1925,7 +1951,7 @@ void SymbianMakefileGenerator::writeSisTargets(QTextStream &t) t << OK_INSTALLER_SIS_TARGET ": " << endl; - pkgcommand = QString("\tcreatepackage.bat $(QT_SIS_OPTIONS) %1_installer.%2 - " \ + pkgcommand = QString::fromLatin1("\tcreatepackage.bat $(QT_SIS_OPTIONS) %1_installer.%2 - " \ "$(QT_SIS_CERTIFICATE) $(QT_SIS_KEY) $(QT_SIS_PASSPHRASE)") .arg(fixedTarget) .arg("pkg"); diff --git a/src/s60installs/qt.iby b/src/s60installs/qt.iby index bdd668c..a6a96ec 100644 --- a/src/s60installs/qt.iby +++ b/src/s60installs/qt.iby @@ -113,6 +113,7 @@ data=\epoc32\data\z\resource\qt\plugins\phonon_backend\phonon_mmf.qtplugin resou data=\epoc32\data\z\resource\qt\plugins\graphicssystems\qvggraphicssystem.qtplugin resource\qt\plugins\graphicssystems\qvggraphicssystem.qtplugin // Stub sis file -data=ZSYSTEM\install\qt.sis System\Install\qt.sis +data=ZSYSTEM\install\qt_stub.sis System\Install\qt_stub.sis +data=ZSYSTEM\install\qtwebkit_stub.sis System\Install\qtwebkit_stub.sis #endif // __QT_IBY__ |