diff --git a/.gitignore b/.gitignore index 6e37dd9..bbe51df 100644 --- a/.gitignore +++ b/.gitignore @@ -1,14 +1,9 @@ .DS_Store - build/ - CPUFriend/.DS_Store - Tools/.DS_Store - CPUFriend.xcodeproj/xcuserdata CPUFriend.xcodeproj/project.xcworkspace/xcuserdata - Lilu.kext - DerivedData +/MacKernelSDK diff --git a/.travis.yml b/.travis.yml index 71134f2..6e6e484 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,6 +12,7 @@ matrix: compiler: clang script: + - git clone https://github.com/acidanthera/MacKernelSDK - src=$(/usr/bin/curl -Lfs https://raw.githubusercontent.com/acidanthera/Lilu/master/Lilu/Scripts/bootstrap.sh) && eval "$src" || exit 1 - xcodebuild -configuration Debug - xcodebuild -jobs 1 -configuration Release @@ -32,6 +33,7 @@ matrix: compiler: clang script: + - git clone https://github.com/acidanthera/MacKernelSDK - src=$(/usr/bin/curl -Lfs https://raw.githubusercontent.com/acidanthera/Lilu/master/Lilu/Scripts/bootstrap.sh) && eval "$src" || exit 1 - xcodebuild analyze -quiet -scheme CPUFriend -configuration Debug CLANG_ANALYZER_OUTPUT=plist-html CLANG_ANALYZER_OUTPUT_DIR="$(pwd)/clang-analyze" && [ "$(find clang-analyze -name "*.html")" = "" ] - xcodebuild analyze -quiet -scheme CPUFriend -configuration Release CLANG_ANALYZER_OUTPUT=plist-html CLANG_ANALYZER_OUTPUT_DIR="$(pwd)/clang-analyze" && [ "$(find clang-analyze -name "*.html")" = "" ] @@ -43,6 +45,7 @@ matrix: compiler: clang before_install: + - git clone https://github.com/acidanthera/MacKernelSDK - curl -Ls https://entrust.com/root-certificates/entrust_l1k.cer -o ~/entrust_l1k.crt || exit 1 - curl -LS https://curl.haxx.se/ca/cacert.pem -o ~/cacert.pem || exit 1 - cat ~/entrust_l1k.crt >> ~/cacert.pem || exit 1 diff --git a/CPUFriend.xcodeproj/project.pbxproj b/CPUFriend.xcodeproj/project.pbxproj index 3c24210..e54b579 100755 --- a/CPUFriend.xcodeproj/project.pbxproj +++ b/CPUFriend.xcodeproj/project.pbxproj @@ -8,8 +8,8 @@ /* Begin PBXBuildFile section */ 1C748C2D1C21952C0024EED2 /* kern_start.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1C748C2C1C21952C0024EED2 /* kern_start.cpp */; }; - CE405EC91E49DD9700AA0B3D /* libkmod.a in Frameworks */ = {isa = PBXBuildFile; fileRef = CE405EC71E49DD7100AA0B3D /* libkmod.a */; }; CE405ED91E4A080700AA0B3D /* plugin_start.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CE405ED81E4A080700AA0B3D /* plugin_start.cpp */; }; + CE8DA0BF2517DD4A008C44E8 /* libkmod.a in Frameworks */ = {isa = PBXBuildFile; fileRef = CE8DA0BE2517DD4A008C44E8 /* libkmod.a */; }; CEBD8C191F372A4600BBCB85 /* CPUFriend.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CEBD8C171F372A4600BBCB85 /* CPUFriend.cpp */; }; CEBD8C1A1F372A4600BBCB85 /* CPUFriend.hpp in Headers */ = {isa = PBXBuildFile; fileRef = CEBD8C181F372A4600BBCB85 /* CPUFriend.hpp */; }; /* End PBXBuildFile section */ @@ -37,6 +37,7 @@ CE405ED21E49F9FC00AA0B3D /* kern_api.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = kern_api.hpp; sourceTree = ""; }; CE405ED81E4A080700AA0B3D /* plugin_start.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = plugin_start.cpp; sourceTree = ""; }; CE405EDA1E4A080F00AA0B3D /* plugin_start.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = plugin_start.hpp; sourceTree = ""; }; + CE8DA0BE2517DD4A008C44E8 /* libkmod.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libkmod.a; path = ../Lilu/MacKernelSDK/Library/x86_64/libkmod.a; sourceTree = ""; }; CEBD8C171F372A4600BBCB85 /* CPUFriend.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CPUFriend.cpp; sourceTree = ""; }; CEBD8C181F372A4600BBCB85 /* CPUFriend.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = CPUFriend.hpp; sourceTree = ""; }; /* End PBXFileReference section */ @@ -46,7 +47,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - CE405EC91E49DD9700AA0B3D /* libkmod.a in Frameworks */, + CE8DA0BF2517DD4A008C44E8 /* libkmod.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -60,6 +61,7 @@ CE405EC81E49DD7B00AA0B3D /* SDK */, 1C748C291C21952C0024EED2 /* CPUFriend */, 1C748C281C21952C0024EED2 /* Products */, + CE8DA0BD2517DD4A008C44E8 /* Frameworks */, ); sourceTree = ""; }; @@ -133,6 +135,14 @@ name = SDK; sourceTree = ""; }; + CE8DA0BD2517DD4A008C44E8 /* Frameworks */ = { + isa = PBXGroup; + children = ( + CE8DA0BE2517DD4A008C44E8 /* libkmod.a */, + ); + name = Frameworks; + sourceTree = ""; + }; /* End PBXGroup section */ /* Begin PBXHeadersBuildPhase section */ @@ -271,6 +281,8 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; + KERNEL_EXTENSION_HEADER_SEARCH_PATHS = "$(PROJECT_DIR)/MacKernelSDK/Headers"; + KERNEL_FRAMEWORK_HEADERS = "$(PROJECT_DIR)/MacKernelSDK/Headers"; ONLY_ACTIVE_ARCH = YES; SDKROOT = macosx; }; @@ -315,6 +327,8 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; + KERNEL_EXTENSION_HEADER_SEARCH_PATHS = "$(PROJECT_DIR)/MacKernelSDK/Headers"; + KERNEL_FRAMEWORK_HEADERS = "$(PROJECT_DIR)/MacKernelSDK/Headers"; SDKROOT = macosx; }; name = Release; @@ -338,7 +352,7 @@ INFOPLIST_FILE = CPUFriend/Info.plist; LIBRARY_SEARCH_PATHS = ( "$(inherited)", - "$(PROJECT_DIR)/Lilu.kext/Contents/Resources/Library", + "$(PROJECT_DIR)/MacKernelSDK/Library/x86_64", ); MACOSX_DEPLOYMENT_TARGET = 10.8; MODULE_NAME = org.vanilla.driver.CPUFriend; @@ -386,7 +400,7 @@ INFOPLIST_FILE = CPUFriend/Info.plist; LIBRARY_SEARCH_PATHS = ( "$(inherited)", - "$(PROJECT_DIR)/Lilu.kext/Contents/Resources/Library", + "$(PROJECT_DIR)/MacKernelSDK/Library/x86_64", ); LLVM_LTO = YES; MACOSX_DEPLOYMENT_TARGET = 10.8; diff --git a/CPUFriend/CPUFriend.hpp b/CPUFriend/CPUFriend.hpp index 3685b6a..7d5ade0 100755 --- a/CPUFriend/CPUFriend.hpp +++ b/CPUFriend/CPUFriend.hpp @@ -9,7 +9,7 @@ #define kern_cpuf_hpp #include -#include +#include class EXPORT CPUFriendData : public IOService { OSDeclareDefaultStructors(CPUFriendData) diff --git a/Changelog.md b/Changelog.md index eff9144..dfdb113 100755 --- a/Changelog.md +++ b/Changelog.md @@ -1,5 +1,8 @@ CPUFriend Changelog =================== +#### v1.2.2 +- Added MacKernelSDK with Xcode 12 compatibility + #### v1.2.1 - Added constants for 11.0 support