mirror of
https://github.com/dortania/OpenCore-Legacy-Patcher.git
synced 2026-04-14 04:38:20 +10:00
reroute_payloads.py: Remove unused import
This commit is contained in:
@@ -2,7 +2,6 @@
|
||||
# Implements a shadowfile to avoid direct writes to the dmg
|
||||
# Copyright (C) 2022, Mykola Grymalyuk
|
||||
|
||||
import sys
|
||||
import plistlib
|
||||
from pathlib import Path
|
||||
import subprocess
|
||||
@@ -12,12 +11,12 @@ import atexit
|
||||
class reroute_payloads:
|
||||
def __init__(self, constants):
|
||||
self.constants = constants
|
||||
|
||||
|
||||
def setup_tmp_disk_image(self):
|
||||
# Create a temp directory to mount the payloads.dmg
|
||||
# Then reroute r/w to this new temp directory
|
||||
# Currently only applicable for GUI variant
|
||||
if self.constants.launcher_binary and self.constants.wxpython_variant is True and not self.constants.launcher_script:
|
||||
if self.constants.wxpython_variant is True and not self.constants.launcher_script:
|
||||
print("- Running in Binary GUI mode, switching to tmp directory")
|
||||
self.temp_dir = tempfile.TemporaryDirectory()
|
||||
print(f"- New payloads location: {self.temp_dir.name}")
|
||||
@@ -28,7 +27,8 @@ class reroute_payloads:
|
||||
[
|
||||
"hdiutil", "attach", "-noverify", f"{self.constants.payload_path}.dmg",
|
||||
"-mountpoint", Path(self.temp_dir.name / Path("payloads")),
|
||||
"-nobrowse", "-shadow", Path(self.temp_dir.name / Path("payloads_overlay")),
|
||||
"-nobrowse",
|
||||
"-shadow", Path(self.temp_dir.name / Path("payloads_overlay")),
|
||||
"-passphrase", "password"
|
||||
],
|
||||
stdout=subprocess.PIPE, stderr=subprocess.STDOUT
|
||||
|
||||
Reference in New Issue
Block a user