Skip to content

Commit

Permalink
Windows improvements and update extlinux.cfg
Browse files Browse the repository at this point in the history
1. Hide command wind when multibootusb is launched
2. Update extlinux.cfg to match with updated syslinux.cfg
  • Loading branch information
mbusb committed Dec 30, 2017
1 parent 5809fb7 commit f868ea8
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion build_pkg
Expand Up @@ -157,7 +157,7 @@ class pkg():
else:
# subprocess.call('python ' + pyinstaller_path + ' --upx-dir C:\\upx multibootusb.spec', shell=True) == 0 and \
# os.path.exists(os.path.join("dist", 'multibootusb-' + self.version + ".exe")):
if subprocess.call('python ' + pyinstaller_path + ' --onefile onefile-multibootusb.spec', shell=True) == 0 and \
if subprocess.call('python ' + pyinstaller_path + ' --uac-admin --onefile onefile-multibootusb.spec', shell=True) == 0 and \
os.path.exists(os.path.join("dist", 'multibootusb-' + self.version + ".exe")):
shutil.copy2(os.path.join("dist", 'multibootusb-' + self.version + ".exe"),
os.path.join(self.release_upload_dir, "Windows"))
Expand Down
2 changes: 1 addition & 1 deletion data/version.txt
@@ -1 +1 @@
8.9.0
9.0.0
3 changes: 3 additions & 0 deletions scripts/update_cfg_file.py
Expand Up @@ -409,6 +409,9 @@ def update_mbusb_cfg_file(iso_link, usb_uuid, usb_mount, distro):

config_file.write("#end " + iso_basename(iso_link) + "\n")
config_file.close()
# Update extlinux.cfg file by copying updated syslinux.cfg
shutil.copy(os.path.join(usb_mount, 'multibootusb', 'syslinux.cfg'),
os.path.join(usb_mount, 'multibootusb', 'extlinux.cfg'))


def kaspersky_config(distro):
Expand Down
5 changes: 4 additions & 1 deletion scripts/usb.py
Expand Up @@ -361,9 +361,12 @@ def gpt_device(dev_name):
:return: True if GPT else False
"""
if platform.system() == 'Windows':
startupinfo = subprocess.STARTUPINFO()
startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW
diskpart_cmd = 'wmic partition get name, type'
dev_no = get_physical_disk_number(dev_name)
cmd_out = subprocess.check_output(diskpart_cmd)
cmd_out = subprocess.check_output(diskpart_cmd, subprocess.SW_HIDE, startupinfo=startupinfo)
gen.log(cmd_out)
cmd_spt = cmd_out.split(b'\r')
for line in cmd_spt:
line = line.decode('utf-8')
Expand Down

0 comments on commit f868ea8

Please sign in to comment.