Fix run.bat: cd to script dir, use full python path
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
@echo off
|
@echo off
|
||||||
chcp 65001 >nul
|
chcp 65001 >nul
|
||||||
|
cd /d "%~dp0"
|
||||||
|
|
||||||
:: Verificar Python
|
:: Verificar Python
|
||||||
where python >nul 2>&1
|
where python >nul 2>&1
|
||||||
@@ -12,19 +13,22 @@ if %errorlevel% neq 0 (
|
|||||||
exit /b
|
exit /b
|
||||||
)
|
)
|
||||||
|
|
||||||
:: Instalar dependencias
|
:: Obtener carpeta de Python
|
||||||
python -m pip install -q -r requirements.txt
|
for /f "delims=" %%i in ('where python') do set PY_DIR=%%~dpi
|
||||||
|
|
||||||
:: Matar instancia anterior si existe
|
:: Instalar dependencias
|
||||||
taskkill /f /im python.exe 2>nul
|
"%PY_DIR%python" -m pip install -q -r requirements.txt
|
||||||
|
|
||||||
|
:: Matar instancia anterior
|
||||||
taskkill /f /im pythonw.exe 2>nul
|
taskkill /f /im pythonw.exe 2>nul
|
||||||
|
|
||||||
:: Iniciar sin ventana
|
:: Iniciar sin ventana
|
||||||
start /b pythonw main.py
|
start "" "%PY_DIR%pythonw" "%~dp0main.py"
|
||||||
|
|
||||||
echo ==========================================
|
echo ==========================================
|
||||||
echo RIPS Manager iniciado en segundo plano
|
echo RIPS Manager iniciado en segundo plano
|
||||||
echo http://localhost:8080
|
echo http://localhost:8080
|
||||||
|
echo Para detener: doble clic en stop.bat
|
||||||
echo ==========================================
|
echo ==========================================
|
||||||
timeout /t 5 /nobreak >nul
|
timeout /t 4 /nobreak >nul
|
||||||
exit
|
exit
|
||||||
|
|||||||
Reference in New Issue
Block a user