v1.8.86: fix update DLL error — cleanup old _MEI dir, delay before launch, retry copy

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
chrome-storm-c442
2026-03-02 00:50:04 -05:00
parent 57ea90f210
commit acc93f98e3
3 changed files with 11 additions and 2 deletions

View File

@@ -269,6 +269,9 @@ class UpdateChecker:
vbs_path = os.path.join(tmp_dir, "sm_update.vbs")
pid = os.getpid()
# Clean up old PyInstaller _MEI dirs to avoid DLL conflicts
mei_dir = getattr(sys, '_MEIPASS', '')
bat_content = f"""@echo off
:wait
tasklist /fi "PID eq {pid}" 2>NUL | find "{pid}" >NUL
@@ -276,11 +279,17 @@ if %ERRORLEVEL% == 0 (
timeout /t 1 /nobreak >NUL
goto wait
)
timeout /t 2 /nobreak >NUL
if exist "{mei_dir}" rmdir /s /q "{mei_dir}" >NUL 2>NUL
copy /Y "{new_exe}" "{current_exe}" >NUL
if %ERRORLEVEL% NEQ 0 (
exit /b 1
timeout /t 3 /nobreak >NUL
copy /Y "{new_exe}" "{current_exe}" >NUL
if %ERRORLEVEL% NEQ 0 exit /b 1
)
timeout /t 2 /nobreak >NUL
start "" "{current_exe}"
del "{new_exe}" >NUL 2>NUL
del "{bat_path}"
del "%~f0"
"""

Binary file not shown.

View File

@@ -1,6 +1,6 @@
"""Version info for ServerManager."""
__version__ = "1.8.85"
__version__ = "1.8.86"
__app_name__ = "ServerManager"
__author__ = "aibot777"
__description__ = "Desktop GUI for managing remote servers"