我认为将应用程序划分为与操作系统无关的 .exe 和几个特定于操作系统的 .dll、.dll.so 和 .dll.dylib 库是有道理的。这些动态库将使从单个 exe 访问 Mac OS X 和 Linux API 成为可能。
I think there is a point in dividing application into OS-independent .exe and several OS-specific .dll, .dll.so and .dll.dylib libraries. These dynamic libraries will make it possible to access Mac OS X and Linux APIs from a single exe.
What you gain by recompiling your application with Winelib is the ability to make calls to Unix APIs, directly from your Windows source code. This allows for a better integration with the Unix environment than is allowed by running an unmodified Windows application running in Wine. Another benefit is that a Winelib application can relatively easily be recompiled on a non-Intel architecture and run there without the need for a slow software emulation of the processor.
Anon: I take it that means all winelib-ported apps are NOT true linux binaries - but some half-breed between win32 binaries and Linux binaries? What is then the advantage of porting (using winelib)as opposed to running win32 binaries under wine?
Dimi Paun: They are true Linux binaries (ELF format) but they need a bit of setup (for Windows compat) before they start. But yes, running the Win32 (PE) executables instead is a true possibility, same speed, etc. But having a Winelib port allows you to better integrate with the Unix env, which may be what you want for a 'true' Linux app.
一个很好的理由是它可能为 Wine 的回归提供一些保障。如果您使用 Winelib A 版本测试您的代码,并将该版本与您的程序静态链接,那么较新版本 Wine 中的回归不会让您崩溃。
One good reason is that it might provide some insurance against regressions in Wine. If you test your code with version A of Winelib and statically link that version with your program, then regressions in a newer version of Wine can't break you.
Googling a bit on the topic seems to show that compiling against winelib is a way to improve wine by putting in evidence issues at compilation which shouldn't arise if wine (hence winelib) was a perfect win32 api implementation replacement. For your application in itself, it's a way of checking compatibility with wine.
发布评论
评论(6)
我认为将应用程序划分为与操作系统无关的 .exe 和几个特定于操作系统的 .dll、.dll.so 和 .dll.dylib 库是有道理的。这些动态库将使从单个 exe 访问 Mac OS X 和 Linux API 成为可能。
I think there is a point in dividing application into OS-independent .exe and several OS-specific .dll, .dll.so and .dll.dylib libraries. These dynamic libraries will make it possible to access Mac OS X and Linux APIs from a single exe.
您可能想阅读 使用 Winelib 的优点和缺点。
You might want to read on Advantages and Disadvantages of using Winelib.
引用 第 1 章 Winelib 简介 - 1.1。什么是 Winelib?:
Quoting Chapter 1. Winelib Introduction - 1.1. What is Winelib? :
请参阅此
See this
一个很好的理由是它可能为 Wine 的回归提供一些保障。如果您使用 Winelib A 版本测试您的代码,并将该版本与您的程序静态链接,那么较新版本 Wine 中的回归不会让您崩溃。
One good reason is that it might provide some insurance against regressions in Wine. If you test your code with version A of Winelib and statically link that version with your program, then regressions in a newer version of Wine can't break you.
谷歌搜索一下这个主题似乎表明,针对 winelib 进行编译是一种通过在编译时添加证据问题来改进 wine 的方法,如果 wine(因此 winelib)是完美的 win32 api 实现替代品,那么这些问题就不会出现。
对于您的应用程序本身来说,这是检查与 wine 兼容性的一种方法。
Googling a bit on the topic seems to show that compiling against winelib is a way to improve wine by putting in evidence issues at compilation which shouldn't arise if wine (hence winelib) was a perfect win32 api implementation replacement.
For your application in itself, it's a way of checking compatibility with wine.