开发者

Advantage of winelib?

Are there any advantages to compiling my Windows application with winelib for Linux users? Why not just give them the .exe and let them run it开发者_JS百科 with Wine? Seems just like extra work for no gain.


You might want to read on Advantages and Disadvantages of using Winelib.


Quoting Chapter 1. Winelib Introduction - 1.1. What is 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.
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.


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? 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.


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.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