-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun.bat
More file actions
61 lines (53 loc) · 1.33 KB
/
Copy pathrun.bat
File metadata and controls
61 lines (53 loc) · 1.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
@echo off
REM AI Virtual Mouse - Windows Launcher
REM This script sets up and runs the Virtual Mouse application
echo.
echo ================================
echo AI Virtual Mouse - Launcher
echo ================================
echo.
REM Check if Python is installed
python --version >nul 2>&1
if errorlevel 1 (
echo ERROR: Python is not installed or not in PATH
echo Please install Python 3.11+ from https://www.python.org/
pause
exit /b 1
)
REM Check if venv exists
if not exist "venv" (
echo Creating virtual environment...
python -m venv venv
if errorlevel 1 (
echo ERROR: Failed to create virtual environment
pause
exit /b 1
)
)
REM Activate venv
echo Activating virtual environment...
call venv\Scripts\activate.bat
REM Check if requirements are installed
pip show mediapipe >nul 2>&1
if errorlevel 1 (
echo Installing dependencies...
pip install -r requirements.txt
if errorlevel 1 (
echo ERROR: Failed to install dependencies
pause
exit /b 1
)
)
echo.
echo ================================
echo Starting AI Virtual Mouse
echo ================================
echo.
REM Run the application
python main.py
REM Keep window open if there was an error
if errorlevel 1 (
echo.
echo ERROR: Application exited with error code %ERRORLEVEL%
pause
)