24 lines
634 B
Batchfile
24 lines
634 B
Batchfile
@echo off
|
|
setlocal
|
|
|
|
if "%AMMC_EXE%"=="" set "AMMC_EXE=%~dp0ammc-amb.exe"
|
|
if not exist "%AMMC_EXE%" if exist "%~dp0..\ammc-amb.exe" set "AMMC_EXE=%~dp0..\ammc-amb.exe"
|
|
if "%DECODER_IP%"=="" set "DECODER_IP=192.168.1.11"
|
|
if "%WS_PORT%"=="" set "WS_PORT=9000"
|
|
|
|
if not exist "%AMMC_EXE%" (
|
|
echo [ERROR] Could not find AMMC executable:
|
|
echo %AMMC_EXE%
|
|
echo Set AMMC_EXE in this file or as environment variable.
|
|
exit /b 1
|
|
)
|
|
|
|
start "AMMC" /min cmd /c "\"%AMMC_EXE%\" -w %WS_PORT% %DECODER_IP%"
|
|
|
|
echo [OK] AMMC started in background
|
|
|
|
echo Decoder IP: %DECODER_IP%
|
|
|
|
echo WebSocket: ws://127.0.0.1:%WS_PORT%
|
|
endlocal
|