diff --git a/OpCore-Simplify.py b/OpCore-Simplify.py index c1b0f11..f347a73 100755 --- a/OpCore-Simplify.py +++ b/OpCore-Simplify.py @@ -27,7 +27,7 @@ class OCPE: "18": "macOS Mojave 10.14", "17": "macOS High Sierra 10.13" } - self.result_dir = os.path.join(os.getcwd(), "Results") + self.result_dir = os.path.join(os.path.dirname(os.path.realpath(__file__)), "Results") def check_for_update(self): self.u.head("Check for update") diff --git a/Scripts/acpi_guru.py b/Scripts/acpi_guru.py index b2ab540..f2d4370 100755 --- a/Scripts/acpi_guru.py +++ b/Scripts/acpi_guru.py @@ -2776,7 +2776,7 @@ DefinitionBlock ("", "SSDT", 2, "ZPSS", "Surface", 0x00001000) return def select_dsdt(self): - results_path = os.path.join(os.getcwd(), "Results") + results_path = os.path.join(os.path.dirname(os.path.dirname(os.path.realpath(__file__))), "Results") apcidump_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), "acpidump.exe") while True: self.utils.head("Select ACPI Tables") diff --git a/Scripts/efi_builder.py b/Scripts/efi_builder.py index e0a66cb..663939d 100755 --- a/Scripts/efi_builder.py +++ b/Scripts/efi_builder.py @@ -13,9 +13,7 @@ class builder: self.config = config_prodigy.ConfigProdigy() self.kext = kext_maestro.KextMaestro() self.utils = utils.Utils() - self.ock_files_dir = os.path.join(os.getcwd(), "OCK_Files") - self.oc_binary_data_dir = os.path.join(os.getcwd(), "OcBinaryData") - self.result_dir = os.path.join(os.getcwd(), "Results") + self.oc_binary_data_dir = os.path.join(os.path.dirname(os.path.dirname(os.path.realpath(__file__))), "OcBinaryData") self.intel_igpu_properties = { "Ice Lake": { "Laptop": { @@ -374,14 +372,14 @@ class builder: self.utils.request_input() def build_efi(self, hardware, macos_version): - efi_directory = os.path.join(os.getcwd(), "Results") + efi_directory = os.path.join(os.path.dirname(os.path.dirname(os.path.realpath(__file__))), "Results") self.utils.mkdirs(efi_directory) - if not os.path.exists(self.ock_files_dir): - raise Exception(f"Directory '{self.ock_files_dir}' does not exist.") + if not os.path.exists(self.kext.ock_files_dir): + raise Exception(f"Directory '{self.kext.ock_files_dir}' does not exist.") - source_efi_dir = os.path.join(self.ock_files_dir, "OpenCore") + source_efi_dir = os.path.join(self.kext.ock_files_dir, "OpenCore") shutil.copytree(source_efi_dir, efi_directory, dirs_exist_ok=True) shutil.copytree(self.oc_binary_data_dir, os.path.join(efi_directory, "EFI", "OC"), dirs_exist_ok=True) diff --git a/Scripts/gathering_files.py b/Scripts/gathering_files.py index 5f2e540..a65934d 100755 --- a/Scripts/gathering_files.py +++ b/Scripts/gathering_files.py @@ -15,7 +15,7 @@ class gatheringFiles: self.dortania_builds_url = "https://raw.githubusercontent.com/dortania/build-repo/builds/latest.json" self.amd_vanilla_patches_url = f"https://raw.githubusercontent.com/AMD-OSX/AMD_Vanilla/beta/patches.plist" self.temporary_dir = tempfile.mkdtemp() - self.ock_files_dir = os.path.join(os.getcwd(), "OCK_Files") + self.ock_files_dir = os.path.join(os.path.dirname(os.path.dirname(os.path.realpath(__file__))), "OCK_Files") self.download_history_file = os.path.join(self.ock_files_dir, "history.json") self.builds = [ "AirportBrcmFixup", diff --git a/Scripts/kext_maestro.py b/Scripts/kext_maestro.py index 3e849e8..d6f402d 100755 --- a/Scripts/kext_maestro.py +++ b/Scripts/kext_maestro.py @@ -16,7 +16,7 @@ class KextMaestro: "idVendor", "HDAConfigDefault" ] - self.ock_files_dir = os.path.join(os.getcwd(), "OCK_Files") + self.ock_files_dir = os.path.join(os.path.dirname(os.path.dirname(os.path.realpath(__file__))), "OCK_Files") self.kext_loading_sequence = [ { "MainKext": "Lilu", diff --git a/version.json b/version.json index a8908f6..b3d08d2 100644 --- a/version.json +++ b/version.json @@ -1,3 +1,3 @@ { - "version": "0.0.1" + "version": "0.0.2" } \ No newline at end of file