diff --git a/ChangeLog b/ChangeLog index 78439db..7f2f2b3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,20 @@ -2009-09-15 Richard frith-Macdonald +2009-09-17 Nicola Pero + + * Framework/PCMakefileFactory.m ([-createMakefileForProject:]): If + GNUSTEP_INSTALLATION_DOMAIN is not set, output a commented out + GNUSTEP_INSTALLATION_DOMAIN line so that the default is used but + people will still find out that the option exists if they look at + the file. + +2009-09-17 Nicola Pero + + Old patch from Markus Hitter , updated to the + current code: + * Framework/PCProjectManager.m ([-openProjectAt:makeActive:]): Pop + up a warning panel if the project path includes a whitespace. + ([-newProject]): Same change. + +2009-09-15 Richard frith-Macdonald * Framework/PCMakefileFactory.m: generate makefiles with standard preamble to determine GNUSTEP_MAKEFILES if possible, and warn if diff --git a/Framework/PCMakefileFactory.m b/Framework/PCMakefileFactory.m index 84633cd..544746c 100644 --- a/Framework/PCMakefileFactory.m +++ b/Framework/PCMakefileFactory.m @@ -101,8 +101,15 @@ static PCMakefileFactory *_factory = nil; } else if ([instDir isEqualToString: @""]) { + /* This should not be specified; gnustep-make will use the + * default - normally, but not necessarily, LOCAL. + * We output a commented line here so that people looking + * at the file will know that this option exists, and + * if they want to change it, will search for it in + * ProjectCenter. + */ [mfile appendString: - [NSString stringWithFormat: @"\nGNUSTEP_INSTALLATION_DOMAIN = LOCAL\n", + [NSString stringWithFormat: @"\n# GNUSTEP_INSTALLATION_DOMAIN = LOCAL\n", instDir]]; } diff --git a/Framework/PCProjectManager.m b/Framework/PCProjectManager.m index 9e68d9c..507a7ef 100644 --- a/Framework/PCProjectManager.m +++ b/Framework/PCProjectManager.m @@ -558,6 +558,21 @@ NSString *PCActiveProjectDidChangeNotification = @"PCActiveProjectDidChange"; return nil; } + if ([aPath rangeOfString: @" "] != NSNotFound || + [aPath rangeOfString: @"\t"] != NSNotFound || + [aPath rangeOfString: @"\r"] != NSNotFound || + [aPath rangeOfString: @"\n"] != NSNotFound) + { + if (NSRunAlertPanel + (@"Open Project", + @"Are you sure you want to open a project with whitespace in it's path?\n" + @"GNUstep's build environment currently can't handle that reliably.", + @"OK", @"Cancel", nil) != NSAlertDefaultReturn) + { + return nil; + } + } + if (!isDir) { projectFile = [NSMutableDictionary dictionaryWithContentsOfFile: aPath]; @@ -744,6 +759,21 @@ NSString *PCActiveProjectDidChangeNotification = @"PCActiveProjectDidChange"; filePath = [files objectAtIndex:0]; if (filePath != nil) { + if ([filePath rangeOfString: @" "] != NSNotFound || + [filePath rangeOfString: @"\t"] != NSNotFound || + [filePath rangeOfString: @"\r"] != NSNotFound || + [filePath rangeOfString: @"\n"] != NSNotFound) + { + if (NSRunAlertPanel + (@"New Project", + @"Are you sure you want to create a project with whitespace in it's path?\n" + @"GNUstep's build environment currently can't handle that reliably.", + @"OK", @"Cancel", nil) != NSAlertDefaultReturn) + { + return; + } + } + projectType = [projectTypePopup titleOfSelectedItem]; if (!(project = [self createProjectOfType:projectType path:filePath]))