update_client

This commit is contained in:
2026-06-28 19:13:31 +03:00
parent 2d1c32fc52
commit 3444cb7105
4 changed files with 15 additions and 4 deletions

View File

@@ -18,7 +18,9 @@ from tkinter import messagebox, ttk
APP_NAME = "InvWebClientAgentV2"
AUTOSTART_VALUE_NAME = "InvWebClientAgentV2"
CLIENT_DISPLAY_NAME = "Inv_web Client"
AUTOSTART_VALUE_NAME = CLIENT_DISPLAY_NAME
LEGACY_AUTOSTART_VALUE_NAMES = ("InvWebClientAgentV2",)
AUTOSTART_REGISTRY_PATH = r"Software\Microsoft\Windows\CurrentVersion\Run"
DEFAULT_SERVER = "http://127.0.0.1:5050"
DEFAULT_TOKEN = "change-me-client-token"
@@ -104,6 +106,11 @@ def enable_windows_autostart():
winreg.REG_SZ,
windows_autostart_command(),
)
for legacy_name in LEGACY_AUTOSTART_VALUE_NAMES:
try:
winreg.DeleteValue(key, legacy_name)
except FileNotFoundError:
pass
def disable_windows_autostart():
@@ -118,7 +125,11 @@ def disable_windows_autostart():
0,
winreg.KEY_SET_VALUE,
) as key:
winreg.DeleteValue(key, AUTOSTART_VALUE_NAME)
for value_name in (AUTOSTART_VALUE_NAME, *LEGACY_AUTOSTART_VALUE_NAMES):
try:
winreg.DeleteValue(key, value_name)
except FileNotFoundError:
pass
except FileNotFoundError:
pass
@@ -759,7 +770,7 @@ class ClientV2App:
self.last_update_var = tk.StringVar(value=f"Последнее обновление: {time.strftime('%H:%M')}")
self.inventory_var.trace_add("write", self.on_inventory_number_changed)
self.root.title("Тестовый клиент инвентаризации")
self.root.title(CLIENT_DISPLAY_NAME)
self.window_icon_image = None
self.apply_window_icon()
self.root.geometry("920x330")

View File

@@ -34,7 +34,7 @@ exe = EXE(
a.zipfiles,
a.datas,
[],
name="inventory_client_agent_v2",
name="Inv_web Client",
debug=False,
bootloader_ignore_signals=False,
strip=False,

BIN
picture/ICON/.DS_Store vendored

Binary file not shown.