Embedding Wine into native MacOS and Linux application...

View: New views
5 Messages — Rating Filter:   Alert me  

Embedding Wine into native MacOS and Linux application...

by Soulcage :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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.






Re: Embedding Wine into native MacOS and Linux application...

by Soulcage :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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






Re: Embedding Wine into native MacOS and Linux application...

by Soulcage :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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?






Re: Embedding Wine into native MacOS and Linux application...

by Soulcage :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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.






Re: Embedding Wine into native MacOS and Linux application...

by Soulcage :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


CartBlanche wrote:
> 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.

Not really. You need the entire Wine and you can't link to winelib library the standard *NIX way - it won't work. Also binary libraries are different on most *NIXes so you can't have one library.

Wine can not be stripped down to one shared library unless of course you need about 0.1% of what Wine does...