mirror of
https://github.com/dortania/OpenCore-Legacy-Patcher.git
synced 2026-04-17 13:22:54 +10:00
Package as .app
This commit is contained in:
15
.github/workflows/main.yml
vendored
15
.github/workflows/main.yml
vendored
@@ -24,17 +24,26 @@ jobs:
|
||||
pip3 install pyinstaller
|
||||
|
||||
- run: pyinstaller Opencore-Patcher.spec
|
||||
- run: cd dist; zip ../OpenCore-Patcher.zip OpenCore-Patcher
|
||||
- run: ./after_pyinstaller.sh
|
||||
|
||||
- name: Upload to Artifacts
|
||||
- run: cd dist; zip ../OpenCore-Patcher.zip OpenCore-Patcher; zip ../OpenCore-Patcher.app.zip OpenCore-Patcher.app
|
||||
|
||||
- name: Upload Binary to Artifacts
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: OpenCore-Patcher
|
||||
path: OpenCore-Patcher.zip
|
||||
- name: Upload App to Artifacts
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: OpenCore-Patcher.app
|
||||
path: OpenCore-Patcher.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.zip
|
||||
file: OpenCore-Patcher.app.zip
|
||||
tag: ${{ github.ref }}
|
||||
file_glob: true
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
from __future__ import print_function
|
||||
|
||||
import subprocess
|
||||
import subprocess, sys, time
|
||||
|
||||
from Resources import build, ModelArray, Constants, utilities
|
||||
|
||||
@@ -88,7 +88,8 @@ system_profiler SPHardwareDataType | grep 'Model Identifier'
|
||||
|
||||
response = menu.start()
|
||||
|
||||
print("Bye")
|
||||
if getattr(sys, "frozen", False):
|
||||
subprocess.run("""osascript -e 'tell application "Terminal" to close first window' & exit""", shell=True)
|
||||
|
||||
|
||||
OpenCoreLegacyPatcher().main_menu()
|
||||
|
||||
@@ -30,3 +30,10 @@ exe = EXE(pyz,
|
||||
upx_exclude=[],
|
||||
runtime_tmpdir=None,
|
||||
console=True )
|
||||
app = BUNDLE(exe,
|
||||
name='OpenCore-Patcher.app',
|
||||
icon="OC-Patcher.icns",
|
||||
bundle_identifier=None,
|
||||
info_plist={
|
||||
"CFBundleExecutable": "MacOS/Launcher"
|
||||
})
|
||||
|
||||
2
after_pyinstaller.sh
Executable file
2
after_pyinstaller.sh
Executable file
@@ -0,0 +1,2 @@
|
||||
#!/bin/sh
|
||||
cp launcher.sh dist/OpenCore-Patcher.app/Contents/MacOS/Launcher
|
||||
5
launcher.sh
Executable file
5
launcher.sh
Executable file
@@ -0,0 +1,5 @@
|
||||
#!/bin/bash
|
||||
cd "$(dirname "$0")"
|
||||
|
||||
chmod +x OpenCore-Patcher
|
||||
open OpenCore-Patcher
|
||||
Reference in New Issue
Block a user