简体   繁体   English

winelib的优势?

[英]Advantage of winelib?

Are there any advantages to compiling my Windows application with winelib for Linux users? 使用winelib为Linux用户编译我的Windows应用程序有什么好处吗? Why not just give them the .exe and let them run it with Wine? 为什么不给他们.exe并让他们用Wine运行它? Seems just like extra work for no gain. 似乎就像额外的工作没有收获。

Quoting Chapter 1. Winelib Introduction - 1.1. 引用第1章Winelib介绍 - 1.1。 What is Winelib? 什么是Winelib? :

What you gain by recompiling your application with Winelib is the ability to make calls to Unix APIs, directly from your Windows source code. 使用Winelib重新编译应用程序所获得的是能够直接从Windows源代码调用Unix API。
This allows for a better integration with the Unix environment than is allowed by running an unmodified Windows application running in Wine. 这使得与Unix环境的更好集成比运行在Wine中运行的未修改的Windows应用程序所允许的更好。
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. 另一个好处是Winelib应用程序可以相对容易地在非英特尔架构上重新编译并在那里运行,而无需对处理器进行缓慢的软件仿真。

您可能想要阅读使用Winelib的优点和缺点

See this 看到这个

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? Anon:我认为这意味着所有winelib移植的应用程序都不是真正的Linux二进制文件 - 但是在win32二进制文件和Linux二进制文件之间有一些“混血儿”? What is then the advantage of porting >(using winelib)as opposed to running win32 binaries under wine? 移植>(使用winelib)而不是在wine下运行win32二进制文件的优势是什么呢?

Dimi Paun: They are true Linux binaries (ELF format) but they need a bit of setup (for >Windows compat) before they start. Dimi Paun:它们是真正的Linux二进制文件(ELF格式),但它们开始之前需要一些设置(用于> Windows compat)。 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. 但是,运行Win32(PE)可执行文件取而代之的是>真正的可能性,相同的速度等。但是使用Winelib端口可以让您更好地>与Unix env集成,这可能是您想要的'真正的'Linux应用程序。

One good reason is that it might provide some insurance against regressions in Wine. 一个很好的理由是它可以为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的A版测试代码并将该版本与您的程序静态链接,那么较新版本的Wine中的回归不会破坏您。

I think there is a point in dividing application into OS-independent .exe and several OS-specific .dll, .dll.so and .dll.dylib libraries. 我认为将应用程序划分为独立于操作系统的.exe和几个特定于操作系统的.dll,.dll.so和.dll.dylib库是有意义的。 These dynamic libraries will make it possible to access Mac OS X and Linux APIs from a single exe. 这些动态库可以从单个exe访问Mac OS X和Linux API。

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. 谷歌搜索该主题似乎表明,编译反对winelib是一种改善葡萄酒的方法,通过在编译时提出证据问题,如果葡萄酒(因此winelib)是一个完美的win32 api实现替换,不应该出现。 For your application in itself, it's a way of checking compatibility with wine. 对于您自己的应用程序,它是一种检查与葡萄酒的兼容性的方法。

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

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