Windows 开发人员如何最轻松地让他的软件在 Wine 下正常运行

发布于 2024-07-11 12:37:23 字数 384 浏览 10 评论 0原文

我的许多用户一直告诉我,他们希望在他们的 Linux 机器上的 Wine 下运行我的软件。

但我是一名 Windows 开发人员,几乎没有 Linux 经验。

现在我可以花一两个月的时间安装Linux,学习Linux,安装Wine,学习Wine,并彻底确保我的应用程序在Wine下运行良好。 但我仍在为 Windows 进行开发,所以我现在不想在开发上花费太多时间。

那么我可以做什么而不需要太多的努力来让我的程序在 Wine 下尽可能好地运行呢?


我确实找到了有关在 Wine 下运行应用程序的一般帮助

Many of my users have been telling me that they'd like to run my software on their Linux machines under Wine.

But I'm a Windows Developer who has practically no experience with Linux.

Now I could spend a month or two installing Linux, learning Linux, installing Wine, learning Wine, and thoroughly ensure my application runs well under Wine. But I am still developing for Windows, so I don't want to take so much time away from development right now.

So what can I do without too much effort to get my program running as well as possible under Wine?


I did find this General help on running applications under Wine.

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

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

发布评论

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

评论(8

遗心遗梦遗幸福 2024-07-18 12:37:25

只要您不做任何不寻常的事情,例如摆弄硬件或研究未记录的 API 调用和数据结构,您应该能够在 Wine 下运行您的代码,只需很少的修改或无需修改。 Wine 具有相当完整的公共 Windows API 实现,因此如果您的程序运行良好且不会混乱,那么它应该可以正常工作。

As long as you're not doing anything unusual such as playing around with hardware or poking around in undocumented API calls and data structures, you should be able to run your code under Wine with few or no modifications. Wine has a fairly complete implementation of the public Windows APIs, so if your program plays nice and doesn't mess around, it should just work.

一曲爱恨情仇 2024-07-18 12:37:25

不要使用太多的 Windows API! 不要使用 Microsoft 的任何新产品;)

Don't use too much of the windows API! Don't use anything new from Microsoft ;)

陈年往事 2024-07-18 12:37:25

避免使用 WPF 是第一条建议。

但在 Wine 下测试你的应用程序确实不会杀死你。 尝试起来并不难; 当然不会需要几个月的时间。 例如:

使用 http://www.ubuntu.com/getubuntu/downloadmirrors#wubi 安装
Ubuntu 到 Windows 机器上的一个文件中,然后启动 ubuntu 并安装最新的 Wine
http://winehq.org/download/deb
然后尝试运行应用程序的安装程序。
如果它不起作用,请检查 Wine 常见问题解答,在 wine 论坛之一寻求帮助,和/或在 wine 的错误跟踪器中提交错误。

从完全启动到尝试安装程序大约需要三个小时。

Avoid using WPF is the #1 suggestion.

But it really wouldn't kill you to test your app under Wine. It's not that hard to try; it certainly won't take months. For instance:

Use http://www.ubuntu.com/getubuntu/downloadmirrors#wubi to install
Ubuntu into a file on your Windows machine, then start ubuntu and install the latest Wine from
http://winehq.org/download/deb
Then try running your app's installer.
If it doesn't work, check the Wine FAQ, ask for help in one of the wine forums, and/or file bugs in wine's bug tracker.

Should take about three hours from a dead start to trying out your installer.

乜一 2024-07-18 12:37:25

当我的一个 Delphi5 应用程序刚刚从 zip 中运行出来时,我感到非常惊讶。

唯一真正有效的方法是自己动手,即按照 Sean 的建议安装 vmware 和 Linux 发行版。 Linux 实际上并没有那么难,我们随时为您提供帮助。

经过快速测试后,我可以确认它基本上有效。 启动期间有一个 ACCVIO 读数为 0x34,可以忽略错误对话框并运行应用程序,我打开了 Steve McCarthy GEDCOM。

屏幕截图

这是在 MEPIS 7.9.94-rc1_32 下使用 Wine 1.1.12虚拟机。 强烈建议使用 VMWare 来完成此类事情。

