Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
version: 2
updates:

- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
10 changes: 5 additions & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,20 @@ jobs:
env:
JOB_TYPE: BUILD
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v2
- uses: actions/checkout@v5
- uses: actions/checkout@v5
with:
repository: acidanthera/MacKernelSDK
path: MacKernelSDK
- name: CI Bootstrap
run: |
src=$(/usr/bin/curl -Lfs https://raw.githubusercontent.com/acidanthera/ocbuild/master/ci-bootstrap.sh) && eval "$src" || exit 1

- run: xcodebuild -scheme CodecCommander -derivedDataPath . -configuration Debug
- run: xcodebuild -scheme CodecCommander -derivedDataPath . -configuration Release
- run: xcodebuild -scheme CodecCommander -configuration Debug
- run: xcodebuild -scheme CodecCommander -configuration Release

- name: Upload to Artifacts
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: Artifacts
path: Build/Products/*/*.zip
Expand Down
39 changes: 14 additions & 25 deletions CodecCommander.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
/* Begin PBXBuildFile section */
849921901600F4FC00CCDF3B /* CodecCommander.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8499218E1600F4FC00CCDF3B /* CodecCommander.cpp */; };
849921911600F4FC00CCDF3B /* CodecCommander.h in Headers */ = {isa = PBXBuildFile; fileRef = 8499218F1600F4FC00CCDF3B /* CodecCommander.h */; };
AA3842732616842B006705B9 /* libkmod.a in Frameworks */ = {isa = PBXBuildFile; fileRef = AA3842722616842B006705B9 /* libkmod.a */; };
AA915F2E2DF971A70090B341 /* libkmod.a in Frameworks */ = {isa = PBXBuildFile; fileRef = AA915F2D2DF971A70090B341 /* libkmod.a */; };
D404F1D61A124D5E008E6BFD /* Client.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D404F1D51A124D5E008E6BFD /* Client.cpp */; };
D40F6EDE1A73EC0A0064E146 /* CoreFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D40F6EDC1A73EBFD0064E146 /* CoreFoundation.framework */; };
D42D3C081A59558C006C4C8C /* main.c in Sources */ = {isa = PBXBuildFile; fileRef = D42D3C071A59558C006C4C8C /* main.c */; };
Expand Down Expand Up @@ -41,7 +41,7 @@
8499218E1600F4FC00CCDF3B /* CodecCommander.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; lineEnding = 0; path = CodecCommander.cpp; sourceTree = "<group>"; usesTabs = 1; xcLanguageSpecificationIdentifier = xcode.lang.cpp; };
8499218F1600F4FC00CCDF3B /* CodecCommander.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = CodecCommander.h; sourceTree = "<group>"; usesTabs = 1; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; };
849F78D71ACFC03600389EDA /* makefile */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.make; path = makefile; sourceTree = "<group>"; usesTabs = 1; };
AA3842722616842B006705B9 /* libkmod.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libkmod.a; path = MacKernelSDK/Library/x86_64/libkmod.a; sourceTree = "<group>"; };
AA915F2D2DF971A70090B341 /* libkmod.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libkmod.a; path = MacKernelSDK/Library/universal/libkmod.a; sourceTree = "<group>"; };
D404F1D51A124D5E008E6BFD /* Client.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Client.cpp; sourceTree = "<group>"; };
D40F6EDC1A73EBFD0064E146 /* CoreFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreFoundation.framework; path = System/Library/Frameworks/CoreFoundation.framework; sourceTree = SDKROOT; };
D42D3C051A59558B006C4C8C /* CodecCommanderClient */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = CodecCommanderClient; sourceTree = BUILT_PRODUCTS_DIR; };
Expand Down Expand Up @@ -69,7 +69,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
AA3842732616842B006705B9 /* libkmod.a in Frameworks */,
AA915F2E2DF971A70090B341 /* libkmod.a in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -112,7 +112,7 @@
0C4B238014598AD20080D960 /* Frameworks */ = {
isa = PBXGroup;
children = (
AA3842722616842B006705B9 /* libkmod.a */,
AA915F2D2DF971A70090B341 /* libkmod.a */,
D40F6EDC1A73EBFD0064E146 /* CoreFoundation.framework */,
D42D3C0D1A595937006C4C8C /* IOKit.framework */,
0AE84D9919B8306F00968A53 /* Kernel.framework */,
Expand Down Expand Up @@ -192,7 +192,6 @@
0C4B237914598AD20080D960 /* Frameworks */,
0C4B237A14598AD20080D960 /* Headers */,
0C4B237B14598AD20080D960 /* Resources */,
0C4B237C14598AD20080D960 /* Rez */,
AA38428B26169F84006705B9 /* Archive */,
);
buildRules = (
Expand Down Expand Up @@ -264,16 +263,6 @@
};
/* End PBXResourcesBuildPhase section */

/* Begin PBXRezBuildPhase section */
0C4B237C14598AD20080D960 /* Rez */ = {
isa = PBXRezBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXRezBuildPhase section */

/* Begin PBXShellScriptBuildPhase section */
AA38428B26169F84006705B9 /* Archive */ = {
isa = PBXShellScriptBuildPhase;
Expand Down Expand Up @@ -361,6 +350,7 @@
MODULE_VERSION = 2.7.3;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = macosx;
SYMROOT = Build/Products;
WRAPPER_EXTENSION = kext;
};
name = Debug;
Expand Down Expand Up @@ -405,6 +395,7 @@
MACOSX_DEPLOYMENT_TARGET = 10.6;
MODULE_VERSION = 2.7.3;
SDKROOT = macosx;
SYMROOT = Build/Products;
WRAPPER_EXTENSION = kext;
};
name = Release;
Expand All @@ -413,17 +404,16 @@
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ENABLE_OBJC_WEAK = YES;
CODE_SIGNING_ALLOWED = NO;
CODE_SIGN_IDENTITY = "";
CODE_SIGNING_ALLOWED = NO;
CURRENT_PROJECT_VERSION = 2.7.3;
CURRENT_PROJECT_VERSION = "$(MODULE_VERSION)";
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "CodecCommander/CodecCommander-Prefix.pch";
INFOPLIST_FILE = "CodecCommander/CodecCommander-Info.plist";
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/MacKernelSDK/Library/x86_64",
"$(PROJECT_DIR)/MacKernelSDK/Library/universal",
);
MARKETING_VERSION = 2.7.3;
MODULE_NAME = org.tw.CodecCommander;
MODULE_START = CodecCommander_Start;
MODULE_STOP = CodecCommander_Stop;
Expand All @@ -437,17 +427,16 @@
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ENABLE_OBJC_WEAK = YES;
CODE_SIGNING_ALLOWED = NO;
CODE_SIGN_IDENTITY = "";
CODE_SIGNING_ALLOWED = NO;
CURRENT_PROJECT_VERSION = 2.7.3;
CURRENT_PROJECT_VERSION = "$(MODULE_VERSION)";
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "CodecCommander/CodecCommander-Prefix.pch";
INFOPLIST_FILE = "CodecCommander/CodecCommander-Info.plist";
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/MacKernelSDK/Library/x86_64",
"$(PROJECT_DIR)/MacKernelSDK/Library/universal",
);
MARKETING_VERSION = 2.7.3;
MODULE_NAME = org.tw.CodecCommander;
MODULE_START = CodecCommander_Start;
MODULE_STOP = CodecCommander_Stop;
Expand All @@ -461,8 +450,8 @@
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ENABLE_OBJC_WEAK = YES;
CODE_SIGNING_ALLOWED = NO;
CODE_SIGN_IDENTITY = "";
CODE_SIGNING_ALLOWED = NO;
MACOSX_DEPLOYMENT_TARGET = 10.6;
ONLY_ACTIVE_ARCH = YES;
PRODUCT_NAME = "$(TARGET_NAME)";
Expand All @@ -473,8 +462,8 @@
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ENABLE_OBJC_WEAK = YES;
CODE_SIGNING_ALLOWED = NO;
CODE_SIGN_IDENTITY = "";
CODE_SIGNING_ALLOWED = NO;
MACOSX_DEPLOYMENT_TARGET = 10.6;
PRODUCT_NAME = "$(TARGET_NAME)";
};
Expand Down
24 changes: 12 additions & 12 deletions CodecCommander/CodecCommander-Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -3,31 +3,31 @@
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<string>en</string>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleGetInfoString</key>
<string>${MODULE_VERSION}, Copyright © 2013-2014 TimeWalker. All rights reserved.</string>
<string>$(MODULE_VERSION), Copyright © 2013-2014 TimeWalker. All rights reserved.</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>${PRODUCT_NAME}</string>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>KEXT</string>
<key>CFBundleShortVersionString</key>
<string>$(MARKETING_VERSION)</string>
<string>$(MODULE_VERSION)</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
<string>$(MODULE_VERSION)</string>
<key>IOKitPersonalities</key>
<dict>
<key>CodecCommander</key>
<dict>
<key>CFBundleIdentifier</key>
<string>${MODULE_NAME}</string>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>Codec Profile</key>
<dict>
<key>1002</key>
Expand Down Expand Up @@ -326,7 +326,7 @@
<key>CodecCommanderPowerHook</key>
<dict>
<key>CFBundleIdentifier</key>
<string>${MODULE_NAME}</string>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>Codec Profile</key>
<dict>
<key>1002</key>
Expand All @@ -351,7 +351,7 @@
<key>CodecCommanderProbeInit</key>
<dict>
<key>CFBundleIdentifier</key>
<string>${MODULE_NAME}</string>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>Codec Profile</key>
<dict>
<key>Default</key>
Expand All @@ -370,7 +370,7 @@
<key>CodecCommanderResidency</key>
<dict>
<key>CFBundleIdentifier</key>
<string>${MODULE_NAME}</string>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>IOClass</key>
<string>CodecCommanderResidency</string>
<key>IOMatchCategory</key>
Expand All @@ -381,7 +381,7 @@
<key>CodecCommanderVoodooHDA</key>
<dict>
<key>CFBundleIdentifier</key>
<string>${MODULE_NAME}</string>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>Codec Profile</key>
<dict>
<key>1002</key>
Expand Down Expand Up @@ -445,6 +445,6 @@
<string>9.0.0</string>
</dict>
<key>Source Code</key>
<string>https://github.com/RehabMan/EAPD-Codec-Commander</string>
<string>https://github.com/Sniki/EAPD-Codec-Commander</string>
</dict>
</plist>
100 changes: 61 additions & 39 deletions makefile
Original file line number Diff line number Diff line change
@@ -1,70 +1,92 @@
KEXT=CodecCommander.kext
DIST=RehabMan-CodecCommander
BUILDDIR=./build/Products
OPTIONS:=$(OPTIONS) -scheme CodecCommander
KEXT := CodecCommander.kext
DIST := CodecCommander
BUILDDIR := ./Build/Products

