diff options
author | Jeffrey Stedfast <jeff@xamarin.com> | 2014-10-30 00:01:15 +0300 |
---|---|---|
committer | Jeffrey Stedfast <jeff@xamarin.com> | 2014-10-30 00:01:15 +0300 |
commit | 360efa38f8a2ab2aa403e575c81b309b90d9daed (patch) | |
tree | c69910cfdcaa6d7d0b1edd59351fe7afdc02c82b /main/build | |
parent | 4d96db1b42893fd2e356c4a5da1462359197a07d (diff) |
[MacOSX] Fixed recursion and removed debug printf's
Diffstat (limited to 'main/build')
-rw-r--r-- | main/build/MacOSX/monostub.m | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/main/build/MacOSX/monostub.m b/main/build/MacOSX/monostub.m index 7e1dca8d16..96f39c2ab8 100644 --- a/main/build/MacOSX/monostub.m +++ b/main/build/MacOSX/monostub.m @@ -232,6 +232,8 @@ push_env (const char *variable, const char *value) } else { setenv (variable, value, 1); } + + //printf ("Updated the %s environment variable.\n", variable); return YES; } @@ -258,20 +260,17 @@ update_environment (const char *contentsDir) bool updated = NO; char *value; - /* CommandLineTools are needed for OSX 10.9+ */ - if (push_env ("DYLD_FALLBACK_LIBRARY_PATH", "/Library/Frameworks/Mono.framework/Versions/Current/lib:/lib:/usr/lib:/Library/Developer/CommandLineTools/usr/lib:/usr/local/lib")) - updated = YES; - - /* Enable the use of stuff bundled into the app bundle and the Mono "External" directory */ - if ((value = str_append (contentsDir, "/Resources/lib/pkgconfig:/Library/Frameworks/Mono.framework/External/pkgconfig"))) { - if (push_env ("PKG_CONFIG_PATH", value)) + /* Inject our Resources/lib dir, Mono's lib dir, and CommandLineTool's lib dir into the DYLD_FALLBACK_LIBRARY_PATH */ + if ((value = str_append (contentsDir, "/Resources/lib:/Library/Frameworks/Mono.framework/Versions/Current/lib:/lib:/usr/lib:/Library/Developer/CommandLineTools/usr/lib:/usr/local/lib"))) { + if (push_env ("DYLD_FALLBACK_LIBRARY_PATH", value)) updated = YES; free (value); } - if ((value = str_append (contentsDir, "/Resources/lib"))) { - if (push_env ("DYLD_FALLBACK_LIBRARY_PATH", value)) + /* Enable the use of stuff bundled into the app bundle and the Mono "External" directory */ + if ((value = str_append (contentsDir, "/Resources/lib/pkgconfig:/Library/Frameworks/Mono.framework/External/pkgconfig"))) { + if (push_env ("PKG_CONFIG_PATH", value)) updated = YES; free (value); @@ -382,13 +381,13 @@ int main (int argc, char **argv) basename++; if (update_environment ([[appDir stringByAppendingPathComponent:@"Contents"] UTF8String])) { - printf ("Updated the environment.\n"); + //printf ("Updated the environment.\n"); [pool drain]; return execv (argv[0], argv); } - printf ("Running main app.\n"); + //printf ("Running main app.\n"); if (getrlimit (RLIMIT_NOFILE, &limit) == 0 && limit.rlim_cur < 1024) { limit.rlim_cur = MIN (limit.rlim_max, 1024); |