gui.py: Add better stdout printing

This commit is contained in:
Mykola Grymalyuk
2021-12-25 13:55:16 -07:00
parent 0d72f46cb4
commit c9cb6db0e4
3 changed files with 37 additions and 25 deletions

View File

@@ -245,8 +245,9 @@ def generate_installer_creation_script(script_location, installer_path, disk):
with script_location.open("w") as script:
script.write(f'''#!/bin/bash
diskutil eraseDisk HFS+ OCLP-Installer {disk}
"{createinstallmedia_path}" --volume /Volumes/OCLP-Installer --nointeraction
earse_disk='diskutil eraseDisk HFS+ OCLP-Installer {disk}'
if $earse_disk; then
"{createinstallmedia_path}" --volume /Volumes/OCLP-Installer --nointeraction
fi
''')
return True

View File

@@ -33,6 +33,8 @@ class OpenCoreLegacyPatcher:
if "python" in launcher_binary:
# We're running from source
launcher_script = __file__
if "main.py" in launcher_script:
launcher_script = launcher_script.replace("/resources/main.py", "/OpenCore-Patcher-GUI.command")
self.constants.launcher_binary = launcher_binary
self.constants.launcher_script = launcher_script
defaults.generate_defaults.probe(self.computer.real_model, True, self.constants)