From 38f28e15c421d265f857f9699d98e717d0afce0e Mon Sep 17 00:00:00 2001 From: mbusb Date: Sat, 29 Apr 2017 18:11:11 +0530 Subject: [PATCH 1/2] Prepare for version 8.7.0 and other improvements 1. Version upgraded to 8.7.0 2. Updated changelog for version 8.7.0 3. Auto convert multibootusb file ending to Linux using dos2unix during packaging 4. Re-enable log message 5. Avoid crashing due to existence of syslinux.cfg --- CHANGELOG | 22 +++++++++++++++++++++- build_pkg | 3 +++ data/version.txt | 2 +- multibootusb | 0 scripts/gen.py | 19 +++++++++---------- scripts/update_cfg_file.py | 12 +++++++++--- 6 files changed, 43 insertions(+), 15 deletions(-) mode change 100644 => 100755 multibootusb diff --git a/CHANGELOG b/CHANGELOG index 60e8ad0..b78a382 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -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 is 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 avail 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 <== ------------------------------------------------------------------------------------------------------------- diff --git a/build_pkg b/build_pkg index ad2dc01..2766945 100644 --- a/build_pkg +++ b/build_pkg @@ -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.") diff --git a/data/version.txt b/data/version.txt index acd405b..df5119e 100644 --- a/data/version.txt +++ b/data/version.txt @@ -1 +1 @@ -8.6.0 +8.7.0 diff --git a/multibootusb b/multibootusb old mode 100644 new mode 100755 diff --git a/scripts/gen.py b/scripts/gen.py index e5519af..1238a9e 100644 --- a/scripts/gen.py +++ b/scripts/gen.py @@ -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": diff --git a/scripts/update_cfg_file.py b/scripts/update_cfg_file.py index b014d1a..9015e42 100644 --- a/scripts/update_cfg_file.py +++ b/scripts/update_cfg_file.py @@ -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") From 8be3d661f25beab1bba8b4640e96b72f2cff86df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alin=20Tr=C4=83istaru?= Date: Sat, 29 Apr 2017 15:58:49 +0300 Subject: [PATCH 2/2] Update CHANGELOG --- CHANGELOG | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index b78a382..41ee046 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,13 +1,13 @@ Version - 8.7.0 --------------- -* Welcome "Alin Trăistaru (alindt)". He is one of the major contributor for the project -* Hide GUI widgets when installation is progress +* 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 avail this option +* 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