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:
@@ -269,6 +269,9 @@ class UpdateChecker:
|
|||||||
vbs_path = os.path.join(tmp_dir, "sm_update.vbs")
|
vbs_path = os.path.join(tmp_dir, "sm_update.vbs")
|
||||||
pid = os.getpid()
|
pid = os.getpid()
|
||||||
|
|
||||||
|
# Clean up old PyInstaller _MEI dirs to avoid DLL conflicts
|
||||||
|
mei_dir = getattr(sys, '_MEIPASS', '')
|
||||||
|
|
||||||
bat_content = f"""@echo off
|
bat_content = f"""@echo off
|
||||||
:wait
|
:wait
|
||||||
tasklist /fi "PID eq {pid}" 2>NUL | find "{pid}" >NUL
|
tasklist /fi "PID eq {pid}" 2>NUL | find "{pid}" >NUL
|
||||||
@@ -276,11 +279,17 @@ if %ERRORLEVEL% == 0 (
|
|||||||
timeout /t 1 /nobreak >NUL
|
timeout /t 1 /nobreak >NUL
|
||||||
goto wait
|
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
|
copy /Y "{new_exe}" "{current_exe}" >NUL
|
||||||
if %ERRORLEVEL% NEQ 0 (
|
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}"
|
start "" "{current_exe}"
|
||||||
|
del "{new_exe}" >NUL 2>NUL
|
||||||
del "{bat_path}"
|
del "{bat_path}"
|
||||||
del "%~f0"
|
del "%~f0"
|
||||||
"""
|
"""
|
||||||
|
|||||||
BIN
releases/ServerManager-v1.8.86-win-x64.exe
Normal file
BIN
releases/ServerManager-v1.8.86-win-x64.exe
Normal file
Binary file not shown.
@@ -1,6 +1,6 @@
|
|||||||
"""Version info for ServerManager."""
|
"""Version info for ServerManager."""
|
||||||
|
|
||||||
__version__ = "1.8.85"
|
__version__ = "1.8.86"
|
||||||
__app_name__ = "ServerManager"
|
__app_name__ = "ServerManager"
|
||||||
__author__ = "aibot777"
|
__author__ = "aibot777"
|
||||||
__description__ = "Desktop GUI for managing remote servers"
|
__description__ = "Desktop GUI for managing remote servers"
|
||||||
|
|||||||
Reference in New Issue
Block a user