]> err.no Git - sope/commitdiff
fixed an issue with flattened installs
authorhelge <helge@e4a50df8-12e2-0310-a44c-efbce7f8a7e3>
Wed, 1 Sep 2004 14:15:02 +0000 (14:15 +0000)
committerhelge <helge@e4a50df8-12e2-0310-a44c-efbce7f8a7e3>
Wed, 1 Sep 2004 14:15:02 +0000 (14:15 +0000)
git-svn-id: http://svn.opengroupware.org/SOPE/trunk@101 e4a50df8-12e2-0310-a44c-efbce7f8a7e3

sope-appserver/NGObjWeb/ChangeLog
sope-appserver/NGObjWeb/Version
sope-appserver/NGObjWeb/WOApplication.m

index ffc8e3bc60c80e54690740666c1c8bb36e1ec3b3..d6157bcb75ad14bd394e3c067997fcec0bba5031 100644 (file)
@@ -1,5 +1,8 @@
 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!)
index b993a0d018dfd5da6197110a3e941e867de0b2ec..b06f94c6b3e4467067e134f6930c02bace639a27 100644 (file)
@@ -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
index 6f98a42ed54d880ad867ff885318bb19ab9b240d..a8433ea56fcb82031174fdc2e727fc86c993b0ef 100644 (file)
@@ -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;
     }