From a712f47e19d0ea9a9452cd5a021443e6df1874b1 Mon Sep 17 00:00:00 2001 From: rfm Date: Mon, 13 Jan 2014 15:38:51 +0000 Subject: [PATCH] log message if developer directory not found git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@37595 72102866-910b-0410-8b05-ffd578937521 --- Source/NSPathUtilities.m | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/Source/NSPathUtilities.m b/Source/NSPathUtilities.m index f468bd3d4..dfd673e71 100644 --- a/Source/NSPathUtilities.m +++ b/Source/NSPathUtilities.m @@ -2294,6 +2294,8 @@ if (domainMask & mask) \ if (nil == root) { NSString *path = nil; + NSString *bpath = nil; + NSString *ipath = nil; NSFileManager *mgr; mgr = [NSFileManager defaultManager]; @@ -2307,8 +2309,11 @@ if (domainMask & mask) \ */ if (nil == path) { - path = devroot(mgr, - [[NSBundle bundleForLibrary: @"gnustep-base"] bundlePath]); + NSBundle *baseBundle; + + baseBundle = [NSBundle bundleForLibrary: @"gnustep-base"]; + bpath = [baseBundle bundlePath]; + path = devroot(mgr, bpath); } /* If we havent found the developer area relative to the @@ -2353,14 +2358,25 @@ L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\App Paths\\GNUstep", if (ERROR_SUCCESS == RegQueryValueExW(regKey, 0, 0, &type, (BYTE *)buf, &bufsize)) { - path = [NSString stringWithCharacters: buf + ipath = [NSString stringWithCharacters: buf length: wcslen(buf)]; - path = devroot(mgr, path); + path = devroot(mgr, ipath); } RegCloseKey(regKey); } } ASSIGNCOPY(root, path); + if (nil == root) + { + if (nil == ipath) + { + NSLog(@"Failed to locate NSDeveloperDirectory above system tools at %@, or base library at %@, and failed to find any installed GNUstep package.", gnustepSystemTools, bpath); + } + else + { + NSLog(@"Failed to locate NSDeveloperDirectory above system tools at %@, or base library at %@, or installed package at %@", gnustepSystemTools, bpath, ipath); + } + } } #endif if (nil == root)