[+] Add acidanthera kexts
This commit is contained in:
@@ -1,4 +1,7 @@
|
|||||||
Repos:
|
Repos:
|
||||||
|
AirPortBrcm4360_Injector: https://github.com/acidanthera/AirportBrcmFixup
|
||||||
|
AirportBrcmFixup: https://github.com/acidanthera/AirportBrcmFixup
|
||||||
|
AirPortBrcmNIC_Injector: https://github.com/acidanthera/AirportBrcmFixup
|
||||||
AirportItlwm-BigSur:
|
AirportItlwm-BigSur:
|
||||||
Artifact: .*BigSur.*
|
Artifact: .*BigSur.*
|
||||||
Repo: &itlwm https://github.com/OpenIntelWireless/itlwm
|
Repo: &itlwm https://github.com/OpenIntelWireless/itlwm
|
||||||
@@ -26,7 +29,11 @@ Repos:
|
|||||||
BrcmPatchRAM3: *brcm
|
BrcmPatchRAM3: *brcm
|
||||||
BrcmPatchRAM: *brcm
|
BrcmPatchRAM: *brcm
|
||||||
BrightnessKeys: https://github.com/acidanthera/BrightnessKeys
|
BrightnessKeys: https://github.com/acidanthera/BrightnessKeys
|
||||||
|
CPUFriend: https://github.com/acidanthera/CPUFriend
|
||||||
CpuTscSync: https://github.com/acidanthera/CpuTscSync
|
CpuTscSync: https://github.com/acidanthera/CpuTscSync
|
||||||
|
CryptexFixup.kext: https://github.com/acidanthera/CryptexFixup
|
||||||
|
DebugEnhancer: https://github.com/acidanthera/DebugEnhancer
|
||||||
|
FeatureUnlock.kext: https://github.com/acidanthera/FeatureUnlock
|
||||||
HibernationFixup: https://github.com/acidanthera/HibernationFixup
|
HibernationFixup: https://github.com/acidanthera/HibernationFixup
|
||||||
IntelBluetoothFirmware: &itlbf https://github.com/OpenIntelWireless/IntelBluetoothFirmware
|
IntelBluetoothFirmware: &itlbf https://github.com/OpenIntelWireless/IntelBluetoothFirmware
|
||||||
IntelBluetoothInjector: *itlbf
|
IntelBluetoothInjector: *itlbf
|
||||||
@@ -34,26 +41,33 @@ Repos:
|
|||||||
IntelMausi: &imausi https://github.com/acidanthera/IntelMausi
|
IntelMausi: &imausi https://github.com/acidanthera/IntelMausi
|
||||||
IntelSnowMausi: *imausi
|
IntelSnowMausi: *imausi
|
||||||
Lilu: https://github.com/acidanthera/Lilu
|
Lilu: https://github.com/acidanthera/Lilu
|
||||||
|
MacHyperVSupport: https://github.com/acidanthera/MacHyperVSupport
|
||||||
|
MacHyperVSupportMonterey: https://github.com/acidanthera/MacHyperVSupport
|
||||||
NVMeFix: https://github.com/acidanthera/NVMeFix
|
NVMeFix: https://github.com/acidanthera/NVMeFix
|
||||||
RealtekCardReader: https://github.com/0xFireWolf/RealtekCardReader
|
RealtekCardReader: https://github.com/0xFireWolf/RealtekCardReader
|
||||||
RealtekCardReaderFriend: https://github.com/0xFireWolf/RealtekCardReaderFriend
|
RealtekCardReaderFriend: https://github.com/0xFireWolf/RealtekCardReaderFriend
|
||||||
RealtekRTL8111: https://github.com/Mieze/RTL8111_driver_for_OS_X
|
RealtekRTL8111: https://github.com/Mieze/RTL8111_driver_for_OS_X
|
||||||
VirtualSMC: &smc https://github.com/acidanthera/VirtualSMC
|
RestrictEvents: https://github.com/acidanthera/RestrictEvents
|
||||||
SMCBatteryManager: *smc
|
RTCMemoryFixup: https://github.com/acidanthera/RTCMemoryFixup
|
||||||
|
SMCBatteryManager: &smc https://github.com/acidanthera/VirtualSMC
|
||||||
SMCDellSensors: *smc
|
SMCDellSensors: *smc
|
||||||
SMCLightSensor: *smc
|
SMCLightSensor: *smc
|
||||||
SMCProcessor: *smc
|
SMCProcessor: *smc
|
||||||
SMCSuperIO: *smc
|
SMCSuperIO: *smc
|
||||||
|
UEFIGraphicsFB: https://github.com/acidanthera/UEFIGraphicsFB
|
||||||
USBInjectAll: https://github.com/Sniki/OS-X-USB-Inject-All
|
USBInjectAll: https://github.com/Sniki/OS-X-USB-Inject-All
|
||||||
USBToolBox: &utb https://github.com/USBToolBox/kext
|
USBToolBox: &utb https://github.com/USBToolBox/kext
|
||||||
UTBDefault: *utb
|
UTBDefault: *utb
|
||||||
|
VirtualSMC: *smc
|
||||||
VoodooI2C: &i2c https://github.com/VoodooI2C/VoodooI2C
|
VoodooI2C: &i2c https://github.com/VoodooI2C/VoodooI2C
|
||||||
VoodooI2CAtmelMXT: *i2c
|
VoodooI2CAtmelMXT: *i2c
|
||||||
VoodooI2CELANL: *i2c
|
VoodooI2CELANL: *i2c
|
||||||
VoodooI2CFTE: *i2c
|
VoodooI2CFTE: *i2c
|
||||||
VoodooI2CHID: *i2c
|
VoodooI2CHID: *i2c
|
||||||
VoodooI2CSynaptics: *i2c
|
VoodooI2CSynaptics: *i2c
|
||||||
VoodooInput: https://github.com/acidanthera/VoodooInput
|
VoodooInput: &ps2 https://github.com/acidanthera/VoodooPS2
|
||||||
VoodooPS2Controller: https://github.com/acidanthera/VoodooPS2
|
VoodooPS2Controller: *ps2
|
||||||
|
VoodooPS2Keyboard: *ps2
|
||||||
|
VoodooPS2Mouse: *ps2
|
||||||
|
VoodooPS2Trackpad: *ps2
|
||||||
WhateverGreen: https://github.com/acidanthera/WhateverGreen
|
WhateverGreen: https://github.com/acidanthera/WhateverGreen
|
||||||
|
|
||||||
|
|||||||
+31
-11
@@ -29,7 +29,36 @@ except Exception:
|
|||||||
bar_len = 20
|
bar_len = 20
|
||||||
|
|
||||||
|
|
||||||
def get_latest_release(name: str, repos: dict, pre: bool):
|
def get_latest_release_repo(repo: str, pre: bool) -> Release:
|
||||||
|
"""
|
||||||
|
Fetch the latest release info from a repository
|
||||||
|
|
||||||
|
:param repo: GitHub repo in the format of owner/repo
|
||||||
|
:param pre: Whether to allow pre-releases
|
||||||
|
:return: Latest release
|
||||||
|
"""
|
||||||
|
|
||||||
|
# Check latest version
|
||||||
|
headers = {}
|
||||||
|
if 'GH_TOKEN' in os.environ:
|
||||||
|
headers['Authorization'] = f'token {os.environ["GH_TOKEN"]}'
|
||||||
|
releases = requests.get(f'https://api.github.com/repos/{repo}/releases', headers=headers).json()
|
||||||
|
if not pre:
|
||||||
|
releases = [r for r in releases if not r['prerelease']]
|
||||||
|
latest = releases[0]
|
||||||
|
|
||||||
|
return Release.from_github(latest)
|
||||||
|
|
||||||
|
|
||||||
|
def get_latest_release(name: str, repos: dict, pre: bool) -> Release:
|
||||||
|
"""
|
||||||
|
Fetch the latest release info from a name in the repository list yml
|
||||||
|
|
||||||
|
:param name: Unique name
|
||||||
|
:param repos: Repository list yml (Check out data/OCKextRepos.yml)
|
||||||
|
:param pre: Whether to allow pre-releases
|
||||||
|
:return: Latest release
|
||||||
|
"""
|
||||||
# Lowercase keys
|
# Lowercase keys
|
||||||
repos = {k.lower(): v for k, v in repos['Repos'].items()}
|
repos = {k.lower(): v for k, v in repos['Repos'].items()}
|
||||||
name = name.lower()
|
name = name.lower()
|
||||||
@@ -47,16 +76,7 @@ def get_latest_release(name: str, repos: dict, pre: bool):
|
|||||||
assert 'github.com/' in repo, f'For {name}: {repo} is not a github repo, skipping...'
|
assert 'github.com/' in repo, f'For {name}: {repo} is not a github repo, skipping...'
|
||||||
repo = repo.split('github.com/')[1]
|
repo = repo.split('github.com/')[1]
|
||||||
|
|
||||||
# Check latest version
|
return get_latest_release_repo(repo, pre)
|
||||||
headers = {}
|
|
||||||
if 'GH_TOKEN' in os.environ:
|
|
||||||
headers['Authorization'] = f'token {os.environ["GH_TOKEN"]}'
|
|
||||||
releases = requests.get(f'https://api.github.com/repos/{repo}/releases', headers=headers).json()
|
|
||||||
if not pre:
|
|
||||||
releases = [r for r in releases if not r['prerelease']]
|
|
||||||
latest = releases[0]
|
|
||||||
|
|
||||||
return Release.from_github(latest)
|
|
||||||
|
|
||||||
|
|
||||||
def download_file(url: str, file: str | Path):
|
def download_file(url: str, file: str | Path):
|
||||||
|
|||||||
@@ -0,0 +1,24 @@
|
|||||||
|
from pathlib import Path
|
||||||
|
from tempfile import TemporaryDirectory
|
||||||
|
from zipfile import ZipFile
|
||||||
|
|
||||||
|
from ocpm.main import download_file, get_latest_release_repo
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
while True:
|
||||||
|
repo = input("Please type in github repo name (e.g. owner/repo): ")
|
||||||
|
|
||||||
|
release = get_latest_release_repo(repo, False)
|
||||||
|
|
||||||
|
with TemporaryDirectory() as tmp:
|
||||||
|
tmp = Path(tmp)
|
||||||
|
|
||||||
|
download_file(release.artifact.url, tmp / "artifact.zip")
|
||||||
|
|
||||||
|
with ZipFile(tmp / 'artifact.zip', 'r') as f:
|
||||||
|
names = [a.strip('/') for a in f.namelist() if a.lower().endswith('.kext/')]
|
||||||
|
print('\n'.join(names))
|
||||||
|
|
||||||
|
repos_path = Path('ocpm/data/OCKextRepos.yml')
|
||||||
|
yml = ''.join(f'\n {Path(a).stem}: https://github.com/{repo}' for a in names)
|
||||||
|
repos_path.write_text(repos_path.read_text() + yml)
|
||||||
Reference in New Issue
Block a user