VERSION_ERA=$(shell ./print_version.sh)
ifeq "$(VERSION_ERA)" "10.10-"
INSTDIR=/System/Library/Extensions
else
INSTDIR=/Library/Extensions
endif
VERSION_ERA := $(shell ./print_version.sh)
VERSION_MODULE := $(shell ./print_module_version.sh)

ifeq ($(findstring 32,$(BITS)),32)
OPTIONS:=$(OPTIONS) -arch i386
ifeq ($(VERSION_ERA),10.10-)
INSTDIR := /System/Library/Extensions
endif

ifeq ($(findstring 64,$(BITS)),64)
OPTIONS:=$(OPTIONS) -arch x86_64
ifeq ($(VERSION_ERA),10.11-10.15)
INSTDIR := /Library/Extensions
endif

.PHONY: all
all:
xcodebuild build $(OPTIONS) -configuration Debug
xcodebuild build $(OPTIONS) -configuration Release
ifeq ($(VERSION_ERA),10.10-)
BINDIR := /usr/bin
else
BINDIR := /usr/local/bin
endif

.PHONY: clean
clean:
xcodebuild clean $(OPTIONS) -configuration Debug
xcodebuild clean $(OPTIONS) -configuration Release
# on 11+ we stub out all install steps
ifeq ($(VERSION_ERA),11+)
.PHONY: install install_debug update_kernelcache
install install_debug update_kernelcache:
@echo "Install/update skipped on macOS $(shell sw_vers -productVersion)"
else
# only for 10.10- through 10.15:
.PHONY: update_kernelcache install_debug install

