mirror of
https://github.com/processing/processing4.git
synced 2026-06-16 04:26:26 +02:00
fixes for Xcode 5
This commit is contained in:
@@ -85,7 +85,7 @@ questions.
|
||||
<arg value="-F"/>
|
||||
<arg value="${env.JAVA_HOME}/../.."/>
|
||||
<arg value="-isysroot"/>
|
||||
<arg value="/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk"/>
|
||||
<arg value="/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk"/>
|
||||
<arg value="-mmacosx-version-min=10.7"/>
|
||||
<arg value="native/main.m"/>
|
||||
</exec>
|
||||
|
||||
@@ -98,13 +98,13 @@ int launch(char *commandName) {
|
||||
|
||||
// execute privileged
|
||||
NSString *privileged = [infoDictionary objectForKey:@JVM_RUN_PRIVILEGED];
|
||||
if ( privileged != nil && getuid() != 0 ) {
|
||||
if (privileged != nil && getuid() != 0) {
|
||||
NSDictionary *error = [NSDictionary new];
|
||||
NSString *script = [NSString stringWithFormat:@"do shell script \"\\\"%@\\\" > /dev/null 2>&1 &\" with administrator privileges", [NSString stringWithCString:commandName encoding:NSASCIIStringEncoding]];
|
||||
NSAppleScript *appleScript = [[NSAppleScript new] initWithSource:script];
|
||||
if ([appleScript executeAndReturnError:&error]) {
|
||||
// This means we successfully elevated the application and can stop in here.
|
||||
return;
|
||||
return 0; // Should this return 'error' instead? [fry]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user