SN-10154 附来源、原文与上下文。
引用中本聪此前的文字中本聪来源 ↗引用 Martti Malmi 的文字Martti Malmi来源 ↗关于让同一个二进制程序在没有 GUI 时运行,我找到几条线索:
Just a few clues I've found about running the same binary without a GUI:
- GTK 支持程序在没有显示环境时运行: http://library.gnome.org/devel/gtk/2.12/gtk-General.html#gtk-init-check。不过,这没说明 wxWidgets 能否做到。
- GTK supports running a program without display: http://library.gnome.org/devel/gtk/2.12/gtk-General.html#gtk-init-check. This doesn't tell if it's possible in wxWidgets though.
我看到它在 wxApp::Initialize 中调用 gtk-init-check。
I see it calls gtk-init-check in wxApp::Initialize.
我可以在子类中重写 Initialize,调用原来的方法,同时抑制错误消息,忽略返回值。看起来能用。
I can subclass Initialize, call the original one while suppressing the error message and ignore the return value. It seems to be working.
这样能用。再处理几件事,我就上传。
This is working. A few more things and I'll upload it.
我们需要告诉大家安装 GTK 库。你记得安装 GTK 的 apt-get 命令吗?没有安装 GUI 的情况下,可以安装它吗?
We'll need to tell people to install the GTK libraries. Do you remember the apt-get command to install GTK, and can you install it without having a GUI installed?