mirror of
https://github.com/dortania/OpenCore-Legacy-Patcher.git
synced 2026-06-14 03:16:28 +10:00
Implement update shim
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
from pathlib import Path
|
||||
|
||||
from opencore_legacy_patcher.support import subprocess_wrapper
|
||||
|
||||
class GenerateAutoPkg:
|
||||
|
||||
def __init__(self) -> None:
|
||||
self._package_build_bin = "/usr/local/bin/packagesbuild"
|
||||
self._autopkg_config = "./ci_tooling/autopkg/AutoPkg-Assets-Setup.pkgproj"
|
||||
|
||||
|
||||
def generate(self) -> None:
|
||||
"""
|
||||
Generate AutoPkg Assets
|
||||
"""
|
||||
print("Generating AutoPkg Assets")
|
||||
subprocess_wrapper.run_and_verify([self._package_build_bin, self._autopkg_config])
|
||||
@@ -0,0 +1,31 @@
|
||||
|
||||
|
||||
from pathlib import Path
|
||||
|
||||
from opencore_legacy_patcher.support import subprocess_wrapper
|
||||
|
||||
|
||||
class GenerateShim:
|
||||
|
||||
def __init__(self) -> None:
|
||||
self._shim_path = "./ci_tooling/update_shim/OpenCore-Patcher.app"
|
||||
self._shim_pkg = f"{self._shim_path}/Contents/Resources/OpenCore-Patcher.pkg"
|
||||
|
||||
self._build_pkg = "./dist/OpenCore-Patcher.pkg"
|
||||
self._output_shim = "./dist/OpenCore-Patcher (Shim).app"
|
||||
|
||||
|
||||
def generate(self) -> None:
|
||||
"""
|
||||
Generate Update Shim
|
||||
"""
|
||||
print("Generating Update Shim")
|
||||
if Path(self._shim_pkg).exists():
|
||||
Path(self._shim_pkg).unlink()
|
||||
|
||||
subprocess_wrapper.run_and_verify(["/bin/cp", "-R", self._build_pkg, self._shim_pkg])
|
||||
|
||||
if Path(self._output_shim).exists():
|
||||
Path(self._output_shim).unlink()
|
||||
|
||||
subprocess_wrapper.run_and_verify(["/bin/cp", "-R", self._shim_path, self._output_shim])
|
||||
@@ -0,0 +1,28 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDisplayName</key>
|
||||
<string>OpenCore-Patcher</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>OpenCore-Patcher</string>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string>OC-Patcher.icns</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.dortania.opencore-legacy-patcher-helper</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>OpenCore-Patcher</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>LSMinimumSystemVersion</key>
|
||||
<string>10.10.0</string>
|
||||
<key>NSHighResolutionCapable</key>
|
||||
<true/>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
<string>Copyright © 2020-2023 Dortania</string>
|
||||
<key>LSUIElement</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
||||
BIN
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,8 @@
|
||||
# OpenCore-Patcher Update Shim
|
||||
|
||||
To handle the new PKG installation method, old versions of OpenCore Legacy Patcher updating to newer versions will still require 'OpenCore-Patcher.app' to be available for download.
|
||||
|
||||
Thus the goal of this app is to install an embedded PKG under ./OpenCore-Patcher.app/Contents/Resources/OpenCore-Patcher.pkg to handle the update process.
|
||||
|
||||
Source is available at:
|
||||
* https://github.com/dortania/OCLP-Helper
|
||||
Reference in New Issue
Block a user