From d961915e0efac1f6790aec07f3635bed857a22c7 Mon Sep 17 00:00:00 2001 From: amnweb <16545063+forumwt@users.noreply.github.com> Date: Mon, 23 Dec 2024 01:32:13 +0100 Subject: [PATCH] chore(cli): bump YASB_CLI_VERSION to 1.0.4 and improve version message formatting - Updated the YASB_CLI_VERSION to 1.0.4. - Enhanced the version message output for better readability. - Added additional process termination for related executables during updates. --- src/core/utils/cli.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/core/utils/cli.py b/src/core/utils/cli.py index 329ded6..a4cb3c2 100644 --- a/src/core/utils/cli.py +++ b/src/core/utils/cli.py @@ -19,7 +19,7 @@ just_fix_windows_console() YASB_VERSION = BUILD_VERSION -YASB_CLI_VERSION = "1.0.3" +YASB_CLI_VERSION = "1.0.4" OS_STARTUP_FOLDER = os.path.join(os.environ['APPDATA'], r'Microsoft\Windows\Start Menu\Programs\Startup') INSTALLATION_PATH = os.path.abspath(os.path.join(__file__, "../../..")) @@ -199,7 +199,7 @@ def parse_arguments(): sys.exit(0) elif args.version: - version_message = f"\nYASB Reborn " + Format.underline + f"v{YASB_VERSION}" + Format.end + f"\nYASB-CLI " + Format.underline + f"v{YASB_CLI_VERSION}" + Format.end + "\n" + version_message = f"YASB Reborn v{YASB_VERSION}\nYASB-CLI v{YASB_CLI_VERSION}" print(version_message) else: logging.info("Unknown command. Use --help for available options.") @@ -347,6 +347,10 @@ def update_yasb(YASB_VERSION): # Step 4: Run the MSI installer in silent mode and restart the application if is_process_running("yasb.exe"): subprocess.run(["taskkill", "/f", "/im", "yasb.exe"], creationflags=subprocess.CREATE_NO_WINDOW) + if is_process_running("yasb_themes.exe"): + subprocess.run(["taskkill", "/f", "/im", "yasb_themes.exe"], creationflags=subprocess.CREATE_NO_WINDOW) + if is_process_running("yasbc.exe"): + subprocess.run(["taskkill", "/f", "/im", "yasbc.exe"], creationflags=subprocess.CREATE_NO_WINDOW) # Construct the uninstall command as a string product_code = CLIUpdateHandler.get_installed_product_code() @@ -354,6 +358,7 @@ def update_yasb(YASB_VERSION): uninstall_command = f'msiexec /x {product_code} /passive' else: uninstall_command = "" + # Construct the install command as a string install_command = f'msiexec /i "{os.path.abspath(msi_path)}" /passive /norestart' run_after_command = f'"{EXE_PATH}"'