在linux上编译windows屏保

发布于 2024-10-07 18:32:39 字数 284 浏览 11 评论 0原文

客户希望向其网站访问者提供 Windows 屏幕保护程序供下载。到目前为止,上帝,但是:屏幕保护程序应该是动态生成的,并带有一些需要在屏幕保护程序中显示的元数据。

我发现一些 Windows 工具可以通过 UI (http://www.instantstorm.com/download/) 创建屏幕保护程序文件,但它们不提供记录的 cli 界面(如果两者都不提供)。当在 ubuntu 上使用 DOSBox 编译屏幕保护程序文件时,cli 界面可能很有用。

问题是如何实现这一点?

最好的, 斯坦尼斯拉夫

an customer would like to provide to his website visitors an windows screensaver as download. So far so god, but: The screensavers should be generated on the fly with some meta date which needs to be displayed within the screensaver.

I've found some windows tools which can create screensaver files through an UI (http://www.instantstorm.com/download/) but they provide no documented cli interface if neither. The cli interface could be useful when using DOSBox on ubuntu to compile an screensaver file.

The question is how this could be accomplished?

Best,
Stanislav

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

阳光的暖冬 2024-10-14 18:32:39

如果它是最近的 Windows 应用程序,您可能需要使用 wine 而不是 dosbox,如果它是 cli 应用程序,则实际上不需要 X。

If it's a recent windows application you probably need to use wine instead of dosbox, which doesn't really need X if it's a cli app.

音盲 2024-10-14 18:32:39

是的,您可以在 Linux 上编译 Windows 二进制文件,但除非您提供更多信息,否则不可能提供更多详细信息。

Yes you can compile windows binaries on Linux, but unless you provide more information, it is impossible to provide more details.

看海 2024-10-14 18:32:39

您应该能够使用 mingw32 交叉编译 Windows 的可执行文件,但您需要使您的源代码能够被 GCC 接受才能执行此操作。

但是,您是否考虑过修补二进制文件而不是编译它的可能性?自从我上次在 XP 下尝试以来,情况可能已经发生了变化,但我相信程序或资源中包含的字符串要么保持不变,要么采用可轻松修补的可访问编码,只要您保持内存中的长度相同(对于以 null 结尾的内容,您始终可以通过在前面放置 null 来使其更短)。此外,您还可以将数据附加到可执行文件的末尾并在运行时读取该数据。

但是,如果您的二进制文件预计以某种方式进行签名,则必须在修改后进行签名。

You should be able to use mingw32 to cross compile executables for windows, though you will need to make your sources acceptable to GCC in order to do this.

However, have you considered the possibility of patching the binary rather than compiling it? Perhaps things have changed since I last tried it under XP, but I believe strings included in the program or in a resource come through either unchanged or in an accessible encoding which you could easily patch, provided that you kept the length in memory the same (for something null-terminated, you can always make it shorter by placing a null earlier). Also you might be able to append data to the end of the executable and read that at runtime.

However, if your binary is expected to be signed in some manner, you'd have to do the signing after the modification.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文