improve locating of framework directories on windows

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@27214 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-MacDonald 2008-12-05 17:45:02 +00:00
parent 596ca63360
commit f794a4cb3c
2 changed files with 17 additions and 1 deletions

View file

@ -10,6 +10,8 @@
* Source/NSBundle.m: ([bundleForLibrary:version:]) extract version
from end of library name if possible.
([_addFrameworkFromClass:]) find the framework directory from path to
the dll on windows.
2008-12-04 Richard Frith-Macdonald <rfm@gnu.org>

View file

@ -595,8 +595,22 @@ _find_main_bundle_for_tool(NSString *toolName)
{
bundlePath = [bundlePath stringByDeletingLastPathComponent];
}
#if defined(__MINGW32__)
/* On windows, the library (dll) is in the Tools area rather than
* in the framework, so we can adjust the path here.
*/
if ([[bundlePath lastPathComponent] isEqual: @"Tools"])
{
bundlePath = [bundlePath stringByDeletingLastPathComponent];
bundlePath
= [bundlePath stringByAppendingPathComponent: @"Library"];
bundlePath
= [bundlePath stringByAppendingPathComponent: @"Frameworks"];
bundlePath = [bundlePath stringByAppendingPathComponent:
[NSString stringWithFormat: @"%@%@", name, @".framework"]];
}
#else
/* There are no Versions on MinGW. Skip the Versions check here. */
#if !defined(__MINGW32__)
/* version name */
bundlePath = [bundlePath stringByDeletingLastPathComponent];