summaryrefslogtreecommitdiffstats
path: root/qmake/generators
diff options
context:
space:
mode:
authorMiikka Heikkinen <miikka.heikkinen@digia.com>2010-06-21 14:27:55 (GMT)
committerMiikka Heikkinen <miikka.heikkinen@digia.com>2010-06-22 08:00:15 (GMT)
commitbc3c9ed2c7a65f976138584298085f79ed85d255 (patch)
treea692647522ac6ac327d3ffa1f2f63cf8cd2975d7 /qmake/generators
parent7f3d9a76e9d956d9e7e4398ac20785070e214958 (diff)
downloadQt-bc3c9ed2c7a65f976138584298085f79ed85d255.zip
Qt-bc3c9ed2c7a65f976138584298085f79ed85d255.tar.gz
Qt-bc3c9ed2c7a65f976138584298085f79ed85d255.tar.bz2
Fix precompiled binary deployment
Precompiled binaries were not copied under /epoc32/data/z to support deployment properly. Task-number: QTBUG-11519 Reviewed-by: Janne Koskinen
Diffstat (limited to 'qmake/generators')
-rw-r--r--qmake/generators/symbian/initprojectdeploy_symbian.cpp53
1 files changed, 28 insertions, 25 deletions
diff --git a/qmake/generators/symbian/initprojectdeploy_symbian.cpp b/qmake/generators/symbian/initprojectdeploy_symbian.cpp
index 4552185..2750ecb 100644
--- a/qmake/generators/symbian/initprojectdeploy_symbian.cpp
+++ b/qmake/generators/symbian/initprojectdeploy_symbian.cpp
@@ -50,6 +50,7 @@
#include <symbian/epocroot.h>
#define SYSBIN_DIR "/sys/bin"
+#define HW_Z_DIR "epoc32/data/z"
#define SUFFIX_DLL "dll"
#define SUFFIX_EXE "exe"
@@ -65,10 +66,11 @@ static bool isPlugin(const QFileInfo& info, const QString& devicePath)
{
// Libraries are plugins if deployment path is something else than
// SYSBIN_DIR with or without drive letter
- if (0 == info.suffix().compare(QLatin1String(SUFFIX_DLL), Qt::CaseInsensitive) &&
- (devicePath.size() < 8 ||
- (0 != devicePath.compare(QLatin1String(SYSBIN_DIR), Qt::CaseInsensitive) &&
- 0 != devicePath.mid(1).compare(QLatin1String(":" SYSBIN_DIR), Qt::CaseInsensitive)))) {
+ if (0 == info.suffix().compare(QLatin1String(SUFFIX_DLL), Qt::CaseInsensitive)
+ && (devicePath.size() < 8
+ || (0 != devicePath.compare(QLatin1String(SYSBIN_DIR), Qt::CaseInsensitive)
+ && 0 != devicePath.mid(1).compare(QLatin1String(":" SYSBIN_DIR), Qt::CaseInsensitive)
+ && 0 != devicePath.compare(epocRoot() + QLatin1String(HW_Z_DIR SYSBIN_DIR))))) {
return true;
} else {
return false;
@@ -172,7 +174,13 @@ void initProjectDeploySymbian(QMakeProject* project,
if (targetPath.size() > 1) {
targetPathHasDriveLetter = targetPath.at(1) == QLatin1Char(':');
}
- QString deploymentDrive = targetPathHasDriveLetter ? targetPath.left(2) : QLatin1String("c:");
+
+ QString deploymentDrive;
+ if (0 == platform.compare(QLatin1String(ROM_DEPLOYMENT_PLATFORM))) {
+ deploymentDrive = epocRoot() + HW_Z_DIR;
+ } else {
+ deploymentDrive = targetPathHasDriveLetter ? targetPath.left(2) : QLatin1String("c:");
+ }
foreach(QString item, project->values("DEPLOYMENT")) {
QString devicePath = project->first(item + ".path");
@@ -209,35 +217,29 @@ void initProjectDeploySymbian(QMakeProject* project,
// Create output path
devicePath = Option::fixPathToLocalOS(QDir::cleanPath(targetPath + QLatin1Char('/') + devicePath));
} else {
- if (!platform.compare(QLatin1String(EMULATOR_DEPLOYMENT_PLATFORM))) {
+ if (0 == platform.compare(QLatin1String(EMULATOR_DEPLOYMENT_PLATFORM))) {
if (devicePathHasDriveLetter) {
devicePath = epocRoot() + "epoc32/winscw/" + devicePath.remove(1, 1);
} else {
devicePath = epocRoot() + "epoc32/winscw/c" + devicePath;
}
} else {
- if (!devicePathHasDriveLetter) {
- if (!platform.compare(QLatin1String(ROM_DEPLOYMENT_PLATFORM))) {
- //For plugin deployment under ARM no needed drive letter
- devicePath = epocRoot() + "epoc32/data/z" + devicePath;
- } else if (targetPathHasDriveLetter) {
- // Drive letter needed if targetpath contains one and it is not already in
- devicePath = deploymentDrive + devicePath;
- }
- } else {
- //it is necessary to delete drive letter for ARM deployment
- if (!platform.compare(QLatin1String(ROM_DEPLOYMENT_PLATFORM))) {
- devicePath.remove(0,2);
- devicePath = epocRoot() + "epoc32/data/z" + devicePath;
- }
+ if (devicePathHasDriveLetter
+ && 0 == platform.compare(QLatin1String(ROM_DEPLOYMENT_PLATFORM))) {
+ devicePath.remove(0,2);
+ }
+ if (0 == platform.compare(QLatin1String(ROM_DEPLOYMENT_PLATFORM))
+ || (!devicePathHasDriveLetter && targetPathHasDriveLetter)) {
+ devicePath = deploymentDrive + devicePath;
}
}
}
devicePath.replace(QLatin1String("\\"), QLatin1String("/"));
- if (!deployBinaries &&
- 0 == devicePath.right(8).compare(QLatin1String(SYSBIN_DIR), Qt::CaseInsensitive)) {
+ if (!deployBinaries
+ && 0 == devicePath.right(8).compare(QLatin1String(SYSBIN_DIR), Qt::CaseInsensitive)
+ && 0 != platform.compare(QLatin1String(ROM_DEPLOYMENT_PLATFORM))) {
// Skip deploying to SYSBIN_DIR for anything but binary deployments
// Note: Deploying pre-built binaries also follow this rule, so emulator builds
// will not get those deployed. Since there is no way to differentiate currently
@@ -281,7 +283,7 @@ void initProjectDeploySymbian(QMakeProject* project,
deploymentList.append(CopyItem(
Option::fixPathToLocalOS(targetPath.absolutePath() + "/" + info.fileName(),
false, true),
- fixPathToEpocOS(deploymentDrive + QLatin1String(SYSBIN_DIR "/")
+ fixPathToEpocOS(deploymentDrive + QLatin1String("/" SYSBIN_DIR "/")
+ info.fileName())));
}
}
@@ -314,7 +316,8 @@ void initProjectDeploySymbian(QMakeProject* project,
if (isPlugin(iterator.fileInfo(), devicePath)) {
// This deploys pre-built plugins. Other pre-built binaries will deploy normally,
// as they have SYSBIN_DIR target path.
- if (deployBinaries) {
+ if (deployBinaries
+ || (0 == platform.compare(QLatin1String(ROM_DEPLOYMENT_PLATFORM)))) {
if (devicePathHasDriveLetter) {
deploymentList.append(CopyItem(
Option::fixPathToLocalOS(absoluteItemPath + "/" + iterator.fileName()),
@@ -323,7 +326,7 @@ void initProjectDeploySymbian(QMakeProject* project,
} else {
deploymentList.append(CopyItem(
Option::fixPathToLocalOS(absoluteItemPath + "/" + iterator.fileName()),
- fixPathToEpocOS(deploymentDrive + QLatin1String(SYSBIN_DIR "/")
+ fixPathToEpocOS(deploymentDrive + QLatin1String("/" SYSBIN_DIR "/")
+ iterator.fileName())));
}
}