Wine on Mac OS X: Libpng, FreeType, it's not DYLD

Questions about Wine on macOS.
Locked
NDDornbrook
Newbie
Newbie
Posts: 1
Joined: Fri Oct 21, 2016 5:21 pm

Wine on Mac OS X: Libpng, FreeType, it's not DYLD

Post by NDDornbrook » Fri Oct 21, 2016 5:42 pm

Good evening.

I'm trying to run Age of Empires III under wine.

I've created a wrapper, started up Steam, gotten it running, installed Age of Empires III and then fallen down a rabbit hole and ended up confused.

So, Age of Empires III starts to load and then fails, claiming that the l3codecx is not installed.

Winetricks says it is installed, but I'm not afraid of the --force flag, so off to the command line I jog to type "winetricks --force l3codecx" This is the advice in the appdb.

Well, oddly, winetricks barfs at this, claiming that the freetype library needs to be 2.0.5 or higher and that it cannot find libpng15.15.dylib

Okay, Google is my friend, this has come up several times, there's a wiki and a FAQ section about it.

I set my DYLD FALLBACK path with:

Code: Select all

export DYLD_FALLBACK_LIBRARY_PATH=/usr/X11/lib:/usr/local/lib:/usr/local/libpng
And then try "winetricks --force l3codecx" and get the same answer: Freetype isn't there, there's no libpng, and basically this isn't going to work.

Okay. So I

Code: Select all

brew install freetype
I know that there's a freetype in /usr/X11/lib. I think that it's higher in version than 2.0.5 but am not really sure how to check. But the latest is 2.7, and that should just about handle it.

But uh-oh: libpng is a pre-requisite to freetype, and it's gone from SourceForge and now the brew is busted.

That's okay, I'll install it by hand. I trundle off to www.libpng.net, grab the source, ./configure, make, make install, make a cup of tea and...

Okay, the installation of libpng seems to be there, but winetricks just will not see it. At all. The DYLD_FALLBACK_LIBRARY_PATH is set correctly, it exists, I've symlinked the 15->16, since I can't figure out where winetricks is configuring the dylib it wants (it wants 1.5 but I've installed 1.6).

And I'm suddenly completely out of ideas. Do any of you clever chaps have any?

jorl17
Level 5
Level 5
Posts: 365
Joined: Mon Jul 28, 2008 6:44 pm
Location: Coimbra, Portugal

Re: Wine on Mac OS X: Libpng, FreeType, it's not DYLD

Post by jorl17 » Fri Oct 21, 2016 11:18 pm

Hi! I have successfully run age of empires III on Linux and on OS X with the help of Wine. On OS X, I have made my own custom Wineskin wrapper.

Perhaps I can provide it to you? :)

doh123
Level 8
Level 8
Posts: 1227
Joined: Tue Jul 14, 2009 1:21 pm

Re: Wine on Mac OS X: Libpng, FreeType, it's not DYLD

Post by doh123 » Tue Oct 25, 2016 2:32 am

In the latest couple versions of OS X (macOS), DYLD_FALLBACK_LIBRARY_PATH can only be set for 1 app directly, and Apple decided to (for security reasons) wipe it out past the 1 app you directly run, any spawned process has it wiped out. So if you set it and say run Winetricks... its set for Winetricks, but when Winetricks launches Wine, the OS will blank out DYLD_FALLBACK_LIBRARY_PATH for Wine.

The easiest way around this is to make wrapper bash scripts for wine and wineserver executables, which resets the DYLD_FALLBACK_LIBRARY_PATH again and calls the right executable.

it would be something like...
#!/bin/bash
DYLD_FALLBACK_LIBRARY_PATH="${SOME_FALLBACK_PATH_STRING}" "$(dirname "$0")/RealWine" "$@"

#!/bin/bash
DYLD_FALLBACK_LIBRARY_PATH="${SOME_FALLBACK_PATH_STRING}" "$(dirname "$0")/RealWineServer" "$@"

Locked