Android: Fix in source builds with Qt 5.2

Now the build directory is by default android-build, so by default the
source and build directory don't clash anymore.

Task-number: QTCREATORBUG-10661
Change-Id: I054bd3790f9bc9720536aac301bee192cb9f0429
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
This commit is contained in:
Daniel Teske
2013-11-06 13:06:10 +01:00
parent f788b7c9fd
commit ae55018548
4 changed files with 7 additions and 3 deletions

View File

@@ -65,6 +65,8 @@ const char ANDROID_DEVICE_ID[] = "Android Device";
const char ANDROID_MANIFEST_MIME_TYPE[] = "application/vnd.google.android.android_manifest";
const char ANDROID_MANIFEST_EDITOR_ID[] = "Android.AndroidManifestEditor.Id";
const char ANDROID_MANIFEST_EDITOR_CONTEXT[] = "Android.AndroidManifestEditor.Id";
const char ANDROID_BUILDDIRECTORY[] = "android-build";
} // namespace Constants;
} // namespace Android

View File

@@ -34,6 +34,7 @@
#include "javaparser.h"
#include "androidmanager.h"
#include "androidconstants.h"
#include <utils/qtcassert.h>
#include <utils/qtcprocess.h>
@@ -232,7 +233,7 @@ bool AndroidDeployQtStep::init()
else if (m_deployAction == BundleLibrariesDeployment)
deploymentMethod = QLatin1String("bundled");
QString outputDir = bc->buildDirectory().appendPath(QLatin1String("android")).toString();
QString outputDir = bc->buildDirectory().appendPath(QLatin1String(Constants::ANDROID_BUILDDIRECTORY)).toString();
QStringList arguments;
arguments << QLatin1String("--input")

View File

@@ -272,7 +272,7 @@ Utils::FileName AndroidManager::dirPath(ProjectExplorer::Target *target)
{
QtSupport::BaseQtVersion *qtVersion = QtSupport::QtKitInformation::qtVersion(target->kit());
if (qtVersion && qtVersion->qtVersion() >= QtSupport::QtVersionNumber(5, 2, 0))
return target->activeBuildConfiguration()->buildDirectory().appendPath(AndroidDirName);
return target->activeBuildConfiguration()->buildDirectory().appendPath(QLatin1String(Constants::ANDROID_BUILDDIRECTORY));
return Utils::FileName::fromString(target->project()->projectDirectory()).appendPath(AndroidDirName);
}

View File

@@ -29,6 +29,7 @@
#include "androidpackageinstallationstep.h"
#include "androidmanager.h"
#include "androidconstants.h"
#include <projectexplorer/buildsteplist.h>
#include <projectexplorer/target.h>
@@ -69,7 +70,7 @@ bool AndroidPackageInstallationStep::init()
if (m_androidDirectory == ProjectDirectory)
dirPath = AndroidManager::dirPath(target()).toString();
else
dirPath = bc->buildDirectory().appendPath((QLatin1String("android"))).toString();
dirPath = bc->buildDirectory().appendPath(QLatin1String(Constants::ANDROID_BUILDDIRECTORY)).toString();
if (Utils::HostOsInfo::isWindowsHost())
if (bc->environment().searchInPath(QLatin1String("sh.exe")).isEmpty())
dirPath = QDir::toNativeSeparators(dirPath);