From 2722baea6cb12468c306b9e69717ec200be7f854 Mon Sep 17 00:00:00 2001 From: CorpNewt <12772521+corpnewt@users.noreply.github.com> Date: Mon, 30 Dec 2019 16:09:33 -0600 Subject: [PATCH] Update pathing, mount first partition after format --- MakeInstall.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/MakeInstall.py b/MakeInstall.py index ecdc935..8d56d61 100755 --- a/MakeInstall.py +++ b/MakeInstall.py @@ -24,6 +24,7 @@ class WinUSB: self.bi_name = "BOOTICEx64.exe" self.clover_url = "https://api.github.com/repos/CloverHackyColor/CloverBootloader/releases" self.dids_url = "https://api.github.com/repos/dids/clover-builder/releases" + self.diskpart = os.path.join(os.environ['SYSTEMDRIVE'] + "\\", "Windows", "System32", "diskpart.exe") # From Tim Sutton's brigadier: https://github.com/timsutton/brigadier/blob/master/brigadier self.z_path = None self.z_path64 = os.path.join(os.environ['SYSTEMDRIVE'] + "\\", "Program Files", "7-Zip", "7z.exe") @@ -195,7 +196,7 @@ class WinUSB: self.u.grab("Press [enter] to return...") return # Let's try to run it! - out = self.r.run({"args":["diskpart","/s",script],"stream":True}) + out = self.r.run({"args":[self.diskpart,"/s",script],"stream":True}) # Ditch our script regardless of whether diskpart worked or not shutil.rmtree(temp) print("") @@ -226,7 +227,9 @@ class WinUSB: "create partition primary size=200", "format quick fs=fat32 label='CLOVER'", "active", - "create partition primary id=AB" # AF = HFS, AB = Recovery + "create partition primary id=AB", # AF = HFS, AB = Recovery + "select part 1", + "assign" ]) else: print("Using GPT...") @@ -250,7 +253,7 @@ class WinUSB: self.u.grab("Press [enter] to return...") return # Let's try to run it! - out = self.r.run({"args":["diskpart","/s",script],"stream":True}) + out = self.r.run({"args":[self.diskpart,"/s",script],"stream":True}) # Ditch our script regardless of whether diskpart worked or not shutil.rmtree(temp) if out[2] != 0: