mirror of
https://github.com/microtherion/VocalEasel.git
synced 2024-12-22 11:14:00 +00:00
Look for running copy of Lilypond.app
This commit is contained in:
parent
f612e5cb38
commit
f55a6e1ab3
|
@ -129,11 +129,23 @@
|
||||||
else
|
else
|
||||||
appPath = lilyPath;
|
appPath = lilyPath;
|
||||||
}
|
}
|
||||||
|
if (!appPath) {
|
||||||
|
//
|
||||||
|
// Look for running copies of Lilypond first
|
||||||
|
//
|
||||||
|
NSArray * runningApps = [[NSWorkspace sharedWorkspace] launchedApplications];
|
||||||
|
for (NSDictionary * app in runningApps)
|
||||||
|
if ([[app objectForKey:@"NSApplicationBundleIdentifier"] isEqual:@"org.lilypond.lilypond"]
|
||||||
|
|| [[app objectForKey:@"NSApplicationName"] isEqual:@"LilyPond"]
|
||||||
|
)
|
||||||
|
if ((appPath = [[app objectForKey:@"NSApplicationPath"] stringByAppendingPathComponent:@"Contents/Resources/bin/lilypond"]))
|
||||||
|
break;
|
||||||
if (!appPath)
|
if (!appPath)
|
||||||
appPath =
|
appPath =
|
||||||
[[[NSWorkspace sharedWorkspace]
|
[[[NSWorkspace sharedWorkspace]
|
||||||
absolutePathForAppBundleWithIdentifier:@"org.lilypond.lilypond"]
|
absolutePathForAppBundleWithIdentifier:@"org.lilypond.lilypond"]
|
||||||
stringByAppendingPathComponent:@"Contents/Resources/bin/lilypond"];
|
stringByAppendingPathComponent:@"Contents/Resources/bin/lilypond"];
|
||||||
|
}
|
||||||
if (!toolPath)
|
if (!toolPath)
|
||||||
toolPath = [self getLineFromCommand:@"bash -l -c 'which lilypond'"];
|
toolPath = [self getLineFromCommand:@"bash -l -c 'which lilypond'"];
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user