mirror of
https://github.com/dortania/OpenCore-Legacy-Patcher.git
synced 2026-04-23 11:30:15 +10:00
Update implementation for updater (#1126)
* Update implementation for updater * Update changelog
This commit is contained in:
@@ -1,5 +1,8 @@
|
|||||||
# OpenCore Legacy Patcher changelog
|
# OpenCore Legacy Patcher changelog
|
||||||
|
|
||||||
|
## 1.5.0
|
||||||
|
- Update updater implementation
|
||||||
|
|
||||||
## 1.4.0
|
## 1.4.0
|
||||||
- Refactor subprocess invocations
|
- Refactor subprocess invocations
|
||||||
- Resolve RecoveryOS support (Regression resolved in OpenCorePkg)
|
- Resolve RecoveryOS support (Regression resolved in OpenCorePkg)
|
||||||
|
|||||||
1210
data/css_data.py
Normal file
1210
data/css_data.py
Normal file
File diff suppressed because it is too large
Load Diff
@@ -17,6 +17,7 @@ from pathlib import Path
|
|||||||
from resources import utilities, updates, global_settings, network_handler, constants
|
from resources import utilities, updates, global_settings, network_handler, constants
|
||||||
from resources.sys_patch import sys_patch_detect
|
from resources.sys_patch import sys_patch_detect
|
||||||
from resources.wx_gui import gui_entry, gui_support
|
from resources.wx_gui import gui_entry, gui_support
|
||||||
|
from data import css_data
|
||||||
|
|
||||||
|
|
||||||
class AutomaticSysPatch:
|
class AutomaticSysPatch:
|
||||||
@@ -70,32 +71,8 @@ class AutomaticSysPatch:
|
|||||||
|
|
||||||
Please check the Github page for more information about this release."""
|
Please check the Github page for more information about this release."""
|
||||||
|
|
||||||
html_markdown = markdown2.markdown(changelog)
|
html_markdown = markdown2.markdown(changelog, extras=["tables"])
|
||||||
html_css = """
|
html_css = css_data.updater_css
|
||||||
<style>
|
|
||||||
body {
|
|
||||||
font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
|
|
||||||
line-height: 1.5;
|
|
||||||
font-size: 13px;
|
|
||||||
margin-top: 20px;
|
|
||||||
background-color: rgb(238,238,238);
|
|
||||||
}
|
|
||||||
h2 {
|
|
||||||
line-height: 0.5;
|
|
||||||
padding-left: 10px;
|
|
||||||
}
|
|
||||||
a {
|
|
||||||
color: -apple-system-control-accent;
|
|
||||||
}
|
|
||||||
@media (prefers-color-scheme: dark) {
|
|
||||||
body {
|
|
||||||
color: #fff;
|
|
||||||
background-color: rgb(47,47,47);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
"""
|
|
||||||
frame = wx.Dialog(None, -1, title="", size=(650, 500))
|
frame = wx.Dialog(None, -1, title="", size=(650, 500))
|
||||||
frame.SetMinSize((650, 500))
|
frame.SetMinSize((650, 500))
|
||||||
frame.SetWindowStyle(wx.STAY_ON_TOP)
|
frame.SetWindowStyle(wx.STAY_ON_TOP)
|
||||||
@@ -107,7 +84,18 @@ Please check the Github page for more information about this release."""
|
|||||||
self.title_text.SetFont(gui_support.font_factory(19, wx.FONTWEIGHT_BOLD))
|
self.title_text.SetFont(gui_support.font_factory(19, wx.FONTWEIGHT_BOLD))
|
||||||
self.description.SetFont(gui_support.font_factory(13, wx.FONTWEIGHT_NORMAL))
|
self.description.SetFont(gui_support.font_factory(13, wx.FONTWEIGHT_NORMAL))
|
||||||
self.web_view = wx.html2.WebView.New(panel, style=wx.BORDER_SUNKEN)
|
self.web_view = wx.html2.WebView.New(panel, style=wx.BORDER_SUNKEN)
|
||||||
html_code = html_css+html_markdown.replace("<a href=", "<a target='_blank' href=")
|
html_code = f'''
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<style>
|
||||||
|
{html_css}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body class="markdown-body">
|
||||||
|
{html_markdown.replace("<a href=", "<a target='_blank' href=")}
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
'''
|
||||||
self.web_view.SetPage(html_code, "")
|
self.web_view.SetPage(html_code, "")
|
||||||
self.web_view.Bind(wx.html2.EVT_WEBVIEW_NEWWINDOW, self._onWebviewNav)
|
self.web_view.Bind(wx.html2.EVT_WEBVIEW_NEWWINDOW, self._onWebviewNav)
|
||||||
self.web_view.EnableContextMenu(False)
|
self.web_view.EnableContextMenu(False)
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ from resources import (
|
|||||||
global_settings,
|
global_settings,
|
||||||
updates
|
updates
|
||||||
)
|
)
|
||||||
from data import os_data
|
from data import os_data, css_data
|
||||||
|
|
||||||
|
|
||||||
class MainFrame(wx.Frame):
|
class MainFrame(wx.Frame):
|
||||||
@@ -352,31 +352,8 @@ class MainFrame(wx.Frame):
|
|||||||
|
|
||||||
Please check the Github page for more information about this release."""
|
Please check the Github page for more information about this release."""
|
||||||
|
|
||||||
html_markdown = markdown2.markdown(changelog)
|
html_markdown = markdown2.markdown(changelog, extras=["tables"])
|
||||||
html_css = """
|
html_css = css_data.updater_css
|
||||||
<style>
|
|
||||||
body {
|
|
||||||
font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
|
|
||||||
line-height: 1.5;
|
|
||||||
font-size: 13px;
|
|
||||||
margin-top: 20px;
|
|
||||||
background-color: rgb(238,238,238);
|
|
||||||
}
|
|
||||||
h2 {
|
|
||||||
line-height: 0.5;
|
|
||||||
}
|
|
||||||
a {
|
|
||||||
color: -apple-system-control-accent;
|
|
||||||
}
|
|
||||||
@media (prefers-color-scheme: dark) {
|
|
||||||
body {
|
|
||||||
color: #fff;
|
|
||||||
background-color: rgb(47,47,47);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
"""
|
|
||||||
frame = wx.Dialog(None, -1, title="", size=(650, 500))
|
frame = wx.Dialog(None, -1, title="", size=(650, 500))
|
||||||
frame.SetMinSize((650, 500))
|
frame.SetMinSize((650, 500))
|
||||||
frame.SetWindowStyle(wx.STAY_ON_TOP)
|
frame.SetWindowStyle(wx.STAY_ON_TOP)
|
||||||
@@ -388,7 +365,18 @@ Please check the Github page for more information about this release."""
|
|||||||
self.title_text.SetFont(gui_support.font_factory(19, wx.FONTWEIGHT_BOLD))
|
self.title_text.SetFont(gui_support.font_factory(19, wx.FONTWEIGHT_BOLD))
|
||||||
self.description.SetFont(gui_support.font_factory(13, wx.FONTWEIGHT_NORMAL))
|
self.description.SetFont(gui_support.font_factory(13, wx.FONTWEIGHT_NORMAL))
|
||||||
self.web_view = wx.html2.WebView.New(panel, style=wx.BORDER_SUNKEN)
|
self.web_view = wx.html2.WebView.New(panel, style=wx.BORDER_SUNKEN)
|
||||||
html_code = html_css+html_markdown.replace("<a href=", "<a target='_blank' href=")
|
html_code = f'''
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<style>
|
||||||
|
{html_css}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body class="markdown-body">
|
||||||
|
{html_markdown.replace("<a href=", "<a target='_blank' href=")}
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
'''
|
||||||
self.web_view.SetPage(html_code, "")
|
self.web_view.SetPage(html_code, "")
|
||||||
self.web_view.Bind(wx.html2.EVT_WEBVIEW_NEWWINDOW, self._onWebviewNav)
|
self.web_view.Bind(wx.html2.EVT_WEBVIEW_NEWWINDOW, self._onWebviewNav)
|
||||||
self.web_view.EnableContextMenu(False)
|
self.web_view.EnableContextMenu(False)
|
||||||
|
|||||||
Reference in New Issue
Block a user