Skip to content

Commit

Permalink
Fix Extensions compiler
Browse files Browse the repository at this point in the history
  • Loading branch information
benbaker76 committed Oct 13, 2020
1 parent cca77f4 commit c1b6e6b
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 19 deletions.
14 changes: 7 additions & 7 deletions Hackintool.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,7 @@
};
E2B27E18229DE4C1002A8B08 = {
CreatedOnToolsVersion = 10.2.1;
DevelopmentTeam = N22WA9762C;
DevelopmentTeam = 5LGHPJM9ZR;
ProvisioningStyle = Automatic;
};
};
Expand Down Expand Up @@ -714,7 +714,7 @@
CODE_SIGN_INJECT_BASE_ENTITLEMENTS = NO;
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 0344;
CURRENT_PROJECT_VERSION = 0345;
DEVELOPMENT_TEAM = 5LGHPJM9ZR;
ENABLE_HARDENED_RUNTIME = NO;
ENABLE_STRICT_OBJC_MSGSEND = NO;
Expand All @@ -728,7 +728,7 @@
HEADER_SEARCH_PATHS = "$(SDKROOT)/usr/include/libxml2";
INFOPLIST_FILE = "Hackintool/Hackintool-Info.plist";
LD_RUNPATH_SEARCH_PATHS = "@loader_path/../Frameworks @executable_path/../Frameworks";
MARKETING_VERSION = 3.4.4;
MARKETING_VERSION = 3.4.5;
PRODUCT_BUNDLE_IDENTIFIER = com.Headsoft.Hackintool;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand All @@ -748,7 +748,7 @@
CODE_SIGN_INJECT_BASE_ENTITLEMENTS = NO;
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 0344;
CURRENT_PROJECT_VERSION = 0345;
DEVELOPMENT_TEAM = 5LGHPJM9ZR;
ENABLE_HARDENED_RUNTIME = NO;
ENABLE_STRICT_OBJC_MSGSEND = NO;
Expand All @@ -762,7 +762,7 @@
HEADER_SEARCH_PATHS = "$(SDKROOT)/usr/include/libxml2";
INFOPLIST_FILE = "Hackintool/Hackintool-Info.plist";
LD_RUNPATH_SEARCH_PATHS = "@loader_path/../Frameworks @executable_path/../Frameworks";
MARKETING_VERSION = 3.4.4;
MARKETING_VERSION = 3.4.5;
PRODUCT_BUNDLE_IDENTIFIER = com.Headsoft.Hackintool;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand All @@ -788,7 +788,7 @@
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 9.9.9;
DEBUG_INFORMATION_FORMAT = dwarf;
DEVELOPMENT_TEAM = N22WA9762C;
DEVELOPMENT_TEAM = 5LGHPJM9ZR;
DYLIB_COMPATIBILITY_VERSION = 8.8.8;
DYLIB_CURRENT_VERSION = 9.9.9;
ENABLE_HARDENED_RUNTIME = YES;
Expand Down Expand Up @@ -831,7 +831,7 @@
CODE_SIGN_STYLE = Automatic;
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 9.9.9;
DEVELOPMENT_TEAM = N22WA9762C;
DEVELOPMENT_TEAM = 5LGHPJM9ZR;
DYLIB_COMPATIBILITY_VERSION = 8.8.8;
DYLIB_CURRENT_VERSION = 9.9.9;
ENABLE_HARDENED_RUNTIME = YES;
Expand Down
Binary file not shown.
18 changes: 17 additions & 1 deletion Hackintool/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -2871,6 +2871,12 @@ - (void)compileSelectedKexts
void (^progressBlock)(void);
progressBlock =
^{
NSString *tempPath = getTempPath();
NSString *macKernelSDKUrl = @"https://github.com/acidanthera/MacKernelSDK.git";
NSString *macKernelSDKPath = [tempPath stringByAppendingPathComponent:@"MacKernelSDK"];

launchCommand(@"/usr/bin/git", @[@"clone", macKernelSDKUrl, macKernelSDKPath], self, @selector(compileOutputNotification:), @selector(compileErrorNotification:), @selector(compileCompleteNotification:));

int compileIndex = 0;

for (int i = 0; i < _kextsArray.count; i++)
Expand All @@ -2882,6 +2888,8 @@ - (void)compileSelectedKexts
NSString *projectUrl = [kextDictionary objectForKey:@"ProjectUrl"];
NSString *projectFileUrl = [kextDictionary objectForKey:@"ProjectFileUrl"];
NSString *outputPath = [buildPath stringByAppendingPathComponent:name];


NSString *projectFileName = (projectFileUrl != nil ? [[projectFileUrl lastPathComponent] stringByRemovingPercentEncoding] : [name stringByAppendingString:@".xcodeproj"]);
NSString *updateGitSubmodules = @"cd $(OUTPUT_PATH) && $(SUBMODULE_UPDATE)";
bool isLilu = [name isEqualToString:@"Lilu"];
Expand All @@ -2893,7 +2901,9 @@ - (void)compileSelectedKexts
[[NSFileManager defaultManager] removeItemAtPath:outputPath error:&error];

launchCommand(@"/usr/bin/git", @[@"clone", projectUrl, outputPath], self, @selector(compileOutputNotification:), @selector(compileErrorNotification:), @selector(compileCompleteNotification:));
updateGitSubmodules = [updateGitSubmodules stringByReplacingOccurrencesOfString:@"$(OUTPUT_PATH)" withString:outputPath];
launchCommand(@"/bin/cp", @[@"-r", macKernelSDKPath, outputPath], self, @selector(compileOutputNotification:), @selector(compileErrorNotification:), @selector(compileCompleteNotification:));

updateGitSubmodules = [updateGitSubmodules stringByReplacingOccurrencesOfString:@"$(OUTPUT_PATH)" withString:outputPath];
updateGitSubmodules = [updateGitSubmodules stringByReplacingOccurrencesOfString:@"$(SUBMODULE_UPDATE)" withString:GitSubmoduleUpdate];
launchCommand(@"/bin/bash", @[@"-c", updateGitSubmodules], self, @selector(compileOutputNotification:), @selector(compileErrorNotification:), @selector(compileCompleteNotification:));
launchCommand(@"/usr/bin/xcodebuild", @[@"-project", [outputPath stringByAppendingPathComponent:projectFileName], @"-configuration", @"Debug", @"clean", @"build", @"ARCHS=x86_64", [NSString stringWithFormat:@"CONFIGURATION_BUILD_DIR=%@", debugPath]], self, @selector(compileOutputNotification:), @selector(compileErrorNotification:), @selector(compileCompleteNotification:));
Expand Down Expand Up @@ -2948,6 +2958,8 @@ - (void)compileSelectedKexts

if ([type isEqualToString:@"Lilu"])
{
launchCommand(@"/bin/cp", @[@"-r", macKernelSDKPath, outputPath], self, @selector(compileOutputNotification:), @selector(compileErrorNotification:), @selector(compileCompleteNotification:));

if ([[NSFileManager defaultManager] fileExistsAtPath:outputLiluKextPath])
[[NSFileManager defaultManager] removeItemAtPath:outputLiluKextPath error:&error];

Expand Down Expand Up @@ -2981,6 +2993,10 @@ - (void)compileSelectedKexts
});
}

