Bug fix and typos

1. Add python path so as to avaoid import error under debian
2. Fixed shipping of grub2 modules under correct directory
3. Display version info only before launching the application
pull/166/head
mbusb 7 years ago
parent 5a86aff8a1
commit 021b3ae436

@ -12,9 +12,13 @@ import sys
import os
import platform
# The following line is required for distros based on rpm so as to avoid import errors when running from installed system
# The following line is required for distros based on rpm so as to avoid import errors when running from
# installed system
sys.path.append('/usr/local/lib/python3.4/dist-packages')
# print(sys.path)
# Ensure that above issue doesn't occur on debian based distro as well
if '/usr/lib/python3/dist-packages/scripts/' not in sys.path:
sys.path.append('/usr/lib/python3/dist-packages/scripts/')
# Had trouble in importing scripts directory. Had to add few lines below to ensure it works on source as well as
# post install
@ -57,7 +61,7 @@ Options:
-h or --help : Print this help message and exit
-c or --command : Invoke command line usage. This option is required;
if omitted, the GUI will be launched.
-i or --iso : Path to ISO file()s. If many ISOs are supplied,
-i or --iso : Path to ISO file(s). If many ISOs are supplied,
they should be separated by ',' with no spaces in
between.
-t or --target : Path to target USB device partition (e.g. "/dev/sdb1").
@ -105,7 +109,6 @@ def start_gui():
if __name__ == '__main__':
running_from()
if platform.system() == 'Windows':
if not admin.isUserAdmin():
admin.runAsAdmin()
@ -165,7 +168,9 @@ if gui is False:
log('\nOptions \'-i\' and \'-t\' must be supplied together. See the usage below.')
usage()
else:
running_from()
cli_install_distro()
elif gui is True:
running_from()
start_gui()

@ -12,7 +12,7 @@
<allow_inactive>auth_admin</allow_inactive>
<allow_active>auth_admin</allow_active>
</defaults>
<annotate key="org.freedesktop.policykit.exec.path">/usr/local/bin/multibootusb</annotate>
<annotate key="org.freedesktop.policykit.exec.path">/usr/bin/multibootusb</annotate>
<annotate key="org.freedesktop.policykit.exec.allow_gui">true</annotate>
</action>

@ -20,6 +20,15 @@ def get_data(_dir):
data.append(cfg_file)
return data
def root_files(_dir):
data = []
for _file in os.listdir(_dir):
path = os.path.join(_dir, _file)
if not os.path.isdir(path):
data.append(path)
return data
Version = mbusb_version()
print(Version)
setup(
@ -55,6 +64,7 @@ setup(
('/usr/share/multibootusb/data/multibootusb', ["data/multibootusb/menu.lst"]),
('/usr/share/multibootusb/data/multibootusb', ["data/multibootusb/syslinux.cfg"]),
('/usr/share/multibootusb/data/multibootusb', ["data/multibootusb/vesamenu.c32"]),
('/usr/share/multibootusb/data/multibootusb/grub', get_data('data/multibootusb/grub')),
('/usr/share/multibootusb/data/multibootusb/grub/i386-pc', get_data('data/multibootusb/grub')),
('/usr/share/multibootusb/data/multibootusb/grub', root_files('data/multibootusb/grub')),
('/usr/share/multibootusb/data/tools/syslinux', get_data('data/tools/syslinux'))]
)

Loading…
Cancel
Save