Commit
·
4ad81fd
1
Parent(s):
c57274b
set up chess engine env variable at startup
Browse files
utils/dependencies_checker.py
CHANGED
|
@@ -25,8 +25,12 @@ def find_stockfish_path():
|
|
| 25 |
|
| 26 |
|
| 27 |
def check_dependencies():
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 31 |
else:
|
| 32 |
-
print("Stockfish
|
|
|
|
| 25 |
|
| 26 |
|
| 27 |
def check_dependencies():
|
| 28 |
+
if os.getenv("CHESS_ENGINE_PATH") is None:
|
| 29 |
+
stockfish_path = find_stockfish_path()
|
| 30 |
+
if stockfish_path:
|
| 31 |
+
print(f"Found Stockfish at: {stockfish_path}")
|
| 32 |
+
os.environ["CHESS_ENGINE_PATH"] = stockfish_path
|
| 33 |
+
else:
|
| 34 |
+
print("Stockfish not found!")
|
| 35 |
else:
|
| 36 |
+
print(f"Stockfish already set to {os.getenv("CHESS_ENGINE_PATH")}")
|