ios: ensure that the private dependencies are resolved by dyld

Change-Id: I36f493dc83a906fb2291b156488531cfff633d4a
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
This commit is contained in:
Fawzi Mohamed
2013-11-29 01:20:00 +01:00
parent 9cb4b52ed4
commit d5a8adc156

View File

@@ -42,6 +42,7 @@
#include <QList> #include <QList>
#include <QScopedArrayPointer> #include <QScopedArrayPointer>
#include <QProcessEnvironment> #include <QProcessEnvironment>
#include <QFileInfo>
#include <string.h> #include <string.h>
#include <errno.h> #include <errno.h>
@@ -203,6 +204,12 @@ IosToolHandlerPrivate::IosToolHandlerPrivate(IosToolHandler::DeviceType devType,
foreach (const QString &k, env.keys()) foreach (const QString &k, env.keys())
if (k.startsWith(QLatin1String("DYLD_"))) if (k.startsWith(QLatin1String("DYLD_")))
env.remove(k); env.remove(k);
QString xcPath = IosConfigurations::developerPath().appendPath(QLatin1String("../OtherFrameworks")).toFileInfo().canonicalFilePath();
env.insert(QLatin1String("DYLD_FALLBACK_FRAMEWORK_PATH"),
xcPath.isEmpty() ?
QLatin1String("/System/Library/PrivateFrameworks")
: (xcPath + QLatin1String(":/System/Library/PrivateFrameworks")));
process.setProcessEnvironment(env); process.setProcessEnvironment(env);
QObject::connect(&process, SIGNAL(readyReadStandardOutput()), q, SLOT(subprocessHasData())); QObject::connect(&process, SIGNAL(readyReadStandardOutput()), q, SLOT(subprocessHasData()));
QObject::connect(&process, SIGNAL(finished(int,QProcess::ExitStatus)), QObject::connect(&process, SIGNAL(finished(int,QProcess::ExitStatus)),