CartBlanche
2009-Nov-07 14:28 UTC
[Wine] Embedding Wine into native MacOS and Linux application...
Hi all, A few years ago Borland embedded Wine into their Kylix IDE so as to speed up development of a Delphi IDE on Linux. I am porting 2 applications over to MacOS X and Linux from Win32. 1. The first application, a game engine, makes extensive use of DirectX 3D, I don't want to force them to buy CrossOver, is there some way for the DirectX calls to be translated into OpenGL calls? 2. The second application makes use of a proprietary DLL that we have licensed and we know it works in CrossOver, but we would like re-write the front end to make it native ( for later ports ) but still be able to call the DLL functions. Again we don't want to force users of our applications to buy CrossOver, so need a solution which will allow us to leverage the aforementioned DLL on MacOS X and Linux. Is there some way to embed Wine into the above applications, either through linking or via some kind of Shared Object? Thanks in advance.
Thunderbird
2009-Nov-07 16:42 UTC
[Wine] Re: Embedding Wine into native MacOS and Linux application...
You can just compile normal Wine for OSX (search on google or this website about it). Crossover is not needed. From personal experience with porting apps using Wine to Linux and OSX I can say that the default OSX X11 server is broken like hell though. It has nasty bugs, it doesn't integrate as well as the Crossover X11 server (e.g. no command+tab because X11 windows are not accessible that way) and other bugs. For the second question look for winelib which allows you to mix win32 and linux/osx code but you need to compile ALL of your code using winelib. You can't just link to Wine as if it were a library because we have to perform a lot of 'magic'.
CartBlanche
2009-Nov-08 00:07 UTC
[Wine] Re: Embedding Wine into native MacOS and Linux application...
Thanks for the quick reply Thunderbird. Would it be possible to C shared object that links to WineLib which in turn, talks to the Win32 DLL. Then my app would call the Shared Object functions natively on both Mac OS X and Linux and WineLib would do its magic with the Win32 DLL. Are there any tutorials on how to use WineLib in your apps?
doh123
2009-Nov-08 00:13 UTC
[Wine] Re: Embedding Wine into native MacOS and Linux application...
if you have the source and you want to make a modified port with Winelib.. thats great.. you could also just bundle up Wine inside of a .app (on OSX) and have it launch everything in the background itself and just hide Wine.