diff --git a/steps/Visualization_Start.bat b/steps/Visualization_Start.bat index 06fcd8c..c07a657 100644 --- a/steps/Visualization_Start.bat +++ b/steps/Visualization_Start.bat @@ -1,8 +1,11 @@ @echo off +:: Force the working directory to be the folder containing this script +cd /d "%~dp0" + title Radar and Video Visualizer - Server color 0B - cls + echo. echo ====================================================== echo Radar and Video Visualizer - Local Server @@ -16,10 +19,17 @@ echo ====================================================== echo. echo Launching the application in your default browser... -start http://127.0.0.1:8000/index.html +:: Delay the browser launch by 2 seconds to allow the Python server to start up +start /b "" cmd /c "timeout /t 2 /nobreak > nul && start http://127.0.0.1:8000/index.html" -echo Server is now running on http://127.0.0.1:8000 +echo Server is starting on http://127.0.0.1:8000 echo Press CTRL+C at any time to stop the server. +echo. -:: Run the server command directly. We know 'python' works from our test. -python server.py \ No newline at end of file +:: Detect python and run server.py +python server.py || py server.py || python3 server.py || ( + echo. + echo ERROR: Could not start Python server. + echo Check if Python is installed and in your PATH. + pause +) \ No newline at end of file diff --git a/steps/index.html b/steps/index.html index 42aac52..b76baed 100644 --- a/steps/index.html +++ b/steps/index.html @@ -71,8 +71,21 @@ })(); - - + + +