summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJanne Anttila <janne.anttila@digia.com>2009-08-28 11:30:43 (GMT)
committerJanne Anttila <janne.anttila@digia.com>2009-08-28 11:30:43 (GMT)
commita2258116129a1ed715118d90f5097c1aa61f5c98 (patch)
tree6d890dca46bc1adb13d274a1823d2ddfd98bbd79
parent67f4c288107fd4e7003df6f882143afa8819844b (diff)
parenta72b61fa95f696a00e7598b12ac1745ff714d756 (diff)
downloadQt-a2258116129a1ed715118d90f5097c1aa61f5c98.zip
Qt-a2258116129a1ed715118d90f5097c1aa61f5c98.tar.gz
Qt-a2258116129a1ed715118d90f5097c1aa61f5c98.tar.bz2
Merge branch 'master' into 4.6
-rw-r--r--bin/createpackage.bat105
-rw-r--r--bin/createpackage.pl163
-rw-r--r--demos/embedded/fluidlauncher/fluidlauncher.pro22
-rw-r--r--doc/src/getting-started/installation.qdoc2
-rw-r--r--mkspecs/symbian-sbsv2/flm/qt/qmake_store_build.flm39
-rw-r--r--mkspecs/symbian-sbsv2/flm/qt/qt.xml4
-rw-r--r--qmake/generators/symbian/initprojectdeploy_symbian.cpp2
-rw-r--r--qmake/generators/symbian/symmake.cpp116
-rw-r--r--qmake/generators/symbian/symmake.h10
-rw-r--r--qmake/generators/symbian/symmake_abld.cpp55
-rw-r--r--qmake/generators/symbian/symmake_abld.h1
-rw-r--r--qmake/generators/symbian/symmake_sbsv2.cpp11
-rw-r--r--src/s60installs/s60installs.pro (renamed from src/s60installs/qt_libs.pro)3
-rw-r--r--src/src.pro5
14 files changed, 355 insertions, 183 deletions
diff --git a/bin/createpackage.bat b/bin/createpackage.bat
index 116d52b..b5ede18 100644
--- a/bin/createpackage.bat
+++ b/bin/createpackage.bat
@@ -1,106 +1,3 @@
@echo off
-
-set installsigned_old=%installsigned%
-set pkgfile_old=%pkgfile%
-set basename_old=%basename%
-set signsis1_old=%signsis1%
-set signsis2_old=%signsis2%
-set signsis3_old=%signsis3%
-set unsigned_sis_name_old=%unsigned_sis_name%
-set signed_sis_name_old=%signed_sis_name%
-set scriptpath_old=%scriptpath%
-set certificate_old=%certificate%
-
-rem Help text
-if "%1"=="" (
- echo Convenience script for creating signed packages you can install on your phone.
- echo Usage: createpackage.bat [-i] myexample_armv5_udeb.pkg [certificate key [passphrase]]
- echo.
- echo If no certificate and key files are provided, either a RnD certificate or
- echo a self-signed certificate from Qt installation root directory is used.
- echo.
- echo To install the package right away using PC suite, use -i argument.
- goto done
-)
-
-if "%1"=="-i" (
- set installsigned=true
- set pkgfile=%2
- set basename=%~n2
- set signsis1=%3
- set signsis2=%4
- set signsis3=%5
-) else (
- set installsigned=false
- set pkgfile=%1
- set basename=%~n1
- set signsis1=%2
- set signsis2=%3
- set signsis3=%4
-)
-
-set unsigned_sis_name=%basename%_unsigned.sis
-set signed_sis_name=%basename%.sis
-
-rem Get absolute path to this script
set scriptpath=%~dp0
-
-rem Check the .pkg actually exists.
-if not exist %pkgfile% (
- echo Error: Package description file '%pkgfile%' does not exist.
- goto done
-)
-
-rem Remove any existing .sis packages
-if exist %signed_sis_name% del %signed_sis_name%
-if exist %unsigned_sis_name% del %unsigned_sis_name%
-
-rem Create .sis package
-makesis %pkgfile% %unsigned_sis_name%
-
-rem If no certificate is given, check default options
-if x%signsis1% == x (
- rem If RnD certificate is not found, sign with self signed certificate
- if not exist %scriptpath%..\rd.cer (
- set certificate=Self signed
- signsis %unsigned_sis_name% %signed_sis_name% %scriptpath%..\selfsigned.cer %scriptpath%..\selfsigned.key
- goto install
- )
-
- rem Sign with RnD certificate
- set certificate=RnD
- signsis %unsigned_sis_name% %signed_sis_name% %scriptpath%..\rd.cer %scriptpath%..\rd-key.pem
-) else (
- if x%signsis2% == x (
- echo Custom certificate key file parameter missing.
- goto cleanup
- )
-
- set certificate=%signsis1%
- signsis %unsigned_sis_name% %signed_sis_name% %signsis1% %signsis2% %signsis3%
-)
-
-:install
-if exist %signed_sis_name% (
- echo Successfully created %signed_sis_name% using certificate %certificate%
- if "%installsigned%" == "true" (
- echo Installing %signed_sis_name%...
- call %signed_sis_name%
- )
-)
-
-:cleanup
-if exist %unsigned_sis_name% del %unsigned_sis_name%
-
-:done
-
-set installsigned=%installsigned_old%
-set pkgfile=%pkgfile_old%
-set basename=%basename_old%
-set signsis1=%signsis1_old%
-set signsis2=%signsis2_old%
-set signsis3=%signsis3_old%
-set unsigned_sis_name=%unsigned_sis_name_old%
-set signed_sis_name=%signed_sis_name_old%
-set scriptpath=%scriptpath_old%
-set certificate=%certificate_old%
+perl %scriptpath%createpackage.pl %* \ No newline at end of file
diff --git a/bin/createpackage.pl b/bin/createpackage.pl
new file mode 100644
index 0000000..b7f4682
--- /dev/null
+++ b/bin/createpackage.pl
@@ -0,0 +1,163 @@
+#!\usr\bin\perl
+############################################################################################
+#
+# Convenience script for creating signed packages you can install on your phone.
+#
+# Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+# Contact: Qt Software Information (qt-info@nokia.com)
+#
+############################################################################################
+
+use strict;
+
+# use a command-line parsing module
+use Getopt::Long;
+# Use file name parsing module
+use File::Basename;
+
+sub Usage() {
+ print "\n";
+ print "==========================================================================================\n";
+ print "Convenience script for creating signed packages you can install on your phone.\n";
+ print "\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 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";
+ print "==========================================================================================\n";
+ exit();
+}
+
+# Read given options
+my $install = "";
+unless (GetOptions('i|install' => \$install)){
+ Usage();
+}
+
+# Read params to variables
+my $templatepkg = $ARGV[0];
+my $targetplatform = uc $ARGV[1];
+
+my @tmpvalues = split('-', $targetplatform);
+my $target = $tmpvalues[0];
+my $platform = $tmpvalues[1];;
+
+# Convert visual target to real target (debug->udeb and release->urel)
+$target =~ s/debug/udeb/i;
+$target =~ s/release/urel/i;
+
+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/_$targetplatform/g;
+$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";
+
+# Store some utility variables
+my $scriptpath = dirname(__FILE__);
+my $certtext = $certificate;
+my $certpath = $scriptpath;
+$certpath =~ s-^(.*[^\\])$-$1\\-o; # ensure path ends with a backslash
+$certpath = $certpath."../"; # certificates are one step up in hierarcy
+$certpath =~ s-/-\\-go; # for those working with UNIX shells
+
+# Check some pre-conditions and print error messages if needed
+unless (length($templatepkg) && length($platform) && length($target)) {
+ print "\nError: Template PKG filename, platform or target is not defined!\n";
+ Usage();
+}
+
+# Check template exist
+stat($templatepkg);
+unless( -e _ ) {
+ print "\nError: Package description file '$templatepkg' does not exist!\n";
+ Usage();
+}
+
+# Check certifcate preconditions and set default certificate variables if needed
+if (length($certificate)) {
+ unless(length($key)) {
+ print "\nError: Custom certificate key file parameter missing.!\n";
+ Usage();
+ }
+} else {
+ #If no certificate is given, check default options
+ $certtext = "RnD";
+ $certificate = $certpath."rd.cer";
+ $key = $certpath."rd-key.pem";
+
+ stat($certificate);
+ unless( -e _ ) {
+ $certtext = "Self Signed";
+ $certificate = $certpath."selfsigned.cer";
+ $key = $certpath."selfsigned.key";
+ }
+}
+
+# Remove any existing .sis packages
+unlink $unsigned_sis_name;
+unlink $signed_sis_name;
+unlink $pkgoutput;
+
+# Preprocess PKG
+local $/;
+# read template file
+open( TEMPLATE, $templatepkg) or die "Error '$templatepkg': $!\n";
+$_=<TEMPLATE>;
+close (TEMPLATE);
+
+# replace the PKG variables
+s/\$\(PLATFORM\)/$platform/gm;
+s/\$\(TARGET\)/$target/gm;
+
+#write the output
+open( OUTPUT, ">$pkgoutput" ) or die "Error '$pkgoutput' $!\n";
+print OUTPUT $_;
+close OUTPUT;
+
+# Create and sign SIS
+system ("makesis $pkgoutput $unsigned_sis_name");
+system ("signsis $unsigned_sis_name $signed_sis_name $certificate $key $passphrase");
+
+# Check if creating signed SIS Succeeded
+stat($signed_sis_name);
+if( -e _ ) {
+ print ("\nSuccessfully created $signed_sis_name using certificate $certtext!\n");
+
+ # remove temporary pkg and unsigned sis
+ unlink $pkgoutput;
+ unlink $unsigned_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");
+}
+
+
+#end of file
diff --git a/demos/embedded/fluidlauncher/fluidlauncher.pro b/demos/embedded/fluidlauncher/fluidlauncher.pro
index 3eff37b..522ccf3 100644
--- a/demos/embedded/fluidlauncher/fluidlauncher.pro
+++ b/demos/embedded/fluidlauncher/fluidlauncher.pro
@@ -67,15 +67,14 @@ symbian {
pathstroke.exe \
wiggly.exe \
ftp.exe \
- context2d.exe \
saxbookmarks.exe \
desktopservices.exe \
fridgemagnets.exe \
drilldown.exe \
softkeys.exe
- contains(QT_CONFIG, webkit) {
- executables.sources += anomaly.exe
- }
+
+ contains(QT_CONFIG, webkit): executables.sources += anomaly.exe
+ contains(QT_CONFIG, script): executables.sources += context2d.exe
executables.path = /sys/bin
@@ -86,15 +85,14 @@ symbian {
$${EPOCROOT}$$HW_ZDIR$$REG_RESOURCE_IMPORT_DIR/pathstroke_reg.rsc \
$${EPOCROOT}$$HW_ZDIR$$REG_RESOURCE_IMPORT_DIR/wiggly_reg.rsc \
$${EPOCROOT}$$HW_ZDIR$$REG_RESOURCE_IMPORT_DIR/ftp_reg.rsc\
- $${EPOCROOT}$$HW_ZDIR$$REG_RESOURCE_IMPORT_DIR/context2d_reg.rsc \
$${EPOCROOT}$$HW_ZDIR$$REG_RESOURCE_IMPORT_DIR/saxbookmarks_reg.rsc \
$${EPOCROOT}$$HW_ZDIR$$REG_RESOURCE_IMPORT_DIR/desktopservices_reg.rsc \
$${EPOCROOT}$$HW_ZDIR$$REG_RESOURCE_IMPORT_DIR/fridgemagnets_reg.rsc \
$${EPOCROOT}$$HW_ZDIR$$REG_RESOURCE_IMPORT_DIR/drilldown_reg.rsc \
$${EPOCROOT}$$HW_ZDIR$$REG_RESOURCE_IMPORT_DIR/softkeys_reg.rsc
- contains(QT_CONFIG, webkit) {
- reg_resource.sources += $${EPOCROOT}$$HW_ZDIR$$REG_RESOURCE_IMPORT_DIR/anomaly_reg.rsc
- }
+
+ contains(QT_CONFIG, webkit): reg_resource.sources += $${EPOCROOT}$$HW_ZDIR$$REG_RESOURCE_IMPORT_DIR/anomaly_reg.rsc
+ contains(QT_CONFIG, script): reg_resource.sources += $${EPOCROOT}$$HW_ZDIR$$REG_RESOURCE_IMPORT_DIR/context2d_reg.rsc
reg_resource.path = $$REG_RESOURCE_IMPORT_DIR
@@ -105,16 +103,14 @@ symbian {
$${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/pathstroke.rsc \
$${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/wiggly.rsc \
$${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/ftp.rsc\
- $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/context2d.rsc \
$${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/saxbookmarks.rsc \
$${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/desktopservices.rsc \
$${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/fridgemagnets.rsc \
$${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/drilldown.rsc \
$${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/softkeys.rsc
- contains(QT_CONFIG, webkit) {
- resource.sources += $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/anomaly.rsc
- }
-
+ contains(QT_CONFIG, webkit): resource.sources += $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/anomaly.rsc
+ contains(QT_CONFIG, script): resource.sources += $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/context2d.rsc
+
resource.path = $$APP_RESOURCE_DIR
mifs.sources = \
diff --git a/doc/src/getting-started/installation.qdoc b/doc/src/getting-started/installation.qdoc
index 9bf774b..ec50060 100644
--- a/doc/src/getting-started/installation.qdoc
+++ b/doc/src/getting-started/installation.qdoc
@@ -520,7 +520,7 @@ in the \l{Qt for S60 Requirements} document.
We've included a subset of the Qt demos in this package for you
to try out. An excellent starting point is the "fluidlauncher"
demo. To run the demo on a real device, you first have to install
- \c{qt_libs.sis} and \c{fluidlauncher.sis} found in the Qt installation
+ \c{qt_for_s60.sis} and \c{fluidlauncher.sis} found in the Qt installation
directory. Begin by connecting your phone using the USB cable and
selecting "PC Suite mode". In Windows Explorer right click on the
\c{.sis} files and select "Install with Nokia Application Installer"
diff --git a/mkspecs/symbian-sbsv2/flm/qt/qmake_store_build.flm b/mkspecs/symbian-sbsv2/flm/qt/qmake_store_build.flm
new file mode 100644
index 0000000..96eb189
--- /dev/null
+++ b/mkspecs/symbian-sbsv2/flm/qt/qmake_store_build.flm
@@ -0,0 +1,39 @@
+# /****************************************************************************
+# **
+# ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+# ** Contact: Nokia Corporation (qt-info@nokia.com)
+# **
+# ** This file is part of symbian-sbsv2 mkspec.
+# **
+# ****************************************************************************/
+
+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)
+
+$(STORE_BUILD_TARGET):
+ $(call startrule,qmake_store_build) \
+ echo "# ==============================================================================" > $(CACHE_FILENAME) && \
+ echo "# This file is generated by make and should not be modified by the user" >> $(CACHE_FILENAME) && \
+ echo "# Name : .make.cache" >> $(CACHE_FILENAME) && \
+ echo "# Part of : " >> $(CACHE_FILENAME) && \
+ echo "# Description : This file is used to cache last build target for" >> $(CACHE_FILENAME) && \
+ echo "# make sisx target." >> $(CACHE_FILENAME) && \
+ echo "# Version : " >> $(CACHE_FILENAME) && \
+ echo "# ==============================================================================" >> $(CACHE_FILENAME) && \
+ echo QT_SISX_TARGET ?= $(VISUAL_CFG)-$(PLATFORM_PATH) >> $(CACHE_FILENAME) \
+ $(call endrule,qmake_store_build)
+endef
+
+$(eval $(qmake_store_build))
+$(eval $(call GenerateStandardCleanTarget,$(CACHE_FILENAME),''))
+
diff --git a/mkspecs/symbian-sbsv2/flm/qt/qt.xml b/mkspecs/symbian-sbsv2/flm/qt/qt.xml
index 2c46f78..5074e47 100644
--- a/mkspecs/symbian-sbsv2/flm/qt/qt.xml
+++ b/mkspecs/symbian-sbsv2/flm/qt/qt.xml
@@ -39,4 +39,8 @@
flm="qmake_generate_temp_dirs.flm">
<param name='DIRS' />
</interface>
+
+ <interface name="qt.qmake_store_build" extends="Symbian.UserFLM"
+ flm="qmake_store_build.flm">
+ </interface>
</build>
diff --git a/qmake/generators/symbian/initprojectdeploy_symbian.cpp b/qmake/generators/symbian/initprojectdeploy_symbian.cpp
index e903fc1..3bc2391 100644
--- a/qmake/generators/symbian/initprojectdeploy_symbian.cpp
+++ b/qmake/generators/symbian/initprojectdeploy_symbian.cpp
@@ -331,7 +331,7 @@ void initProjectDeploySymbian(QMakeProject* project,
if (deployBinaries) {
// Executables and libraries are deployed to \sys\bin
QFileInfo releasePath(epocRoot() + "epoc32\\release\\" + platform + "\\" + build + "\\");
- deploymentList.append(CopyItem(Option::fixPathToLocalOS(releasePath.absolutePath() + "\\" + info.fileName()),
+ deploymentList.append(CopyItem(Option::fixPathToLocalOS(releasePath.absolutePath() + "\\" + info.fileName(), false, true),
Option::fixPathToLocalOS(deploymentDrive + QLatin1String(SYSBIN_DIR "\\") + info.fileName())));
}
if (isPlugin(info, devicePath)) {
diff --git a/qmake/generators/symbian/symmake.cpp b/qmake/generators/symbian/symmake.cpp
index c20ecf3..48fc8ef 100644
--- a/qmake/generators/symbian/symmake.cpp
+++ b/qmake/generators/symbian/symmake.cpp
@@ -72,6 +72,12 @@
#define MMP_TARGETTYPE "TARGETTYPE"
#define MMP_SECUREID "SECUREID"
+#define SISX_TARGET "sisx"
+#define OK_SISX_TARGET "ok_sisx"
+#define FAIL_SISX_NOPKG_TARGET "fail_sisx_nopkg"
+#define FAIL_SISX_NOCACHE_TARGET "fail_sisx_nocache"
+#define RESTORE_BUILD_TARGET "restore_build"
+
#define PRINT_FILE_CREATE_ERROR(filename) fprintf(stderr, "Error: Could not create '%s'\n", qPrintable(filename));
QString SymbianMakefileGenerator::fixPathForMmp(const QString& origPath, const QDir& parentDir)
@@ -194,13 +200,7 @@ bool SymbianMakefileGenerator::writeMakefile(QTextStream &t)
}
if (generatePkg) {
- QStringList platformList = project->values("SYMBIAN_PLATFORMS");
- foreach(QString platform, platformList) {
- if (platform.compare("WINSCW", Qt::CaseInsensitive)) {
- generatePkgFile(platform.toLower(), "udeb", iconFile);
- generatePkgFile(platform.toLower(), "urel", iconFile);
- }
- }
+ generatePkgFile(iconFile);
}
writeBldInfContent(t, generatePkg);
@@ -246,9 +246,9 @@ bool SymbianMakefileGenerator::writeMakefile(QTextStream &t)
if (targetType == TypeExe) {
if (!project->values("CONFIG").contains("no_icon", Qt::CaseInsensitive)) {
- writeRegRssFile(fixedTarget, userRssRules);
- writeRssFile(fixedTarget, numberOfIcons, iconFile);
- writeLocFile(fixedTarget, symbianLangCodes);
+ writeRegRssFile(userRssRules);
+ writeRssFile(numberOfIcons, iconFile);
+ writeLocFile(symbianLangCodes);
}
}
@@ -258,13 +258,10 @@ bool SymbianMakefileGenerator::writeMakefile(QTextStream &t)
return true;
}
-void SymbianMakefileGenerator::generatePkgFile(const QString &compiler, const QString &config, const QString &iconFile)
+void SymbianMakefileGenerator::generatePkgFile(const QString &iconFile)
{
- QString build = (config == "udeb") ? "debug" : "release";
- QString pkgFilename = QString("%1_%2-%3.%4")
- .arg(fileInfo(project->projectFile()).completeBaseName())
- .arg(build)
- .arg(compiler)
+ QString pkgFilename = QString("%1_template.%2")
+ .arg(fixedTarget)
.arg("pkg");
QFile pkgFile(pkgFilename);
if (!pkgFile.open(QIODevice::WriteOnly | QIODevice::Text)) {
@@ -313,8 +310,11 @@ void SymbianMakefileGenerator::generatePkgFile(const QString &compiler, const QS
QString applicationVersion = project->first("VERSION").isEmpty() ? "1,0,0" : project->first("VERSION").replace('.', ',');
if (!containsStartWithItem('#', rawPkgPreRules)) {
+ QString visualTarget = escapeFilePath(fileFixify(project->first("TARGET")));
+ visualTarget = removePathSeparators(visualTarget);
+
t << "; SIS header: name, uid, version" << endl;
- t << QString("#{\"%1\"},(%2),%3").arg(fixedTarget).arg(uid3).arg(applicationVersion) << endl << endl;
+ t << QString("#{\"%1\"},(%2),%3").arg(visualTarget).arg(uid3).arg(applicationVersion) << endl << endl;
}
// Localized vendor name
@@ -344,10 +344,8 @@ void SymbianMakefileGenerator::generatePkgFile(const QString &compiler, const QS
QString installPathRegResource = "!:\\private\\10003a3f\\import\\apps";
// Find location of builds
- QString epocReleasePath = QString("%1epoc32/release/%2/%3")
- .arg(epocRoot())
- .arg(compiler)
- .arg(config);
+ QString epocReleasePath = QString("%1epoc32/release/$(PLATFORM)/$(TARGET)")
+ .arg(epocRoot());
if (targetType == TypeExe) {
@@ -391,7 +389,7 @@ void SymbianMakefileGenerator::generatePkgFile(const QString &compiler, const QS
QString remoteTestPath;
remoteTestPath = QString("!:\\private\\%1").arg(privateDirUid);
- initProjectDeploySymbian(project, depList, remoteTestPath, true, compiler, config, generatedDirs, generatedFiles);
+ initProjectDeploySymbian(project, depList, remoteTestPath, true, "$(PLATFORM)", "$(TARGET)", generatedDirs, generatedFiles);
if (depList.size())
t << "; DEPLOYMENT" << endl;
for (int i = 0; i < depList.size(); ++i) {
@@ -471,6 +469,7 @@ void SymbianMakefileGenerator::init()
MakefileGenerator::init();
fixedTarget = escapeFilePath(fileFixify(project->first("TARGET")));
fixedTarget = removePathSeparators(fixedTarget);
+ removeSpecialCharacters(fixedTarget);
if (0 != project->values("QMAKE_PLATFORM").size())
platform = varGlue("QMAKE_PLATFORM", "", " ", "");
@@ -1187,9 +1186,9 @@ void SymbianMakefileGenerator::writeBldInfContent(QTextStream &t, bool addDeploy
}
}
-void SymbianMakefileGenerator::writeRegRssFile(QString &appName, QStringList &userItems)
+void SymbianMakefileGenerator::writeRegRssFile(QStringList &userItems)
{
- QString filename(appName);
+ QString filename(fixedTarget);
filename.append("_reg.rss");
QFile ft(filename);
if (ft.open(QIODevice::WriteOnly)) {
@@ -1202,7 +1201,7 @@ void SymbianMakefileGenerator::writeRegRssFile(QString &appName, QStringList &us
t << "// * user." << endl;
t << "// ============================================================================" << endl;
t << endl;
- t << "#include <" << appName << ".rsg>" << endl;
+ t << "#include <" << fixedTarget << ".rsg>" << endl;
t << "#include <appinfo.rh>" << endl;
t << endl;
//t << "#include <data_caging_paths.hrh>" << "\n" << endl;
@@ -1210,8 +1209,8 @@ void SymbianMakefileGenerator::writeRegRssFile(QString &appName, QStringList &us
t << "UID3 " << uid3 << endl << endl;
t << "RESOURCE APP_REGISTRATION_INFO" << endl;
t << "\t{" << endl;
- t << "\tapp_file=\"" << appName << "\";" << endl;
- t << "\tlocalisable_resource_file=\"" RESOURCE_DIRECTORY_RESOURCE << appName << "\";" << endl;
+ t << "\tapp_file=\"" << fixedTarget << "\";" << endl;
+ t << "\tlocalisable_resource_file=\"" RESOURCE_DIRECTORY_RESOURCE << fixedTarget << "\";" << endl;
t << endl;
foreach(QString item, userItems)
@@ -1222,9 +1221,9 @@ void SymbianMakefileGenerator::writeRegRssFile(QString &appName, QStringList &us
}
}
-void SymbianMakefileGenerator::writeRssFile(QString &appName, QString &numberOfIcons, QString &iconFile)
+void SymbianMakefileGenerator::writeRssFile(QString &numberOfIcons, QString &iconFile)
{
- QString filename(appName);
+ QString filename(fixedTarget);
filename.append(".rss");
QFile ft(filename);
if (ft.open(QIODevice::WriteOnly)) {
@@ -1238,7 +1237,7 @@ void SymbianMakefileGenerator::writeRssFile(QString &appName, QString &numberOfI
t << "// ============================================================================" << endl;
t << endl;
t << "#include <appinfo.rh>" << endl;
- t << "#include \"" << appName << ".loc\"" << endl;
+ t << "#include \"" << fixedTarget << ".loc\"" << endl;
t << endl;
t << "RESOURCE LOCALISABLE_APP_INFO r_localisable_app_info" << endl;
t << "\t{" << endl;
@@ -1265,9 +1264,9 @@ void SymbianMakefileGenerator::writeRssFile(QString &appName, QString &numberOfI
}
}
-void SymbianMakefileGenerator::writeLocFile(QString &appName, QStringList &symbianLangCodes)
+void SymbianMakefileGenerator::writeLocFile(QStringList &symbianLangCodes)
{
- QString filename(appName);
+ QString filename(fixedTarget);
filename.append(".loc");
QFile ft(filename);
if (ft.open(QIODevice::WriteOnly)) {
@@ -1281,18 +1280,16 @@ void SymbianMakefileGenerator::writeLocFile(QString &appName, QStringList &symbi
t << "// ============================================================================" << endl;
t << endl;
t << "#ifdef LANGUAGE_SC" << endl;
- //t << "#include \"" << appName << ".l01\"" << endl;
- t << "#define STRING_r_short_caption \"" << appName << "\"" << endl;
- t << "#define STRING_r_caption \"" << appName << "\"" << endl;
+ t << "#define STRING_r_short_caption \"" << fixedTarget << "\"" << endl;
+ t << "#define STRING_r_caption \"" << fixedTarget << "\"" << endl;
foreach(QString lang, symbianLangCodes) {
t << "#elif defined LANGUAGE_" << lang << endl;
- //t << "#include \"" << appName << ".l" << lang << "\"" << endl;
- t << "#define STRING_r_short_caption \"" << appName << "\"" << endl;
- t << "#define STRING_r_caption \"" << appName << "\"" << endl;
+ t << "#define STRING_r_short_caption \"" << fixedTarget << "\"" << endl;
+ t << "#define STRING_r_caption \"" << fixedTarget << "\"" << endl;
}
t << "#else" << endl;
- t << "#define STRING_r_short_caption \"" << appName << "\"" << endl;
- t << "#define STRING_r_caption \"" << appName << "\"" << endl;
+ t << "#define STRING_r_short_caption \"" << fixedTarget << "\"" << endl;
+ t << "#define STRING_r_caption \"" << fixedTarget << "\"" << endl;
t << "#endif" << endl;
} else {
PRINT_FILE_CREATE_ERROR(filename);
@@ -1635,6 +1632,44 @@ void SymbianMakefileGenerator::removeSpecialCharacters(QString& str)
str.replace(QString(" "), QString("_"));
}
+void SymbianMakefileGenerator::writeSisxTargets(QTextStream &t)
+{
+ t << SISX_TARGET ": " RESTORE_BUILD_TARGET << endl;
+ QString sisxcommand = QString("\t$(if $(wildcard %1_template.%2),$(if $(wildcard %3)," \
+ "$(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_SISX_TARGET)
+ .arg(FAIL_SISX_NOCACHE_TARGET)
+ .arg(FAIL_SISX_NOPKG_TARGET);
+ t << sisxcommand << endl;
+ t << endl;
+
+ t << OK_SISX_TARGET ":" << endl;
+
+ QString pkgcommand = QString("\tcreatepackage.bat %1_template.%2 $(QT_SISX_TARGET) " \
+ "$(QT_SISX_CERTIFICATE) $(QT_SISX_KEY) $(QT_SISX_PASSPHRASE)")
+ .arg(fixedTarget)
+ .arg("pkg");
+ t << pkgcommand << endl;
+ t << endl;
+
+ t << FAIL_SISX_NOPKG_TARGET ":" << endl;
+ t << "\t$(error PKG file does not exist, 'SISX' target is only supported for executables or projects with DEPLOYMENT statement)" << endl;
+ t << endl;
+
+ t << FAIL_SISX_NOCACHE_TARGET ":" << endl;
+ t << "\t$(error Project has to be build before calling 'SISX' target)" << endl;
+ t << endl;
+
+
+ t << RESTORE_BUILD_TARGET ":" << endl;
+ t << "-include " MAKE_CACHE_NAME << endl;
+ t << endl;
+}
+
void SymbianMakefileGenerator::generateDistcleanTargets(QTextStream& t)
{
t << "dodistclean:" << endl;
@@ -1688,4 +1723,3 @@ void SymbianMakefileGenerator::generateDistcleanTargets(QTextStream& t)
t << "distclean: clean dodistclean" << endl;
t << endl;
}
-
diff --git a/qmake/generators/symbian/symmake.h b/qmake/generators/symbian/symmake.h
index 22dc4c9..ce65822 100644
--- a/qmake/generators/symbian/symmake.h
+++ b/qmake/generators/symbian/symmake.h
@@ -50,6 +50,7 @@ QT_BEGIN_NAMESPACE
#define MAKEFILE_DEPENDENCY_SEPARATOR " \\\n\t"
#define QT_EXTRA_INCLUDE_DIR "tmp"
+#define MAKE_CACHE_NAME ".make.cache"
class SymbianMakefileGenerator : public MakefileGenerator
{
@@ -84,7 +85,7 @@ protected:
QString canonizePath(const QString& origPath);
virtual bool writeMakefile(QTextStream &t);
- void generatePkgFile(const QString &compiler, const QString &config, const QString &iconFile);
+ void generatePkgFile(const QString &iconFile);
bool containsStartWithItem(const QChar &c, const QStringList& src);
virtual void init();
@@ -116,9 +117,9 @@ protected:
void writeCustomDefFile();
- void writeRegRssFile(QString &appname, QStringList &useritems);
- void writeRssFile(QString &appName, QString &numberOfIcons, QString &iconfile);
- void writeLocFile(QString &appName, QStringList &symbianLangCodes);
+ void writeRegRssFile(QStringList &useritems);
+ void writeRssFile(QString &numberOfIcons, QString &iconfile);
+ void writeLocFile(QStringList &symbianLangCodes);
void readRssRules(QString &numberOfIcons, QString &iconFile, QStringList &userRssRules);
QStringList symbianLangCodesFromTsFiles();
@@ -136,6 +137,7 @@ protected:
const QString& itemPrefix,
const QString& itemSuffix);
+ void writeSisxTargets(QTextStream &t);
void generateDistcleanTargets(QTextStream& t);
// Subclass implements
diff --git a/qmake/generators/symbian/symmake_abld.cpp b/qmake/generators/symbian/symmake_abld.cpp
index 271d210..49cd7ed 100644
--- a/qmake/generators/symbian/symmake_abld.cpp
+++ b/qmake/generators/symbian/symmake_abld.cpp
@@ -58,6 +58,7 @@
#define ALL_SOURCE_DEPS_TARGET "all_source_deps"
#define WINSCW_DEPLOYMENT_TARGET "winscw_deployment"
#define WINSCW_DEPLOYMENT_CLEAN_TARGET "winscw_deployment_clean"
+#define STORE_BUILD_TARGET "store_build"
SymbianAbldMakefileGenerator::SymbianAbldMakefileGenerator() : SymbianMakefileGenerator() { }
SymbianAbldMakefileGenerator::~SymbianAbldMakefileGenerator() { }
@@ -87,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;
@@ -101,14 +108,16 @@ void SymbianAbldMakefileGenerator::writeMkFile(const QString& wrapperFileName, b
QString finalDepsWinscw;
QStringList wrapperTargets;
if (deploymentOnly) {
- buildDeps.append(DO_NOTHING_TARGET);
+ buildDeps.append(STORE_BUILD_TARGET);
cleanDeps.append(DO_NOTHING_TARGET);
cleanDepsWinscw.append(WINSCW_DEPLOYMENT_CLEAN_TARGET);
finalDeps.append(DO_NOTHING_TARGET);
finalDepsWinscw.append(WINSCW_DEPLOYMENT_TARGET);
- wrapperTargets << WINSCW_DEPLOYMENT_TARGET << WINSCW_DEPLOYMENT_CLEAN_TARGET;
+ wrapperTargets << WINSCW_DEPLOYMENT_TARGET
+ << WINSCW_DEPLOYMENT_CLEAN_TARGET
+ << STORE_BUILD_TARGET;
} else {
- buildDeps.append(CREATE_TEMPS_TARGET " " PRE_TARGETDEPS_TARGET);
+ buildDeps.append(CREATE_TEMPS_TARGET " " PRE_TARGETDEPS_TARGET " " STORE_BUILD_TARGET);
cleanDeps.append(EXTENSION_CLEAN);
cleanDepsWinscw.append(EXTENSION_CLEAN " " WINSCW_DEPLOYMENT_CLEAN_TARGET);
finalDeps.append(FINALIZE_TARGET);
@@ -118,7 +127,8 @@ void SymbianAbldMakefileGenerator::writeMkFile(const QString& wrapperFileName, b
<< EXTENSION_CLEAN
<< FINALIZE_TARGET
<< WINSCW_DEPLOYMENT_CLEAN_TARGET
- << WINSCW_DEPLOYMENT_TARGET;
+ << WINSCW_DEPLOYMENT_TARGET
+ << STORE_BUILD_TARGET;
}
t << "MAKMAKE: " << buildDeps << endl << endl;
@@ -143,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 << endl << endl;
- }
-
+ t << "\t-$(MAKE) -f \"" << makefile << "\" " << target << " QT_SISX_TARGET=$(VISUAL_CFG)-$(PLATFORM)" << endl << endl;
+ }
+
t << endl;
} // if(ft.open(QIODevice::WriteOnly))
}
@@ -179,10 +189,8 @@ void SymbianAbldMakefileGenerator::writeWrapperMakefile(QFile& wrapperFile, bool
t << "#" << endl;
t << "# ==============================================================================" << "\n" << endl;
t << endl;
- QString ofile = Option::fixPathToTargetOS(Option::output.fileName());
- if (ofile.lastIndexOf(Option::dir_sep) != -1)
- ofile = ofile.right(ofile.length() - ofile.lastIndexOf(Option::dir_sep) - 1);
- t << "MAKEFILE = " << ofile << endl;
+
+ t << "MAKEFILE = " << wrapperFile.fileName() << endl;
t << "QMAKE = " << Option::fixPathToTargetOS(var("QMAKE_QMAKE")) << endl;
t << "DEL_FILE = " << var("QMAKE_DEL_FILE") << endl;
t << "DEL_DIR = " << var("QMAKE_DEL_DIR") << endl;
@@ -353,6 +361,10 @@ void SymbianAbldMakefileGenerator::writeWrapperMakefile(QFile& wrapperFile, bool
writeDeploymentTargets(t);
+ writeSisxTargets(t);
+
+ writeStoreBuildTarget(t);
+
generateDistcleanTargets(t);
t << "clean: $(ABLD)" << endl;
@@ -408,6 +420,25 @@ bool SymbianAbldMakefileGenerator::writeDeploymentTargets(QTextStream &t)
return true;
}
+void SymbianAbldMakefileGenerator::writeStoreBuildTarget(QTextStream &t)
+{
+ t << STORE_BUILD_TARGET ":" << endl;
+ t << "\t@echo # ============================================================================== > " MAKE_CACHE_NAME << endl;
+ t << "\t@echo # This file is generated by make and should not be modified by the user >> " MAKE_CACHE_NAME << endl;
+ t << "\t@echo # Name : " << MAKE_CACHE_NAME << " >> " MAKE_CACHE_NAME << endl;
+ t << "\t@echo # Part of : " << project->values("TARGET").join(" ") << " >> " MAKE_CACHE_NAME << endl;
+ t << "\t@echo # Description : This file is used to cache last build target for >> " MAKE_CACHE_NAME << endl;
+ t << "\t@echo # make sisx target. >> " MAKE_CACHE_NAME << endl;
+ t << "\t@echo # Version : >> " MAKE_CACHE_NAME << endl;
+ 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_TARGET ?= $(QT_SISX_TARGET) >> " MAKE_CACHE_NAME << endl;
+ t << endl;
+
+ generatedFiles << MAKE_CACHE_NAME;
+}
+
void SymbianAbldMakefileGenerator::writeBldInfMkFilePart(QTextStream& t, bool addDeploymentExtension)
{
// Normally emulator deployment gets done via regular makefile, but since subdirs
diff --git a/qmake/generators/symbian/symmake_abld.h b/qmake/generators/symbian/symmake_abld.h
index 7709d5d..67da43e 100644
--- a/qmake/generators/symbian/symmake_abld.h
+++ b/qmake/generators/symbian/symmake_abld.h
@@ -56,6 +56,7 @@ protected:
virtual void writeMkFile(const QString& wrapperFileName, bool deploymentOnly);
virtual void writeWrapperMakefile(QFile& wrapperFile, bool isPrimaryMakefile);
+ void writeStoreBuildTarget(QTextStream &t);
bool writeDeploymentTargets(QTextStream &t);
public:
diff --git a/qmake/generators/symbian/symmake_sbsv2.cpp b/qmake/generators/symbian/symmake_sbsv2.cpp
index 2471a2b..9891a2e 100644
--- a/qmake/generators/symbian/symmake_sbsv2.cpp
+++ b/qmake/generators/symbian/symmake_sbsv2.cpp
@@ -123,10 +123,7 @@ void SymbianSbsv2MakefileGenerator::writeWrapperMakefile(QFile& wrapperFile, boo
t << "#" << endl;
t << "# ==============================================================================" << "\n" << endl;
t << endl;
- QString ofile = Option::fixPathToTargetOS(Option::output.fileName());
- if (ofile.lastIndexOf(Option::dir_sep) != -1)
- ofile = ofile.right(ofile.length() - ofile.lastIndexOf(Option::dir_sep) - 1);
- t << "MAKEFILE = " << ofile << endl;
+ t << "MAKEFILE = " << wrapperFile.fileName() << endl;
t << "QMAKE = " << Option::fixPathToTargetOS(var("QMAKE_QMAKE")) << endl;
t << "DEL_FILE = " << var("QMAKE_DEL_FILE") << endl;
t << "DEL_DIR = " << var("QMAKE_DEL_DIR") << endl;
@@ -219,6 +216,8 @@ void SymbianSbsv2MakefileGenerator::writeWrapperMakefile(QFile& wrapperFile, boo
qDeleteAll(subtargets);
}
+ writeSisxTargets(t);
+
generateDistcleanTargets(t);
t << "clean: " << BLD_INF_FILENAME << endl;
@@ -402,6 +401,10 @@ void SymbianSbsv2MakefileGenerator::writeBldInfExtensionRulesPart(QTextStream& t
t << "END" << endl;
t << endl;
+ t << "START EXTENSION qt/qmake_store_build" << endl;
+ t << "END" << endl;
+ t << endl;
+
t << endl;
}
diff --git a/src/s60installs/qt_libs.pro b/src/s60installs/s60installs.pro
index f24a03f..0314958 100644
--- a/src/s60installs/qt_libs.pro
+++ b/src/s60installs/s60installs.pro
@@ -5,7 +5,8 @@ symbian: {
load(data_caging_paths)
SUBDIRS=
- TARGET = "QtLibs pre-release"
+ # WARNING: Changing TARGET name will break Symbian SISX upgrade functionality
+ TARGET = "Qt for S60"
TARGET.UID3 = 0x2001E61C
VERSION=$${QT_MAJOR_VERSION}.$${QT_MINOR_VERSION}.$${QT_PATCH_VERSION}
diff --git a/src/src.pro b/src/src.pro
index feb6a9c..1801d55 100644
--- a/src/src.pro
+++ b/src/src.pro
@@ -6,8 +6,7 @@ win32:SRC_SUBDIRS += src_winmain
wince*:{
SRC_SUBDIRS += src_corelib src_xml src_gui src_sql src_network src_testlib
} else:symbian {
- SRC_SUBDIRS += src_s60main src_corelib src_xml src_gui src_network src_sql src_testlib
- SRC_SUBDIRS += $$QT_SOURCE_TREE/src/s60installs/qt_libs.pro
+ SRC_SUBDIRS += src_s60main src_corelib src_xml src_gui src_network src_sql src_testlib src_s60installs
} else {
SRC_SUBDIRS += src_tools_bootstrap src_tools_moc src_tools_rcc src_tools_uic src_corelib src_xml src_network src_gui src_sql src_testlib
!vxworks:contains(QT_CONFIG, qt3support): SRC_SUBDIRS += src_qt3support
@@ -37,6 +36,8 @@ SRC_SUBDIRS += src_plugins
src_s60main.subdir = $$QT_SOURCE_TREE/src/s60main
src_s60main.target = sub-s60main
+src_s60installs.subdir = $$QT_SOURCE_TREE/src/s60installs
+src_s60installs.target = sub-s60installs
src_winmain.subdir = $$QT_SOURCE_TREE/src/winmain
src_winmain.target = sub-winmain
src_tools_bootstrap.subdir = $$QT_SOURCE_TREE/src/tools/bootstrap