创建一个 wine 静态可执行文件?

发布于 2024-08-21 10:54:55 字数 200 浏览 12 评论 0原文

我有一些经常使用的二进制形式的 Windows 命令行应用程序(我没有源代码)。有时我需要在 Linux 机器上运行它们,并且它在 wine 下完美运行(wine 不是模拟器)。我现在面临的问题是我需要在一个没有安装 wine 的集群上工作。我想知道是否可以在另一台类似的 Linux 机器上创建静态可执行文件等,这样我就可以在集群上运行这个 Windows 程序

谢谢

I have some windows command line applications, in binary form (I do not have the source code) which I use frequently. Sometimes I need to run them in Linux machines, and it works perfectly under wine (wine is not an emulator). The problem I'm facing now is that I need to work on a cluster which has not wine installed on it. I wonder if it is possible to create in another similar linux machine kind of a static executable or so, so i can run this windows program on the cluster

Thanks

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

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

发布评论

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

评论(3

忆沫 2024-08-28 10:54:55

这是一个疯狂的想法;)在该集群上安装 wine。是什么阻止了你?如果你可以在那里执行程序......

如果这是某种严肃的软件,则不建议在非本机操作系统上运行它。 Wine 不是为运行关键应用程序而开发的。它仍然不是Windows。

This is an insane idea ;) Install wine on that cluster. What stops you? If you can execute programs there....

If this is some kind of serious software, it don't recommend to run it on non-native OS. Wine is not developed for running critical applications. It is still not Windows.

忆离笙 2024-08-28 10:54:55

你不能编译静态exe; Windows 太复杂了。但您也许能够编译 Wine 以在您的集群上运行。

您需要的是一种在集群上编译代码的方法。 Wine 本身可以安装在任何地方,但由于我不知道您是否拥有集群上的所有依赖项,因此可能需要一些工作。

所以我建议获取 Wine 源代码,运行 configure --prefix=$HOME/wine && make 然后解决错误。

--prefix 是 Wine 将安装的路径;它应该是集群和构建主机上相同的路径。如果所有其他方法都失败,ln 是你的朋友)。

You can't compile a static exe; Windows is too complex for that. But you might be able to compile Wine to run on your cluster.

What you need is a way to compile code on the cluster. Wine itself can be installed anywhere but since I don't know if you have all the dependencies on the cluster, it might take some work.

So I suggest to get the Wine sources, run configure --prefix=$HOME/wine && make and then work through the errors.

(--prefix is the path under which Wine will be installed; it should be some path that is the same on the cluster and your build host. If all else fails, ln is your friend).

╰ゝ天使的微笑 2024-08-28 10:54:55

我刚刚花了几分钟寻找我头脑中知识的参考,但我的谷歌搜索无法满足要求。

适用于 Linux 的 Picasa 与 Wine 捆绑在一起,因此可能有可能,但我找不到几个月前读过的文章。

除此之外,您可以使用 gcc 和 winelib 进行交叉编译,但正如 Cyper 所说,没有代码就没有编译。

I've just spent a couple minutes looking for a reference to the knowledge in my head but it my googling isn't up to it.

Picasa for linux is bundled with Wine, so it may be possible but I couldn't find the article I read a couple months back.

Other than this, you can cross compile with gcc and winelib but as Cyper rightly said, no code no compilation.

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