mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-31 16:50:58 +00:00
Find library bundles for debug/profile library
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@22867 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
3ed6c038e2
commit
c97d508d8e
2 changed files with 23 additions and 10 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2006-05-07 Richard Frith-Macdonald <rfm@gnu.org>
|
||||||
|
|
||||||
|
* Source/NSBundle.m: ignore profile/debug extensions in library name
|
||||||
|
when looking for library bundles.
|
||||||
|
|
||||||
2006-05-06 Fred Kiefer <FredKiefer@gmx.de>
|
2006-05-06 Fred Kiefer <FredKiefer@gmx.de>
|
||||||
|
|
||||||
* Resources/Languages/Esperanto: New language file.
|
* Resources/Languages/Esperanto: New language file.
|
||||||
|
|
|
@ -1039,16 +1039,6 @@ _bundle_load_callback(Class theClass, struct objc_category *theCategory)
|
||||||
{
|
{
|
||||||
lib = nil; // In program, not library.
|
lib = nil; // In program, not library.
|
||||||
}
|
}
|
||||||
lib = [lib lastPathComponent];
|
|
||||||
do
|
|
||||||
{
|
|
||||||
lib = [lib stringByDeletingPathExtension];
|
|
||||||
}
|
|
||||||
while ([[lib pathExtension] length] > 0);
|
|
||||||
if ([lib hasPrefix: @"lib"] == YES)
|
|
||||||
{
|
|
||||||
lib = [lib substringFromIndex: 3];
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Get the library bundle ... if there wasn't one
|
* Get the library bundle ... if there wasn't one
|
||||||
|
@ -2020,12 +2010,30 @@ _bundle_load_callback(Class theClass, struct objc_category *theCategory)
|
||||||
NSString *tail;
|
NSString *tail;
|
||||||
NSFileManager *fm = [NSFileManager defaultManager];
|
NSFileManager *fm = [NSFileManager defaultManager];
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Eliminate any base path or extensions.
|
||||||
|
*/
|
||||||
libraryName = [libraryName lastPathComponent];
|
libraryName = [libraryName lastPathComponent];
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
libraryName = [libraryName stringByDeletingPathExtension];
|
libraryName = [libraryName stringByDeletingPathExtension];
|
||||||
}
|
}
|
||||||
while ([[libraryName pathExtension] length] > 0);
|
while ([[libraryName pathExtension] length] > 0);
|
||||||
|
/*
|
||||||
|
* Discard leading 'lib'
|
||||||
|
*/
|
||||||
|
if ([libraryName hasPrefix: @"lib"] == YES)
|
||||||
|
{
|
||||||
|
libraryName = [libraryName substringFromIndex: 3];
|
||||||
|
}
|
||||||
|
/*
|
||||||
|
* Discard debug/profile library suffix
|
||||||
|
*/
|
||||||
|
if ([libraryName hasSuffix: @"_d"] == YES
|
||||||
|
|| [libraryName hasSuffix: @"_p"] == YES)
|
||||||
|
{
|
||||||
|
libraryName = [libraryName substringToIndex: [libraryName length] - 3];
|
||||||
|
}
|
||||||
|
|
||||||
if ([libraryName length] == 0)
|
if ([libraryName length] == 0)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue