From bb5cba5dcc3f3453ccbfea2667adc3a12c4ba92b Mon Sep 17 00:00:00 2001 From: Jaakko Helanti Date: Mon, 16 Jan 2012 12:48:39 +0200 Subject: Symbian: qmake: Fix emulator deployment destinations MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This fix affects how qmake generates "bld.inf" file. Earlier, all emulator deployments went to epoc32/winscw/c, which is the C-drive of the emulator. However, emulator implementation expects often to find deployments from epoc32/release/winscw/udeb/z, which is the ROM drive of the emulator. For this reason many things, including QML deployments, did not work in the emulator. Now the fixed deployment is as follows: - If pro-file deployment has no path value, it goes to emulator ROM drive. - If pro-file deployment has path variable with no drive letter, it goes to emulator ROM drive. - If pro-file deployment has path variable with drive letter, it goes to the given emulator drive. - If pro-file deployment has path variable with '!' as drive letter, it goes to emulator C drive. When making emulator ROM-drive deployment, two deployments are made, one to udeb and one to urel emulator. Task-number: ou1cimx1#954237 Change-Id: I62d3f5b479ee0c0c547e824bb45ae8c0a6484d87 Reviewed-by: Jaakko Helanti Reviewed-by: Pasi Pentikäinen --- .../generators/symbian/initprojectdeploy_symbian.cpp | 19 ++++++++++++++----- qmake/generators/symbian/symmake_sbsv2.cpp | 15 +++++++++++++-- 2 files changed, 27 insertions(+), 7 deletions(-) (limited to 'qmake/generators') diff --git a/qmake/generators/symbian/initprojectdeploy_symbian.cpp b/qmake/generators/symbian/initprojectdeploy_symbian.cpp index 36e5610faf..5d1b2c1a41 100644 --- a/qmake/generators/symbian/initprojectdeploy_symbian.cpp +++ b/qmake/generators/symbian/initprojectdeploy_symbian.cpp @@ -223,12 +223,21 @@ void initProjectDeploySymbian(QMakeProject* project, } else { if (0 == platform.compare(QLatin1String(EMULATOR_DEPLOYMENT_PLATFORM))) { if (devicePathHasDriveLetter) { - if (devicePath.startsWith("!")) - devicePath = qt_epocRoot() + "epoc32/winscw/c" + devicePath.remove(0, 2); - else - devicePath = qt_epocRoot() + "epoc32/winscw/" + devicePath.remove(1, 1); + if (devicePath.startsWith("z", Qt::CaseInsensitive)) { + devicePath = qt_epocRoot() + "epoc32/release/winscw/" + build + "/z" + devicePath.remove(0, 2); + } else { + // Do not create deployment for urel target. Otherwise we would be generating two + // identical deployments for paths with drive letter other than Z. + if (0 == build.compare(QLatin1String("urel"), Qt::CaseInsensitive)) + continue; + if (devicePath.startsWith("!")) + devicePath = qt_epocRoot() + "epoc32/winscw/c" + devicePath.remove(0, 2); + else + devicePath = qt_epocRoot() + "epoc32/winscw/" + devicePath.remove(1, 1); + } } else { - devicePath = qt_epocRoot() + "epoc32/winscw/c" + devicePath; + // If no device path drive letter, deploy to "emulator ROM drive" + devicePath = qt_epocRoot() + "epoc32/release/winscw/" + build + "/z" + devicePath; } } else { if (devicePathHasDriveLetter diff --git a/qmake/generators/symbian/symmake_sbsv2.cpp b/qmake/generators/symbian/symmake_sbsv2.cpp index ffb386a5f5..d4ccd847ff 100644 --- a/qmake/generators/symbian/symmake_sbsv2.cpp +++ b/qmake/generators/symbian/symmake_sbsv2.cpp @@ -687,13 +687,24 @@ void SymbianSbsv2MakefileGenerator::writeBldInfExtensionRulesPart(QTextStream& t t << endl; // Write deployment rules - QString remoteTestPath = qt_epocRoot() + QLatin1String("epoc32/winscw/c/private/") + privateDirUid; + QString remoteTestPath = qt_epocRoot() + + QLatin1String("epoc32/release/winscw/udeb/z/private/") + privateDirUid; DeploymentList depList; //write emulator deployment + // There are deployment targets for both uded and urel emulators. t << "#if defined(WINSCW)" << endl; initProjectDeploySymbian(project, depList, remoteTestPath, false, true, - QLatin1String(EMULATOR_DEPLOYMENT_PLATFORM), QString(), generatedDirs, generatedFiles); + QLatin1String(EMULATOR_DEPLOYMENT_PLATFORM), QLatin1String(BUILD_DEBUG), + generatedDirs, generatedFiles); + writeSbsDeploymentList(depList, t); + + depList.clear(); + remoteTestPath = qt_epocRoot() + + QLatin1String("epoc32/release/winscw/urel/z/private/") + privateDirUid; + initProjectDeploySymbian(project, depList, remoteTestPath, false, true, + QLatin1String(EMULATOR_DEPLOYMENT_PLATFORM), QLatin1String(BUILD_RELEASE), + generatedDirs, generatedFiles); writeSbsDeploymentList(depList, t); t << "#endif" << endl; -- cgit v1.2.3