-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstart_server.bat
More file actions
69 lines (61 loc) · 1.46 KB
/
start_server.bat
File metadata and controls
69 lines (61 loc) · 1.46 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
62
63
64
65
66
67
68
69
@echo off
chcp 65001 >nul
echo ================================================
echo Bluestack Integration Server
echo ================================================
echo.
REM ADB Path
set ADB_PATH=C:\Users\hawks\Downloads\platform-tools-latest-windows\platform-tools\adb.exe
if not exist "%ADB_PATH%" (
REM Try system PATH
where adb >nul 2>&1
if %errorlevel% neq 0 (
echo [WARNING] ADB not found.
echo.
echo ADB Path: %ADB_PATH%
echo.
echo Please install ADB or update the path in this script.
echo.
pause
exit /b 1
)
set ADB_PATH=adb
) else (
echo ADB Path: %ADB_PATH%
)
REM Check ADB Connection
echo Checking ADB connection...
"%ADB_PATH%" devices
echo.
REM Try to connect to Bluestack
echo Attempting to connect to Bluestack...
"%ADB_PATH%" connect 127.0.0.1:5555
echo.
REM Check Python
where python >nul 2>&1
if %errorlevel% neq 0 (
where python3 >nul 2>&1
if %errorlevel% neq 0 (
echo [ERROR] Python not found.
echo Please install Python or add it to PATH.
pause
exit /b 1
)
set PYTHON_CMD=python3
) else (
set PYTHON_CMD=python
)
REM Set environment variable
set ADB_PATH=%ADB_PATH%
REM Check for uv
where uv >nul 2>&1
if %errorlevel% equ 0 (
echo Starting server with uv...
echo.
uv run python bluestack_integration.py
) else (
echo Starting server with Python...
echo.
%PYTHON_CMD% bluestack_integration.py
)
pause