-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathConfigure-RCC6-Windows.cmd
More file actions
33 lines (28 loc) · 898 Bytes
/
Copy pathConfigure-RCC6-Windows.cmd
File metadata and controls
33 lines (28 loc) · 898 Bytes
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
@echo off
setlocal
title NeonPocketMC RCC6 Repeater Setup
set "VENV=%LOCALAPPDATA%\NeonPocketMC-RCC6-Repeater\configurator"
set "PYTHON="
where py >nul 2>&1 && set "PYTHON=py -3"
if not defined PYTHON where python >nul 2>&1 && set "PYTHON=python"
if not defined PYTHON (
echo Python 3 is required.
echo Install it from https://www.python.org/downloads/windows/ and run this file again.
pause
exit /b 1
)
if not exist "%VENV%\Scripts\python.exe" (
echo First run: preparing the small USB helper...
%PYTHON% -m venv "%VENV%" || goto :failed
"%VENV%\Scripts\python.exe" -m pip install --disable-pip-version-check pyserial==3.5 || goto :failed
)
"%VENV%\Scripts\python.exe" "%~dp0scripts\configure_rcc6.py" %*
set "RESULT=%ERRORLEVEL%"
echo.
pause
exit /b %RESULT%
:failed
echo.
echo Could not prepare the USB helper. See the manual browser setup links in README.md.
pause
exit /b 1