Skip to content

Commit

Permalink
Initial MacKernelSDK and Xcode 12 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
vit9696 committed Sep 20, 2020
1 parent 4aebe0b commit 0559165
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 11 deletions.
7 changes: 1 addition & 6 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -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
3 changes: 3 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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")" = "" ]
Expand All @@ -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
Expand Down
22 changes: 18 additions & 4 deletions CPUFriend.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down Expand Up @@ -37,6 +37,7 @@
CE405ED21E49F9FC00AA0B3D /* kern_api.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = kern_api.hpp; sourceTree = "<group>"; };
CE405ED81E4A080700AA0B3D /* plugin_start.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = plugin_start.cpp; sourceTree = "<group>"; };
CE405EDA1E4A080F00AA0B3D /* plugin_start.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = plugin_start.hpp; sourceTree = "<group>"; };
CE8DA0BE2517DD4A008C44E8 /* libkmod.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libkmod.a; path = ../Lilu/MacKernelSDK/Library/x86_64/libkmod.a; sourceTree = "<group>"; };
CEBD8C171F372A4600BBCB85 /* CPUFriend.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CPUFriend.cpp; sourceTree = "<group>"; };
CEBD8C181F372A4600BBCB85 /* CPUFriend.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = CPUFriend.hpp; sourceTree = "<group>"; };
/* End PBXFileReference section */
Expand All @@ -46,7 +47,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
CE405EC91E49DD9700AA0B3D /* libkmod.a in Frameworks */,
CE8DA0BF2517DD4A008C44E8 /* libkmod.a in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand All @@ -60,6 +61,7 @@
CE405EC81E49DD7B00AA0B3D /* SDK */,
1C748C291C21952C0024EED2 /* CPUFriend */,
1C748C281C21952C0024EED2 /* Products */,
CE8DA0BD2517DD4A008C44E8 /* Frameworks */,
);
sourceTree = "<group>";
};
Expand Down Expand Up @@ -133,6 +135,14 @@
name = SDK;
sourceTree = "<group>";
};
CE8DA0BD2517DD4A008C44E8 /* Frameworks */ = {
isa = PBXGroup;
children = (
CE8DA0BE2517DD4A008C44E8 /* libkmod.a */,
);
name = Frameworks;
sourceTree = "<group>";
};
/* End PBXGroup section */

/* Begin PBXHeadersBuildPhase section */
Expand Down Expand Up @@ -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;
};
Expand Down Expand Up @@ -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;
Expand All @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion CPUFriend/CPUFriend.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#define kern_cpuf_hpp

#include <Headers/kern_patcher.hpp>
#include <Library/LegacyIOService.h>
#include <IOKit/IOService.h>

class EXPORT CPUFriendData : public IOService {
OSDeclareDefaultStructors(CPUFriendData)
Expand Down
3 changes: 3 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
CPUFriend Changelog
===================
#### v1.2.2
- Added MacKernelSDK with Xcode 12 compatibility

#### v1.2.1
- Added constants for 11.0 support

Expand Down

0 comments on commit 0559165

Please sign in to comment.