fix: improve app relaunch after update and release 0.1.28
This commit is contained in:
@@ -1479,9 +1479,25 @@ timeout /t 1 /nobreak >nul\r\n\
|
||||
start \"\" /wait \"%INSTALLER%\" /S\r\n\
|
||||
set \"INSTALL_EXIT=%ERRORLEVEL%\"\r\n\
|
||||
echo [%%date%% %%time%%] installer exit code: %INSTALL_EXIT% >> \"%LOG_FILE%\"\r\n\
|
||||
if not \"%INSTALL_EXIT%\"==\"0\" exit /b %INSTALL_EXIT%\r\n\
|
||||
set \"RETRY_COUNT=0\"\r\n\
|
||||
:wait_for_app\r\n\
|
||||
if exist \"%APP_EXE%\" goto launch_app\r\n\
|
||||
if exist \"%LOCALAPPDATA%\\玩玩云\\desktop-client.exe\" (\r\n\
|
||||
set \"APP_EXE=%LOCALAPPDATA%\\玩玩云\\desktop-client.exe\"\r\n\
|
||||
goto launch_app\r\n\
|
||||
)\r\n\
|
||||
if %RETRY_COUNT% GEQ 25 goto app_missing\r\n\
|
||||
set /a RETRY_COUNT+=1\r\n\
|
||||
timeout /t 1 /nobreak >nul\r\n\
|
||||
if exist \"%APP_EXE%\" start \"\" \"%APP_EXE%\"\r\n\
|
||||
goto wait_for_app\r\n\
|
||||
:launch_app\r\n\
|
||||
start \"\" \"%APP_EXE%\"\r\n\
|
||||
set \"START_EXIT=%ERRORLEVEL%\"\r\n\
|
||||
echo [%%date%% %%time%%] launch app exit code: %START_EXIT% path=%APP_EXE% >> \"%LOG_FILE%\"\r\n\
|
||||
goto cleanup\r\n\
|
||||
:app_missing\r\n\
|
||||
echo [%%date%% %%time%%] app exe not found after install >> \"%LOG_FILE%\"\r\n\
|
||||
:cleanup\r\n\
|
||||
del \"%~f0\" >nul 2>nul\r\n",
|
||||
installer = installer_text,
|
||||
app_exe = app_text,
|
||||
|
||||
Reference in New Issue
Block a user