aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/qtprofilesetup/templates
diff options
context:
space:
mode:
authorJake Petroules <jake.petroules@petroules.com>2014-08-22 06:32:43 -0400
committerChristian Kandeler <christian.kandeler@digia.com>2014-08-28 15:21:53 +0200
commit58f3c809ec0c7e9a9ddc87a6baf926738513bbd0 (patch)
tree8fefe0a0663445b6b02cde68819d40605f18dc8f /src/lib/qtprofilesetup/templates
parent0182ef8978c2a5dd3845630f6213e76cca3fc0d9 (diff)
Fix run environment setup.
Now Darwin platforms get the same DYLD_* environment variables set as Xcode (plus Qt) so applications can be developed/tested without embedding bundles. This brings equivalent behavior to what already exists on Windows. This also fixes a regression introduced in 5877328c4dacb1283408083cb3538ea5bc46eae5 with the Node.js module, causing the working directory to be inappropriately changed by the run command. Change-Id: Ic2904f105378eb61d9236367329a2f9c8771a7d3 Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
Diffstat (limited to 'src/lib/qtprofilesetup/templates')
-rw-r--r--src/lib/qtprofilesetup/templates/core.qbs17
1 files changed, 12 insertions, 5 deletions
diff --git a/src/lib/qtprofilesetup/templates/core.qbs b/src/lib/qtprofilesetup/templates/core.qbs
index 18b5d5eaf..aefd9c48d 100644
--- a/src/lib/qtprofilesetup/templates/core.qbs
+++ b/src/lib/qtprofilesetup/templates/core.qbs
@@ -171,12 +171,19 @@ Module {
}
setupRunEnvironment: {
+ var env;
if (qbs.targetOS.contains('windows')) {
- var v = getEnv('PATH') || '';
- if (v.length > 0 && v.charAt(0) != ';')
- v = ';' + v;
- v = FileInfo.toWindowsSeparators(binPath) + v;
- putEnv('PATH', v);
+ env = new ModUtils.EnvironmentVariable("PATH", qbs.pathListSeparator, true);
+ env.append(binPath);
+ env.set();
+ } else if (qbs.targetOS.contains("darwin")) {
+ env = new ModUtils.EnvironmentVariable("DYLD_FRAMEWORK_PATH", qbs.pathListSeparator);
+ env.append(libPath);
+ env.set();
+
+ env = new ModUtils.EnvironmentVariable("DYLD_LIBRARY_PATH", qbs.pathListSeparator);
+ env.append(libPath);
+ env.set();
}
}