mirror of
https://github.com/corpnewt/gibMacOS.git
synced 2025-01-07 18:47:44 +01:00
Update pathing, mount first partition after format
This commit is contained in:
parent
8dc2a1c78a
commit
2722baea6c
@ -24,6 +24,7 @@ class WinUSB:
|
|||||||
self.bi_name = "BOOTICEx64.exe"
|
self.bi_name = "BOOTICEx64.exe"
|
||||||
self.clover_url = "https://api.github.com/repos/CloverHackyColor/CloverBootloader/releases"
|
self.clover_url = "https://api.github.com/repos/CloverHackyColor/CloverBootloader/releases"
|
||||||
self.dids_url = "https://api.github.com/repos/dids/clover-builder/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
|
# From Tim Sutton's brigadier: https://github.com/timsutton/brigadier/blob/master/brigadier
|
||||||
self.z_path = None
|
self.z_path = None
|
||||||
self.z_path64 = os.path.join(os.environ['SYSTEMDRIVE'] + "\\", "Program Files", "7-Zip", "7z.exe")
|
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...")
|
self.u.grab("Press [enter] to return...")
|
||||||
return
|
return
|
||||||
# Let's try to run it!
|
# 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
|
# Ditch our script regardless of whether diskpart worked or not
|
||||||
shutil.rmtree(temp)
|
shutil.rmtree(temp)
|
||||||
print("")
|
print("")
|
||||||
@ -226,7 +227,9 @@ class WinUSB:
|
|||||||
"create partition primary size=200",
|
"create partition primary size=200",
|
||||||
"format quick fs=fat32 label='CLOVER'",
|
"format quick fs=fat32 label='CLOVER'",
|
||||||
"active",
|
"active",
|
||||||
"create partition primary id=AB" # AF = HFS, AB = Recovery
|
"create partition primary id=AB", # AF = HFS, AB = Recovery
|
||||||
|
"select part 1",
|
||||||
|
"assign"
|
||||||
])
|
])
|
||||||
else:
|
else:
|
||||||
print("Using GPT...")
|
print("Using GPT...")
|
||||||
@ -250,7 +253,7 @@ class WinUSB:
|
|||||||
self.u.grab("Press [enter] to return...")
|
self.u.grab("Press [enter] to return...")
|
||||||
return
|
return
|
||||||
# Let's try to run it!
|
# 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
|
# Ditch our script regardless of whether diskpart worked or not
|
||||||
shutil.rmtree(temp)
|
shutil.rmtree(temp)
|
||||||
if out[2] != 0:
|
if out[2] != 0:
|
||||||
|
Loading…
Reference in New Issue
Block a user