Skip to content

Commit aff095a

Browse files
committed
forgot to add pip logging to .bat wss server script, added
1 parent e3b9f6a commit aff095a

File tree

2 files changed

+21
-18
lines changed

2 files changed

+21
-18
lines changed

app/pyscripts.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/start_server.bat

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,28 @@
11
@echo off
2-
cd "%~dp0"
2+
set INSTALL_LOG=atv_pip_install.log
3+
set MY_PATH=%~dp0
4+
cd /d %MY_PATH%
35

4-
IF NOT EXIST env (
6+
if not exist env (
7+
echo ATVRemote - Python install started %DATE% %TIME% >> %INSTALL_LOG%
58
echo > setting_up_python
6-
python -m venv env
9+
python -m venv env >> %INSTALL_LOG% 2>&1
710
call env\Scripts\activate.bat
8-
pip install --upgrade pip
9-
) ELSE (
11+
python -m pip install --upgrade pip >> %INSTALL_LOG% 2>&1
12+
python -m pip install websockets pyatv >> %INSTALL_LOG% 2>&1
13+
echo ATVRemote - Python install ended %DATE% %TIME% >> %INSTALL_LOG%
14+
echo ================================================== >> %INSTALL_LOG%
15+
) else (
1016
call env\Scripts\activate.bat
1117
)
1218

13-
:: Killing process wsserver.py
14-
FOR /F "tokens=2 delims=," %%i IN ('tasklist /nh /fi "imagename eq python.exe" /fo csv ^| findstr /i "wsserver.py"') DO (
15-
echo Killing process: %%i
16-
taskkill /PID %%i
19+
:kill_proc
20+
for /f "tokens=2 delims= " %%A in ('tasklist /FI "IMAGENAME eq python.exe" /NH') do (
21+
tasklist /FI "WINDOWTITLE eq wsserver.py" | findstr wsserver.py >nul
22+
if not errorlevel 1 (
23+
echo Killing %%A
24+
taskkill /PID %%A /F
25+
)
1726
)
18-
19-
pip install -q websockets pyatv
20-
21-
IF EXIST setting_up_python (
22-
del setting_up_python
23-
)
24-
25-
python wsserver.py
27+
if exist setting_up_python del setting_up_python
28+
python wsserver.py

0 commit comments

Comments
 (0)