NSString *stdoutString = nil;

launchCommand(@"/bin/rm", @[@"-Rf", tempPath], &stdoutString);

NSArray *fileURLs = [NSArray arrayWithObjects:[NSURL fileURLWithPath:buildPath], nil];
[[NSWorkspace sharedWorkspace] activateFileViewerSelectingURLs:fileURLs];
};
Expand Down
22 changes: 11 additions & 11 deletions Hackintool/Base.lproj/MainMenu.xib
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="16097" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="16097.2" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
<dependencies>
<deployment identifier="macosx"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="16097"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="16097.2"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
Expand Down Expand Up @@ -1018,7 +1018,7 @@
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<buttonCell key="cell" type="bevel" bezelStyle="rounded" image="IconFind" imagePosition="overlaps" alignment="center" controlSize="small" imageScaling="proportionallyDown" inset="2" id="SYW-Yf-0jo">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="message" size="11"/>
<font key="font" metaFont="label" size="11"/>
</buttonCell>
<connections>
<action selector="pciViewButtonClicked:" target="494" id="aGI-Oj-OHB"/>
Expand Down Expand Up @@ -1174,7 +1174,7 @@
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<buttonCell key="cell" type="bevel" bezelStyle="rounded" image="IconFind" imagePosition="overlaps" alignment="center" controlSize="small" imageScaling="proportionallyDown" inset="2" id="0tI-PN-WQ3">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="message" size="11"/>
<font key="font" metaFont="label" size="11"/>
</buttonCell>
<connections>
<action selector="pciViewButtonClicked:" target="494" id="K87-Bv-68L"/>
Expand Down Expand Up @@ -1394,7 +1394,7 @@
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<buttonCell key="cell" type="bevel" bezelStyle="rounded" image="IconFind" imagePosition="overlaps" alignment="center" controlSize="small" imageScaling="proportionallyDown" inset="2" id="EcU-6a-ng0">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="message" size="11"/>
<font key="font" metaFont="label" size="11"/>
</buttonCell>
<connections>
<action selector="pciViewButtonClicked:" target="494" id="LZQ-K7-Gf5"/>
Expand Down Expand Up @@ -1607,7 +1607,7 @@
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<buttonCell key="cell" type="bevel" bezelStyle="rounded" image="IconFind" imagePosition="overlaps" alignment="center" controlSize="small" imageScaling="proportionallyDown" inset="2" id="uBZ-H8-0mW">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="message" size="11"/>
<font key="font" metaFont="label" size="11"/>
</buttonCell>
<connections>
<action selector="pciViewButtonClicked:" target="494" id="Vj6-j3-lsO"/>
Expand Down Expand Up @@ -1852,7 +1852,7 @@
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<buttonCell key="cell" type="bevel" bezelStyle="rounded" image="IconFind" imagePosition="overlaps" alignment="center" controlSize="small" imageScaling="proportionallyDown" inset="2" id="wMt-i8-2Mx">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="message" size="11"/>
<font key="font" metaFont="label" size="11"/>
</buttonCell>
<connections>
<action selector="pciViewButtonClicked:" target="494" id="ZGw-k7-ITe"/>
Expand Down Expand Up @@ -2615,7 +2615,7 @@
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<buttonCell key="cell" type="check" bezelStyle="regularSquare" imagePosition="left" controlSize="small" state="on" inset="2" id="LnX-6m-vR5">
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
<font key="font" metaFont="message" size="11"/>
<font key="font" metaFont="label" size="11"/>
</buttonCell>
<connections>
<action selector="framebufferFlagsChanged:" target="494" id="eeV-hP-3yX"/>
Expand Down Expand Up @@ -2824,7 +2824,7 @@
<rect key="frame" x="261" y="1" width="99" height="25"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<comboBoxCell key="cell" controlSize="small" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" borderStyle="bezel" identifier="Type" buttonBordered="NO" completes="NO" numberOfVisibleItems="5" id="JZB-dW-6zH">
<font key="font" metaFont="message" size="11"/>
<font key="font" metaFont="label" size="11"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
</comboBoxCell>
Expand Down Expand Up @@ -2921,7 +2921,7 @@
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<buttonCell key="cell" type="check" bezelStyle="regularSquare" imagePosition="left" controlSize="small" state="on" inset="2" id="mXo-Q1-JAp">
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
<font key="font" metaFont="message" size="11"/>
<font key="font" metaFont="label" size="11"/>
</buttonCell>
<connections>
<action selector="connectorFlagsChanged:" target="494" id="pXi-pS-hIV"/>
Expand Down Expand Up @@ -8328,7 +8328,7 @@
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<clipView key="contentView" copiesOnScroll="NO" id="PNl-wA-SYG">
<rect key="frame" x="1" y="1" width="551" height="488"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<textView editable="NO" importsGraphics="NO" richText="NO" horizontallyResizable="YES" verticallyResizable="YES" findStyle="bar" smartInsertDelete="YES" id="9Gw-h6-fSV">
<rect key="frame" x="0.0" y="0.0" width="551" height="488"/>
Expand Down

0 comments on commit c1b6e6b

Please sign in to comment.