Commit 55011ff
Fix silent-exit when frozen + show MessageBox on startup errors
The bundled gui.exe was exiting on startup because main() checked for
cli.py next to gui.py — that file isn't shipped in the bundle (we ship
xeno-cli.exe instead). With console=False, the stderr message was
invisible, so the exe appeared to "just not run."
* Replace the cli.py existence check with CLI_TARGET which resolves to
xeno-cli.exe in frozen mode and cli.py from source.
* Add a _fatal() helper that pops a Windows MessageBox in addition to
printing — so any future startup failure (missing CLI sibling, port
bind failure, unhandled exception) shows the user a real error
instead of nothing.
* Wrap main() in a try/except that routes unhandled exceptions through
the same MessageBox path with a traceback.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 6833374 commit 55011ff
2 files changed
Lines changed: 60 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | | - | |
| 43 | + | |
| 44 | + | |
44 | 45 | | |
45 | 46 | | |
46 | | - | |
| 47 | + | |
| 48 | + | |
47 | 49 | | |
48 | 50 | | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
49 | 71 | | |
50 | 72 | | |
51 | 73 | | |
| |||
1508 | 1530 | | |
1509 | 1531 | | |
1510 | 1532 | | |
1511 | | - | |
1512 | | - | |
1513 | | - | |
| 1533 | + | |
| 1534 | + | |
| 1535 | + | |
| 1536 | + | |
| 1537 | + | |
| 1538 | + | |
| 1539 | + | |
| 1540 | + | |
| 1541 | + | |
| 1542 | + | |
| 1543 | + | |
| 1544 | + | |
| 1545 | + | |
| 1546 | + | |
1514 | 1547 | | |
1515 | 1548 | | |
1516 | 1549 | | |
1517 | 1550 | | |
1518 | | - | |
| 1551 | + | |
| 1552 | + | |
| 1553 | + | |
| 1554 | + | |
| 1555 | + | |
| 1556 | + | |
| 1557 | + | |
| 1558 | + | |
| 1559 | + | |
| 1560 | + | |
1519 | 1561 | | |
1520 | 1562 | | |
1521 | 1563 | | |
| |||
1532 | 1574 | | |
1533 | 1575 | | |
1534 | 1576 | | |
1535 | | - | |
| 1577 | + | |
| 1578 | + | |
| 1579 | + | |
| 1580 | + | |
| 1581 | + | |
| 1582 | + | |
| 1583 | + | |
| 1584 | + | |
| 1585 | + | |
| 1586 | + | |
| 1587 | + | |
0 commit comments