From d04b915580c8ba05beb0943a6fab9b04e12294e4 Mon Sep 17 00:00:00 2001 From: Christophe Besson Date: Fri, 4 Sep 2026 14:51:08 +0200 Subject: feat(packaging): stamp the frozen node exe, document Windows networking MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit meshbay-node.spec now builds a VSVersionInfo (ProductName "MeshBay Node", version read from the installed package so it tracks pyproject) and passes it to EXE(version=...). The Windows Firewall prompt, Task Manager and the file's Properties then show "MeshBay Node" instead of a bare exe name — the prompt the operator has to answer on first run. packaging/win/README.md gains a Networking section: the first-run firewall prompt (allow Private AND Public — a VM adapter is Public), that a flat LAN needs nothing else, what a routed/multi-subnet LAN additionally needs, the libvirt-NAT caveat, and a pointer to the packaged Linux firewall profiles. test_packaging_win.py covers the version resource. Co-Authored-By: Claude Sonnet 5 --- packaging/win/meshbay-node.spec | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) (limited to 'packaging/win/meshbay-node.spec') diff --git a/packaging/win/meshbay-node.spec b/packaging/win/meshbay-node.spec index f1f994d..324d8c1 100644 --- a/packaging/win/meshbay-node.spec +++ b/packaging/win/meshbay-node.spec @@ -12,6 +12,44 @@ # frozen run raises ModuleNotFoundError — that is the expected way this list grows. from PyInstaller.utils.hooks import collect_all, copy_metadata +from PyInstaller.utils.win32.versioninfo import ( + FixedFileInfo, + StringFileInfo, + StringStruct, + StringTable, + VarFileInfo, + VarStruct, + VSVersionInfo, +) + +# Version resource stamped into meshbay-node.exe so the Windows Firewall prompt, +# Task Manager and the file's Properties read "MeshBay Node" rather than a bare +# exe name. Read from the installed package so it cannot drift from pyproject. +try: + from importlib.metadata import version as _pkg_version + + _ver = _pkg_version("meshbay-node") +except Exception: + _ver = "0.0.0" +_vtuple = tuple( + int(p) for p in (_ver.split("+")[0].split(".") + ["0", "0", "0", "0"])[:4] +) + +_version_info = VSVersionInfo( + ffi=FixedFileInfo(filevers=_vtuple, prodvers=_vtuple), + kids=[ + StringFileInfo([StringTable("040904B0", [ + StringStruct("CompanyName", "MeshBay"), + StringStruct("FileDescription", "MeshBay Node"), + StringStruct("FileVersion", _ver), + StringStruct("InternalName", "meshbay-node"), + StringStruct("OriginalFilename", "meshbay-node.exe"), + StringStruct("ProductName", "MeshBay Node"), + StringStruct("ProductVersion", _ver), + ])]), + VarFileInfo([VarStruct("Translation", [0x0409, 1200])]), + ], +) # Packages taken in full: data files + shared libs + every submodule. COLLECT_ALL = [ @@ -114,6 +152,7 @@ exe = EXE( codesign_identity=None, entitlements_file=None, icon="../../packages/meshbay-client/build/icon.ico", + version=_version_info, ) coll = COLLECT( exe, -- cgit v1.2.3