[Wine] Re: Include X11 on Mac

doh123 wineforum-user at winehq.org
Wed May 25 00:49:01 CDT 2011


fedorawins wrote:
> Thanks for the answer. I rather not use other's work as I want to understand it.
> 
> So to package XQuartz for users who did not install it I need to copy it out of /opt/X11 and put it inside my app. Is export LD_LIBRARY_PATH the right one or do I need to use DYLD_FALLBACK_LIBRARY_PATH with wine to make it not look into /opt/X11 (where it won't be) but rather in the packaged directory?
> 
> Thank you,
> fedorawins aka James


This is not easy... it took me a looong time to figure out how to get it all to work to make Wineskin...

If you really want to try, I can give you a couple clues to lead the way.  Xquartz needs to have a static location.  It has parts (mainly xkb) that cannot run from a location that can change from computer to computer.  I build all of WineskinX11 My customized Xquartz for Wineskin) to run out of /tmp/Wineskin, since everyone has a fully read/write /tmp folder, and making symlinks is easy.  I also modify the executables and dylibs to run off an @executable_path instead of a set location, so only a couple of things actually look at that location during start up.... look into using install_name_tool for that type of modification.... you'd have to build Xquartz yourself, not use a preinstalled copy, because the parts that are hard complied for location will always go back to /opt/X11, and use the files if a user has them on their machine.  This might not be a problem today, but int he future it may be as versions and incompatibilities between what is in the app and what is in /opt/X11 come about.... if the user doesn't have /opt/X11/lib at all on their machine, then it will always check the DYLD_FALLBACK_LIBRARY_PATH.  Just trying to set the entire library path yourself and not just the fallback can be majorly painful... but go ahead and try if you'd like.

Wineskin is LGPL open source licensed (http://sourceforge.net/projects/wineskin/)... you can always get the source and take a look if you just want to know how it works.  You'd really only need to look at the Wineskin.m file, as it handles how the wrapper works, starting up X11 and Wine and everything... You'd have to look at the actual files for Xquartz in a WineskinEngine.bundle in a wrapper and how I modify them after compiling (with otool).  The patch files I use to modify the Xquartz source code I haven't made available, but has really no bearing on just bundling Xquartz to use it.  For a long time Wineskin used completely unmodified Xquartz...

But really a major point of me making Wineskin is so its easy to do for other people, not so everyone can re-create the wheel  :-)  If you just want custom Wine builds, Wineskin supports making your own custom engines from Wine source as well.







More information about the wine-users mailing list