Skip to content

Commit

Permalink
Changed createpackage parameters to be more consistent with make targ…
Browse files Browse the repository at this point in the history
…ets.

Earlier createpackage required two separate parameters to define the
platform and target. For example
    > createpackage fluidlauncher_template.pkg release armv5

Now it is changed to:
    > createpackage fluidlauncher_template.pkg release-armv5

This is consistent to make target what is used to do the building i.e.:
    > make release-armv5

The change also affected environment variables supported by 'make sisx'
target. QT_SISX_PLATFORM is not any more supported, and the info is
merged QT_SISX_TARGET variable.

Reviewed-by: Miikka Heikkinen
  • Loading branch information
Janne Anttila committed Aug 28, 2009
1 parent 92718f6 commit d7cdd19
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 23 deletions.
30 changes: 15 additions & 15 deletions bin/createpackage.pl
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,21 @@ ()
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";
Expand All @@ -47,26 +50,23 @@ ()

# 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
Expand Down
8 changes: 6 additions & 2 deletions mkspecs/symbian-sbsv2/flm/qt/qmake_store_build.flm
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand All @@ -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

Expand Down
2 changes: 1 addition & 1 deletion qmake/generators/symbian/symmake.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
15 changes: 10 additions & 5 deletions qmake/generators/symbian/symmake_abld.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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))
}
Expand Down Expand Up @@ -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;

Expand Down

0 comments on commit d7cdd19

Please sign in to comment.