From bc3c9ed2c7a65f976138584298085f79ed85d255 Mon Sep 17 00:00:00 2001 From: Miikka Heikkinen Date: Mon, 21 Jun 2010 17:27:55 +0300 Subject: 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 --- .../symbian/initprojectdeploy_symbian.cpp | 53 ++++++++++++---------- 1 file 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 #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()))); } } -- cgit v0.12 From c2f0e79f36ddd9c157ee795825c862687957941d Mon Sep 17 00:00:00 2001 From: Miikka Heikkinen Date: Tue, 22 Jun 2010 12:54:18 +0300 Subject: Moved QT_PLUGINS_BASE_DIR and QT_IMPORTS_BASE_DIR to symbian.conf These definitions are not platform dependent as they must be exactly what configure sets for plugins and imports paths, so moved them out of data_caging_paths.prf into symbian.conf. Task-number: QTBUG-11619 Reviewed-by: axis --- mkspecs/common/symbian/symbian.conf | 5 +++++ mkspecs/features/symbian/data_caging_paths.prf | 2 -- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/mkspecs/common/symbian/symbian.conf b/mkspecs/common/symbian/symbian.conf index b037d3c..baa519f 100644 --- a/mkspecs/common/symbian/symbian.conf +++ b/mkspecs/common/symbian/symbian.conf @@ -110,6 +110,11 @@ QMAKE_TAR = tar -cf QMAKE_GZIP = gzip -9f QT_ARCH = symbian + +# These directories must match what configure uses for QT_INSTALL_PLUGINS and QT_INSTALL_IMPORTS +QT_PLUGINS_BASE_DIR = /resource/qt$${QT_LIBINFIX}/plugins +QT_IMPORTS_BASE_DIR = /resource/qt/imports + load(qt_config) load(symbian/platform_paths) diff --git a/mkspecs/features/symbian/data_caging_paths.prf b/mkspecs/features/symbian/data_caging_paths.prf index 6b709cc..6b38d4d 100644 --- a/mkspecs/features/symbian/data_caging_paths.prf +++ b/mkspecs/features/symbian/data_caging_paths.prf @@ -74,8 +74,6 @@ exists($${EPOCROOT}epoc32/include/data_caging_paths.prf) { BOOTDATA_DIR = /resource/bootdata } -isEmpty(QT_PLUGINS_BASE_DIR): QT_PLUGINS_BASE_DIR = $$RESOURCE_FILES_DIR/qt$${QT_LIBINFIX}/plugins -isEmpty(QT_IMPORTS_BASE_DIR): QT_IMPORTS_BASE_DIR = $$RESOURCE_FILES_DIR/qt/imports isEmpty(HW_ZDIR): HW_ZDIR = epoc32/data/z isEmpty(REG_RESOURCE_DIR): REG_RESOURCE_DIR = /private/10003a3f/apps isEmpty(REG_RESOURCE_IMPORT_DIR): REG_RESOURCE_IMPORT_DIR = /private/10003a3f/import/apps \ No newline at end of file -- cgit v0.12