Skip to content

Commit

Permalink
Updated kexts (#27)
Browse files Browse the repository at this point in the history
Co-authored-by: Floren Munteanu <floren@zeus.local>
  • Loading branch information
fmunteanu and Floren Munteanu committed Nov 15, 2020
1 parent e00214b commit ffc57da
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 50 deletions.
69 changes: 24 additions & 45 deletions config.py
Expand Up @@ -59,39 +59,31 @@ def main(directory):
'Delete': {}
}

kernel_kexts = []
kexts = [
'Lilu',
'NightShiftEnabler',
'WhateverGreen'
]
if cpu_count > 15:
kexts.insert(0, 'AppleMCEReporterDisabler')
for i in kexts:
kext = {
'Arch': 'x86_64',
'BundlePath': '{}.kext'.format(i),
'Comment': '',
'Enabled': True,
'ExecutablePath': 'Contents/MacOS/{}'.format(i),
'MaxKernel': '',
'MinKernel': '',
'PlistPath': 'Contents/Info.plist'
}
if i == 'AppleMCEReporterDisabler':
kext['ExecutablePath'] = ''
kernel_kexts.append(dict(kext))

Kernel = {
'Add': [
{
'Arch': 'x86_64',
'BundlePath': 'Lilu.kext',
'Comment': '',
'Enabled': True,
'ExecutablePath': 'Contents/MacOS/Lilu',
'MaxKernel': '',
'MinKernel': '',
'PlistPath': 'Contents/Info.plist'
},
{
'Arch': 'x86_64',
'BundlePath': 'NightShiftEnabler.kext',
'Comment': '',
'Enabled': True,
'ExecutablePath': 'Contents/MacOS/NightShiftEnabler',
'MaxKernel': '',
'MinKernel': '',
'PlistPath': 'Contents/Info.plist'
},
{
'Arch': 'x86_64',
'BundlePath': 'WhateverGreen.kext',
'Comment': '',
'Enabled': True,
'ExecutablePath': 'Contents/MacOS/WhateverGreen',
'MaxKernel': '',
'MinKernel': '',
'PlistPath': 'Contents/Info.plist'
}
],
'Add': kernel_kexts,
'Block': [],
'Emulate': {
'Cpuid1Data': Data('\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00'),
Expand Down Expand Up @@ -128,19 +120,6 @@ def main(directory):
'KernelCache': 'Auto'
}
}
if cpu_count > 15:
Kernel['Add'].append(
{
'Arch': 'x86_64',
'BundlePath': 'AppleMCEReporterDisabler.kext',
'Comment': '',
'Enabled': True,
'ExecutablePath': '',
'MaxKernel': '',
'MinKernel': '',
'PlistPath': 'Contents/Info.plist'
}
)

Misc = {
'BlessOverride': [],
Expand Down
10 changes: 5 additions & 5 deletions tree.py
Expand Up @@ -62,11 +62,11 @@ def install_kext(repo, project, version, directory, debug=False):
file = '{}/download/{}/{}'.format(url, version, release)
print_bold('* {} {}'.format(project, version))
extract_files(file, directory)
rmtree('{}/{}'.format(directory, '{}.kext.dSYM'.format(project)))
if project == 'WhateverGreen':
for i in glob('{}/*.dsl'.format(directory)):
remove(i)
rmtree('{}/WhateverName.app'.format(directory))
for i in ['app', 'dsl', 'dSYM']:
files = glob('{}/*.{}'.format(directory, i))
if files:
for j in files:
remove(j) if i == 'dsl' else rmtree(j)


def install_opencore(version, directory, debug=False):
Expand Down

0 comments on commit ffc57da

Please sign in to comment.