fixes for Xcode 5

This commit is contained in:
Ben Fry
2013-09-21 09:52:48 -04:00
parent 1abc8273e5
commit 11f5b0f990
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -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>
+2 -2
View File
@@ -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]
}
}