mirror of
https://github.com/dortania/OpenCore-Legacy-Patcher.git
synced 2026-06-19 22:00:00 +10:00
macos_installer_handler.py: Add min OS check
Ventura’s installer requires an El Cap host to run
This commit is contained in:
@@ -13,6 +13,8 @@
|
|||||||
- thanks [@jazzzny](https://github.com/Jazzzny)
|
- thanks [@jazzzny](https://github.com/Jazzzny)
|
||||||
- Resolve UI unable to download macOS installers on unknown models
|
- Resolve UI unable to download macOS installers on unknown models
|
||||||
- ex. M2 Macs and Hackintoshes
|
- ex. M2 Macs and Hackintoshes
|
||||||
|
- Implement minimum OS check for installer creation
|
||||||
|
- Prevents vague errors when creating Ventura installers on Yosemite
|
||||||
- Increment Binaries:
|
- Increment Binaries:
|
||||||
- PatcherSupportPkg 0.9.6 - release
|
- PatcherSupportPkg 0.9.6 - release
|
||||||
- Build Server Changes:
|
- Build Server Changes:
|
||||||
|
|||||||
+3
-3
@@ -18,13 +18,13 @@ The below table will list all supported and unsupported functions of the patcher
|
|||||||
|
|
||||||
Regarding OS support, see below:
|
Regarding OS support, see below:
|
||||||
|
|
||||||
* Machines listing `YES - Ventura and older` means they cannot run macOS Ventura at this time. Machines with only `YES` can run all of the supported macOS versions offered by OpenCore Legacy Patcher.
|
|
||||||
|
|
||||||
| Support Entry | Supported OSes | Description | Comment |
|
| Support Entry | Supported OSes | Description | Comment |
|
||||||
| :--- | :--- | :--- | :--- |
|
| :--- | :--- | :--- | :--- |
|
||||||
| HostOS | macOS 10.9 - macOS 13 | Refers to OSes where running OpenCore-Patcher.app are supported | Supports 10.7+ if [Python 3.9 or higher](https://www.python.org/downloads/) is manually installed, simply run the `OpenCore-Patcher-GUI.command` located in the repo |
|
| HostOS | macOS 10.10 - macOS 13 | Refers to OSes where running OpenCore-Patcher.app are supported | Supports 10.7+ if [Python 3.9 or higher](https://www.python.org/downloads/) is manually installed, simply run the `OpenCore-Patcher-GUI.command` located in the repo |
|
||||||
| TargetOS | macOS 11 - macOS 13 | Refers to OSes that can be patched to run with OpenCore | May support 10.4 and newer (in a potentially broken state). No support provided. |
|
| TargetOS | macOS 11 - macOS 13 | Refers to OSes that can be patched to run with OpenCore | May support 10.4 and newer (in a potentially broken state). No support provided. |
|
||||||
|
|
||||||
|
* macOS Ventura installer creation requires 10.11 or later
|
||||||
|
|
||||||
### MacBook
|
### MacBook
|
||||||
|
|
||||||
| SMBIOS | Year | Supported | Comment |
|
| SMBIOS | Year | Supported | Comment |
|
||||||
|
|||||||
@@ -2060,7 +2060,17 @@ class wx_python_gui:
|
|||||||
logging.info("Installer(s) found:")
|
logging.info("Installer(s) found:")
|
||||||
for app in available_installers:
|
for app in available_installers:
|
||||||
logging.info(f"- {available_installers[app]['Short Name']}: {available_installers[app]['Version']} ({available_installers[app]['Build']})")
|
logging.info(f"- {available_installers[app]['Short Name']}: {available_installers[app]['Version']} ({available_installers[app]['Build']})")
|
||||||
self.install_selection = wx.Button(self.frame, label=f"{available_installers[app]['Short Name']}: {available_installers[app]['Version']} ({available_installers[app]['Build']})", size=(320, 30))
|
|
||||||
|
app_str = f"{available_installers[app]['Short Name']}"
|
||||||
|
unsupported: bool = available_installers[app]['Minimum Host OS'] > self.constants.detected_os
|
||||||
|
|
||||||
|
if unsupported:
|
||||||
|
min_str = os_data.os_conversion.convert_kernel_to_marketing_name(available_installers[app]['Minimum Host OS'])
|
||||||
|
app_str += f" (Requires {min_str})"
|
||||||
|
else:
|
||||||
|
app_str += f": {available_installers[app]['Version']} ({available_installers[app]['Build']})"
|
||||||
|
|
||||||
|
self.install_selection = wx.Button(self.frame, label=app_str, size=(320, 30))
|
||||||
i = i + 25
|
i = i + 25
|
||||||
self.install_selection.SetPosition(
|
self.install_selection.SetPosition(
|
||||||
wx.Point(
|
wx.Point(
|
||||||
@@ -2070,6 +2080,9 @@ class wx_python_gui:
|
|||||||
)
|
)
|
||||||
self.install_selection.Bind(wx.EVT_BUTTON, lambda event, temp=app: self.format_usb_menu(available_installers[temp]['Short Name'], available_installers[temp]['Path']))
|
self.install_selection.Bind(wx.EVT_BUTTON, lambda event, temp=app: self.format_usb_menu(available_installers[temp]['Short Name'], available_installers[temp]['Path']))
|
||||||
self.install_selection.Centre(wx.HORIZONTAL)
|
self.install_selection.Centre(wx.HORIZONTAL)
|
||||||
|
|
||||||
|
if unsupported:
|
||||||
|
self.install_selection.Disable()
|
||||||
else:
|
else:
|
||||||
logging.info("No installers found")
|
logging.info("No installers found")
|
||||||
# Label: No Installers Found
|
# Label: No Installers Found
|
||||||
|
|||||||
@@ -518,28 +518,35 @@ class LocalInstallerCatalog:
|
|||||||
if "CFBundleDisplayName" not in application_info_plist:
|
if "CFBundleDisplayName" not in application_info_plist:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
app_version = application_info_plist["DTPlatformVersion"]
|
app_version: str = application_info_plist["DTPlatformVersion"]
|
||||||
clean_name = application_info_plist["CFBundleDisplayName"]
|
clean_name: str = application_info_plist["CFBundleDisplayName"]
|
||||||
|
app_sdk: str = application_info_plist["DTSDKBuild"] if "DTSDKBuild" in application_info_plist else "Unknown"
|
||||||
|
min_required: str = application_info_plist["LSMinimumSystemVersion"] if "LSMinimumSystemVersion" in application_info_plist else "Unknown"
|
||||||
|
|
||||||
if "DTSDKBuild" in application_info_plist:
|
kernel: int = 0
|
||||||
app_sdk = application_info_plist["DTSDKBuild"]
|
try:
|
||||||
else:
|
kernel = int(app_sdk[:2])
|
||||||
app_sdk = "Unknown"
|
except ValueError:
|
||||||
|
pass
|
||||||
|
|
||||||
|
min_required = os_data.os_conversion.os_to_kernel(min_required) if min_required != "Unknown" else "Unknown"
|
||||||
|
|
||||||
|
if isinstance(min_required, int):
|
||||||
|
if min_required == os_data.os_data.sierra and kernel == os_data.os_data.ventura:
|
||||||
|
# Ventura's installer requires El Capitan minimum
|
||||||
|
# Ref: https://github.com/dortania/OpenCore-Legacy-Patcher/discussions/1038
|
||||||
|
min_required = os_data.os_data.el_capitan
|
||||||
|
|
||||||
# app_version can sometimes report GM instead of the actual version
|
# app_version can sometimes report GM instead of the actual version
|
||||||
# This is a workaround to get the actual version
|
# This is a workaround to get the actual version
|
||||||
if app_version.startswith("GM"):
|
if app_version.startswith("GM"):
|
||||||
try:
|
if kernel == 0:
|
||||||
app_version = int(app_sdk[:2])
|
|
||||||
if app_version < 20:
|
|
||||||
app_version = f"10.{app_version - 4}"
|
|
||||||
else:
|
|
||||||
app_version = f"{app_version - 9}.0"
|
|
||||||
except ValueError:
|
|
||||||
app_version = "Unknown"
|
app_version = "Unknown"
|
||||||
|
else:
|
||||||
|
app_version = os_data.os_conversion.kernel_to_os(kernel)
|
||||||
|
|
||||||
# Check if App Version is High Sierra or newer
|
# Check if App Version is High Sierra or newer
|
||||||
if os_data.os_conversion.os_to_kernel(app_version) < os_data.os_data.high_sierra:
|
if kernel < os_data.os_data.high_sierra:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
results = self._parse_sharedsupport_version(Path(APPLICATION_SEARCH_PATH) / Path(application)/ Path("Contents/SharedSupport/SharedSupport.dmg"))
|
results = self._parse_sharedsupport_version(Path(APPLICATION_SEARCH_PATH) / Path(application)/ Path("Contents/SharedSupport/SharedSupport.dmg"))
|
||||||
@@ -554,6 +561,7 @@ class LocalInstallerCatalog:
|
|||||||
"Version": app_version,
|
"Version": app_version,
|
||||||
"Build": app_sdk,
|
"Build": app_sdk,
|
||||||
"Path": application,
|
"Path": application,
|
||||||
|
"Minimum Host OS": min_required,
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user