diff --git a/.gitignore b/.gitignore index 7728fa4d9..5f8c9d206 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ .DS_Store +/App /Build-Folder /.vscode __pycache__/ diff --git a/Build-App.command b/Build-App.command new file mode 100755 index 000000000..68cfc1d40 --- /dev/null +++ b/Build-App.command @@ -0,0 +1,51 @@ +#!/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) + + diff --git a/Info.plist b/Info.plist new file mode 100644 index 000000000..568f13d7e --- /dev/null +++ b/Info.plist @@ -0,0 +1,32 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleExecutable + OpenCore-Patcher.command + CFBundleIconFile + OC-Patcher.icns + CFBundleIdentifier + com.dortania.OpenCore-Patcher + CFBundleInfoDictionaryVersion + 0.0 + CFBundleName + OpenCore-Patcher + CFBundlePackageType + APPL + CFBundleShortVersionString + 0.0 + CFBundleSignature + ???? + CFBundleVersion + 0.0 + LSMinimumSystemVersion + 10.4 + LSMultipleInstancesProhibited + + NSHumanReadableCopyright + Copyright 2020 Dortania + + diff --git a/OC-Patcher.icns b/OC-Patcher.icns new file mode 100644 index 000000000..b5bf9a6c2 Binary files /dev/null and b/OC-Patcher.icns differ