Hi,
for Zipper, I was looking for an easy way to find out GNUSTEP_SYSTEM_APPS. I
know I can use
gnustep-config --variable=GNUSTEP_SYSTEM_APPS
on the command line to find that out.
Programmatically, I did the same, running it via NSTask, see the snippet at the
end.
I wonder whether there is an easier way to get the value of such a variable?
Sebastian
NSString *gnustepSystemApps;
NSTask *task;
NSPipe *pipe;
NSFileHandle *readHandle;
pipe = [NSPipe pipe];
readHandle = [pipe fileHandleForReading];
task = [[NSTask alloc] init];
[task setLaunchPath:@"gnustep-config"];
[task setArguments:[NSArray
arrayWithObject:@"--variable=GNUSTEP_SYSTEM_APPS"]];
[task setStandardOutput:pipe];
[task launch];
gnustepSystemApps = [[[NSString alloc] initWithData:[readHandle
availableData]
encoding:NSASCIIStringEncoding] autorelease];
[task waitUntilExit];
...
_______________________________________________
Discuss-gnustep mailing list
Discuss-gnustep@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnustep