diff options
-rw-r--r-- | bin/createpackage.pl | 30 | ||||
-rw-r--r-- | mkspecs/symbian-sbsv2/flm/qt/qmake_store_build.flm | 8 | ||||
-rw-r--r-- | qmake/generators/symbian/symmake.cpp | 2 | ||||
-rw-r--r-- | qmake/generators/symbian/symmake_abld.cpp | 15 |
4 files changed, 32 insertions, 23 deletions
diff --git a/bin/createpackage.pl b/bin/createpackage.pl index 856f318..b7f4682 100644 --- a/bin/createpackage.pl +++ b/bin/createpackage.pl @@ -20,18 +20,21 @@ sub Usage() { print "==========================================================================================\n"; print "Convenience script for creating signed packages you can install on your phone.\n"; print "\n"; - print "Usage: createpackage.pl [-i] templatepkg platform target [certificate key [passphrase]]\n"; + print "Usage: createpackage.pl [-i] templatepkg target-platform [certificate key [passphrase]]\n"; print "\n"; print "Where parameters are as follows:\n"; print " [-i|install] = Install the package right away using PC suite\n"; print " templatepkg = Name of .pkg file template\n"; - print " target = Either debug|udeb or release|urel\n"; + print " target = Either debug or release\n"; print " platform = One of the supported platform\n"; print " winscw | gcce | armv5 | armv6 | armv7\n"; print " certificate = The certificate file used for signing\n"; print " key = The certificate's private key file\n"; print " passphrase = The certificate's private key file's passphrase\n"; print "\n"; + print "For example:\n"; + print " createpackage.pl fluidlauncher_template.pkg release-armv5\n"; + print "\n"; print "If no certificate and key files are provided, either a RnD certificate or\n"; print "a self-signed certificate from Qt installation root directory is used.\n"; print "\n"; @@ -47,26 +50,23 @@ unless (GetOptions('i|install' => \$install)){ # Read params to variables my $templatepkg = $ARGV[0]; -my $target = uc $ARGV[1]; -my $platform = uc $ARGV[2]; +my $targetplatform = uc $ARGV[1]; + +my @tmpvalues = split('-', $targetplatform); +my $target = $tmpvalues[0]; +my $platform = $tmpvalues[1];; -# Make sure target contains only urel/udeb. -# i.e. convert possible given debug->udeb and release->urel +# Convert visual target to real target (debug->udeb and release->urel) $target =~ s/debug/udeb/i; $target =~ s/release/urel/i; -# Make sure visual target contains only release/debug -my $visualtarget = $target; -$visualtarget =~ s/udeb/debug/i; -$visualtarget =~ s/urel/release/i; - -my $certificate = $ARGV[3]; -my $key = $ARGV[4]; -my $passphrase = $ARGV[5]; +my $certificate = $ARGV[2]; +my $key = $ARGV[3]; +my $passphrase = $ARGV[4]; # Generate output pkg basename (i.e. file name without extension) my $pkgoutputbasename = $templatepkg; -$pkgoutputbasename =~ s/_template\.pkg/_$visualtarget-$platform/g; +$pkgoutputbasename =~ s/_template\.pkg/_$targetplatform/g; $pkgoutputbasename = lc($pkgoutputbasename); # Store output file names to variables diff --git a/mkspecs/symbian-sbsv2/flm/qt/qmake_store_build.flm b/mkspecs/symbian-sbsv2/flm/qt/qmake_store_build.flm index 49d9bab..96eb189 100644 --- a/mkspecs/symbian-sbsv2/flm/qt/qmake_store_build.flm +++ b/mkspecs/symbian-sbsv2/flm/qt/qmake_store_build.flm @@ -12,6 +12,11 @@ include $(FLMHOME)/metaflm.mk STORE_BUILD_TARGET:=$(call sanitise,TSTORE_BUILD_$(PLATFORM_PATH)_$(CFG_PATH)_$(EXTENSION_ROOT)) CACHE_FILENAME:=$(EXTENSION_ROOT)/.make.cache +VISUAL_CFG:=RELEASE +ifeq "$(CFG_PATH)" "UDEB" +VISUAL_CFG:=DEBUG +endif + define qmake_store_build FINAL:: $(STORE_BUILD_TARGET) @@ -25,8 +30,7 @@ $(STORE_BUILD_TARGET): echo "# make sisx target." >> $(CACHE_FILENAME) && \ echo "# Version : " >> $(CACHE_FILENAME) && \ echo "# ==============================================================================" >> $(CACHE_FILENAME) && \ - echo QT_SISX_PLATFORM ?= $(PLATFORM_PATH) >> $(CACHE_FILENAME) && \ - echo QT_SISX_TARGET ?= $(CFG_PATH) >> $(CACHE_FILENAME) \ + echo QT_SISX_TARGET ?= $(VISUAL_CFG)-$(PLATFORM_PATH) >> $(CACHE_FILENAME) \ $(call endrule,qmake_store_build) endef diff --git a/qmake/generators/symbian/symmake.cpp b/qmake/generators/symbian/symmake.cpp index aaa1903..48fc8ef 100644 --- a/qmake/generators/symbian/symmake.cpp +++ b/qmake/generators/symbian/symmake.cpp @@ -1650,7 +1650,7 @@ void SymbianMakefileGenerator::writeSisxTargets(QTextStream &t) t << OK_SISX_TARGET ":" << endl; QString pkgcommand = QString("\tcreatepackage.bat %1_template.%2 $(QT_SISX_TARGET) " \ - "$(QT_SISX_PLATFORM) $(QT_SISX_CERTIFICATE) $(QT_SISX_KEY) $(QT_SISX_PASSPHRASE)") + "$(QT_SISX_CERTIFICATE) $(QT_SISX_KEY) $(QT_SISX_PASSPHRASE)") .arg(fixedTarget) .arg("pkg"); t << pkgcommand << endl; diff --git a/qmake/generators/symbian/symmake_abld.cpp b/qmake/generators/symbian/symmake_abld.cpp index 254bf9c..d287106 100644 --- a/qmake/generators/symbian/symmake_abld.cpp +++ b/qmake/generators/symbian/symmake_abld.cpp @@ -88,9 +88,15 @@ void SymbianAbldMakefileGenerator::writeMkFile(const QString& wrapperFileName, b t << "# ==============================================================================" << "\n" << endl; t << endl << endl; - + t << "MAKE = make" << endl; t << endl; + + t << "VISUAL_CFG = RELEASE" << endl; + t << "ifeq \"$(CFG)\" \"UDEB\"" << endl; + t << "VISUAL_CFG = DEBUG" << endl; + t << "endif" << endl; + t << endl; t << DO_NOTHING_TARGET " :" << endl; t << "\t" << "@rem " DO_NOTHING_TARGET << endl << endl; @@ -147,9 +153,9 @@ void SymbianAbldMakefileGenerator::writeMkFile(const QString& wrapperFileName, b QString makefile(Option::fixPathToTargetOS(fileInfo(wrapperFileName).canonicalFilePath())); foreach(QString target, wrapperTargets) { t << target << " : " << makefile << endl; - t << "\t-$(MAKE) -f \"" << makefile << "\" " << target << " QT_SISX_PLATFORM=$(PLATFORM) QT_SISX_TARGET=$(CFG)" << endl << endl; - } - + t << "\t-$(MAKE) -f \"" << makefile << "\" " << target << "QT_SISX_TARGET=$(VISUAL_CFG)-$(PLATFORM)" << endl << endl; + } + t << endl; } // if(ft.open(QIODevice::WriteOnly)) } @@ -427,7 +433,6 @@ void SymbianAbldMakefileGenerator::writeStoreBuildTarget(QTextStream &t) t << "\t@echo # >> " MAKE_CACHE_NAME << endl; t << "\t@echo # ============================================================================== >> " MAKE_CACHE_NAME << endl; t << "\t@echo. >> " MAKE_CACHE_NAME << endl; - t << "\t@echo QT_SISX_PLATFORM ?= $(QT_SISX_PLATFORM) >> " MAKE_CACHE_NAME << endl; t << "\t@echo QT_SISX_TARGET ?= $(QT_SISX_TARGET) >> " MAKE_CACHE_NAME << endl; t << endl; |