Skip to content

回复:非 GUI 选项 ​

首次公开证据

打开首次公开证据
查看 1 个交叉存档
来源说明

Published on GitHub in February 2024 as part of Martti Malmi's testimony in the COPA v. Wright trial

关于在没有 GUI 的情况下运行同一个二进制文件,我找到了一些线索:

  1. GTK 支持在没有显示器的情况下运行程序: http://library.gnome.org/devel/gtk/2.12/gtk-General.html#gtk-init-check。 不过这并不能说明 wxWidgets 是否可行。

我看到它在 wxApp::Initialize 中调用 gtk-init-check。

我可以重写 Initialize,在抑制错误消息的同时调用原始实现,并忽略返回值。看来能正常工作。

这能用了。再处理几件事,我就上传。

我们需要告诉大家安装 GTK 库。你记得安装 GTK 的 apt-get 命令吗?没有安装 GUI 的情况下也能安装吗?

英文原文 ​

展开英文原文

Just a few clues I've found about running the same binary without a GUI:

  1. 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.

I see it calls gtk-init-check in wxApp::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.

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?

为历史保存,为中文读者整理。每篇档案均附来源与英文原文。