2
0
mirror of https://github.com/mbusb/multibootusb synced 2024-11-18 15:25:46 +00:00
This commit is contained in:
mbusb 2017-04-29 18:35:21 +05:30
commit 30ffc206b3
5 changed files with 42 additions and 14 deletions

View File

@ -1,6 +1,26 @@
Version - 8.7.0
---------------
* Welcome "Alin Trăistaru (alindt)". He is one of the major contributor for the project
* Hide GUI widgets when installation in progress
* Show USB disk size in USB details
* Reduced CPU usage drastically
* Open default text editor application under Linux for editing syslinux file
* Reduced various redundant function calls
* Dropped p7zip-plugin for suse and mageia (package not available in repo)
* Improved CLI user experience. Windows users should run from source to enable this option
* Added custom functions for writing custom loopback.cfg file
* Various code cleanup
* Removed windows line ending which prevented application not to start under Linux
* Corrected systemrescuecd subdir path
* Full credit to and added as
* Added colour to terminal output
* Bundled Colorama module
* Added vba32rescue ISO
* Added PC Tools ISO
* Few other minor improvements to code
Version - 8.6.0
---------------
==> A very big thanks to "Alin Trăistaru (alindt)". All credits goes to him for redesigning of GUI and code cleanups <==
-------------------------------------------------------------------------------------------------------------

View File

@ -279,6 +279,9 @@ def usage():
sys.exit(-1)
if __name__ == '__main__':
if platform.system() == 'Linux':
print('Converting line ending to Linux for proper functioning.')
os.system('dos2unix multibootusb')
argv = sys.argv
if not os.path.exists(release_dir):
print("Release directory does not exist.\nPlease mount and rerun the script.")

0
multibootusb Normal file → Executable file
View File

View File

@ -44,17 +44,16 @@ def log(message, info=True, error=False, debug=False):
level=logging.DEBUG)
print(message)
'''
# remove ANSI color codes from logs
message_clean = re.compile(r'\x1b[^m]*m').sub('', message)
# message_clean = re.compile(r'\x1b[^m]*m').sub('', message)
if info is True:
logging.info(message_clean)
logging.info(message)
elif error is not False:
logging.error(message_clean)
logging.error(message)
elif debug is not False:
logging.debug(message_clean)
'''
logging.debug(message)
def resource_path(relativePath):
@ -92,7 +91,7 @@ def print_version():
Simple log the version number of the multibootusb application
:return:
"""
log('multibootusb version: ', mbusb_version())
log('multibootusb version: ' + mbusb_version())
def quote(text):
@ -113,7 +112,7 @@ def is_quoted(text):
:param text: Any word or sentence with or without quote.
:return: True if text is quoted else False.
"""
if text.startswith("""") and text.endswith("""):
if text.startswith("\"") and text.endswith("\""):
return True
else:
return False
@ -140,10 +139,10 @@ def mbusb_log_file():
"""
Function to genrate path to log file.
Under linux path is created as /tmp/multibootusb.log
Under Windows the file is created under
Under Windows the file is created under installation directory
"""
if platform.system() == "Linux":
home_dir = os.path.expanduser('~')
# home_dir = os.path.expanduser('~')
# log_file = os.path.join(home_dir, "multibootusb.log")
log_file = os.path.join(tempfile.gettempdir(), "multibootusb.log")
elif platform.system() == "Windows":

View File

@ -233,9 +233,15 @@ def update_distro_cfg_files(iso_link, usb_disk, distro, persistence=0):
# Ensure that isolinux.cfg file is copied as syslinux.cfg to boot correctly.
for dirpath, dirnames, filenames in os.walk(install_dir):
for f in filenames:
if f.endswith("isolinux.cfg") or f.endswith("ISOLINUX.CFG"):
if not os.path.exists(os.path.join(dirpath, "syslinux.cfg")) or not os.path.exists(os.path.join(dirpath, "SYSLINUX.CFG")):
shutil.copy2(os.path.join(dirpath, f), os.path.join(dirpath, "syslinux.cfg"))
if f.lower().endswith("isolinux.cfg"):
if not os.path.exists(os.path.join(dirpath, "syslinux.cfg")):
try:
shutil.copyfile(os.path.join(dirpath, f), os.path.join(dirpath, "syslinux.cfg"))
except Exception as e:
log('Copying isolinux to syslinux failed...')
log(e)
else:
continue
# Assertain if the entry is made..
sys_cfg_file = os.path.join(config.usb_mount, "multibootusb", "syslinux.cfg")