Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/monodevelop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarius Ungureanu <marius.ungureanu@xamarin.com>2015-10-08 18:18:49 +0300
committerMarius Ungureanu <marius.ungureanu@xamarin.com>2015-10-08 18:19:11 +0300
commit2a54fff00b559f5e906142437fd8f642309ac321 (patch)
treec49fdbb8663c520becb45ef6e3e317d683089bd4 /main/build
parenta81406eea84f5f8306eafdf6a4fe8f1eacb69ccb (diff)
[Mac] Fixup to f1d43a688234d937111f87b640aec34a87de693f
Diffstat (limited to 'main/build')
-rw-r--r--main/build/MacOSX/monostub.m17
1 files changed, 9 insertions, 8 deletions
diff --git a/main/build/MacOSX/monostub.m b/main/build/MacOSX/monostub.m
index ab8398c1e8..b412a2f767 100644
--- a/main/build/MacOSX/monostub.m
+++ b/main/build/MacOSX/monostub.m
@@ -233,7 +233,7 @@ push_env (const char *variable, const char *value)
setenv (variable, value, 1);
}
- //printf ("Updated the %s environment variable.\n", variable);
+ //printf ("Updated the %s environment variable with '%s'.\n", variable, value);
return YES;
}
@@ -314,18 +314,20 @@ update_environment (const char *contentsDir)
if ((value = str_append (contentsDir, "/MacOS"))) {
char *compat;
-
+
+ char *value2 = str_append("/Libraries/Frameworks/Mono.framework/Commands:", value);
+
// Note: older versions of Xamarin Studio incorrectly set the PATH to the Resources dir instead of the MacOS dir
// and older versions of mtouch relied on this broken behavior.
if ((compat = str_append (contentsDir, "/Resources"))) {
size_t compatlen = strlen (compat);
- size_t valuelen = strlen (value);
+ size_t valuelen = strlen (value2);
char *combined;
if ((combined = malloc (compatlen + valuelen + 2))) {
memcpy (combined, compat, compatlen);
combined[compatlen] = ':';
- strcpy (combined + compatlen + 1, value);
+ strcpy (combined + compatlen + 1, value2);
if (push_env ("PATH", combined))
updated = YES;
@@ -339,15 +341,14 @@ update_environment (const char *contentsDir)
free (compat);
} else {
- if (push_env ("PATH", value))
+ if (push_env ("PATH", value2))
updated = YES;
}
-
+
free (value);
+ free (value2);
}
- if (push_env ("PATH", "/Library/Frameworks/Mono.framework/Commands"))
- updated = YES;
return updated;
}