Add accsaber and don't update menu after reloading

This commit is contained in:
pleb
2026-07-11 16:25:20 -07:00
parent f40f3ddc56
commit c7d629644a
3 changed files with 38 additions and 8 deletions
+20 -7
View File
@@ -3,23 +3,36 @@ setlocal
cd /d "%~dp0"
if not exist ".venv\Scripts\python.exe" (
set "VENV_PY=.venv\Scripts\python.exe"
set "STAMP_FILE=.venv\.last-install"
set "NEED_INSTALL=0"
if not exist "%VENV_PY%" (
echo Creating virtual environment...
py -m venv .venv
if errorlevel 1 (
echo Failed to create virtual environment.
exit /b 1
)
set "NEED_INSTALL=1"
) else if not exist "%STAMP_FILE%" (
set "NEED_INSTALL=1"
) else (
"%VENV_PY%" -c "import pathlib, sys, time; p=pathlib.Path(r'%STAMP_FILE%'); sys.exit(0 if time.time()-p.stat().st_mtime >= 20*3600 else 1)"
if not errorlevel 1 set "NEED_INSTALL=1"
)
echo Installing plugin-helper...
".venv\Scripts\python.exe" -m pip install -e .
if errorlevel 1 (
echo Failed to install plugin-helper.
exit /b 1
if "%NEED_INSTALL%"=="1" (
echo Installing plugin-helper...
"%VENV_PY%" -m pip install -e .
if errorlevel 1 (
echo Failed to install plugin-helper.
exit /b 1
)
type nul > "%STAMP_FILE%"
)
".venv\Scripts\python.exe" -m plugin_helper
"%VENV_PY%" -m plugin_helper
set EXIT_CODE=%ERRORLEVEL%
endlocal & exit /b %EXIT_CODE%