Add PyInstaller release workflow

This commit is contained in:
Golumpa 2026-06-17 14:54:25 +01:00
parent fefe3a1567
commit c5373aa9e0
9 changed files with 320 additions and 3 deletions

View file

@ -24,7 +24,10 @@ def build_parser() -> argparse.ArgumentParser:
"--capture-backend",
choices=["auto", "libpcap", "raw"],
default="auto",
help="live capture backend; auto prefers Npcap/libpcap and falls back to raw sockets on Windows",
help=(
"live capture backend; auto prefers Npcap/libpcap and falls back to raw sockets on Windows "
"(default: %(default)s)"
),
)
parser.add_argument("--copy-clipboard", action="store_true", help="copy a single live export to clipboard")
parser.add_argument("--debug", action="store_true", help="also write research CSVs next to the JSON exports")

View file

@ -103,7 +103,8 @@ def _load_library() -> ctypes.CDLL:
npcap_dir = _windows_npcap_directory()
if npcap_dir.is_dir() and hasattr(os, "add_dll_directory"):
dll_directory = os.add_dll_directory(str(npcap_dir))
candidates.extend([str(npcap_dir / "wpcap.dll"), "wpcap.dll"])
candidates.append(str(npcap_dir / "wpcap.dll"))
candidates.append("wpcap.dll")
elif sys.platform == "darwin":
candidates.extend(
[

View file

@ -1,10 +1,11 @@
from __future__ import annotations
import json
import sys
from pathlib import Path
from typing import Any
PROJECT_ROOT = Path(__file__).resolve().parents[2]
PROJECT_ROOT = Path(getattr(sys, "_MEIPASS", Path(__file__).resolve().parents[2]))
MAPPINGS_DIR = PROJECT_ROOT / "mappings"