Remove Online Binaries

This commit is contained in:
Mykola Grymalyuk
2022-04-24 15:01:43 -06:00
parent 8e02cc4d83
commit 7b4f7024c4
12 changed files with 52 additions and 117 deletions
-42
View File
@@ -1,42 +0,0 @@
name: CI - Build Offline TUI
on:
push:
workflow_dispatch:
release:
types: [published]
jobs:
build:
name: Build Offline TUI
runs-on: x86_64_mojave
env:
branch: ${{ github.event.ref }}
commiturl: ${{ github.event.head_commit.url }}
commitdate: ${{ github.event.head_commit.timestamp }}
steps:
- uses: actions/checkout@v2
- run: python3 create_offline_build.py
- run: /Library/Frameworks/Python.framework/Versions/3.9/bin/pyinstaller OpenCore-Patcher.spec
- run: python3 ./payloads/binary.py $branch $commiturl $commitdate
- run: ./after_pyinstaller.sh
- run: 'codesign -s "Developer ID Application: Mykola Grymalyuk (S74BDJXQMD)" -v --force --deep --timestamp --entitlements ./payloads/entitlements.plist -o runtime "dist/OpenCore-Patcher.app"'
- run: cd dist; zip -r ../OpenCore-Patcher-TUI.app.zip OpenCore-Patcher.app
- run: ./../sign-tui.sh
- run: mv ./OpenCore-Patcher-TUI.app.zip ./OpenCore-Patcher-TUI-Offline.app.zip
- name: Upload App to Artifacts
uses: actions/upload-artifact@v2
with:
name: OpenCore-Patcher-TUI.app (Offline)
path: OpenCore-Patcher-TUI-Offline.app.zip
- name: Upload to Release
if: github.event_name == 'release'
uses: svenstaro/upload-release-action@e74ff71f7d8a4c4745b560a485cc5fdb9b5b999d
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: OpenCore-Patcher-TUI-Offline.app.zip
tag: ${{ github.ref }}
file_glob: true
- name: Validate OpenCore
run: ./dist/OpenCore-Patcher.app/Contents/MacOS/OpenCore-Patcher --validate
@@ -1,52 +0,0 @@
name: CI - Build wxPython Offline
on:
push:
workflow_dispatch:
release:
types: [published]
jobs:
build:
name: Build wxPython Offline
runs-on: x86_64_mojave
env:
branch: ${{ github.event.ref }}
commiturl: ${{ github.event.head_commit.url }}
commitdate: ${{ github.event.head_commit.timestamp }}
steps:
- uses: actions/checkout@v2
- run: python3 create_offline_build.py
- run: /Library/Frameworks/Python.framework/Versions/3.9/bin/pyinstaller OpenCore-Patcher-GUI.spec
- run: python3 ./payloads/binary.py $branch $commiturl $commitdate
- run: 'codesign -s "Developer ID Application: Mykola Grymalyuk (S74BDJXQMD)" -v --force --deep --timestamp --entitlements ./payloads/entitlements.plist -o runtime "dist/OpenCore-Patcher.app"'
- run: cd dist; zip -r ../OpenCore-Patcher-wxPython.app.zip OpenCore-Patcher.app
- run: ./../sign-wxpython.sh
- run: packagesbuild ./payloads/InstallPackage/AutoPkg-Assets-Setup.pkgproj
- run: mv ./OpenCore-Patcher-wxPython.app.zip ./OpenCore-Patcher-GUI-Offline.app.zip
- name: Upload App to Artifacts
uses: actions/upload-artifact@v2
with:
name: OpenCore-Patcher.app (GUI Offline)
path: OpenCore-Patcher-GUI-Offline.app.zip
- name: Upload Package to Artifacts
uses: actions/upload-artifact@v2
with:
name: AutoPkg-Assets.pkg
path: ./dist/AutoPkg-Assets.pkg
- name: Upload Binary to Release
if: github.event_name == 'release'
uses: svenstaro/upload-release-action@e74ff71f7d8a4c4745b560a485cc5fdb9b5b999d
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: OpenCore-Patcher-GUI-Offline.app.zip
tag: ${{ github.ref }}
file_glob: true
- name: Upload Package to Release
if: github.event_name == 'release'
uses: svenstaro/upload-release-action@e74ff71f7d8a4c4745b560a485cc5fdb9b5b999d
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ./dist/AutoPkg-Assets.pkg
tag: ${{ github.ref }}
file_glob: true
+16 -1
View File
@@ -16,22 +16,37 @@ jobs:
commitdate: ${{ github.event.head_commit.timestamp }}
steps:
- uses: actions/checkout@v2
- run: python3 create_offline_build.py
- run: /Library/Frameworks/Python.framework/Versions/3.9/bin/pyinstaller OpenCore-Patcher-GUI.spec
- run: python3 ./payloads/binary.py $branch $commiturl $commitdate
- run: 'codesign -s "Developer ID Application: Mykola Grymalyuk (S74BDJXQMD)" -v --force --deep --timestamp --entitlements ./payloads/entitlements.plist -o runtime "dist/OpenCore-Patcher.app"'
- run: cd dist; zip -r ../OpenCore-Patcher-wxPython.app.zip OpenCore-Patcher.app
- run: ./../sign-wxpython.sh
- run: packagesbuild ./payloads/InstallPackage/AutoPkg-Assets-Setup.pkgproj
- run: mv ./OpenCore-Patcher-wxPython.app.zip ./OpenCore-Patcher-GUI.app.zip
- name: Upload App to Artifacts
uses: actions/upload-artifact@v2
with:
name: OpenCore-Patcher.app (GUI)
path: OpenCore-Patcher-GUI.app.zip
- name: Upload to Release
- name: Upload Package to Artifacts
uses: actions/upload-artifact@v2
with:
name: AutoPkg-Assets.pkg
path: ./dist/AutoPkg-Assets.pkg
- name: Upload Binary to Release
if: github.event_name == 'release'
uses: svenstaro/upload-release-action@e74ff71f7d8a4c4745b560a485cc5fdb9b5b999d
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: OpenCore-Patcher-GUI.app.zip
tag: ${{ github.ref }}
file_glob: true
- name: Upload Package to Release
if: github.event_name == 'release'
uses: svenstaro/upload-release-action@e74ff71f7d8a4c4745b560a485cc5fdb9b5b999d
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ./dist/AutoPkg-Assets.pkg
tag: ${{ github.ref }}
file_glob: true
+3
View File
@@ -16,6 +16,7 @@ jobs:
commitdate: ${{ github.event.head_commit.timestamp }}
steps:
- uses: actions/checkout@v2
- run: python3 create_offline_build.py
- run: /Library/Frameworks/Python.framework/Versions/3.9/bin/pyinstaller OpenCore-Patcher.spec
- run: python3 ./payloads/binary.py $branch $commiturl $commitdate
- run: ./after_pyinstaller.sh
@@ -36,3 +37,5 @@ jobs:
file: OpenCore-Patcher-TUI.app.zip
tag: ${{ github.ref }}
file_glob: true
- name: Validate OpenCore
run: ./dist/OpenCore-Patcher.app/Contents/MacOS/OpenCore-Patcher --validate
+4 -1
View File
@@ -18,7 +18,7 @@
- Improve Display Prefpane Image
- Defaults prefix change (`ASB_` -> `MORAEA_`, reopen non-Metal Settings to apply)
- Increment Binaries:
- PatcherSupportPkg 0.3.7 - release
- PatcherSupportPkg 0.3.9 - release
- OpenCorePkg 0.8.0 - release
- FeatureUnlock 1.0.8 - release
- CPUFriend 1.2.5 - release
@@ -47,6 +47,9 @@
- `bless` based reversion still supported in Big Sur+
- Remove Unoffical Mojave/Catalina Root Patching
- For TeraScale 2-based acceleration on older OSes, use v0.4.3
- Simplify Binary options
- Removes Online Patcher Variants
- Offline variants are now new defaults, no longer retain `Offline` suffix
## 0.4.3
- Increment Binaries:
-3
View File
@@ -5,10 +5,7 @@ OpenCore Legacy Patcher at its core is a python-based TUI/CLI based application.
For developers wishing to validate mainline changes, you may use these nightly links:
* [GUI (Graphical Based App)](https://nightly.link/dortania/OpenCore-Legacy-Patcher/workflows/build-app-wxpython/main/OpenCore-Patcher.app%20%28GUI%29.zip)
* [GUI (Graphical Based App) - Offline Variant](https://nightly.link/dortania/OpenCore-Legacy-Patcher/workflows/build-app-wxpython-offline/main/OpenCore-Patcher.app%20%28GUI%20Offline%29.zip)
* [TUI (Text Based App)](https://nightly.link/dortania/OpenCore-Legacy-Patcher/workflows/build-app/main/OpenCore-Patcher-TUI.app.zip)
* [TUI (Text Based App) - Offline Variant](https://nightly.link/dortania/OpenCore-Legacy-Patcher/workflows/build-app-offline/main/OpenCore-Patcher-TUI.app%20%28Offline%29.zip)
**Warning**: These binaries should not be used without first consulting the [CHANGELOG](./CHANGELOG.md). Do not distribute these links in forums, instead direct to this file.
* Users running new builds of the project without understanding what has changed are at higher of bricking their installation as they do not read any warnings provided in the CHANGELOG. We wish to minimize these situations as much as possible.
+1 -1
View File
@@ -2,7 +2,7 @@ import subprocess
from resources import constants
patcher_support_pkg_version = constants.Constants().patcher_support_pkg_version
binary_packages = ["11-Big-Sur", "12-Monterey"]
binary_packages = ["11-Big-Sur", "12-Monterey", "Universal-Extensions"]
for binary_package in binary_packages:
print(f"- Downloading {binary_package}...")
+1 -1
View File
@@ -867,7 +867,7 @@ class wx_python_gui:
# Download resources
sys.stdout=menu_redirect.RedirectLabel(self.developer_note)
download_result, os_ver, link = sys_patch_download.grab_patcher_support_pkg(self.constants).download_files()
download_result, os_ver, extensions_link, framework_link = sys_patch_download.grab_patcher_support_pkg(self.constants).download_files()
sys.stdout=sys.__stdout__
if download_result is None:
+6 -2
View File
@@ -15,7 +15,7 @@ class Constants:
def __init__(self):
# Patcher Versioning
self.patcher_version = "0.4.4" # OpenCore-Legacy-Patcher
self.patcher_support_pkg_version = "0.3.8" # PatcherSupportPkg
self.patcher_support_pkg_version = "0.3.9" # PatcherSupportPkg
self.url_patcher_support_pkg = "https://github.com/dortania/PatcherSupportPkg/releases/download/"
self.nightly_url_patcher_support_pkg = "https://nightly.link/dortania/PatcherSupportPkg/workflows/build/master/"
self.discord_link = "https://discord.gg/rqdPgH8xSN"
@@ -575,6 +575,10 @@ class Constants:
@property
def payload_apple_root_path_zip(self):
return self.payload_path / Path("Apple.zip")
@property
def payload_universal_extensions_zip_path(self):
return self.payload_path / Path("Universal-Extensions.zip")
@property
def payload_apple_root_path(self):
@@ -582,7 +586,7 @@ class Constants:
@property
def payload_apple_kexts_path(self):
return self.payload_apple_root_path / Path("Extensions")
return self.payload_path / Path("Universal-Extensions")
@property
def payload_apple_coreservices_path(self):
+8 -5
View File
@@ -628,19 +628,21 @@ class PatchSysVolume:
def download_files(self):
if self.constants.gui_mode is False or "Library/InstallerSandboxes/" in str(self.constants.payload_path):
download_result, os_ver, link = sys_patch_download.grab_patcher_support_pkg(self.constants).download_files()
download_result, os_ver, extensions_link, framework_link = sys_patch_download.grab_patcher_support_pkg(self.constants).download_files()
else:
download_result = True
os_ver, link = sys_patch_download.grab_patcher_support_pkg(self.constants).generate_pkg_link()
os_ver, extensions_link, framework_link = sys_patch_download.grab_patcher_support_pkg(self.constants).generate_pkg_link()
if download_result and self.constants.payload_apple_root_path_zip.exists():
if download_result and self.constants.payload_apple_root_path_zip.exists() and self.constants.payload_universal_extensions_zip_path.exists():
print("- Download completed")
print("- Unzipping download...")
try:
utilities.process_status(subprocess.run(["unzip", self.constants.payload_apple_root_path_zip], stdout=subprocess.PIPE, stderr=subprocess.STDOUT, cwd=self.constants.payload_path))
utilities.process_status(subprocess.run(["unzip", self.constants.payload_universal_extensions_zip_path], stdout=subprocess.PIPE, stderr=subprocess.STDOUT, cwd=self.constants.payload_path))
print("- Renaming folder")
os.rename(self.constants.payload_path / Path(os_ver), self.constants.payload_apple_root_path)
Path(self.constants.payload_apple_root_path_zip).unlink()
Path(self.constants.payload_universal_extensions_zip_path).unlink()
print("- Binaries downloaded to:")
print(self.constants.payload_path)
return self.constants.payload_apple_root_path
@@ -649,8 +651,9 @@ class PatchSysVolume:
return None
else:
if self.constants.gui_mode is True:
print("- Download failed, please verify the below link works:")
print(link)
print("- Download failed, please verify the below links work:")
print(framework_link)
print(extensions_link)
print("\nIf you continue to have issues, try using the Offline builds")
print("located on Github next to the other builds")
else:
+12 -8
View File
@@ -22,11 +22,12 @@ class grab_patcher_support_pkg:
os_ver = "10.14-Mojave"
else:
raise Exception(f"Unsupported OS: {self.constants.detected_os}")
link = f"{self.constants.url_patcher_support_pkg}{self.constants.patcher_support_pkg_version}/{os_ver}.zip"
return os_ver, link
framework_link = f"{self.constants.url_patcher_support_pkg}{self.constants.patcher_support_pkg_version}/{os_ver}.zip"
extensions_link = f"{self.constants.url_patcher_support_pkg}{self.constants.patcher_support_pkg_version}/Universal-Extensions.zip"
return os_ver, extensions_link, framework_link
def download_files(self):
os_ver, link = self.generate_pkg_link()
os_ver, extensions_link, framework_link = self.generate_pkg_link()
if Path(self.constants.payload_apple_root_path).exists():
print("- Removing old Apple Binaries folder")
# Delete folder
@@ -36,13 +37,16 @@ class grab_patcher_support_pkg:
Path(self.constants.payload_apple_root_path_zip).unlink()
download_result = None
local_zip = Path(self.constants.payload_path) / f"{os_ver}.zip"
if Path(local_zip).exists():
local_framework_zip = Path(self.constants.payload_path) / f"{os_ver}.zip"
local_extensions_zip = Path(self.constants.payload_path) / f"Universal-Extensions.zip"
if Path(local_framework_zip).exists() and Path(local_extensions_zip).exists():
print(f"- Found local {os_ver} zip, skipping download")
print(f"- Duplicating into Apple.zip")
shutil.copy(local_zip, self.constants.payload_apple_root_path_zip)
shutil.copy(local_framework_zip, self.constants.payload_apple_root_path_zip)
download_result = True
else:
download_result = utilities.download_file(link, self.constants.payload_apple_root_path_zip)
print(f"- No local version found, donwloading...")
if utilities.download_file(extensions_link, self.constants.payload_universal_extensions_zip_path):
download_result = utilities.download_file(framework_link, self.constants.payload_apple_root_path_zip)
return download_result, os_ver, link
return download_result, os_ver, extensions_link, framework_link
+1 -1
View File
@@ -50,7 +50,7 @@ class check_binary_updates:
return "TUI"
def determine_local_build_type_offline(self):
if (Path(self.constants.payload_path) / f"12-Monterey.zip").exists():
if (Path(self.constants.payload_path) / "Universal-Extensions.zip").exists():
return True
else:
return False