"""PyInstaller entry point for the bundled Windows node daemon. `meshbay_node.daemon:main` is a module function; PyInstaller freezes a script. This is that script. The frozen binary is `meshbay-node.exe`, relocatable, and is what the desktop client spawns and what the W3 autostart launcher points at (`meshbay_node.platform._node_exe`). `meshbay-nodew.exe` is the same script built without a console (meshbay-node.spec). """ import os import sys # meshbay-nodew.exe, the build without a console, starts with no stdio at all # (sys.stdout and sys.stderr are None), and a library that writes to either or # asks whether it is a terminal would raise. The daemon logs to node.log. for _name in ("stdout", "stderr"): if getattr(sys, _name) is None: setattr(sys, _name, open(os.devnull, "w", encoding="utf-8")) from meshbay_node.daemon import main # noqa: E402 if __name__ == "__main__": main()