I was rather surprised when one of my Delphi5 applications just worked out of the zip.

The only real way this is going to work is to do it yourself, i.e. install vmware and a linux distro as Sean suggested. Linux isn't actually that hard, and we're all here to help.

Having done a quick test I can confirm that it largely works. There is an ACCVIO reading 0x34 during start up, the error dialog can be ignored and the application runs, I opened the Steve McCarthy GEDCOM.

Screenshot

This was using Wine 1.1.12 under MEPIS 7.9.94-rc1_32 under VMWare. Highly recommend to use VMWare for this sort of thing.

月朦胧 2024-07-18 12:37:25

您使用什么语言/平台进行开发? 根据具体情况,使其在本机运行应该没有问题。 例如,如果您使用 Java 或 Python,则两者在 Linux 上运行起来都非常干净。 同样,如果您是一名 .NET 开发人员,那么您应该能够在经历一些痛苦的情况下让您的应用程序在 Mono 中运行。

What language/platform do you develop with? Depending on which it is, it should be no trouble to get it running native. For example, if you use Java or Python, both operate very cleanly on Linux. Likewise, if you're a .NET developer, you should be able, with some pain, to get your app running in Mono.

后知后觉 2024-07-18 12:37:25

寻找 Linux Beta 测试人员。 它可以向 WINE 开发人员报告错误或查找应用程序中的错误。

Find Linux beta testers. It can reports a bug to WINE developers or find a bug in your application.

∞梦里开花 2024-07-18 12:37:25

Wine 比 Windows 对错误更敏感。 例如,如果类无效,Wine 将在 NULL 窗口句柄上崩溃,并且无法创建窗口,而 Windows 则更健壮,只会避免该错误。

这是清理代码的机会。

当我第一次尝试时,Wine 运行我的应用程序的效果让我感到惊讶。 但是,我必须摆脱基于第三方驱动程序的组件。

Wine is more sensitive to errors than Windows. For example, Wine will crash on NULL window handles, and fail to create windows if the class is invalid, whereas Windows is more robust and will just circumvent the error.

It's an opportunity to clean up your code.

I was amazed at how well Wine ran my app the first time I tried. However, I had to get rid of a third-party driver-based component.

抚你发端 2024-07-18 12:37:24

下载 VMWareUbuntu 虚拟机(Ubuntu 是一种流行的 Linux 发行版),来自 VMWare 站点。 这将为您提供在 Windows 环境中运行的 Linux 操作系统,而无需手动安装 Linux。

然后,您可以使用此处的说明来安装 Wine,该 Wiki 页面还为您提供了一些关于如何使用它。

如果您按照 Adam Rosenfield 的建议,尝试在不加修改的 Wine 中运行您的应用程序,您将能够快速确定是否存在问题。 我的猜测是有一些,否则您的用户不会就此联系您:)

有很多方法可以获取在 Wine 中调试应用程序的帮助,请参阅 网站 获取选项并选择一些适合您的方法。 一如既往,最好不要依赖单一渠道进行沟通。

另外,如果您更喜欢在 Windows 中进行开发,那么使用虚拟机的方法将允许您像往常一样在 Windows 中编译代码并将二进制文件复制到虚拟机中进行测试(Ubuntu 支持浏览/挂载 Windows 共享)。

Download VMWare and an Ubuntu virtual machine (Ubuntu is a popular Linux distribution) from the VMWare site. This will provide you with a working Linux O/S inside your Windows environment without needing to install Linux manually.

You can then use the instructions here to install Wine, that Wiki page also provides you with some instructions on how to use it.

If you follow what Adam Rosenfield suggested and just try running your application in Wine unmodified, you will be able to determine quickly whether there are problems. My guess would be that there are some, otherwise your users would not have contacted you about it :)

There are many ways for getting help with debugging applications in Wine, consult the website for options and pick a few ways that suit you. As always, it's best not to rely on a single channel for communication.

Also, if you are more comfortable with developing in Windows, the approach of using a virtual machine will allow you to compile your code as usual in Windows and copy the binary into the virtual machine for testing (Ubuntu supports browsing/mounting Windows shares).

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