Permalink
Browse files

OS X 10.8.2 compatibility

  • Loading branch information...
future
future committed Jan 18, 2013
1 parent f969f72 commit a7011d1ec6f8afcb68ab65ee9972dbefd2c54b05
@@ -308,7 +308,7 @@
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ARCHS = "$(ARCHS_STANDARD_64_BIT)";
- CLANG_ENABLE_OBJC_ARC = YES;
+ CLANG_ENABLE_OBJC_ARC = NO;
CLANG_WARN_OBJCPP_ARC_ABI = YES;
COPY_PHASE_STRIP = NO;
DEPLOYMENT_LOCATION = YES;
@@ -342,7 +342,7 @@
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ARCHS = "$(ARCHS_STANDARD_64_BIT)";
- CLANG_ENABLE_OBJC_ARC = YES;
+ CLANG_ENABLE_OBJC_ARC = NO;
CLANG_WARN_OBJCPP_ARC_ABI = YES;
COPY_PHASE_STRIP = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
@@ -367,7 +367,8 @@
E0D1C83615D40BF400EB32CE /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
- CLANG_ENABLE_OBJC_ARC = YES;
+ CLANG_ENABLE_OBJC_ARC = NO;
+ CLANG_WARN_OBJCPP_ARC_ABI = NO;
DEPLOYMENT_LOCATION = YES;
GCC_ENABLE_OBJC_GC = required;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
@@ -382,7 +383,8 @@
E0D1C83715D40BF400EB32CE /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
- CLANG_ENABLE_OBJC_ARC = YES;
+ CLANG_ENABLE_OBJC_ARC = NO;
+ CLANG_WARN_OBJCPP_ARC_ABI = NO;
DEPLOYMENT_LOCATION = YES;
GCC_ENABLE_OBJC_GC = required;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
@@ -31,8 +31,9 @@ + (NSArray*) all {
+ (Interface*) ethernet {
NSArray *interfaces = [self all];
for (Interface *interface in interfaces) {
- if ([interface.kind isEqualToString:@"Ethernet"] && ([interface.BSDName isEqualToString:@"en0"] || [interface.BSDName isEqualToString:@"en1"])) {
- //DLog(@"Identified Ethernet Interface: %@", interface.BSDName);
+ BOOL isNotBluetooth = [[interface.displayName stringByReplacingOccurrencesOfString:@"tooth" withString:@""] isEqualToString:interface.displayName];
+ if ([interface.kind isEqualToString:@"Ethernet"] && isNotBluetooth && ([interface.BSDName isEqualToString:@"en0"] || [interface.BSDName isEqualToString:@"en1"] || [interface.BSDName isEqualToString:@"en2"])) {
+ //DLog(@"Identified Ethernet Interface: <%@> <%@> <%@>", interface.BSDName, interface.kind, interface.displayName);
return interface;
}
@@ -59,14 +60,15 @@ + (Interface*) wifi {
* the currently assigned MAC address. It returns it as NSString.
*/
- (NSString*) softMAC {
+ if (!self.kind) return @"";
// Getting the Task bootstrapped
NSTask *ifconfig = [[NSTask alloc] init];
NSPipe *pipe = [NSPipe pipe];
NSFileHandle *file = [pipe fileHandleForReading];
// Configuring the ifconfig command
[ifconfig setLaunchPath: @"/sbin/ifconfig"];
- [ifconfig setArguments: [NSArray arrayWithObjects: [self BSDName], nil]];
+ [ifconfig setArguments: [NSArray arrayWithObjects: self.BSDName, nil]];
[ifconfig setStandardOutput: pipe];
// Starting the Task
[ifconfig launch];
@@ -80,6 +82,7 @@ - (NSString*) softMAC {
}
- (void) applyAddress:(MACAddresss*)address {
+ if (!self.kind) return;
NSDictionary *error = [NSDictionary new];
NSString *command = [self changeCommandForInterface:self.BSDName usingAddress:address.string];
NSString *script = [[NSString new] stringByAppendingFormat:@"do shell script \"%@\" with administrator privileges", command];
@@ -20,10 +20,10 @@ - (void) mainViewDidLoad {
- (void) refreshGUI:sender {
wifi = [Interface wifi];
ethernet = [Interface ethernet];
- [wifiNameLabel setStringValue:[wifi.displayName stringByAppendingFormat:@" %@", wifi.BSDName]];
- [wifiSoftMAC setStringValue:wifi.softMAC];
- [ethernetNameLabel setStringValue:[ethernet.displayName stringByAppendingFormat:@" %@", ethernet.BSDName]];
- [ethernetSoftMAC setStringValue:ethernet.softMAC];
+ if (wifi.BSDName) [wifiNameLabel setStringValue:[wifi.displayName stringByAppendingFormat:@" %@", wifi.BSDName]];
+ if (wifi.softMAC) [wifiSoftMAC setStringValue:wifi.softMAC];
+ if (ethernet.BSDName) [ethernetNameLabel setStringValue:[ethernet.displayName stringByAppendingFormat:@" %@", ethernet.BSDName]];
+ if (ethernet.softMAC) [ethernetSoftMAC setStringValue:ethernet.softMAC];
}
- (void) setupObservers {
@@ -70,10 +70,12 @@ - (void) wasSingleClickedNotification:(NSNotification*)notification {
}
- (void) editWifi {
+ if (!wifi.kind) return;
[changePopover showRelativeToRect:[wifiSoftMAC bounds] ofView:wifiSoftMAC preferredEdge:NSMaxYEdge];
}
- (void) editEthernet {
+ if (!ethernet.kind) return;
[changePopover showRelativeToRect:[ethernetSoftMAC bounds] ofView:ethernetSoftMAC preferredEdge:NSMaxYEdge];
}
@@ -7,7 +7,7 @@
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIconFile</key>
- <string></string>
+ <string>LinkLiar.icns</string>
<key>CFBundleIdentifier</key>
<string>com.funkensturm.${PRODUCT_NAME:rfc1034identifier}</string>
<key>CFBundleInfoDictionaryVersion</key>
Oops, something went wrong.

0 comments on commit a7011d1

Please sign in to comment.