.PHONY: update_kernelcache
update_kernelcache:
sudo touch /System/Library/Extensions
sudo kextcache -update-volume /

.PHONY: install_debug
install_debug:
sudo cp $(BUILDDIR)/Debug/CodecCommanderClient /usr/bin/hda-verb
if [ "`which tag`" != "" ]; then sudo tag -a Purple /usr/bin/hda-verb; fi
if [ ! -d $(BINDIR) ]; then sudo mkdir -p $(BINDIR); fi
sudo cp $(BUILDDIR)/Debug/CodecCommanderClient $(BINDIR)/hda-verb
if [ "`which tag`" != "" ]; then sudo tag -a Purple $(BINDIR)/hda-verb; fi
sudo rm -Rf $(INSTDIR)/$(KEXT)
sudo cp -R $(BUILDDIR)/Debug/$(KEXT) $(INSTDIR)
if [ "`which tag`" != "" ]; then sudo tag -a Purple $(INSTDIR)/$(KEXT); fi
make update_kernelcache
$(MAKE) update_kernelcache

.PHONY: install
install:
sudo cp $(BUILDDIR)/Release/CodecCommanderClient /usr/bin/hda-verb
if [ "`which tag`" != "" ]; then sudo tag -a Blue /usr/bin/hda-verb; fi
if [ ! -d $(BINDIR) ]; then sudo mkdir -p $(BINDIR); fi
sudo cp $(BUILDDIR)/Release/CodecCommanderClient $(BINDIR)/hda-verb
if [ "`which tag`" != "" ]; then sudo tag -a Blue $(BINDIR)/hda-verb; fi
sudo rm -Rf $(INSTDIR)/$(KEXT)
sudo cp -R $(BUILDDIR)/Release/$(KEXT) $(INSTDIR)
if [ "`which tag`" != "" ]; then sudo tag -a Blue $(INSTDIR)/$(KEXT); fi
make update_kernelcache
$(MAKE) update_kernelcache
endif

