diff --git a/OCBuilder.xcodeproj/project.pbxproj b/OCBuilder.xcodeproj/project.pbxproj index a6b13b2..7ab411d 100644 --- a/OCBuilder.xcodeproj/project.pbxproj +++ b/OCBuilder.xcodeproj/project.pbxproj @@ -7,14 +7,11 @@ objects = { /* Begin PBXBuildFile section */ - 242EF84825326AAF00E41AEA /* debug_without_kexts_IA32.command in Resources */ = {isa = PBXBuildFile; fileRef = 242EF84625326AAF00E41AEA /* debug_without_kexts_IA32.command */; }; - 242EF84925326AAF00E41AEA /* release_without_kexts_IA32.command in Resources */ = {isa = PBXBuildFile; fileRef = 242EF84725326AAF00E41AEA /* release_without_kexts_IA32.command */; }; - CF0C453522F0E19F00D5AF7D /* release.command in Resources */ = {isa = PBXBuildFile; fileRef = CF0C452922F0E19F00D5AF7D /* release.command */; }; + 9637503D2875C45C00B6E4E1 /* OC_kexts.plist in Resources */ = {isa = PBXBuildFile; fileRef = 9637503C2875C45C00B6E4E1 /* OC_kexts.plist */; }; + 96ABD5F82875D0C100D8F885 /* OC_kexts.command in Resources */ = {isa = PBXBuildFile; fileRef = 96ABD5F72875D0C100D8F885 /* OC_kexts.command */; }; + 96F5F6F2262CBE10004238FC /* runOCBuilderScript.command in Resources */ = {isa = PBXBuildFile; fileRef = 96F5F6F1262CBE0F004238FC /* runOCBuilderScript.command */; }; CF16433823CD462D00D02E15 /* OC.png in Resources */ = {isa = PBXBuildFile; fileRef = CF16433723CD462D00D02E15 /* OC.png */; }; - CF1D3F4823C9253B00CB97A8 /* debug.command in Resources */ = {isa = PBXBuildFile; fileRef = CF1D3F4723C9253B00CB97A8 /* debug.command */; }; CF1DCFBD22ED3A3300B513CF /* TaskViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = CF1DCFBC22ED3A3300B513CF /* TaskViewController.swift */; }; - CF5FCF4023CA60AC00542BB5 /* release_without_kexts.command in Resources */ = {isa = PBXBuildFile; fileRef = CF5FCF3F23CA60AC00542BB5 /* release_without_kexts.command */; }; - CF5FCF4223CA60C800542BB5 /* debug_without_kexts.command in Resources */ = {isa = PBXBuildFile; fileRef = CF5FCF4123CA60C800542BB5 /* debug_without_kexts.command */; }; CFCE804825C74EDF00D741CE /* generate_appcast in Resources */ = {isa = PBXBuildFile; fileRef = CFCE804625C74EDF00D741CE /* generate_appcast */; }; CFCE804925C74EDF00D741CE /* generate_keys in Resources */ = {isa = PBXBuildFile; fileRef = CFCE804725C74EDF00D741CE /* generate_keys */; }; CFD761D125C74D280021793A /* XPCServices in Resources */ = {isa = PBXBuildFile; fileRef = CFD761CF25C74D270021793A /* XPCServices */; }; @@ -40,14 +37,11 @@ /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ - 242EF84625326AAF00E41AEA /* debug_without_kexts_IA32.command */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = debug_without_kexts_IA32.command; sourceTree = ""; }; - 242EF84725326AAF00E41AEA /* release_without_kexts_IA32.command */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = release_without_kexts_IA32.command; sourceTree = ""; }; - CF0C452922F0E19F00D5AF7D /* release.command */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = release.command; sourceTree = ""; }; + 9637503C2875C45C00B6E4E1 /* OC_kexts.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = OC_kexts.plist; sourceTree = ""; }; + 96ABD5F72875D0C100D8F885 /* OC_kexts.command */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; path = OC_kexts.command; sourceTree = ""; }; + 96F5F6F1262CBE0F004238FC /* runOCBuilderScript.command */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = runOCBuilderScript.command; sourceTree = ""; }; CF16433723CD462D00D02E15 /* OC.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = OC.png; sourceTree = ""; }; - CF1D3F4723C9253B00CB97A8 /* debug.command */ = {isa = PBXFileReference; lastKnownFileType = text; path = debug.command; sourceTree = ""; }; CF1DCFBC22ED3A3300B513CF /* TaskViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TaskViewController.swift; sourceTree = ""; }; - CF5FCF3F23CA60AC00542BB5 /* release_without_kexts.command */ = {isa = PBXFileReference; lastKnownFileType = text; path = release_without_kexts.command; sourceTree = ""; }; - CF5FCF4123CA60C800542BB5 /* debug_without_kexts.command */ = {isa = PBXFileReference; lastKnownFileType = text; path = debug_without_kexts.command; sourceTree = ""; }; CFCE804625C74EDF00D741CE /* generate_appcast */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.executable"; path = generate_appcast; sourceTree = ""; }; CFCE804725C74EDF00D741CE /* generate_keys */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.executable"; path = generate_keys; sourceTree = ""; }; CFD761CF25C74D270021793A /* XPCServices */ = {isa = PBXFileReference; lastKnownFileType = folder; path = XPCServices; sourceTree = ""; }; @@ -111,15 +105,12 @@ CFFC393822ED390600A4CA25 /* OCBuilder */ = { isa = PBXGroup; children = ( + 9637503C2875C45C00B6E4E1 /* OC_kexts.plist */, + 96ABD5F72875D0C100D8F885 /* OC_kexts.command */, + 96F5F6F1262CBE0F004238FC /* runOCBuilderScript.command */, CF16433723CD462D00D02E15 /* OC.png */, CFFC393922ED390600A4CA25 /* AppDelegate.swift */, CF1DCFBC22ED3A3300B513CF /* TaskViewController.swift */, - CF5FCF3F23CA60AC00542BB5 /* release_without_kexts.command */, - 242EF84625326AAF00E41AEA /* debug_without_kexts_IA32.command */, - 242EF84725326AAF00E41AEA /* release_without_kexts_IA32.command */, - CF5FCF4123CA60C800542BB5 /* debug_without_kexts.command */, - CF0C452922F0E19F00D5AF7D /* release.command */, - CF1D3F4723C9253B00CB97A8 /* debug.command */, CFFC393D22ED390800A4CA25 /* Assets.xcassets */, CFFC393F22ED390800A4CA25 /* Main.storyboard */, CFFC394222ED390800A4CA25 /* Info.plist */, @@ -156,7 +147,7 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 1030; - LastUpgradeCheck = 1240; + LastUpgradeCheck = 1410; ORGANIZATIONNAME = Pavo; TargetAttributes = { CFFC393522ED390600A4CA25 = { @@ -193,17 +184,14 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( - CF5FCF4023CA60AC00542BB5 /* release_without_kexts.command in Resources */, - CF5FCF4223CA60C800542BB5 /* debug_without_kexts.command in Resources */, + 96ABD5F82875D0C100D8F885 /* OC_kexts.command in Resources */, + 9637503D2875C45C00B6E4E1 /* OC_kexts.plist in Resources */, CFCE804825C74EDF00D741CE /* generate_appcast in Resources */, CFD761D125C74D280021793A /* XPCServices in Resources */, CFFC393E22ED390800A4CA25 /* Assets.xcassets in Resources */, - 242EF84925326AAF00E41AEA /* release_without_kexts_IA32.command in Resources */, CF16433823CD462D00D02E15 /* OC.png in Resources */, - CF1D3F4823C9253B00CB97A8 /* debug.command in Resources */, CFFC394122ED390800A4CA25 /* Main.storyboard in Resources */, - 242EF84825326AAF00E41AEA /* debug_without_kexts_IA32.command in Resources */, - CF0C453522F0E19F00D5AF7D /* release.command in Resources */, + 96F5F6F2262CBE10004238FC /* runOCBuilderScript.command in Resources */, CFCE804925C74EDF00D741CE /* generate_keys in Resources */, ); runOnlyForDeploymentPostprocessing = 0; @@ -269,6 +257,7 @@ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CODE_SIGN_IDENTITY = "Mac Developer"; COPY_PHASE_STRIP = NO; + DEAD_CODE_STRIPPING = YES; DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; @@ -286,7 +275,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.6; + MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)"; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; ONLY_ACTIVE_ARCH = YES; @@ -332,6 +321,7 @@ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CODE_SIGN_IDENTITY = "Mac Developer"; COPY_PHASE_STRIP = NO; + DEAD_CODE_STRIPPING = YES; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; @@ -343,7 +333,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.6; + MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)"; MTL_ENABLE_DEBUG_INFO = NO; MTL_FAST_MATH = YES; SDKROOT = macosx; @@ -358,11 +348,12 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_ENTITLEMENTS = OCBuilder/OCBuilder.entitlements; - CODE_SIGN_IDENTITY = "Apple Development"; + CODE_SIGN_IDENTITY = "-"; CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; CURRENT_PROJECT_VERSION = 7.6.1; - DEVELOPMENT_TEAM = 5DG8PLV54H; + DEAD_CODE_STRIPPING = YES; + DEVELOPMENT_TEAM = ""; ENABLE_HARDENED_RUNTIME = NO; EXCLUDED_ARCHS = arm64; FRAMEWORK_SEARCH_PATHS = ( @@ -376,7 +367,7 @@ "@loader_path/../Frameworks", "@executable_path/../Frameworks", ); - MACOSX_DEPLOYMENT_TARGET = 10.11; + MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)"; MARKETING_VERSION = 7.6.1; ONLY_ACTIVE_ARCH = NO; PRODUCT_BUNDLE_IDENTIFIER = OCBuilder.OCBuilder; @@ -391,11 +382,12 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_ENTITLEMENTS = OCBuilder/OCBuilder.entitlements; - CODE_SIGN_IDENTITY = "Apple Development"; + CODE_SIGN_IDENTITY = "-"; CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; CURRENT_PROJECT_VERSION = 7.6.1; - DEVELOPMENT_TEAM = 5DG8PLV54H; + DEAD_CODE_STRIPPING = YES; + DEVELOPMENT_TEAM = ""; ENABLE_HARDENED_RUNTIME = NO; EXCLUDED_ARCHS = arm64; FRAMEWORK_SEARCH_PATHS = ( @@ -409,7 +401,7 @@ "@loader_path/../Frameworks", "@executable_path/../Frameworks", ); - MACOSX_DEPLOYMENT_TARGET = 10.11; + MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)"; MARKETING_VERSION = 7.6.1; ONLY_ACTIVE_ARCH = NO; PRODUCT_BUNDLE_IDENTIFIER = OCBuilder.OCBuilder; diff --git a/OCBuilder/Base.lproj/Main.storyboard b/OCBuilder/Base.lproj/Main.storyboard index ec1e176..128a4d4 100644 --- a/OCBuilder/Base.lproj/Main.storyboard +++ b/OCBuilder/Base.lproj/Main.storyboard @@ -1,8 +1,7 @@ - + - - + @@ -754,7 +753,7 @@ - + @@ -762,29 +761,26 @@ - + - - + + - + - - - - + @@ -793,26 +789,26 @@ - - - - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -884,12 +897,14 @@ + + - + diff --git a/OCBuilder/OC_kexts.command b/OCBuilder/OC_kexts.command new file mode 100644 index 0000000..9f36f94 --- /dev/null +++ b/OCBuilder/OC_kexts.command @@ -0,0 +1,51 @@ +#!/bin/bash +if [ "${7}" = "1" ];then + set -x +fi + +KextListPrj=$(dirname $0)/OC_kexts.plist + +if [ ! -f "${KextListPrj}" ] +then + echo "${BackSlash_N} ----> Kexts list file (${KextListPrj}) does not exist !.."; exit 1 +else + #head -$(expr $(grep -n "End-of-Kexts-List" "${KextListPrj}" | awk -F':' '{print $1}') - 1) "${KextListPrj}" > "${KextListWrk}" + head -$(expr $(grep -n "Kexts-List-End" "${KextListPrj}" | awk -F':' '{print $1}')) "${KextListPrj}" | \ + tail -$(expr $(grep -n "Kexts-List-End" "${KextListPrj}" | awk -F':' '{print $1}') - $(grep -n "Kexts-List-Start" "${KextListPrj}" | head -1 | awk -F':' '{print $1 -1}')) > "${KextListWrk}" +fi + +KextNotUsed=0 +EndOfList=0 +First_Loop=1 +for NumLine in $(egrep -n "\" ${KextListWrk} | awk -F':' '{print $1}'); do + if [ ${EndOfList} = 0 ]; then + NextLine=$(expr ${NumLine} + 1) + Key=$(head -${NumLine} ${KextListWrk} | tail -1);Key=$(echo ${Key} | sed -e 's/^ *//g' -e 's/\//g' -e 's/\<\/key\>//g') + Val=$(head -${NextLine} ${KextListWrk} | tail -1);Val=$(echo ${Val} | sed -e 's/^ *//g' -e 's/\//g' -e 's/\<\/string\>//g' -e 's/\/YES/g' -e 's/\/NO/g') + if [ "${Key}" != "Kexts-List-End" ]; then + if [ "${Key}" != "Kexts-List-Start" -a "$(echo -e "${Key}" | cut -c 1)" != "#" ]; then + if [ $(echo "${Val}" | sed -e 's/ /_/g' -e 's/\/DICTIONNARY/g') != "DICTIONNARY" ]; then + if [ ${KextNotUsed} = 0 ]; then + if [ "${Key}" = "Kext-Description" ]; then + Val=$(echo -e "${Val}" | sed -e 's/ /_/g' -e 's/;/_/g') + fi + echo -e "${Val};\c" >>"${KextListTxt}" + fi + else + KextNotUsed=0 + if [ ${First_Loop} = 0 ]; then + echo -e "\n\c" >>"${KextListTxt}" + else + First_Loop=0 + fi + fi + else + if [ "${Key}" = "Kexts-List-Start" -o $(echo "${Val}" | sed -e 's/ /_/g' -e 's/;/_/g' -e 's/\/DICTIONNARY/g') = "DICTIONNARY" ]; then + KextNotUsed=1 + fi + fi + else + EndOfList=1 + fi + fi +done diff --git a/OCBuilder/OC_kexts.plist b/OCBuilder/OC_kexts.plist new file mode 100644 index 0000000..d9f769e --- /dev/null +++ b/OCBuilder/OC_kexts.plist @@ -0,0 +1,1035 @@ + + + + + Kexts-List-Start + KEXTS HowTo : Col1=Kext Name;Col2=Kext Description;Col3=Kext(s) repo;Col4=Kext Build Directory;Col5=Debug needed too;Col6=Dependance(s);Col7=Clone SubModule;Col8=Copy SubModule;Col9=Exit on Compil Abort + Lilu + + #New Item + Lilu;Open-source kernel;https://github.com/acidanthera/Lilu.git;Lilu;Y;N;https://github.com/acidanthera/MacKernelSDK;N;Y + Kext-Name + Lilu + Kext-Description + Open-source kernel extension for macOS + Kext-ProjectUrl + https://github.com/acidanthera/Lilu.git + Kext-Build-Dir + Lilu + Kext-Debug-needed + + Kext-Dependances + NO + Kext-Clone-SubModule + https://github.com/acidanthera/MacKernelSDK + Kext-Copy-SubModule + NO + Kext-Build-Abort-Process-Exit + + + AppleALC + + #New Item + AppleALC;macOS HD audio;https://github.com/acidanthera/AppleALC.git;AppleALC;N;Lilu;N;/Lilu/MacKernelSDK;N + Kext-Name + AppleALC + Kext-Description + Enabling native macOS HD audio + Kext-ProjectUrl + https://github.com/acidanthera/AppleALC.git + Kext-Build-Dir + AppleALC + Kext-Debug-needed + + Kext-Dependances + Lilu + Kext-Clone-SubModule + NO + Kext-Copy-SubModule + /Lilu/MacKernelSDK + Kext-Build-Abort-Process-Exit + + + WhateverGreen + + #New Item + WhateverGreen;Lilu GPU plugin;https://github.com/acidanthera/WhateverGreen.git;WhateverGreen;N;Lilu;N;/Lilu/MacKernelSDK;N + Kext-Name + WhateverGreen + Kext-Description + Lilu plugin providing patches to select GPUs on macOS + Kext-ProjectUrl + https://github.com/acidanthera/WhateverGreen.git + Kext-Build-Dir + WhateverGreen + Kext-Debug-needed + + Kext-Dependances + Lilu + Kext-Clone-SubModule + NO + Kext-Copy-SubModule + /Lilu/MacKernelSDK + Kext-Build-Abort-Process-Exit + + + VirtualSMC + + #New Item + VirtualSMC;Apple SMC emulator;https://github.com/acidanthera/VirtualSMC.git;VirtualSMC;Y;Lilu;N;/Lilu/MacKernelSDK;N + Kext-Name + VirtualSMC + Kext-Description + Advanced Apple SMC emulator in the kernel + Kext-ProjectUrl + https://github.com/acidanthera/VirtualSMC.git + Kext-Build-Dir + VirtualSMC + Kext-Debug-needed + + Kext-Dependances + Lilu + Kext-Clone-SubModule + NO + Kext-Copy-SubModule + /Lilu/MacKernelSDK + Kext-Build-Abort-Process-Exit + + + AirportBrcmFixup + + #New Item + AirportBrcmFixup;non-native Airport Broadcom Wi-Fi cards;https://github.com/acidanthera/AirportBrcmFixup.git;AirportBrcmFixup;N;Lilu;N;/Lilu/MacKernelSDK;N + Kext-Name + AirportBrcmFixup + Kext-Description + An open-source kernel extension for non-native Airport Broadcom Wi-Fi cards + Kext-ProjectUrl + https://github.com/acidanthera/AirportBrcmFixup.git + Kext-Build-Dir + AirportBrcmFixup + Kext-Debug-needed + + Kext-Dependances + Lilu + Kext-Clone-SubModule + NO + Kext-Copy-SubModule + /Lilu/MacKernelSDK + Kext-Build-Abort-Process-Exit + + + AtherosE2200Ethernet + + #New Item + AtherosE2200Ethernet;Atheros Killer;https://github.com/Mieze/AtherosE2200Ethernet.git;AtherosE2200Ethernet;N;N;N;N;N + Kext-Name + AtherosE2200Ethernet + Kext-Description + Qualcomm Atheros Killer E2200 driver for OS X + Kext-ProjectUrl + https://github.com/Mieze/AtherosE2200Ethernet.git + Kext-Build-Dir + AtherosE2200Ethernet + Kext-Debug-needed + + Kext-Dependances + NO + Kext-Clone-SubModule + NO + Kext-Copy-SubModule + NO + Kext-Build-Abort-Process-Exit + + + IntelMausi + + #New Item + IntelMausi;Intel on-board LAN ;https://github.com/acidanthera/IntelMausi.git;N;N;N;/Lilu/MacKernelSDK;N + Kext-Name + IntelMausi + Kext-Description + A macOS driver for Intel on-board LAN adapters (by acidanthera) + Kext-ProjectUrl + https://github.com/acidanthera/IntelMausi.git + Kext-Build-Dir + IntelMausi + Kext-Debug-needed + + Kext-Dependances + NO + Kext-Clone-SubModule + NO + Kext-Copy-SubModule + /Lilu/MacKernelSDK + Kext-Build-Abort-Process-Exit + + + #IntelMausiEthernet + + #New Item + IntelMausiEthernet;Intel on-board LAN adapters (by mieze) ;https://github.com/mieze/IntelMausiEthernet.git;IntelMausiEthernet;N;N;N;/Lilu/MacKernelSDK;N + Kext-Name + IntelMausiEthernet + Kext-Description + A macOS driver for Intel on-board LAN adapters (by mieze) + Kext-ProjectUrl + https://github.com/mieze/IntelMausiEthernet.git + Kext-Build-Dir + IntelMausiEthernet + Kext-Debug-needed + + Kext-Dependances + NO + Kext-Clone-SubModule + NO + Kext-Copy-SubModule + /Lilu/MacKernelSDK + Kext-Build-Abort-Process-Exit + + + RealtekRTL8111 + + #New Item + RealtekRTL8111;Realtek RTL8111/8168 family of network controllers;https://github.com/Mieze/RTL8111_driver_for_OS_X.git;RTL8111_driver_for_OS_X/RealtekRTL8111;N;N;N;N;N + Kext-Name + RealtekRTL8111 + Kext-Description + An open-source driver for the Realtek RTL8111/8168 family of network controllers + Kext-ProjectUrl + https://github.com/Mieze/RTL8111_driver_for_OS_X.git + Kext-Build-Dir + RTL8111_driver_for_OS_X + Kext-Debug-needed + + Kext-Dependances + NO + Kext-Clone-SubModule + NO + Kext-Copy-SubModule + NO + Kext-Build-Abort-Process-Exit + + + ECEnabler + + #New Item + ECEnabler;Allows reading Embedded Controller fields over 1 byte long, vastly reducing the amount of ACPI modification needed (if any) for working battery status;https://github.com/1Revenger1/ECEnabler.git;ECEnabler;N;Lilu;N;/Lilu/MacKernelSDK;N + Kext-Name + ECEnabler + Kext-Description + Allows reading Embedded Controller fields over 1 byte long, vastly reducing the amount of ACPI modification needed (if any) for working battery status + Kext-ProjectUrl + https://github.com/1Revenger1/ECEnabler + Kext-Build-Dir + ECEnabler + Kext-Debug-needed + + Kext-Dependances + Lilu + Kext-Clone-SubModule + NO + Kext-Copy-SubModule + /Lilu/MacKernelSDK + Kext-Build-Abort-Process-Exit + + + NVMeFix + + #New Item + NVMeFix;patches to the Apple NVMe storage;https://github.com/acidanthera/NVMeFix.git;NVMeFix;N;Lilu;N;/Lilu/MacKernelSDK;N + Kext-Name + NVMeFix + Kext-Description + NVMeFix applies a set of patches to the Apple NVMe storage driver IONVMeFamily + Kext-ProjectUrl + https://github.com/acidanthera/NVMeFix.git + Kext-Build-Dir + NVMeFix + Kext-Debug-needed + + Kext-Dependances + Lilu + Kext-Clone-SubModule + NO + Kext-Copy-SubModule + /Lilu/MacKernelSDK + Kext-Build-Abort-Process-Exit + + + VoodooPS2Controller + + #New Item + VoodooPS2;improved Keyboard & Synaptics TouchPad support;https://github.com/acidanthera/VoodooPS2.git;VoodooPS2Controller;N;Lilu;N;/Lilu/MacKernelSDK;N + Kext-Name + VoodooPS2 + Kext-Description + Contains updated Voodoo PS/2 Controller, improved Keyboard & Synaptics TouchPad support + Kext-ProjectUrl + https://github.com/acidanthera/VoodooPS2.git + Kext-Build-Dir + VoodooPS2 + Kext-Debug-needed + + Kext-Dependances + Lilu + Kext-Clone-SubModule + NO + Kext-Copy-SubModule + /Lilu/MacKernelSDK + Kext-Build-Abort-Process-Exit + + + CPUFriend + + #New Item + CPUFriend;power management data injection;https://github.com/acidanthera/CPUFriend.git;CPUFriend;N;Lilu;N;/Lilu/MacKernelSDK;N + Kext-Name + CPUFriend + Kext-Description + A Lilu plugin for dynamic power management data injection + Kext-ProjectUrl + https://github.com/acidanthera/CPUFriend.git + Kext-Build-Dir + CPUFriend + Kext-Debug-needed + + Kext-Dependances + Lilu + Kext-Clone-SubModule + NO + Kext-Copy-SubModule + /Lilu/MacKernelSDK + Kext-Build-Abort-Process-Exit + + + RTCMemoryFixup + + #New Item + RTCMemoryFixup;emulate some offsets in CMOS (RTC) memory;https://github.com/acidanthera/RTCMemoryFixup.git;RTCMemoryFixup;N;Lilu;N;/Lilu/MacKernelSDK;N + Kext-Name + RTCMemoryFixup + Kext-Description + An open-source kernel extension providing a way to emulate some offsets in CMOS (RTC) memory + Kext-ProjectUrl + https://github.com/acidanthera/RTCMemoryFixup.git + Kext-Build-Dir + RTCMemoryFixup + Kext-Debug-needed + + Kext-Dependances + Lilu + Kext-Clone-SubModule + NO + Kext-Copy-SubModule + /Lilu/MacKernelSDK + Kext-Build-Abort-Process-Exit + + + BrcmPatchRAM + + #New Item + BrcmPatchRAM;wireless card PatchRAM;https://github.com/acidanthera/BrcmPatchRAM.git;BrcmPatchRAM;N;N;N;N;N + Kext-Name + BrcmPatchRAM + Kext-Description + Broadcom wireless card PatchRAM driver for macOS + Kext-ProjectUrl + https://github.com/acidanthera/BrcmPatchRAM.git + Kext-Build-Dir + BrcmPatchRAM + Kext-Debug-needed + + Kext-Dependances + Lilu + Kext-Clone-SubModule + NO + Kext-Copy-SubModule + /Lilu/MacKernelSDK + Kext-Build-Abort-Process-Exit + + + FeatureUnlock + + #New Item + FeatureUnlock;Lilu plugin providing Sidecar and other functions;https://github.com/acidanthera/FeatureUnlock.git;FeatureUnlock;N;Lilu;N;/Lilu/MacKernelSDK;N + Kext-Name + FeatureUnlock + Kext-Description + Lilu plugin providing Sidecar and other functions + Kext-ProjectUrl + https://github.com/acidanthera/FeatureUnlock.git + Kext-Build-Dir + FeatureUnlock + Kext-Debug-needed + + Kext-Dependances + Lilu + Kext-Clone-SubModule + NO + Kext-Copy-SubModule + /Lilu/MacKernelSDK + Kext-Build-Abort-Process-Exit + + + RestrictEvents + + #New Item + RestrictEvents;for blocking unwanted processes;https://github.com/acidanthera/RestrictEvents.git;RestrictEvents;N;Lilu;N;/Lilu/MacKernelSDK;N + Kext-Name + RestrictEvents + Kext-Description + Lilu Kernel extension for blocking unwanted processes + Kext-ProjectUrl + https://github.com/acidanthera/RestrictEvents.git + Kext-Build-Dir + RestrictEvents + Kext-Debug-needed + + Kext-Dependances + Lilu + Kext-Clone-SubModule + NO + Kext-Copy-SubModule + /Lilu/MacKernelSDK + Kext-Build-Abort-Process-Exit + + + CryptexFixup + + #New Item + CryptexFixup;Lilu Kernel extension for installing Rosetta Cryptex in macOS Ventura;https://github.com/acidanthera/CryptexFixup.git;CryptexFixup;N;Lilu;N;/Lilu/MacKernelSDK;N + Kext-Name + CryptexFixup + Kext-Description + Lilu Kernel extension for installing Rosetta Cryptex in macOS Ventura + Kext-ProjectUrl + https://github.com/acidanthera/CryptexFixup.git + Kext-Build-Dir + CryptexFixup + Kext-Debug-needed + + Kext-Dependances + Lilu + Kext-Clone-SubModule + NO + Kext-Copy-SubModule + /Lilu/MacKernelSDK + Kext-Build-Abort-Process-Exit + + + DebugEnhancer + + #New Item + DebugEnhancer;A Lilu plugin intended to enable debug output in the macOS kernel;https://github.com/acidanthera/DebugEnhancer.git;DebugEnhancer;N;Lilu;N;/Lilu/MacKernelSDK;N + Kext-Name + DebugEnhancer + Kext-Description + A Lilu plugin intended to enable debug output in the macOS kernel + Kext-ProjectUrl + https://github.com/acidanthera/DebugEnhancer.git + Kext-Build-Dir + DebugEnhancer + Kext-Debug-needed + + Kext-Dependances + Lilu + Kext-Clone-SubModule + NO + Kext-Copy-SubModule + /Lilu/MacKernelSDK + Kext-Build-Abort-Process-Exit + + + Kexts-List-End + No more Kext to build + NullCPUPowerManagement + + Description + Another problem for OS X running on non-Apple hardware (virtual or otherwise) is the AppleIntelCPUPowerManagement kernel extension which tends to either panic the machine or spew endless debug messages to the console regarding the HPET and its relationship to the CPU + Name + NullCPUPowerManagement + ProjectUrl + https://github.com/corpnewt/NullCPUPowerManagement + Type + Kext + + Shiki + + Description + Protected video playback support and hardware video acceleration on various hardware + Name + Shiki + ProjectUrl + https://github.com/acidanthera/Shiki + Superseder + WhateverGreen + Type + Lilu + + LucyRTL8125Ethernet + + Description + A macOS driver for Realtek RTL8125 2.5GBit Ethernet Controllers + Name + LucyRTL8125Ethernet + ProjectUrl + https://github.com/Mieze/LucyRTL8125Ethernet + Type + Kext + + FakeSMC3_with_plugins + + Description + Driver for emulation SMC device with hardware sensors support + Name + FakeSMC3_with_plugins + ProjectUrl + https://github.com/CloverHackyColor/FakeSMC3_with_plugins + Type + Kext + + SmallTree-I211-AT-patch + + Description + Patching SmallTree to support I211-AT controllers + Name + SmallTree-I211-AT-patch + ProjectUrl + https://github.com/khronokernel/SmallTree-I211-AT-patch + Type + Kext + + DiskArbitrationFixup + + Description + Lilu plugin for disabling the "The disk you inserted was not readable by this computer" message at boot on 10.9 or later; useful if you have other disks with filesystems unknown to macOS + Name + DiskArbitrationFixup + ProjectUrl + https://github.com/Goldfish64/DiskArbitrationFixup + Type + Lilu + + BT4LEContinuityFixup + + Description + An open-source kernel extension providing patches for IOBluetoothFamily + Name + BT4LEContinuityFixup + ProjectUrl + https://github.com/acidanthera/BT4LEContinuityFixup + Type + Lilu + + NoTouchID + + Description + Lilu plugin for disabling Touch ID support; recommended to use only with Apple laptop SMBIOS + Name + NoTouchID + ProjectUrl + https://github.com/al3xtjames/NoTouchID + Type + Lilu + + NightShiftUnlocker + + Description + A Lilu plugin that unlocks the Night Shift function for all Macs + Name + NightShiftUnlocker + ProjectUrl + https://github.com/0xFireWolf/NightShiftUnlocker + Type + Lilu + + ATH9KFixup + + Description + An open-source kernel extension providing patches for unsupported Atheros cards + Name + ATH9KFixup + ProjectUrl + https://github.com/RehabMan/ATH9KFixup + Type + Lilu + + SidecarFixup + + Description + Lilu Kernel extension for enabling Sidecar support on the unsupported SMBIOS + Name + SidecarFixup + ProjectUrl + https://github.com/acidanthera/SidecarFixup + Type + Lilu + + HibernationFixup + + Description + An open-source kernel extension providing a sync between RTC variables and NVRAM + Name + HibernationFixup + ProjectUrl + https://github.com/lvs1974/HibernationFixup + Type + Lilu + + NoVPAJpeg + + Description + A Lilu plugin that disables the hardware JPEG decoding feature of the AppleVPA framework that breaks Preview and Quicklook on some systems + Name + NoVPAJpeg + ProjectUrl + https://github.com/vulgo/NoVPAJpeg + Type + Lilu + + SystemProfilerMemoryFixup + + Description + Lilu plugin for showing the memory tab on MacBookAir and MacBookPro10,x platforms; the tab is normally hidden as these models have soldered memory + Name + SystemProfilerMemoryFixup + ProjectUrl + https://github.com/Goldfish64/SystemProfilerMemoryFixup + Type + Lilu + + USBInjectAll + + Description + This kext attempts to inject USB ports for each controller and for hubs as well; could be complemented with a custom SSDT-UIAC.aml + Name + USBInjectAll + ProjectUrl + https://github.com/Sniki/OS-X-USB-Inject-All + Type + Kext + + ACPIBatteryManager + + Description + Implements an Advanced Configuration and Power Interface (ACPI) based battery manager kernel extension (kext/driver) for non-Apple laptops running OS X + Name + ACPIBatteryManager + ProjectUrl + https://github.com/RehabMan/OS-X-ACPI-Battery-Driver + Type + RehabMan + + BrcmWLFixup + + Description + A Lilu plugin that removes whitelist for Wi-Fi under macOS + Name + BrcmWLFixup + ProjectUrl + https://github.com/PMheart/BrcmWLFixup + Superseder + AirportBrcmFixup + Type + Lilu + + AppleBacklightFixup + + Description + Lilu plugin for enabling support for backlight using RehabMan's patches + Name + AppleBacklightFixup + ProjectUrl + https://github.com/RehabMan/AppleBacklightFixup + Superseder + WhateverGreen + Type + Lilu + + AsusSMC + + Description + A VirtualSMC plugin that provides native support for ALS, keyboard backlight and Fn keys for Asus laptops on macOS + Name + AsusSMC + ProjectUrl + https://github.com/hieplpvip/AsusSMC + Type + Lilu + + YogaSMC + + Description + A VirtualSMC plugin, Allow syncing SMC keys like sensors reading and battery conservation mode for Lenovo laptops on macOS + Name + YogaSMC + ProjectUrl + https://github.com/zhen-zen/YogaSMC + Type + Lilu + + AzulPatcher4600 + + Description + Lilu plugin for Haswell HD4600 mobile Intel GPUs + Name + AzulPatcher4600 + ProjectUrl + https://github.com/coderobe/AzulPatcher4600 + Superseder + WhateverGreen + Type + Lilu + + CodecCommander + + Description + Used for updating EAPD (External Amplifier) state on HDA (High Definition Audio) codecs that use given amp on Speaker or Headphone nodes (both, or even extra ones in some cases) + Name + CodecCommander + ProjectUrl + https://github.com/Sniki/EAPD-Codec-Commander + Superseder + AppleALC + Type + Kext + + CoreDisplayFixup + + Description + Enable 4K resolution or greater, for all graphics under macOS + Name + CoreDisplayFixup + ProjectUrl + https://github.com/PMheart/CoreDisplayFixup + Superseder + WhateverGreen + Type + Lilu + + EnableLidWake + + Description + This kext (actually Lilu friend) provides you the ability to fix the lid wake issue after resuming from sleep on macOS + Name + EnableLidWake + ProjectUrl + https://github.com/syscl/EnableLidWake + Type + Lilu + + FakePCIID + + Description + The purpose of this kext is to attach to any IOPCIDevice so it can provide alternate PCI ID when another driver attached to the same device requests them + Name + FakePCIID + ProjectUrl + https://github.com/RehabMan/OS-X-Fake-PCI-ID + Type + Kext + + FakeSMC + + Description + HWSensors is a software bundle that includes drivers and applications that allow you to access available information from hardware sensors + Name + FakeSMC + ProjectFileUrl + https://github.com/RehabMan/OS-X-FakeSMC-kozlek/raw/master/Versioning%20And%20Distribution.xcodeproj + ProjectUrl + https://github.com/RehabMan/OS-X-FakeSMC-kozlek + Type + Kext + + GenericUSBXHCI + + Description + Fork of Zenith432's GenericUSBXHCI USB 3.0 driver for OS X + Name + GenericUSBXHCI + ProjectUrl + https://github.com/RehabMan/OS-X-Generic-USB3 + Type + Kext + + IntelGraphicsDVMTFixup + + Description + A common problem with Broadwell/Skylake/KabyLake is the relatively small DVMT-prealloc setting by PC OEMs + Name + IntelGraphicsDVMTFixup + Superseder + WhateverGreen + Type + Lilu + + IntelGraphicsFixup + + Description + An open-source kernel extension providing patches to select Intel GPUs + Name + IntelGraphicsFixup + ProjectUrl + https://github.com/lvs1974/IntelGraphicsFixup + Superseder + WhateverGreen + Type + Lilu + + AppleIntelE1000 + + Description + An Intel E1000 network driver based on Linux code + DownloadUrl + https://sourceforge.net/projects/osx86drivers/files/latest/download + Name + AppleIntelE1000 + ProjectUrl + https://sourceforge.net/p/osx86drivers + Type + Kext + + LiluFriend + + Description + A Lilu helper for those who prefer to leave everything inside /Library/Extensions and /System/Library/Extensions + Name + LiluFriend + ProjectUrl + https://github.com/PMheart/LiluFriend + Type + Lilu + + NativeDisplayBrightness + + Description + This a utility utilizes DDC/CI to control monitor brightness with the F1 and F2 keys + Name + NativeDisplayBrightness + ProjectUrl + https://github.com/Bensge/NativeDisplayBrightness + Type + Kext + + NullEthernet + + Description + Enable Mac App Store access even if you don't have a built-in Ethernet (LAN) port with supporting drivers + Name + NullEthernet + ProjectUrl + https://github.com/RehabMan/OS-X-Null-Ethernet + Type + Kext + + NVWebDriverLibValFix + + Description + Fixes the NVIDIA web driver's blank window issue on macOS Sierra with a small and safe kernel patch + Name + NVWebDriverLibValFix + ProjectUrl + https://github.com/mologie/NVWebDriverLibValFix + Superseder + WhateverGreen + Type + Kext + + NvidiaGraphicsFixup + + Description + An open-source kernel extension providing patches for NVidia GPUs + Name + NvidiaGraphicsFixup + ProjectUrl + https://github.com/lvs1974/NvidiaGraphicsFixup + Superseder + WhateverGreen + Type + Lilu + + VoodooHDA + + Description + VoodooHDA is an open-source audio driver for devices compliant with the Intel High Definition Audio specification + DownloadUrl + https://sourceforge.net/projects/voodoohda/files/latest/download + Name + VoodooHDA + ProjectFileUrl + https://sourceforge.net/p/voodoohda/code/HEAD/tree/branches/zdev/VoodooHDA.xcodeproj?format=raw + ProjectUrl + https://sourceforge.net/p/voodoohda + Type + Driver + + VoodooI2C + + Description + VoodooI2C is a project consisting of macOS kernel extensions that add support for I2C bus devices + Name + VoodooI2C + ProjectUrl + https://github.com/alexandred/VoodooI2C + Type + Lilu + + AlpsHID + + Name + AlpsHID + Description + VoodooI2C HID plugin for add support ALPS touchpad + ProjectUrl + https://github.com/blankmac/AlpsHID + Type + VoodooI2C + + VoodooTSCSync + + Description + A kernel extension which will synchronize the TSC on any Intel CPUs + Name + VoodooTSCSync + ProjectUrl + https://github.com/RehabMan/VoodooTSCSync + Type + Kext + + CpuTscSync + + Description + Combining functionality of VoodooTSCSync and disabling xcpm_urgency if TSC is not in sync. It should solve some kernel panics after wake + Name + CpuTscSync + ProjectUrl + https://github.com/acidanthera/CpuTscSync + Type + Lilu + + VoodooInput + + Description + An open-source trackpad aggregator kernel extension providing Magic Trackpad 2 software emulation for arbitrary input sources like VoodooPS2 + Name + VoodooInput + ProjectUrl + https://github.com/acidanthera/VoodooInput + Type + Kext + + VoodooRMI + + Description + A port for macOS of Synaptic's RMI code from Linux. RMI4 is used for touchscreens, touchpads and other sensors + Name + VoodooRMI + ProjectUrl + https://github.com/VoodooSMBus/VoodooRMI + Type + Kext + + VoodooSMBus + + Description + VoodooSMBus provides a kernel extension (driver) for macOS that adds support for the SMBus capabilities of Intel I/O Controller Hubs (ICH), also called i801 SMBus + Name + VoodooSMBus + ProjectUrl + https://github.com/VoodooSMBus/VoodooSMBus + Type + Kext + + IntelBluetoothFirmware + + Description + A driver that loads the Intel BTLE driver firmware on supported devices + Name + IntelBluetoothFirmware + ProjectUrl + https://github.com/OpenIntelWireless/IntelBluetoothFirmware + Type + Kext + + AppleIntelWifiAdapter + + Description + A first effort to create an Intel wireless adapter on MacOS with code as a rewrite from Linux driver; it is now bandoned in favour of "itlmw" by the same author + Name + AppleIntelWifiAdapter + ProjectUrl + https://github.com/zxystd/AppleIntelWifiAdapter + Superseder + itlwm + Type + Kext + + BrightnessKeys + + BundleID + BrightnessKeys + Description + A driver that loads the Brightness Keys + Name + BrightnessKeys + ProjectUrl + https://github.com/acidanthera/BrightnessKeys + Type + Lilu + + AirportItlwm + + BundleID + AirportItlwm + Description + An OpenBSD-based macOS Intel wireless card driver for supported devices that behaves like an integrated AirPort card + Name + itlwm + ProjectUrl + https://github.com/OpenIntelWireless/itlwm + Type + Kext + + itlwm + + BundleID + itlwm + Description + An OpenBSD-based macOS Intel wireless card driver for supported devices that behaves as an Ethernet card; must be accompanied by HeliPort.app to control it + Name + itlwm + ProjectUrl + https://github.com/OpenIntelWireless/itlwm + Type + Kext + + RealtekCardReader + + BundleID + RTSX + Description + An unofficial macOS kernel extension for Realtek PCIe/USB-based SD card readers. + Name + RealtekCardReader + ProjectUrl + https://github.com/0xFireWolf/RealtekCardReader + Type + kext + + RealtekCardReaderFriend + + BundleID + RTSF + Description + A Lilu plugin that makes System Information recognize your builtin USB card reader as a native one. + Name + RealtekCardReaderFriend + ProjectUrl + https://github.com/0xFireWolf/RealtekCardReaderFriend + Type + Lilu + + + \ No newline at end of file diff --git a/OCBuilder/TaskViewController.swift b/OCBuilder/TaskViewController.swift index f409144..37d0656 100644 --- a/OCBuilder/TaskViewController.swift +++ b/OCBuilder/TaskViewController.swift @@ -18,9 +18,11 @@ class TaskViewController: NSViewController { @IBOutlet var progressBar: NSProgressIndicator! @IBOutlet var stopButton: NSButton! @IBOutlet weak var versionList: NSPopUpButton! - let versionArray = ["Debug", "Release", "Debug IA32", "Release IA32"] + let versionArray = ["Release X64", "Debug X64", "Release IA32", "Debug IA32", "None"] @IBOutlet weak var withKextsChecked: NSButton! - + @IBOutlet weak var withStdLogChecked: NSButton! + @IBOutlet weak var withErrLogChecked: NSButton! + override func viewDidLoad() { stopButton.isEnabled = false progressBar.isHidden = true @@ -44,34 +46,64 @@ class TaskViewController: NSViewController { stopButton.isEnabled = true progressBar.isHidden = false outputText.string = "" - if let repositoryURL = pathLocation.url { - let cloneLocation = "/tmp" - let finalLocation = repositoryURL.path - var arguments:[String] = [] - arguments.append(cloneLocation) - arguments.append(finalLocation) - buildButton.isEnabled = false - progressBar.startAnimation(self) - if versionList.titleOfSelectedItem == "Debug" { - if withKextsChecked.state == NSControl.StateValue.on { - runDebugScript(arguments) - } else { - runDebugWithoutKextScript(arguments) + if (versionList.titleOfSelectedItem == "None" && withKextsChecked.state == NSControl.StateValue.on) || versionList.titleOfSelectedItem != "None" { + if let repositoryURL = pathLocation.url { + let cloneLocation = "/tmp" + let finalLocation = repositoryURL.path + var arguments:[String] = [] + arguments.append(cloneLocation) + arguments.append(finalLocation) + buildButton.isEnabled = false + progressBar.startAnimation(self) + if versionList.titleOfSelectedItem == "Release X64" { + arguments.append("Release") + arguments.append("X64") + if withKextsChecked.state == NSControl.StateValue.on { + arguments.append("1") + } else { + arguments.append("0") + } } - } - if versionList.titleOfSelectedItem == "Release" { - if withKextsChecked.state == NSControl.StateValue.on { - runReleaseScript(arguments) - } else { - runReleaseWithoutKextScript(arguments) + if versionList.titleOfSelectedItem == "Debug X64" { + arguments.append("Debug") + arguments.append("X64") + if withKextsChecked.state == NSControl.StateValue.on { + arguments.append("1") + } else { + arguments.append("0") + } + } + if versionList.titleOfSelectedItem == "Release IA32" { + arguments.append("Release") + arguments.append("Ia32") + arguments.append("0") } if versionList.titleOfSelectedItem == "Debug IA32" { - runDebugWithoutKextScriptIA32(arguments) + arguments.append("Debug") + arguments.append("Ia32") + arguments.append("0") } - if versionList.titleOfSelectedItem == "Release IA32" { - runReleaseWithoutKextScriptIA32(arguments) + if versionList.titleOfSelectedItem == "None" { + arguments.append("None") + arguments.append("None") + arguments.append("1") + } + if withStdLogChecked.state == NSControl.StateValue.on { + arguments.append("1") + } else { + arguments.append("0") } + if withErrLogChecked.state == NSControl.StateValue.on { + arguments.append("1") + } else { + arguments.append("0") + } + runOCBuilderScript(arguments) + } else { + showAlert() } + } else { + showAlert() } } @@ -84,40 +116,12 @@ class TaskViewController: NSViewController { } } - func runReleaseScript(_ arguments:[String]) { - isRunning = true - let taskQueue = DispatchQueue.global(qos: DispatchQoS.QoSClass.background) - taskQueue.async { - guard let path = Bundle.main.path(forResource: "release",ofType:"command") else { - print("Unable to locate release.command") - return - } - self.buildTask = Process() - self.buildTask.launchPath = path - self.buildTask.arguments = arguments - self.buildTask.terminationHandler = { - task in - DispatchQueue.main.async(execute: { - self.stopButton.isEnabled = false - self.buildButton.isEnabled = true - self.progressBar.isHidden = true - self.progressBar.stopAnimation(self) - self.progressBar.doubleValue = 0.0 - self.isRunning = false - }) - } - self.captureStandardOutputAndRouteToTextViewReleaseWithKext(self.buildTask) - self.buildTask.launch() - self.buildTask.waitUntilExit() - } - } - - func runReleaseWithoutKextScript(_ arguments:[String]) { + func runOCBuilderScript(_ arguments:[String]) { isRunning = true let taskQueue = DispatchQueue.global(qos: DispatchQoS.QoSClass.background) taskQueue.async { - guard let path = Bundle.main.path(forResource: "release_without_kexts",ofType:"command") else { - print("Unable to locate release_without_kexts.command") + guard let path = Bundle.main.path(forResource: "runOCBuilderScript",ofType:"command") else { + print("Unable to locate runOCBuilderScript.command") return } self.buildTask = Process() @@ -134,230 +138,30 @@ class TaskViewController: NSViewController { self.isRunning = false }) } - self.captureStandardOutputAndRouteToTextViewonReleaseWithoutKext(self.buildTask) + self.captureStandardOutput(self.buildTask) self.buildTask.launch() self.buildTask.waitUntilExit() } } - func runReleaseWithoutKextScriptIA32(_ arguments:[String]) { - isRunning = true - let taskQueue = DispatchQueue.global(qos: DispatchQoS.QoSClass.background) - taskQueue.async { - guard let path = Bundle.main.path(forResource: "release_without_kexts_IA32",ofType:"command") else { - print("Unable to locate release_without_kexts_IA32.command") - return - } - self.buildTask = Process() - self.buildTask.launchPath = path - self.buildTask.arguments = arguments - self.buildTask.terminationHandler = { - task in - DispatchQueue.main.async(execute: { - self.stopButton.isEnabled = false - self.buildButton.isEnabled = true - self.progressBar.isHidden = true - self.progressBar.stopAnimation(self) - self.progressBar.doubleValue = 0.0 - self.isRunning = false - }) - } - self.captureStandardOutputAndRouteToTextViewonReleaseWithoutKext(self.buildTask) - self.buildTask.launch() - self.buildTask.waitUntilExit() - } - } - - func runDebugScript(_ arguments:[String]) { - isRunning = true - let taskQueue = DispatchQueue.global(qos: DispatchQoS.QoSClass.background) - taskQueue.async { - guard let path = Bundle.main.path(forResource: "debug",ofType:"command") else { - print("Unable to locate release.command") - return - } - self.buildTask = Process() - self.buildTask.launchPath = path - self.buildTask.arguments = arguments - self.buildTask.terminationHandler = { - task in - DispatchQueue.main.async(execute: { - self.stopButton.isEnabled = false - self.buildButton.isEnabled = true - self.progressBar.isHidden = true - self.progressBar.stopAnimation(self) - self.progressBar.doubleValue = 0.0 - self.isRunning = false - }) - } - self.captureStandardOutputAndRouteToTextViewDebugWithKext(self.buildTask) - self.buildTask.launch() - self.buildTask.waitUntilExit() - } - } - - func runDebugWithoutKextScript(_ arguments:[String]) { - isRunning = true - let taskQueue = DispatchQueue.global(qos: DispatchQoS.QoSClass.background) - taskQueue.async { - guard let path = Bundle.main.path(forResource: "debug_without_kexts",ofType:"command") else { - print("Unable to locate debug_without_kexts.command") - return - } - self.buildTask = Process() - self.buildTask.launchPath = path - self.buildTask.arguments = arguments - self.buildTask.terminationHandler = { - task in - DispatchQueue.main.async(execute: { - self.stopButton.isEnabled = false - self.buildButton.isEnabled = true - self.progressBar.isHidden = true - self.progressBar.stopAnimation(self) - self.progressBar.doubleValue = 0.0 - self.isRunning = false - }) - } - self.captureStandardOutputAndRouteToTextViewonDebugWithoutKext(self.buildTask) - self.buildTask.launch() - self.buildTask.waitUntilExit() - } - } - - func runDebugWithoutKextScriptIA32(_ arguments:[String]) { - isRunning = true - let taskQueue = DispatchQueue.global(qos: DispatchQoS.QoSClass.background) - taskQueue.async { - guard let path = Bundle.main.path(forResource: "debug_without_kexts_IA32",ofType:"command") else { - print("Unable to locate debug_without_kexts_IA32.command") - return - } - self.buildTask = Process() - self.buildTask.launchPath = path - self.buildTask.arguments = arguments - self.buildTask.terminationHandler = { - task in - DispatchQueue.main.async(execute: { - self.stopButton.isEnabled = false - self.buildButton.isEnabled = true - self.progressBar.isHidden = true - self.progressBar.stopAnimation(self) - self.progressBar.doubleValue = 0.0 - self.isRunning = false - }) - } - self.captureStandardOutputAndRouteToTextViewonDebugWithoutKext(self.buildTask) - self.buildTask.launch() - self.buildTask.waitUntilExit() - } - } - - func captureStandardOutputAndRouteToTextViewonReleaseWithoutKext(_ task:Process) { - outputPipe = Pipe() - task.standardOutput = outputPipe - outputPipe.fileHandleForReading.waitForDataInBackgroundAndNotify() - NotificationCenter.default.addObserver(forName: NSNotification.Name.NSFileHandleDataAvailable, object: outputPipe.fileHandleForReading , queue: nil) { - notification in - let output = self.outputPipe.fileHandleForReading.availableData - let outputString = String(data: output, encoding: String.Encoding.utf8) ?? "" - DispatchQueue.main.async(execute: { - let previousOutput = self.outputText.string - let nextOutput = previousOutput + "\n" + outputString - self.outputText.string = nextOutput - let range = NSRange(location:nextOutput.count,length:0) - self.outputText.scrollRangeToVisible(range) - }) - self.outputPipe.fileHandleForReading.waitForDataInBackgroundAndNotify() - } - } - - func captureStandardOutputAndRouteToTextViewonReleaseWithoutKextIA32(_ task:Process) { - outputPipe = Pipe() - task.standardOutput = outputPipe - outputPipe.fileHandleForReading.waitForDataInBackgroundAndNotify() - NotificationCenter.default.addObserver(forName: NSNotification.Name.NSFileHandleDataAvailable, object: outputPipe.fileHandleForReading , queue: nil) { - notification in - let output = self.outputPipe.fileHandleForReading.availableData - let outputString = String(data: output, encoding: String.Encoding.utf8) ?? "" - DispatchQueue.main.async(execute: { - let previousOutput = self.outputText.string - let nextOutput = previousOutput + "\n" + outputString - self.outputText.string = nextOutput - let range = NSRange(location:nextOutput.count,length:0) - self.outputText.scrollRangeToVisible(range) - }) - self.outputPipe.fileHandleForReading.waitForDataInBackgroundAndNotify() - } - } - - func captureStandardOutputAndRouteToTextViewonDebugWithoutKext(_ task:Process) { - outputPipe = Pipe() - task.standardOutput = outputPipe - outputPipe.fileHandleForReading.waitForDataInBackgroundAndNotify() - NotificationCenter.default.addObserver(forName: NSNotification.Name.NSFileHandleDataAvailable, object: outputPipe.fileHandleForReading , queue: nil) { - notification in - let output = self.outputPipe.fileHandleForReading.availableData - let outputString = String(data: output, encoding: String.Encoding.utf8) ?? "" - DispatchQueue.main.async(execute: { - let previousOutput = self.outputText.string - let nextOutput = previousOutput + "\n" + outputString - self.outputText.string = nextOutput - let range = NSRange(location:nextOutput.count,length:0) - self.outputText.scrollRangeToVisible(range) - }) - self.outputPipe.fileHandleForReading.waitForDataInBackgroundAndNotify() - } - } - - func captureStandardOutputAndRouteToTextViewonDebugWithoutKextIA32(_ task:Process) { + func captureStandardOutput(_ task:Process) { outputPipe = Pipe() task.standardOutput = outputPipe outputPipe.fileHandleForReading.waitForDataInBackgroundAndNotify() NotificationCenter.default.addObserver(forName: NSNotification.Name.NSFileHandleDataAvailable, object: outputPipe.fileHandleForReading , queue: nil) { notification in let output = self.outputPipe.fileHandleForReading.availableData - let outputString = String(data: output, encoding: String.Encoding.utf8) ?? "" + var outputString = String(data: output, encoding: String.Encoding.utf8) ?? "" + var nextOutput = "" DispatchQueue.main.async(execute: { let previousOutput = self.outputText.string - let nextOutput = previousOutput + "\n" + outputString - self.outputText.string = nextOutput - let range = NSRange(location:nextOutput.count,length:0) - self.outputText.scrollRangeToVisible(range) - }) - self.outputPipe.fileHandleForReading.waitForDataInBackgroundAndNotify() - } - } - - func captureStandardOutputAndRouteToTextViewReleaseWithKext(_ task:Process) { - outputPipe = Pipe() - task.standardOutput = outputPipe - outputPipe.fileHandleForReading.waitForDataInBackgroundAndNotify() - NotificationCenter.default.addObserver(forName: NSNotification.Name.NSFileHandleDataAvailable, object: outputPipe.fileHandleForReading , queue: nil) { - notification in - let output = self.outputPipe.fileHandleForReading.availableData - let outputString = String(data: output, encoding: String.Encoding.utf8) ?? "" - DispatchQueue.main.async(execute: { - let previousOutput = self.outputText.string - let nextOutput = previousOutput + "\n" + outputString - self.outputText.string = nextOutput - let range = NSRange(location:nextOutput.count,length:0) - self.outputText.scrollRangeToVisible(range) - }) - self.outputPipe.fileHandleForReading.waitForDataInBackgroundAndNotify() - } - } - - func captureStandardOutputAndRouteToTextViewDebugWithKext(_ task:Process) { - outputPipe = Pipe() - task.standardOutput = outputPipe - outputPipe.fileHandleForReading.waitForDataInBackgroundAndNotify() - NotificationCenter.default.addObserver(forName: NSNotification.Name.NSFileHandleDataAvailable, object: outputPipe.fileHandleForReading , queue: nil) { - notification in - let output = self.outputPipe.fileHandleForReading.availableData - let outputString = String(data: output, encoding: String.Encoding.utf8) ?? "" - DispatchQueue.main.async(execute: { - let previousOutput = self.outputText.string - let nextOutput = previousOutput + "\n" + outputString + if String(outputString.utf16.prefix(2)) == "\\n" { + outputString.remove(at: outputString.startIndex) + outputString.remove(at: outputString.startIndex) + nextOutput = previousOutput + "\n" + outputString + } else { + nextOutput = previousOutput + outputString + } self.outputText.string = nextOutput let range = NSRange(location:nextOutput.count,length:0) self.outputText.scrollRangeToVisible(range) @@ -374,4 +178,13 @@ class TaskViewController: NSViewController { alert.addButton(withTitle: "OK") alert.runModal() } + + func showAlert() { + let alert = NSAlert() + alert.messageText = "Mismatch mandatory selection(s)" + alert.informativeText = "You must choose 'With Kexts' with 'Select Version = None' and choose too a 'Location to save Builds'" + alert.alertStyle = .critical + alert.addButton(withTitle: "OK") + alert.runModal() + } } diff --git a/OCBuilder/debug.command b/OCBuilder/debug.command deleted file mode 100755 index 7f55696..0000000 --- a/OCBuilder/debug.command +++ /dev/null @@ -1,530 +0,0 @@ -#!/bin/bash - -prompt() { - dialogTitle="OCBuilder" - authPass=$(/usr/bin/osascript <