update_client
This commit is contained in:
Binary file not shown.
@@ -18,7 +18,9 @@ from tkinter import messagebox, ttk
|
|||||||
|
|
||||||
|
|
||||||
APP_NAME = "InvWebClientAgentV2"
|
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"
|
AUTOSTART_REGISTRY_PATH = r"Software\Microsoft\Windows\CurrentVersion\Run"
|
||||||
DEFAULT_SERVER = "http://127.0.0.1:5050"
|
DEFAULT_SERVER = "http://127.0.0.1:5050"
|
||||||
DEFAULT_TOKEN = "change-me-client-token"
|
DEFAULT_TOKEN = "change-me-client-token"
|
||||||
@@ -104,6 +106,11 @@ def enable_windows_autostart():
|
|||||||
winreg.REG_SZ,
|
winreg.REG_SZ,
|
||||||
windows_autostart_command(),
|
windows_autostart_command(),
|
||||||
)
|
)
|
||||||
|
for legacy_name in LEGACY_AUTOSTART_VALUE_NAMES:
|
||||||
|
try:
|
||||||
|
winreg.DeleteValue(key, legacy_name)
|
||||||
|
except FileNotFoundError:
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
def disable_windows_autostart():
|
def disable_windows_autostart():
|
||||||
@@ -118,7 +125,11 @@ def disable_windows_autostart():
|
|||||||
0,
|
0,
|
||||||
winreg.KEY_SET_VALUE,
|
winreg.KEY_SET_VALUE,
|
||||||
) as key:
|
) 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:
|
except FileNotFoundError:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
@@ -759,7 +770,7 @@ class ClientV2App:
|
|||||||
self.last_update_var = tk.StringVar(value=f"Последнее обновление: {time.strftime('%H:%M')}")
|
self.last_update_var = tk.StringVar(value=f"Последнее обновление: {time.strftime('%H:%M')}")
|
||||||
self.inventory_var.trace_add("write", self.on_inventory_number_changed)
|
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.window_icon_image = None
|
||||||
self.apply_window_icon()
|
self.apply_window_icon()
|
||||||
self.root.geometry("920x330")
|
self.root.geometry("920x330")
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ exe = EXE(
|
|||||||
a.zipfiles,
|
a.zipfiles,
|
||||||
a.datas,
|
a.datas,
|
||||||
[],
|
[],
|
||||||
name="inventory_client_agent_v2",
|
name="Inv_web Client",
|
||||||
debug=False,
|
debug=False,
|
||||||
bootloader_ignore_signals=False,
|
bootloader_ignore_signals=False,
|
||||||
strip=False,
|
strip=False,
|
||||||
|
|||||||
BIN
picture/ICON/.DS_Store
vendored
BIN
picture/ICON/.DS_Store
vendored
Binary file not shown.
Reference in New Issue
Block a user