35 lines
525 B
Batchfile
35 lines
525 B
Batchfile
@echo off
|
|
setlocal
|
|
|
|
cd /d "%~dp0"
|
|
|
|
where py >nul 2>nul
|
|
if not errorlevel 1 (
|
|
set "PYTHON=py"
|
|
goto python_found
|
|
)
|
|
|
|
where python >nul 2>nul
|
|
if not errorlevel 1 (
|
|
set "PYTHON=python"
|
|
goto python_found
|
|
)
|
|
|
|
echo Python was not found. Install Python 3 and try again.
|
|
pause
|
|
exit /b 1
|
|
|
|
:python_found
|
|
echo Installing requirements...
|
|
%PYTHON% -m pip install -r requirements.txt
|
|
if errorlevel 1 (
|
|
echo Failed to install requirements.
|
|
pause
|
|
exit /b 1
|
|
)
|
|
|
|
echo Launching spotify.py...
|
|
%PYTHON% spotify.py
|
|
|
|
pause
|