forked from InstituteforDiseaseModeling/vis-tools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
server.bat
34 lines (31 loc) · 1.14 KB
/
server.bat
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
@echo off
:: Test for ability to run python
where /q python
if ERRORLEVEL 1 (
echo Python is not in your PATH environment variable. Please re-run the Python
echo installer and make sure 'Add python.exe to Path' is enabled in the 'Customize
echo Python' page of the installer.
pause
exit /b
)
:: Test if we can find server.py and whether we might be running from a UNC path
if not exist "server.py" (
if /I "%CD%" == "%WINDIR%" (
echo.
echo It is likely that you have run server.bat from an Explorer window that is
echo pointed at a UNC path ^(that is, one that starts with two \\^). The windows
echo command prompt does not support UNC paths. If the UNC path corresponds to a
echo mapped drive, open an Explorer window to the mapped drive letter and try
echo again. It is recommended that you unzip Vis-Tools to a local ^(non-network^)
echo location for best performance.
) else (
echo.
echo The server python file, server.py, is not present in the current directory.
echo Please re-install Vis-Tools to a local ^(non-network^) location and try again.
)
pause
exit /b
)
:: Prereqs check, run the server
python server.py
pause