简体   繁体   English

在Linux上编译Windows屏保

[英]compiling windows screensavers on linux

an customer would like to provide to his website visitors an windows screensaver as download. 客户希望向其网站访问者提供Windows屏幕保护程序作为下载。 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. 我找到了一些Windows工具,这些工具可以通过UI(http://www.instantstorm.com/download/)创建屏幕保护程序文件,但如果两者都不提供,则不会提供任何文档说明的cli界面。 The cli interface could be useful when using DOSBox on ubuntu to compile an screensaver file. 当在ubuntu上使用DOSBox编译屏幕保护程序文件时,cli接口可能很有用。

The question is how this could be accomplished? 问题是如何做到这一点?

Best, Stanislav 最好,斯坦尼斯拉夫

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

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

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. 您应该能够使用mingw32来交叉编译Windows的可执行文件,尽管您需要使源代码对于GCC而言是可接受的。

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). 自从我上次在XP下尝试后,情况可能已经发生了变化,但是我相信程序或资源中包含的字符串通过不变的或可访问的编码(您可以轻松打补丁)进行,前提是您将内存中的长度保持不变(对于以null结尾的内容,您总是可以通过提前放置null来使其更短)。 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. 但是,如果您希望二进制文件以某种方式进行签名,则必须在修改后进行签名。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM