fixup finding tools on mingw

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@27238 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-MacDonald 2008-12-07 05:39:29 +00:00
parent 978d3ef1fb
commit bff954868b
4 changed files with 14 additions and 45 deletions

View file

@ -1,3 +1,11 @@
2008-12-07 Richard Frith-Macdonald <rfm@gnu.org>
* Source\NSSound.m:
* Source\NSWorkspace.m:
* Source\NSPasteboard.m:
Use new method to locate tool executables which handles the addition
of .exe extenstion for mingw.
2008-12-06 Wolfgang Lux <wolfgang.lux@gmail.com>
* Source/NSSavePanel.m (-_shouldShowExtension:isDir:,

View file

@ -550,6 +550,7 @@
#include <Foundation/NSTask.h>
#include <Foundation/NSTimer.h>
#include "GNUstepBase/GSCategories.h"
#include "GNUstepGUI/GSServicesManager.h"
#include "GNUstepGUI/GSPasteboardServer.h"
@ -1977,22 +1978,7 @@ static NSMapTable *mimeMap = NULL;
if (cmd == nil && recursion ==NO)
{
NSEnumerator *enumerator;
NSString *path;
NSFileManager *mgr;
mgr = [NSFileManager defaultManager];
enumerator = [NSSearchPathForDirectoriesInDomains(
GSToolsDirectory, NSAllDomainsMask, YES) objectEnumerator];
while ((path = [enumerator nextObject]) != nil)
{
path = [path stringByAppendingPathComponent: @"gpbs"];
if ([mgr isExecutableFileAtPath: path])
{
cmd = [path copy];
break;
}
}
cmd = [NSTask launchPathForTool: @"gpbs"];
}
if (recursion == YES || cmd == nil)
{

View file

@ -28,6 +28,7 @@
#include "config.h"
#include <Foundation/Foundation.h>
#include <GNUstepBase/GSCategories.h>
#include "AppKit/NSPasteboard.h"
#include "AppKit/NSSound.h"
@ -173,22 +174,7 @@ static id<GSSoundSvr> the_server = nil;
if (cmd == nil && recursion == NO)
{
NSEnumerator *enumerator;
NSString *path;
NSFileManager *mgr;
mgr = [NSFileManager defaultManager];
enumerator = [NSSearchPathForDirectoriesInDomains(
GSToolsDirectory, NSAllDomainsMask, YES) objectEnumerator];
while ((path = [enumerator nextObject]) != nil)
{
path = [path stringByAppendingPathComponent: @"gnustep_sndd"];
if ([mgr isExecutableFileAtPath: path])
{
cmd = [path copy];
break;
}
}
cmd = [NSTask launchPathForTool: @"gnustep_sndd"];
}
if (recursion == YES || cmd == nil)

View file

@ -68,6 +68,7 @@
#include "AppKit/NSPanel.h"
#include "AppKit/NSWindow.h"
#include "AppKit/NSScreen.h"
#include "GNUstepBase/GSCategories.h"
#include "GNUstepGUI/GSServicesManager.h"
#include "GNUstepGUI/GSDisplayServer.h"
@ -1273,19 +1274,7 @@ inFileViewerRootedAtPath: (NSString*)rootFullpath
*/
if (path == nil)
{
NSEnumerator *enumerator;
enumerator = [NSSearchPathForDirectoriesInDomains(
GSToolsDirectory, NSAllDomainsMask, YES) objectEnumerator];
while ((path = [enumerator nextObject]) != nil)
{
path = [path stringByAppendingPathComponent: @"make_services"];
if ([mgr isExecutableFileAtPath: path])
{
[path retain];
break;
}
}
path = [NSTask launchPathForTool: @"make_services"];
}
task = [NSTask launchedTaskWithLaunchPath: path
arguments: nil];