massive changes for 1.5.0
This commit is contained in:
+13
-2
@@ -16,6 +16,7 @@ import shutil
|
||||
import zipfile
|
||||
import traceback
|
||||
import subprocess
|
||||
import configparser
|
||||
|
||||
# External library imports
|
||||
import psutil
|
||||
@@ -415,13 +416,24 @@ def wait_for_process_to_exit(process_name, timeout=10):
|
||||
return False
|
||||
|
||||
|
||||
def finish_update_if_needed(platform_name, app_name):
|
||||
def finish_update_if_needed(platform_name, app_name, cfg_path):
|
||||
"""
|
||||
Completes a pending application update if '--finish-update' is present in the command-line arguments.
|
||||
"""
|
||||
|
||||
if "--finish-update" in sys.argv:
|
||||
print("Finishing update...")
|
||||
|
||||
update_cfg = configparser.ConfigParser()
|
||||
try:
|
||||
update_cfg.read(cfg_path)
|
||||
update_cfg.set("Options", "show_welcome_dialog", "true")
|
||||
|
||||
with open(cfg_path, "w") as f:
|
||||
update_cfg.write(f)
|
||||
print("Welcome dialog flag successfully reset to 'true' for next run.")
|
||||
except Exception as e:
|
||||
print(f"Warning: Could not update welcome dialog preference flag: {e}")
|
||||
|
||||
if platform_name == 'darwin':
|
||||
app_dir = f'/tmp/{app_name}tempupdate'
|
||||
@@ -519,7 +531,6 @@ def finish_update_if_needed(platform_name, app_name):
|
||||
except Exception as e:
|
||||
print(f"Failed to delete update folder: {e}")
|
||||
|
||||
QMessageBox.information(None, "Update Complete", "The application has been successfully updated.")
|
||||
sys.argv.remove("--finish-update")
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user