2004-09-01 Helge Hess <helge.hess@skyrix.com>
+ * WOApplication.m: added a fix to find the appwrapper in flattened
+ environments (v4.3.23)
+
* WOCoreApplication.m: search for libNGObjWeb resources in
Library/Libraries for compatibility with gstep-make 1.9.2 (Note:
this version does _not_ work with the old gstep-make fork anymore!)
result = [result stringByAppendingPathComponent:wrapperName];
if (![fm fileExistsAtPath:result]) {
/* lookup in process-path */
- NSString *ppath;
+ NSProcessInfo *pi;
+ NSDictionary *env;
+ NSString *ppath;
+ BOOL isFlattened;
- ppath = [[[NSProcessInfo processInfo] arguments] objectAtIndex:0];
+ pi = [NSProcessInfo processInfo];
+ env = [pi environment];
+ if ([env objectForKey:@"GNUSTEP_SYSTEM_ROOT"] != nil) {
+ isFlattened = [[[env objectForKey:@"GNUSTEP_FLATTENED"]
+ lowercaseString] isEqualToString:@"yes"];
+ }
+ else /* default to flattened if no GNUstep runtime is set */
+ isFlattened = YES;
+
+ ppath = [[pi arguments] objectAtIndex:0];
ppath = [ppath stringByDeletingLastPathComponent]; // del exe-name
- ppath = [ppath stringByDeletingLastPathComponent]; // lib-combo
- ppath = [ppath stringByDeletingLastPathComponent]; // os
- ppath = [ppath stringByDeletingLastPathComponent]; // cpu
-
+
+ if (!isFlattened) {
+ ppath = [ppath stringByDeletingLastPathComponent]; // lib-combo
+ ppath = [ppath stringByDeletingLastPathComponent]; // os
+ ppath = [ppath stringByDeletingLastPathComponent]; // cpu
+ }
if ([ppath hasSuffix:suffix])
result = ppath;
}