Skip to content

Commit

Permalink
Add kext bundle version support
Browse files Browse the repository at this point in the history
  • Loading branch information
PMheart committed Aug 9, 2022
1 parent 4cf7f90 commit 54f861c
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion Tools/ResourceConverter.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@ function showHelp() {
echo
echo "-h, --help Show this help message."
echo "-a, --acpi <file> Create ${ssdtFile} with CPU power management data provided by file."
echo "-k, --kext <file> Create ${kextFile} with CPU power management data provided by file."
echo
echo "-k, --kext <file> (version) Create ${kextFile} with CPU power management data provided by file."
echo "For cross-version compatibility, version can be specified when creating the kext bundle to be used together with OC MinKernel/MaxKernel."
echo "e.g. $0 --kext path/to/PM/plist 110 - This creates CPUFriendDataProvider_110.kext."
}

function genSSDT() {
Expand Down Expand Up @@ -160,6 +163,11 @@ function main() {
abort "$1 does not exist!"
fi

# $2 is the optional version info
if [ "$2" != "" ]; then
kextFile="CPUFriendDataProvider_$2.kext"
fi

if [ -d "${kextFile}" ]; then
read -p "${kextFile} already exists, override? (y/N) " ask4NewKext
case "${ask4NewKext}" in
Expand Down

4 comments on commit 54f861c

@Andrey1970AppleLife
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It will break check CPUFriendDataProvider.kext in ocvalidate.

@PMheart
Copy link
Member Author

@PMheart PMheart commented on 54f861c Aug 9, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It will break check CPUFriendDataProvider.kext in ocvalidate.

Hi! Indeed, thanks for letting me know. Actually, let’s remove that check, as CPUFriendDataProvider simply injects personalities, hence the order does not really matter; will do it tomorrow.

UPDATE: Done!

@Andrey1970AppleLife
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's no need to remove the check, there's a dependency check. You'd better remove commit with the version number in kext name.

@PMheart
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's no need to remove the check, there's a dependency check. You'd better remove commit with the version number in kext name.

Nope. This commit was created for compatibility reasons. If we still need the ocvalidate check, strstr might be used instead of strcmp; but actually we don't have to, due to the aforementioned points in my last comment.

Please sign in to comment.