aboutsummaryrefslogtreecommitdiffstats
path: root/run.bat
diff options
context:
space:
mode:
Diffstat (limited to 'run.bat')
-rw-r--r--run.bat18
1 files changed, 16 insertions, 2 deletions
diff --git a/run.bat b/run.bat
index fc25e1b..26fb963 100644
--- a/run.bat
+++ b/run.bat
@@ -1,4 +1,18 @@
@echo off
-.\python\python.exe .\server.py
+
+REM https://stackoverflow.com/a/25719250
+REM setlocal makes sure changing directory only applies inside this bat file,
+REM and not in the command shell.
+setlocal
+
+REM So this bat file can be called from a different working directory.
+REM %~dp0 is the directory with this bat file.
+cd /d "%~dp0"
+
+REM This is so brotli and gevent search in the python directory for the
+REM visual studio c++ runtime dlls
+set PATH=.\python;%PATH%
+
+.\python\python.exe -I .\server.py
echo Press any key to quit...
-PAUSE > nul \ No newline at end of file
+PAUSE > nul