[Web] Disable UNIX sockets

They are not supported anyway, emscripten has an emulation layer that
implements them over WebSocket/WebRTC, which is really surprising for
users, and also not very useful since we have proper WebSocket and
WebRTC support.

This can make the build smaller, if we also disable the UPNP module
(which will otherwise include a third party library referencing "socket"
thus forcing emscripten to include the compatibility layer)
This commit is contained in:
Fabio Alessandrelli 2024-11-08 12:38:16 +01:00
parent fc52821cfb
commit 9383610ad1

View File

@ -201,7 +201,7 @@ def configure(env: "SConsEnvironment"):
sys.exit(255)
env.Prepend(CPPPATH=["#platform/web"])
env.Append(CPPDEFINES=["WEB_ENABLED", "UNIX_ENABLED"])
env.Append(CPPDEFINES=["WEB_ENABLED", "UNIX_ENABLED", "UNIX_SOCKET_UNAVAILABLE"])
if env["opengl3"]:
env.AppendUnique(CPPDEFINES=["GLES3_ENABLED"])