Fix BOM breaking bin/*.bat and add early Graphviz check to --tosvg wrappers

setenv.bat (and activate_venv/get_cmd/install_py.bat) had a UTF-8 BOM,
which cmd.exe read as part of the @echo off line, breaking every bin
script that calls setenv.bat via `call`. Stripped the BOM.

material_flow.bat/.sh and tro_flow.bat/.sh now check up front whether
the Graphviz engine --tosvg needs (dot, or neato with --use-cords) is
resolvable, and print an early WARNUNG with fix instructions if not -
before the CSV is even parsed. The Python scripts still run and report
the same failure in detail if the SVG step is actually reached.
This commit is contained in:
2026-08-21 12:08:41 +02:00
parent e165beeaa8
commit fce0b8d9a1
9 changed files with 89 additions and 5 deletions
+5 -1
View File
@@ -98,7 +98,11 @@ Conventions shared by the CLI tools:
`ezdxf>=1.4.0` for `tro_annotate.py` only) — run `bin\install_py.bat` once.
- `--tosvg` needs Graphviz's `dot` (or `neato`, for `tro_flow.py
--use-cords`) on `PATH`, or the `GRAPHVIZ_DOT` environment variable pointing
at the `dot` executable.
at the `dot` executable. `bin/material_flow.bat`/`.sh` and `bin/tro_flow.bat`/`.sh`
check for the right engine up front when `--tosvg` is passed and print an early
`WARNUNG` if it's missing (`GRAPHVIZ_DOT` only covers `dot`, not `neato`) — this
is just a heads-up before the CSV is even parsed; the Python script still runs
and reports the same failure in detail (exit code `2`) if the SVG step is reached.
## 3. `material_flow.py` — material-flow graph of the mechanical layout