mirror of
https://github.com/dortania/OpenCore-Legacy-Patcher.git
synced 2026-04-24 03:50:14 +10:00
constants.py: Load icons from relative resources
Resolves issues with icons failing to load on macOS download UI
This commit is contained in:
@@ -8,6 +8,8 @@
|
||||
- Add new Launch Daemon for clean up on macOS updates
|
||||
- Resolves KDKless Macs failing to boot after updating from 14.0 to 14.x
|
||||
- `/Library/LaunchDaemons/com.dortania.opencore-legacy-patcher.macos-update.plist`
|
||||
- Load UI icons from local path
|
||||
- Resolves macOS downloader crash on slower machines
|
||||
- Remove News Widget removal from Control Centre
|
||||
- News Widget no longer crashes on 3802-based GPUs
|
||||
- Resolve i210 NIC support for macOS Sonoma
|
||||
|
||||
@@ -707,6 +707,13 @@ class Constants:
|
||||
return self.payload_path / Path("Tools/RSRRepair")
|
||||
|
||||
# Icons
|
||||
@property
|
||||
def icns_resource_path(self):
|
||||
if self.launcher_script:
|
||||
return self.payload_path / Path("Icon/AppIcons")
|
||||
return Path(self.launcher_binary).parent.parent / Path("Resources")
|
||||
|
||||
|
||||
@property
|
||||
def app_icon_path(self):
|
||||
return self.payload_path / Path("OC-Patcher.icns")
|
||||
@@ -729,23 +736,23 @@ class Constants:
|
||||
|
||||
@property
|
||||
def icon_path_macos_generic(self):
|
||||
return self.payload_path / Path("Icon/AppIcons/Generic.icns")
|
||||
return self.icns_resource_path / Path("Generic.icns")
|
||||
|
||||
@property
|
||||
def icon_path_macos_big_sur(self):
|
||||
return self.payload_path / Path("Icon/AppIcons/BigSur.icns")
|
||||
return self.icns_resource_path / Path("BigSur.icns")
|
||||
|
||||
@property
|
||||
def icon_path_macos_monterey(self):
|
||||
return self.payload_path / Path("Icon/AppIcons/Monterey.icns")
|
||||
return self.icns_resource_path / Path("Monterey.icns")
|
||||
|
||||
@property
|
||||
def icon_path_macos_ventura(self):
|
||||
return self.payload_path / Path("Icon/AppIcons/Ventura.icns")
|
||||
return self.icns_resource_path / Path("Ventura.icns")
|
||||
|
||||
@property
|
||||
def icon_path_macos_sonoma(self):
|
||||
return self.payload_path / Path("Icon/AppIcons/Sonoma.icns")
|
||||
return self.icns_resource_path / Path("Sonoma.icns")
|
||||
|
||||
@property
|
||||
def gui_path(self):
|
||||
@@ -768,13 +775,6 @@ class Constants:
|
||||
def kdk_download_path(self):
|
||||
return self.payload_path / Path("KDK.dmg")
|
||||
|
||||
@property
|
||||
def icns_resource_path(self):
|
||||
if self.launcher_script:
|
||||
return self.payload_path / Path("Icon/AppIcons")
|
||||
return Path(self.launcher_binary).parent.parent / Path("Resources")
|
||||
|
||||
|
||||
@property
|
||||
def icons_path(self):
|
||||
return [
|
||||
|
||||
Reference in New Issue
Block a user