# common bits below ----------------------------------------------------

ifeq ($(findstring 32,$(BITS)),32)
OPTIONS:=$(OPTIONS) -arch i386
endif

ifeq ($(findstring 64,$(BITS)),64)
OPTIONS:=$(OPTIONS) -arch x86_64
endif

OPTIONS += -scheme CodecCommander

.PHONY: all clean distribute

all:
xcodebuild build $(OPTIONS) -configuration Debug
xcodebuild build $(OPTIONS) -configuration Release

clean:
xcodebuild clean $(OPTIONS) -configuration Debug
xcodebuild clean $(OPTIONS) -configuration Release

.PHONY: distribute
distribute:
if [ -e ./Distribute ]; then rm -r ./Distribute; fi
mkdir ./Distribute
cp -R $(BUILDDIR)/Debug ./Distribute
cp -R $(BUILDDIR)/Release ./Distribute
cp README.md ./Distribute
cp LICENSE ./Distribute
mv ./Distribute/Debug/CodecCommanderClient ./Distribute/Debug/hda-verb
mv ./Distribute/Release/CodecCommanderClient ./Distribute/Release/hda-verb
cp README.md ./Distribute/Debug
cp README.md ./Distribute/Release
cp LICENSE ./Distribute/Debug
cp LICENSE ./Distribute/Release
find ./Distribute -path *.DS_Store -delete
find ./Distribute -path *.dSYM -exec echo rm -r {} \; >/tmp/org.voodoo.rm.dsym.sh
chmod +x /tmp/org.voodoo.rm.dsym.sh
/tmp/org.voodoo.rm.dsym.sh
rm /tmp/org.voodoo.rm.dsym.sh
ditto -c -k --sequesterRsrc --zlibCompressionLevel 9 ./Distribute ./Archive.zip
mv ./Archive.zip ./Distribute/`date +$(DIST)-%Y-%m%d.zip`
ditto -c -k --sequesterRsrc --zlibCompressionLevel 9 ./Distribute/Release ./Archive_Release.zip
ditto -c -k --sequesterRsrc --zlibCompressionLevel 9 ./Distribute/Debug ./Archive_Debug.zip
mv ./Archive_Release.zip ./Distribute/$(DIST)-$(VERSION_MODULE)-RELEASE.zip
mv ./Archive_Debug.zip ./Distribute/$(DIST)-$(VERSION_MODULE)-DEBUG.zip
Loading
Loading