From: helge Date: Wed, 1 Sep 2004 14:15:02 +0000 (+0000) Subject: fixed an issue with flattened installs X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=350bf70468d7ce2cc030ba914df7e1559f06203b;p=sope fixed an issue with flattened installs git-svn-id: http://svn.opengroupware.org/SOPE/trunk@101 e4a50df8-12e2-0310-a44c-efbce7f8a7e3 --- diff --git a/sope-appserver/NGObjWeb/ChangeLog b/sope-appserver/NGObjWeb/ChangeLog index ffc8e3bc..d6157bcb 100644 --- a/sope-appserver/NGObjWeb/ChangeLog +++ b/sope-appserver/NGObjWeb/ChangeLog @@ -1,5 +1,8 @@ 2004-09-01 Helge Hess + * 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!) diff --git a/sope-appserver/NGObjWeb/Version b/sope-appserver/NGObjWeb/Version index b993a0d0..b06f94c6 100644 --- a/sope-appserver/NGObjWeb/Version +++ b/sope-appserver/NGObjWeb/Version @@ -1,6 +1,6 @@ # version file -SUBMINOR_VERSION:=22 +SUBMINOR_VERSION:=23 # v4.2.413 requires libSaxObjC v4.2.33 # v4.2.341 requires libNGExtensions v4.2.77 diff --git a/sope-appserver/NGObjWeb/WOApplication.m b/sope-appserver/NGObjWeb/WOApplication.m index 6f98a42e..a8433ea5 100644 --- a/sope-appserver/NGObjWeb/WOApplication.m +++ b/sope-appserver/NGObjWeb/WOApplication.m @@ -167,14 +167,28 @@ static NSString *rapidTurnAroundPath = nil; 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; }