mirror of
https://github.com/dortania/OpenCore-Legacy-Patcher.git
synced 2026-04-24 20:10:14 +10:00
GUI: Use range for extraction loop
This commit is contained in:
@@ -20,6 +20,7 @@
|
|||||||
- Reworked settings UI
|
- Reworked settings UI
|
||||||
- Unified download UI with time remaining
|
- Unified download UI with time remaining
|
||||||
- Implement in-app update system
|
- Implement in-app update system
|
||||||
|
- Guides users to update OpenCore and Root Patches once update's installed
|
||||||
- Expand app update checks to include nightly users
|
- Expand app update checks to include nightly users
|
||||||
- ex. 0.6.6 nightly -> 0.6.6 release
|
- ex. 0.6.6 nightly -> 0.6.6 release
|
||||||
- Implement macOS installer verification after flashing
|
- Implement macOS installer verification after flashing
|
||||||
|
|||||||
@@ -167,8 +167,7 @@ class UpdateFrame(wx.Frame):
|
|||||||
|
|
||||||
# Some hell spawn at Github decided to double zip our Github Actions artifacts
|
# Some hell spawn at Github decided to double zip our Github Actions artifacts
|
||||||
# So we need to unzip it twice
|
# So we need to unzip it twice
|
||||||
loop = 0
|
for i in range(3):
|
||||||
while True:
|
|
||||||
result = subprocess.run(
|
result = subprocess.run(
|
||||||
["ditto", "-xk", str(self.constants.payload_path / "OpenCore-Patcher-GUI.app.zip"), str(self.constants.payload_path)], capture_output=True
|
["ditto", "-xk", str(self.constants.payload_path / "OpenCore-Patcher-GUI.app.zip"), str(self.constants.payload_path)], capture_output=True
|
||||||
)
|
)
|
||||||
@@ -178,8 +177,8 @@ class UpdateFrame(wx.Frame):
|
|||||||
wx.CallAfter(sys.exit, 1)
|
wx.CallAfter(sys.exit, 1)
|
||||||
if Path(self.application_path).exists():
|
if Path(self.application_path).exists():
|
||||||
break
|
break
|
||||||
loop += 1
|
|
||||||
if loop == 2:
|
if i == 2:
|
||||||
wx.CallAfter(self.progress_bar.SetValue, 0)
|
wx.CallAfter(self.progress_bar.SetValue, 0)
|
||||||
wx.CallAfter(wx.MessageBox, "Failed to extract update. Error: Update file does not exist", "Critical Error!", wx.OK | wx.ICON_ERROR)
|
wx.CallAfter(wx.MessageBox, "Failed to extract update. Error: Update file does not exist", "Critical Error!", wx.OK | wx.ICON_ERROR)
|
||||||
wx.CallAfter(sys.exit, 1)
|
wx.CallAfter(sys.exit, 1)
|
||||||
|
|||||||
Reference in New Issue
Block a user