diff options
Diffstat (limited to 'src/headless.cpp')
| -rw-r--r-- | src/headless.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/headless.cpp b/src/headless.cpp new file mode 100644 index 0000000..3372936 --- /dev/null +++ b/src/headless.cpp | |||
| @@ -0,0 +1,20 @@ | |||
| 1 | // Copyright (c) 2026 Bitflash developers | ||
| 2 | // Distributed under the MIT/X11 software license. | ||
| 3 | // | ||
| 4 | // Stand-ins for the handful of symbols the node core expects the GUI to | ||
| 5 | // provide, so a headless binary can be linked without ImGui, GLFW or OpenGL. | ||
| 6 | // | ||
| 7 | // This exists because linking the GUI made the node need libGL at load time | ||
| 8 | // even when started with -nogui: the dynamic loader resolves everything before | ||
| 9 | // main() runs, so the flag came far too late. On a clean server -- which is | ||
| 10 | // where a node most naturally lives -- that is a hard failure with an error | ||
| 11 | // message about shared libraries and no hint that the program would otherwise | ||
| 12 | // have worked fine. | ||
| 13 | |||
| 14 | #include "headers_core.h" | ||
| 15 | |||
| 16 | // The GUI uses this to mark itself dirty. With no window to repaint there is | ||
| 17 | // nothing to do, and the call sites in main.cpp and net.cpp stay unchanged. | ||
| 18 | void MainFrameRepaint() | ||
| 19 | { | ||
| 20 | } | ||