Commit 536944a3 authored by Jake Petroules's avatar Jake Petroules

Qbs: fix run environment to behave correctly like `qbs run`.

This allows Qbs to correctly set DYLD_LIBRARY_PATH and
DYLD_FRAMEWORK_PATH for OS X and iOS platforms.

Change-Id: I9d3093bc0b4a377f08e8cc737139d02a2158c4ea
Reviewed-by: default avatarChristian Kandeler <christian.kandeler@digia.com>
parent 631ee70c
......@@ -318,9 +318,12 @@ void QbsRunConfiguration::addToBaseEnvironment(Utils::Environment &env) const
if (project) {
const qbs::ProductData product = findProduct(project->qbsProjectData(), m_uniqueProductName);
if (product.isValid()) {
QProcessEnvironment procEnv = env.toProcessEnvironment();
procEnv.insert(QLatin1String("QBS_INSTALL_ROOT"), installRoot());
procEnv.insert(QLatin1String("QBS_RUN_FILE_PATH"), executable());
qbs::RunEnvironment qbsRunEnv = project->qbsProject().getRunEnvironment(product, installOptions(),
env.toProcessEnvironment(), QbsManager::settings());
QProcessEnvironment procEnv = qbsRunEnv.runEnvironment();
procEnv, QbsManager::settings());
procEnv = qbsRunEnv.runEnvironment();
if (!procEnv.isEmpty()) {
env = Utils::Environment();
foreach (const QString &key, procEnv.keys())
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment