From 918713bae7e7ea7edeb884bdc5f20e60b06f3260 Mon Sep 17 00:00:00 2001 From: Ben Baker Date: Sun, 17 Jan 2021 13:15:59 -0500 Subject: [PATCH] Titlebar fix. USB improvements --- Hackintool.xcodeproj/project.pbxproj | 8 +- .../xcschemes/Hackintool.xcscheme | 78 +++++++++++++++++++ Hackintool/AppDelegate.m | 24 ++++-- 3 files changed, 98 insertions(+), 12 deletions(-) create mode 100644 Hackintool.xcodeproj/xcshareddata/xcschemes/Hackintool.xcscheme diff --git a/Hackintool.xcodeproj/project.pbxproj b/Hackintool.xcodeproj/project.pbxproj index 5ea48dcd..5e8c8371 100644 --- a/Hackintool.xcodeproj/project.pbxproj +++ b/Hackintool.xcodeproj/project.pbxproj @@ -717,7 +717,7 @@ CODE_SIGN_INJECT_BASE_ENTITLEMENTS = NO; CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; - CURRENT_PROJECT_VERSION = 0349; + CURRENT_PROJECT_VERSION = 0350; DEVELOPMENT_TEAM = 5LGHPJM9ZR; ENABLE_HARDENED_RUNTIME = YES; ENABLE_STRICT_OBJC_MSGSEND = NO; @@ -732,7 +732,7 @@ INFOPLIST_FILE = "Hackintool/Hackintool-Info.plist"; LD_RUNPATH_SEARCH_PATHS = "@loader_path/../Frameworks @executable_path/../Frameworks"; MACOSX_DEPLOYMENT_TARGET = 10.9; - MARKETING_VERSION = 3.4.9; + MARKETING_VERSION = 3.5.0; PRODUCT_BUNDLE_IDENTIFIER = com.Headsoft.Hackintool; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; @@ -753,7 +753,7 @@ CODE_SIGN_INJECT_BASE_ENTITLEMENTS = NO; CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; - CURRENT_PROJECT_VERSION = 0349; + CURRENT_PROJECT_VERSION = 0350; DEVELOPMENT_TEAM = 5LGHPJM9ZR; ENABLE_HARDENED_RUNTIME = YES; ENABLE_STRICT_OBJC_MSGSEND = NO; @@ -768,7 +768,7 @@ INFOPLIST_FILE = "Hackintool/Hackintool-Info.plist"; LD_RUNPATH_SEARCH_PATHS = "@loader_path/../Frameworks @executable_path/../Frameworks"; MACOSX_DEPLOYMENT_TARGET = 10.9; - MARKETING_VERSION = 3.4.9; + MARKETING_VERSION = 3.5.0; PRODUCT_BUNDLE_IDENTIFIER = com.Headsoft.Hackintool; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; diff --git a/Hackintool.xcodeproj/xcshareddata/xcschemes/Hackintool.xcscheme b/Hackintool.xcodeproj/xcshareddata/xcschemes/Hackintool.xcscheme new file mode 100644 index 00000000..6328fd5d --- /dev/null +++ b/Hackintool.xcodeproj/xcshareddata/xcschemes/Hackintool.xcscheme @@ -0,0 +1,78 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Hackintool/AppDelegate.m b/Hackintool/AppDelegate.m index 9235c4ca..93ce891f 100644 --- a/Hackintool/AppDelegate.m +++ b/Hackintool/AppDelegate.m @@ -122,6 +122,12 @@ - (void)applicationDidFinishLaunching:(NSNotification *)aNotification NSDictionary *infoDictionary = [mainBundle infoDictionary]; NSString *version = [infoDictionary objectForKey:@"CFBundleShortVersionString"]; [_window setTitle:[NSString stringWithFormat:@"Hackintool v%@", version]]; + + NSOperatingSystemVersion minimumSupportedOSVersion = { .majorVersion = 11, .minorVersion = 0, .patchVersion = 0 }; + BOOL isSupported = [NSProcessInfo.processInfo isOperatingSystemAtLeastVersion:minimumSupportedOSVersion]; + + if (isSupported) + [_window setToolbarStyle:NSWindowToolbarStyleExpanded]; NSLog(@"Hackintool v%@", version); @@ -2483,7 +2489,7 @@ - (void)getInstalledKextVersionDictionary // 41 0 0xffffff7f840bb000 0x5000 0x5000 as.lvs1974.HibernationFixup (1.2.4) 605DDBEF-3997-3AF0-9E0F-5D69CBD5AD38 <37 8 6 5 3 2 1> // kextstat -l - + _installedKextVersionDictionary = [[NSMutableDictionary dictionary] retain]; NSString *stdoutString = nil; @@ -2505,6 +2511,10 @@ - (void)getInstalledKextVersionDictionary NSMutableArray *nameArray = [[[name componentsSeparatedByString:@"."] mutableCopy] autorelease]; [nameArray removeObject:@"kext"]; name = [nameArray lastObject]; + + if (name == nil) + continue; + NSString *version = [kextArray objectAtIndex:6]; NSCharacterSet *characterSet = [NSCharacterSet characterSetWithCharactersInString:@"()"]; version = [version stringByTrimmingCharactersInSet:characterSet]; @@ -3365,9 +3375,7 @@ - (void)refreshUSBPorts if (usbConnector == nil && portType == nil) { - //[self createUSBPortConnector:propertyDictionary]; - - continue; + [propertyDictionary setObject:[NSNumber numberWithInt:kTypeA] forKey:hubName != nil ? @"portType" : @"UsbConnector"]; } if (hubName != nil) @@ -3839,9 +3847,9 @@ - (bool)getUSBKextRequirements:(NSNumber *)usbControllerID usbRequirements:(NSSt // 8086:1E31, 8086:8C31, 8086:8CB1, 8086:8D31, 8086:9C31, 8086:9CB1 -> FakePCIID.kext + FakePCIID_XHCIMux.kext // As of 10.11.1 no longer needed - NSOperatingSystemVersion minimumSupportedOSVersion = { .majorVersion = 10, .minorVersion = 11, .patchVersion = 1 }; - BOOL isSupported = [NSProcessInfo.processInfo isOperatingSystemAtLeastVersion:minimumSupportedOSVersion]; - + NSOperatingSystemVersion minimumSupportedOSVersion = { .majorVersion = 10, .minorVersion = 11, .patchVersion = 1 }; + BOOL isSupported = [NSProcessInfo.processInfo isOperatingSystemAtLeastVersion:minimumSupportedOSVersion]; + if (!isSupported) { if ([usbControllerIDString isEqualToString:@"80868CB1"]) @@ -10130,7 +10138,7 @@ - (IBAction)lockButtonClicked:(id)sender - (void) updateAuthorization { - [_authorizationButton setImage:[NSImage imageNamed:@"IconUnlocked.png"]]; + [_authorizationButton setImage:[NSImage imageNamed:@"IconUnlocked"]]; } - (IBAction)toolbarClicked:(id)sender