forked from dortania/OpenCore-Legacy-Patcher
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
619 additions
and
651 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
[MASTER] | ||
|
||
init-hook="from pylint.config import find_pylintrc; import os, sys; sys.path.append(os.path.dirname(find_pylintrc()))" | ||
|
||
[MESSAGES CONTROL] | ||
|
||
disable=unused-import, | ||
subprocess-run-check, | ||
line-too-long, | ||
too-few-public-methods, | ||
missing-module-docstring, | ||
missing-class-docstring, | ||
missing-function-docstring |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
#!/usr/bin/env python | ||
from __future__ import print_function | ||
|
||
from shutil import copy | ||
from shutil import rmtree | ||
from distutils.dir_util import copy_tree | ||
|
||
import os | ||
import json | ||
import subprocess | ||
import sys | ||
import zipfile | ||
|
||
os.chdir(os.path.dirname(os.path.realpath(__file__))) | ||
current_path = os.getcwd() | ||
|
||
print(current_path) | ||
|
||
# File location | ||
command_path = os.path.join(current_path, "OpenCore-Patcher.command") | ||
resources_path = os.path.join(current_path, "Resources/") | ||
payloads_path = os.path.join(current_path, "payloads/") | ||
icns_path = os.path.join(current_path, "OC-Patcher.icns") | ||
plist_path = os.path.join(current_path, "Info.plist") | ||
|
||
app_path = os.path.join(current_path, "App/") | ||
app_app_path = os.path.join(current_path, "App/OpenCore-Patcher.app/") | ||
contents_path = os.path.join(current_path, "App/OpenCore-Patcher.app/Contents/") | ||
app_macos_path = os.path.join(current_path, "App/OpenCore-Patcher.app/Contents/MacOS/") | ||
app_macos_payload_path = os.path.join(current_path, "App/OpenCore-Patcher.app/Contents/MacOS/payloads") | ||
app_macos_resources_path = os.path.join(current_path, "App/OpenCore-Patcher.app/Contents/MacOS/Resources") | ||
app_resources_path = os.path.join(current_path, "App/OpenCore-Patcher.app/Contents/Resources/") | ||
|
||
|
||
if os.path.exists(app_path): | ||
print("Cleaning App folder") | ||
rmtree(app_path) | ||
|
||
print("Creating new App folder") | ||
os.mkdir(app_path) | ||
os.mkdir(app_app_path) | ||
os.mkdir(contents_path) | ||
os.mkdir(app_macos_path) | ||
os.mkdir(app_resources_path) | ||
|
||
copy(command_path, app_macos_path) | ||
copy_tree(resources_path, app_macos_resources_path) | ||
copy_tree(payloads_path, app_macos_payload_path) | ||
copy(icns_path, app_resources_path) | ||
copy(plist_path, contents_path) | ||
copy(icns_path, app_macos_path) | ||
|
Oops, something went wrong.