From 4417a22cf003ed1a7b59350eefc1cf887027a332 Mon Sep 17 00:00:00 2001 From: Benjamin Christau Date: Fri, 19 Jan 2024 17:23:36 +0100 Subject: [PATCH] [Network/WS/HAL/Native] Websocket configuration can now be override through environment variable --- network/ws_network/HAL/NATIVE/hal_script.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/network/ws_network/HAL/NATIVE/hal_script.py b/network/ws_network/HAL/NATIVE/hal_script.py index 834a841f0..74b338cb8 100644 --- a/network/ws_network/HAL/NATIVE/hal_script.py +++ b/network/ws_network/HAL/NATIVE/hal_script.py @@ -21,3 +21,9 @@ env.Append(CPPDEFINES=["_POSIX_C_SOURCE=200000L"]) env.Append(LIBS=["ws2_32"]) click.secho("\t* mongoose 7.8 lib ready.", fg="green") + +# Websocket configurations override +if os.environ.get("WS_NETWORK_BROKER_ADDR"): + env.Append(CPPDEFINES=[("WS_NETWORK_BROKER_ADDR","\\\""+os.environ["WS_NETWORK_BROKER_ADDR"]+"\\\"")]) +if os.environ.get(""): + env.Append(CPPDEFINES=[("PIPE_WS_SERVER_ADDR","\\\""+os.environ["PIPE_WS_SERVER_ADDR"]+"\\\"")]) \ No newline at end of file