Skip to content

Commit

Permalink
Merge pull request #30 from aweichman/master
Browse files Browse the repository at this point in the history
Updating for linux.
  • Loading branch information
timsutton committed Apr 26, 2021
2 parents 78e0a49 + 49a9878 commit fa6d26b
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions brigadier
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,29 @@ when running the installer out of 'system32'." % output_dir)
# subprocess.call(['/usr/bin/hdiutil', 'eject', mntpoint])
shutil.rmtree(arc_workdir)

elif platform.system() == 'Linux':
status("Extracting for Linux...")
for arc in [pkg_dl_path,
os.path.join(arc_workdir, 'Payload'),
os.path.join(arc_workdir, 'Payload~')]:
if os.path.exists(arc):
status("Extracting {}".format(arc))
subprocess.call(['7z','x',arc, '-o{}'.format(arc_workdir)])

# BootCamp.pkg (xar) -> Payload (gzip) -> Payload~ (cpio) -> WindowsSupport.dmg
output_file = os.path.join(arc_workdir, 'WindowsSupport.dmg')
shutil.move(os.path.join(arc_workdir, 'Library/Application Support/BootCamp/WindowsSupport.dmg'),
output_file)
subprocess.call(['7z','-o{}'.format(landing_dir),'x','WindowsSupport.dmg',])

status("Extracted to %s." % output_file)

if os.path.exists('/mnt/c/Windows/explorer.exe'):
subprocess.call(['/mnt/c/Windows/explorer.exe','.'])
else:
print("Platform not supported! ({})".format(playform.system()))
pass

status("Done.")

if __name__ == "__main__":
Expand Down

0 comments on commit fa6d26b

Please sign in to comment.