mirror of
https://github.com/dortania/OpenCore-Legacy-Patcher.git
synced 2026-04-17 13:22:54 +10:00
installer.py: Add Variant Info
This commit is contained in:
@@ -1264,7 +1264,11 @@ B. Exit
|
||||
# Add mirror of 11.2.3 for users who want it
|
||||
options.append([f"macOS {mirror_data.Install_macOS_Big_Sur_11_2_3['Version']} ({mirror_data.Install_macOS_Big_Sur_11_2_3['Build']} - {utilities.human_fmt(mirror_data.Install_macOS_Big_Sur_11_2_3['Size'])} - {mirror_data.Install_macOS_Big_Sur_11_2_3['Source']})", lambda: self.download_install_assistant(mirror_data.Install_macOS_Big_Sur_11_2_3['Link'])])
|
||||
for app in avalible_installers:
|
||||
options.append([f"macOS {avalible_installers[app]['Version']} ({avalible_installers[app]['Build']} - {utilities.human_fmt(avalible_installers[app]['Size'])} - {avalible_installers[app]['Source']})", lambda x=app: self.download_install_assistant(avalible_installers[x]['Link'])])
|
||||
if avalible_installers[app]['Variant'] in ["DeveloperSeed", "PublicSeed"]:
|
||||
variant = " Beta"
|
||||
else:
|
||||
variant = ""
|
||||
options.append([f"macOS {avalible_installers[app]['Version']}{variant} ({avalible_installers[app]['Build']} - {utilities.human_fmt(avalible_installers[app]['Size'])} - {avalible_installers[app]['Source']})", lambda x=app: self.download_install_assistant(avalible_installers[x]['Link'])])
|
||||
for option in options:
|
||||
menu.add_menu_option(option[0], function=option[1])
|
||||
response = menu.start()
|
||||
|
||||
@@ -22,6 +22,7 @@ class Constants:
|
||||
self.guide_link = "https://dortania.github.io/OpenCore-Legacy-Patcher/"
|
||||
self.repo_link = "https://github.com/dortania/OpenCore-Legacy-Patcher"
|
||||
self.repo_link_latest = f"{self.repo_link}/releases/tag/{self.patcher_version}"
|
||||
self.copyright_date = "Copyright © 2020-2022 Dortania"
|
||||
|
||||
# OpenCore Versioning
|
||||
# https://github.com/acidanthera/OpenCorePkg
|
||||
|
||||
@@ -99,11 +99,24 @@ def list_downloadable_macOS_installers(download_path, catalog):
|
||||
catalog_plist["Products"][item]["ExtendedMetaInfo"]["InstallAssistantPackageIdentifiers"]["BuildManifest"]
|
||||
|
||||
for bm_package in catalog_plist["Products"][item]["Packages"]:
|
||||
if "BuildManifest.plist" in bm_package["URL"]:
|
||||
utilities.download_file(bm_package["URL"], (Path(download_path) / Path("BuildManifest.plist")))
|
||||
build_plist = plistlib.load((Path(download_path) / Path("BuildManifest.plist")).open("rb"))
|
||||
version = build_plist["ProductVersion"]
|
||||
build = build_plist["ProductBuildVersion"]
|
||||
if "Info.plist" in bm_package["URL"] and "InstallInfo.plist" not in bm_package["URL"]:
|
||||
utilities.download_file(bm_package["URL"], (Path(download_path) / Path("Info.plist")))
|
||||
build_plist = plistlib.load((Path(download_path) / Path("Info.plist")).open("rb"))
|
||||
version = build_plist["MobileAssetProperties"]["OSVersion"]
|
||||
build = build_plist["MobileAssetProperties"]["Build"]
|
||||
try:
|
||||
catalog_url = build_plist["MobileAssetProperties"]["BridgeVersionInfo"]["CatalogURL"]
|
||||
if "beta" in catalog_url:
|
||||
catalog_url = "PublicSeed"
|
||||
elif "customerseed" in catalog_url:
|
||||
catalog_url = "CustomerSeed"
|
||||
elif "seed" in catalog_url:
|
||||
catalog_url = "DeveloperSeed"
|
||||
else:
|
||||
catalog_url = "Unknown"
|
||||
except KeyError:
|
||||
# Assume CustomerSeed if no catalog URL is found
|
||||
catalog_url = "CustomerSeed"
|
||||
for ia_package in catalog_plist["Products"][item]["Packages"]:
|
||||
if "InstallAssistant.pkg" in ia_package["URL"]:
|
||||
download_link = ia_package["URL"]
|
||||
@@ -118,6 +131,7 @@ def list_downloadable_macOS_installers(download_path, catalog):
|
||||
"Size": size,
|
||||
"integrity": integrity,
|
||||
"Source": "Apple Inc.",
|
||||
"Variant": catalog_url,
|
||||
}
|
||||
})
|
||||
except KeyError:
|
||||
|
||||
@@ -173,7 +173,7 @@ class detect_root_patch:
|
||||
"Validation: Patching Possible": self.verify_patch_allowed(),
|
||||
"Validation: SIP is enabled": self.sip_enabled,
|
||||
"Validation: SBM is enabled": self.sbm_enabled,
|
||||
"Validation: AMFI is enabled": self.amfi_enabled,
|
||||
"Validation: AMFI is enabled": self.amfi_enabled if self.amfi_must_disable else False,
|
||||
"Validation: FileVault is enabled": self.fv_enabled,
|
||||
"Validation: System is dosdude1 patched": self.dosdude_patched,
|
||||
"Validation: Board ID is unsupported": self.bad_board_id,
|
||||
|
||||
Reference in New Issue
Block a user