Implement getattrlist for improved CoW detection

This commit is contained in:
Mykola Grymalyuk
2024-08-01 11:16:00 -06:00
parent 57356bcceb
commit 90092a296d
11 changed files with 222 additions and 23 deletions

View File

@@ -5,6 +5,7 @@ import subprocess
from pathlib import Path
from opencore_legacy_patcher.volume import generate_copy_arguments
from opencore_legacy_patcher.support import subprocess_wrapper
@@ -157,7 +158,7 @@ class GenerateApplication:
print("Embedding resources")
for file in Path("payloads/Icon/AppIcons").glob("*.icns"):
subprocess_wrapper.run_and_verify(
["/bin/cp", str(file), self._application_output / "Contents" / "Resources/"],
generate_copy_arguments(str(file), self._application_output / "Contents" / "Resources/"),
stdout=subprocess.PIPE, stderr=subprocess.PIPE
)

View File

@@ -4,6 +4,7 @@ shim.py: Generate Update Shim
from pathlib import Path
from opencore_legacy_patcher.volume import generate_copy_arguments
from opencore_legacy_patcher.support import subprocess_wrapper
@@ -25,9 +26,9 @@ class GenerateShim:
if Path(self._shim_pkg).exists():
Path(self._shim_pkg).unlink()
subprocess_wrapper.run_and_verify(["/bin/cp", "-R", self._build_pkg, self._shim_pkg])
subprocess_wrapper.run_and_verify(generate_copy_arguments(self._build_pkg, self._shim_pkg))
if Path(self._output_shim).exists():
Path(self._output_shim).unlink()
subprocess_wrapper.run_and_verify(["/bin/cp", "-R", self._shim_path, self._output_shim])
subprocess_wrapper.run_and_verify(generate_copy_arguments(self._shim_path, self._output_shim))