Skip to content

Commit

Permalink
Titlebar fix. USB improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
Ben Baker authored and Ben Baker committed Jan 17, 2021
1 parent b75ed8e commit 918713b
Show file tree
Hide file tree
Showing 3 changed files with 98 additions and 12 deletions.
8 changes: 4 additions & 4 deletions Hackintool.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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 = "";
Expand All @@ -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;
Expand All @@ -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 = "";
Expand Down
78 changes: 78 additions & 0 deletions Hackintool.xcodeproj/xcshareddata/xcschemes/Hackintool.xcscheme
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1230"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "E24936F9169D1B2B00384895"
BuildableName = "Hackintool.app"
BlueprintName = "Hackintool"
ReferencedContainer = "container:Hackintool.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Release"
selectedDebuggerIdentifier = ""
selectedLauncherIdentifier = "Xcode.IDEFoundation.Launcher.PosixSpawn"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "E24936F9169D1B2B00384895"
BuildableName = "Hackintool.app"
BlueprintName = "Hackintool"
ReferencedContainer = "container:Hackintool.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "E24936F9169D1B2B00384895"
BuildableName = "Hackintool.app"
BlueprintName = "Hackintool"
ReferencedContainer = "container:Hackintool.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
24 changes: 16 additions & 8 deletions Hackintool/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down Expand Up @@ -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;
Expand All @@ -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];
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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"])
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 918713b

Please sign in to comment.