discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: problem loading NSBundle in TalkSoup


From: Riccardo Mottola
Subject: Re: problem loading NSBundle in TalkSoup
Date: Sun, 15 Mar 2015 11:55:56 +0100
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:36.0) Gecko/20100101 Firefox/36.0 SeaMonkey/2.33

Hi Fred,

Fred Kiefer wrote:
The first thing I would check is the content of the Info.plists. Maybe
all these bundles look the same to GNUstep and it gets confused.

For a deeper analysis it would help to know, which TalkSoup class does
the bundle loading to start the inspection there.
The loading code (for bundles which are active in your preferences and get loaded at startup) is in:
TalkSoupBundles/TalkSoup.m

in method:
static inline id activate_bundle(NSDictionary *a, NSString *name)

at the end the code is very simple:

bundle = [NSBundle bundleWithPath: dir];
return [[[[bundle principalClass] alloc] init] autorelease];

I see that "dir" is correct, but then bundle is wrong. Not for all bundles, but for some. Empyrically I found that e.g. the bundle loaded *after* dccsupport is wrong.

The plist content might be the problem, it looks, once installed like this:

{
    CFBundleDevelopmentRegion = English;
    CFBundleExecutable = "${EXECUTABLE_NAME}";
    CFBundleIdentifier = "org.gnustep.${PRODUCT_NAME:rfc1034identifier}";
    CFBundleInfoDictionaryVersion = "6.0";
    CFBundlePackageType = BNDL;
    CFBundleShortVersionString = "1.0";
    CFBundleSignature = "????";
    CFBundleVersion = 1;
    NOTE = "Automatically generated, do not edit!";
    NSExecutable = MessageInTab;
    NSMainNibFile = "";
    NSPrincipalClass = MessageInTab;
}

all the CFBundle* stuff is "new", it appears to be merged in from the Cocoa plist. The CFBundleIdentifier is always the same. In fact, that is the problem: if I remove from the plist that line, the next loaded bundle will be the problem.
So apparently we respect that identifier if present but it can be omitted.

Each bundle has a Ignore-Info.plist in its directory which is XCode information, why do we "merge" it in? I want it to be ignored, XCode does some substitution in it before putting it in the bundle.

How does actually gnustep-make guess stuff like NSPrincipalClass?

It is thus somehow a build problem: GNUstep make tries to be smart, merges in some Mac stuff which confuses then the code at runtime.


Riccardo

PS: TalkSoup is in GAP now
http://svn.savannah.nongnu.org/viewvc/trunk/user-apps/TalkSoup/?root=gap





reply via email to

[Prev in Thread] Current Thread [Next in Thread]