From 26103b69df9bdd32016f3fbab975a26c8a147ea0 Mon Sep 17 00:00:00 2001 From: Miikka Heikkinen Date: Thu, 26 Aug 2010 15:30:59 +0300 Subject: Added support for DEPLOYMENT.pkg_build_version DEPLOYMENT.pkg_build_version can be used to pad the patch version number in Symbian pkg files to allow hot-fix deployments to be done between patch releases. DEPLOYMENT.pkg_build_version accepts only values 0 - 99, as pkg patch version number has limits how large numbers it can accept. The specified number is prefixed with zero if it is single digit and then appended to patch version number. Task-number: QTBUG-13147 Reviewed-by: Janne Koskinen --- qmake/generators/symbian/symbiancommon.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/qmake/generators/symbian/symbiancommon.cpp b/qmake/generators/symbian/symbiancommon.cpp index d124b02..155dbc9 100644 --- a/qmake/generators/symbian/symbiancommon.cpp +++ b/qmake/generators/symbian/symbiancommon.cpp @@ -275,6 +275,20 @@ void SymbianCommonGenerator::generatePkgFile(const QString &iconFile, bool epocB if (success) applicationVersion = QString("%1,%2,%3").arg(major).arg(minor).arg(patch); + // Append package build version number if it is set + QString pkgBuildVersion = project->first("DEPLOYMENT.pkg_build_version"); + if (!pkgBuildVersion.isEmpty()) { + success = false; + uint build = pkgBuildVersion.toUInt(&success); + if (success && build < 100) { + if (pkgBuildVersion.size() == 1) + pkgBuildVersion.prepend(QLatin1Char('0')); + applicationVersion.append(pkgBuildVersion); + } else { + fprintf(stderr, "Warning: Invalid DEPLOYMENT.pkg_build_version (%s), must be a number between 0 - 99\n", qPrintable(pkgBuildVersion)); + } + } + // Package header QString sisHeader = "; SIS header: name, uid, version\n#{\"%1\"},(%2),%3\n\n"; QString visualTarget = generator->escapeFilePath(project->first("TARGET")); -- cgit v0.12