From 7ecf9ff151c052135810331baed306215e5edaee Mon Sep 17 00:00:00 2001 From: Mykola Grymalyuk Date: Tue, 11 Jan 2022 09:21:38 -0700 Subject: [PATCH] Update docs --- .../workflows/build-app-wxpython-offline.yml | 10 +---- README.md | 2 +- SOURCE.md | 39 +++++++------------ requirements.txt | 3 +- 4 files changed, 18 insertions(+), 36 deletions(-) diff --git a/.github/workflows/build-app-wxpython-offline.yml b/.github/workflows/build-app-wxpython-offline.yml index 73affca15..ddad4237c 100644 --- a/.github/workflows/build-app-wxpython-offline.yml +++ b/.github/workflows/build-app-wxpython-offline.yml @@ -1,10 +1,4 @@ -on: - push: - workflow_dispatch: - release: - types: [published] - -name: CI - Build Offline wxPython +name: CI - Build wxPython Offline on: push: @@ -14,7 +8,7 @@ on: jobs: build: - name: Build Offline wxPython + name: Build wxPython Offline runs-on: x86_64_mojave steps: - uses: actions/checkout@v2 diff --git a/README.md b/README.md index 3b678eb89..b5779c8b4 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@

OpenCore Legacy Patcher

-A python program with an [Objective-C GUI](https://github.com/dortania/OCLP-GUI) for building and booting [OpenCore](https://github.com/acidanthera/OpenCorePkg) on both legacy and modern Macs, see our in-depth [Guide](https://dortania.github.io/OpenCore-Legacy-Patcher/) for more information. +A python program for building and booting [OpenCore](https://github.com/acidanthera/OpenCorePkg) on both legacy and modern Macs, see our in-depth [Guide](https://dortania.github.io/OpenCore-Legacy-Patcher/) for more information. Supported features: diff --git a/SOURCE.md b/SOURCE.md index d0373104f..b3e36aba7 100644 --- a/SOURCE.md +++ b/SOURCE.md @@ -4,7 +4,8 @@ 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-gui/main/OpenCore-Patcher-GUI.app.zip) +* [GUI (Graphical Based App)](https://nightly.link/dortania/OpenCore-Legacy-Patcher/workflows/build-app-wxpython/main/OpenCore-Patcher-GUI.app.zip) +* [GUI (Graphical Based App) - Offline Variant](https://nightly.link/dortania/OpenCore-Legacy-Patcher/workflows/build-app-wxpython-offline/main/OpenCore-Patcher-GUI.app.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/main/OpenCore-Patcher-TUI-Offline.app.zip) @@ -36,12 +37,19 @@ pip3 install -r requirements.txt To run the project from source, simply invoke via python3: ```sh +# Launch TUI python3 OpenCore-Patcher.command ``` +```sh +# Launch GUI +python3 OpenCore-Patcher-GUI.command +``` + Note that the OpenCore-Patcher.command file can be run as both a TUI and a CLI utility for other programs to call. If no core arguments are passed, the TUI is initialized. Otherwise the CLI will start: ```sh +# Launch CLI python3 OpenCore-Patcher.command --build --model iMac12,2 --verbose ``` @@ -49,7 +57,7 @@ See `-h`/`--help` for more information on supported CLI arguments. ## Generating prebuilt binaries -The main goal of generating prebuilt binaries is to strip the requirement of a local python installation for users. For developers, there's very little benefit besides for usage with the project's GUI ([Generating the GUI](#generating-the-gui)). For development, simply use the OpenCore-Patcher.command file with a python3 installation. +The main goal of generating prebuilt binaries is to strip the requirement of a local python installation for users. For developers, there's very little benefit besides enabling dark mode support in the GUI. For development, simply use the OpenCore-Patcher.command file with a python3 installation. * Note that due to PyInstaller's linking mechanism, binaries generated on Catalina and newer are not compatible with High Sierra and older * To ensure the largest compatibility, generate binaries on macOS Mojave. These binaries will be compatible with macOS 10.9 to macOS 12. @@ -60,9 +68,9 @@ The main goal of generating prebuilt binaries is to strip the requirement of a l pip3 install pyinstaller # Move into project directory cd ~/Developer/OpenCore-Legacy-Patcher/ -# Create the pyinstaller based Application +# Create the pyinstaller based Application (replace OpenCore-Patcher.spec with OpenCore-Patcher-GUI.spec for GUI binary) pyinstaller OpenCore-Patcher.spec -# Post PyInstaller clean up +# Post PyInstaller clean up (only for the TUI) ./after_pyinstaller.sh # Open build folder open ./dist/ @@ -70,25 +78,4 @@ open ./dist/ Once done, you'll find the application generated at `./dist/OpenCore-Patcher.app`: -![](./images/build-dist.png) - -## Generating the GUI - -To generate a GUI, you will have need a core `OpenCore-Patcher` binary generated during the above stage([Generating prebuilt binaries](#generating-prebuilt-binaries)). - -Once conditions are met, you'll be able to work with the GUI portion. The source of which is found at [dortania/OCLP-GUI](https://github.com/dortania/OCLP-GUI). - -```sh -# Move into a directory to store the project -cd ~/Developer -# Clone project -git clone https://github.com/dortania/OCLP-GUI -# Update the OpenCore-Patcher binary from the core project -cp ./OpenCore-Legacy-Patcher/dist/OpenCore-Patcher ./OCLP-GUI/OpenCore\ Patcher/OpenCore\ Patcher/ -# Rename binary to OCLP-CLI -mv ./OCLP-GUI/OpenCore\ Patcher/OpenCore\ Patcher/OCLP-GUI/OpenCore-Patcher ./OCLP-GUI/OpenCore\ Patcher/OpenCore\ Patcher/OCLP-GUI/OCLP-CLI -# Build project -cd ./OCLP-GUI/OpenCore\ Patcher; xcodebuild; cd ../../ -# Open build folder -open ./OCLP-GUI/OpenCore\ Patcher/build/Release/ -``` \ No newline at end of file +![](./images/build-dist.png) \ No newline at end of file diff --git a/requirements.txt b/requirements.txt index 9e7648675..48afcd905 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1,3 @@ requests -pyobjc \ No newline at end of file +pyobjc +wxpython \ No newline at end of file