mirror of
https://github.com/dortania/OpenCore-Legacy-Patcher.git
synced 2026-04-23 11:30:15 +10:00
installer.py: Add Variant Info
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -22,3 +22,4 @@ __pycache__/
|
|||||||
/docs/node_modules/
|
/docs/node_modules/
|
||||||
/payloads/List.txt
|
/payloads/List.txt
|
||||||
/payloads/Installer.sh
|
/payloads/Installer.sh
|
||||||
|
/payloads/Info.plist
|
||||||
|
|||||||
@@ -46,10 +46,11 @@ app = BUNDLE(exe,
|
|||||||
bundle_identifier="com.dortania.opencore-legacy-patcher-wxpython",
|
bundle_identifier="com.dortania.opencore-legacy-patcher-wxpython",
|
||||||
info_plist={
|
info_plist={
|
||||||
"CFBundleShortVersionString": constants.Constants().patcher_version,
|
"CFBundleShortVersionString": constants.Constants().patcher_version,
|
||||||
"NSHumanReadableCopyright": "Copyright 2020-2022 Dortania",
|
"NSHumanReadableCopyright": constants.Constants().copyright_date
|
||||||
"LSMinimumSystemVersion": "10.10.0",
|
"LSMinimumSystemVersion": "10.10.0",
|
||||||
"NSRequiresAquaSystemAppearance": False,
|
"NSRequiresAquaSystemAppearance": False,
|
||||||
"NSHighResolutionCapable": True,
|
"NSHighResolutionCapable": True,
|
||||||
"Build Date": time.strftime("%Y-%m-%d %H:%M:%S", time.localtime()),
|
"Build Date": time.strftime("%Y-%m-%d %H:%M:%S", time.localtime()),
|
||||||
"BuildMachineOSBuild": subprocess.run("sw_vers -buildVersion".split(), stdout=subprocess.PIPE, stderr=subprocess.STDOUT).stdout.decode().strip(),
|
"BuildMachineOSBuild": subprocess.run("sw_vers -buildVersion".split(), stdout=subprocess.PIPE, stderr=subprocess.STDOUT).stdout.decode().strip(),
|
||||||
|
"NSPrincipalClass": "NSApplication",
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -315,7 +315,7 @@ class wx_python_gui:
|
|||||||
|
|
||||||
|
|
||||||
# Copyright Label
|
# Copyright Label
|
||||||
self.copyright = wx.StaticText(self.frame, label="Copyright © 2020-2022 Dortania")
|
self.copyright = wx.StaticText(self.frame, label=self.constants.copyright_date)
|
||||||
self.copyright.SetFont(wx.Font(8, wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL))
|
self.copyright.SetFont(wx.Font(8, wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL))
|
||||||
self.copyright.SetPosition(
|
self.copyright.SetPosition(
|
||||||
wx.Point(
|
wx.Point(
|
||||||
@@ -1065,8 +1065,12 @@ class wx_python_gui:
|
|||||||
i = -20
|
i = -20
|
||||||
if avalible_installers:
|
if avalible_installers:
|
||||||
for app in avalible_installers:
|
for app in avalible_installers:
|
||||||
print(f"macOS {avalible_installers[app]['Version']} ({avalible_installers[app]['Build']} - {utilities.human_fmt(avalible_installers[app]['Size'])} - {avalible_installers[app]['Source']})")
|
print(f"macOS {avalible_installers[app]['Version']} ({avalible_installers[app]['Build']} - {utilities.human_fmt(avalible_installers[app]['Size'])} - {avalible_installers[app]['Source']}) - {avalible_installers[app]['Variant']}")
|
||||||
self.install_selection = wx.Button(self.frame, label=f"macOS {avalible_installers[app]['Version']} ({avalible_installers[app]['Build']} - {utilities.human_fmt(avalible_installers[app]['Size'])})", size=(250, 30))
|
if avalible_installers[app]['Variant'] in ["DeveloperSeed" , "PublicSeed"]:
|
||||||
|
extra = " Beta"
|
||||||
|
else:
|
||||||
|
extra = ""
|
||||||
|
self.install_selection = wx.Button(self.frame, label=f"macOS {avalible_installers[app]['Version']}{extra} ({avalible_installers[app]['Build']} - {utilities.human_fmt(avalible_installers[app]['Size'])})", size=(280, 30))
|
||||||
i = i + 25
|
i = i + 25
|
||||||
self.install_selection.SetPosition(
|
self.install_selection.SetPosition(
|
||||||
wx.Point(
|
wx.Point(
|
||||||
|
|||||||
@@ -1264,7 +1264,11 @@ B. Exit
|
|||||||
# Add mirror of 11.2.3 for users who want it
|
# 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'])])
|
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:
|
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:
|
for option in options:
|
||||||
menu.add_menu_option(option[0], function=option[1])
|
menu.add_menu_option(option[0], function=option[1])
|
||||||
response = menu.start()
|
response = menu.start()
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ class Constants:
|
|||||||
self.guide_link = "https://dortania.github.io/OpenCore-Legacy-Patcher/"
|
self.guide_link = "https://dortania.github.io/OpenCore-Legacy-Patcher/"
|
||||||
self.repo_link = "https://github.com/dortania/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.repo_link_latest = f"{self.repo_link}/releases/tag/{self.patcher_version}"
|
||||||
|
self.copyright_date = "Copyright © 2020-2022 Dortania"
|
||||||
|
|
||||||
# OpenCore Versioning
|
# OpenCore Versioning
|
||||||
# https://github.com/acidanthera/OpenCorePkg
|
# https://github.com/acidanthera/OpenCorePkg
|
||||||
|
|||||||
@@ -99,11 +99,24 @@ def list_downloadable_macOS_installers(download_path, catalog):
|
|||||||
catalog_plist["Products"][item]["ExtendedMetaInfo"]["InstallAssistantPackageIdentifiers"]["BuildManifest"]
|
catalog_plist["Products"][item]["ExtendedMetaInfo"]["InstallAssistantPackageIdentifiers"]["BuildManifest"]
|
||||||
|
|
||||||
for bm_package in catalog_plist["Products"][item]["Packages"]:
|
for bm_package in catalog_plist["Products"][item]["Packages"]:
|
||||||
if "BuildManifest.plist" in bm_package["URL"]:
|
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("BuildManifest.plist")))
|
utilities.download_file(bm_package["URL"], (Path(download_path) / Path("Info.plist")))
|
||||||
build_plist = plistlib.load((Path(download_path) / Path("BuildManifest.plist")).open("rb"))
|
build_plist = plistlib.load((Path(download_path) / Path("Info.plist")).open("rb"))
|
||||||
version = build_plist["ProductVersion"]
|
version = build_plist["MobileAssetProperties"]["OSVersion"]
|
||||||
build = build_plist["ProductBuildVersion"]
|
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"]:
|
for ia_package in catalog_plist["Products"][item]["Packages"]:
|
||||||
if "InstallAssistant.pkg" in ia_package["URL"]:
|
if "InstallAssistant.pkg" in ia_package["URL"]:
|
||||||
download_link = ia_package["URL"]
|
download_link = ia_package["URL"]
|
||||||
@@ -118,6 +131,7 @@ def list_downloadable_macOS_installers(download_path, catalog):
|
|||||||
"Size": size,
|
"Size": size,
|
||||||
"integrity": integrity,
|
"integrity": integrity,
|
||||||
"Source": "Apple Inc.",
|
"Source": "Apple Inc.",
|
||||||
|
"Variant": catalog_url,
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
except KeyError:
|
except KeyError:
|
||||||
|
|||||||
@@ -173,7 +173,7 @@ class detect_root_patch:
|
|||||||
"Validation: Patching Possible": self.verify_patch_allowed(),
|
"Validation: Patching Possible": self.verify_patch_allowed(),
|
||||||
"Validation: SIP is enabled": self.sip_enabled,
|
"Validation: SIP is enabled": self.sip_enabled,
|
||||||
"Validation: SBM is enabled": self.sbm_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: FileVault is enabled": self.fv_enabled,
|
||||||
"Validation: System is dosdude1 patched": self.dosdude_patched,
|
"Validation: System is dosdude1 patched": self.dosdude_patched,
|
||||||
"Validation: Board ID is unsupported": self.bad_board_id,
|
"Validation: Board ID is unsupported": self.bad_board_id,
|
||||||
|
|||||||
Reference in New Issue
Block a user