Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Compile a wineskin base on macOS 10.11 and newer

Option 1 - Compiling

Get the source

git clone git://

Or from the Github mirror

git clone

Or download a release from and extract the files.

Install dependencies

brew update
brew install wine --only-dependencies --without-x11 --devel

Apply patches (optional)

You can find wine-staging patches at:

git apply --check 0001-secur32-Set-output-buffer-size-to-zero-during-handsh.patch
git apply 0001-secur32-Set-output-buffer-size-to-zero-during-handsh.patch


Using Wineskin install the Wine Engine Base. Attempt a build. When asked if you want to install gcc-4.2 press 'N'. We will be using clang instead.

We need to trick Wineskin into beliving gcc-4.2 is installed. We can do this by symlinking our current version.

sudo ln -s /usr/bin/gcc /usr/local/bin/gcc-4.2

Edit configuration

Open ~/Library/Application Support/Wineskin/EngineBase/W2.5.5v1EngineBase/config.txt in your favourite editor. Next add the CC CXX and CFLAGS varables so that wine is now compiled with clang rather than the outdated gcc-4.2.

{location to the wine source code}
CC=clang CXX=clang++ CFLAGS=-std=gnu89 --without-x --without-xml --disable-option-checking --without-oss --without-cms --disable-tests --without-v4l --without-alsa --without-audioio --without-capi --with-coreaudio --without-esd --without-hal --without-jack --with-xcomposite --with-xcursor --with-xinerama --with-xinput --with-xrandr --with-xrender --with-xshape --with-xshm --with-xslt --with-xxf86vm --without-fontconfig --without-gphoto --without-gstreamer --without-dbus
/Users/{user}/Library/Application Support/Wineskin/7za

On the last line is the operating system version number. Make sure it matches with yours.


~/Library/Application\ Support/Wineskin/EngineBase/W2.5.5v1EngineBase/WineskinEngineBuild


brew rm $(join <(brew leaves) <(brew deps wine))
brew cleanup
cd {wine_source} && make clean
sudo periodic daily

don't forget to remove the wine source files.

Option 2 - download binary and convert/7zip

export WINE_VER=3.9
export WINE_BRANCH=devel # stable devel staging
wget "$WINE_BRANCH-$WINE_VER-osx64.tar.gz"
tar xf portable-winehq-*-osx64.tar.gz
echo "WS9Wine$WINE_VER-$WINE_BRANCH-64bit" > usr/version
mv usr/ wswine.bundle
tar cf - wswine.bundle | ~/Library/Application\ Support/Wineskin/7za a -si "WS9Wine$WINE_VER-$WINE_BRANCH-64bit.tar.7z"
# brew install p7zip # alternatively using p7zip from homebrew
# tar cf - wswine.bundle | 7za a -si "WS9Wine$WINE_VER-$WINE_BRANCH-64bit.tar.7z"
mv "WS9Wine$WINE_VER-$WINE_BRANCH-64bit.tar.7z" ~/Library/Application\ Support/Wineskin/Engines/

rm -rdf wswine.bundle
rm portable-winehq-*-osx64.tar.gz

This comment has been minimized.

Copy link

l3laze commented Jul 25, 2017

When is the last time you tried this?

Just gave it a shot yesterday on OS X 10.11.6 and it fails completely with the usual "compiler can't create executables" issue, just like every other set of directions for building a Wineskin engine from Wine source does for me =\

Edit: And of course now that I said something after so many failed attempts it's finally starting to work (building now, though of course that may fail).

Another edit: Part of my failure was because I didn't copy your ./configure arguments (CC=clang CXX=clang++ CFLAGS=-std=gnu89 --without-x --without-xml --disable-option-checking --without-oss --without-cms --disable-tests --without-v4l --without-alsa --without-audioio --without-capi --with-coreaudio --without-esd --without-hal --without-jack --with-xcomposite --with-xcursor --with-xinerama --with-xinput --with-xrandr --with-xrender --with-xshape --with-xshm --with-xslt --with-xxf86vm --without-fontconfig --without-gphoto --without-gstreamer --without-dbus) and instead tried to use the Wineskin defaults. I noticed the CFLAGS=-std=gnu89 yesterday when I was trying to figure this out, but didn't try it personally and until I saw it again in your args I thought that it was wrong. Lol.

One more edit: It compiled, and it even showed up in my Engines list, but nothing works. Can't install anything, can't run RegEdit, Uninstaller, Task Manager, or anything else. I'm guessing it's something wrong on my end, but I just don't have the ability to care any more right now.

Last edit: Wine 2.02 Stable compiled and so far is working as expected (Steam is installing fine, will try a game shortly). Thank you; sorry for the earlier doubt.


This comment has been minimized.

Copy link

l3laze commented Apr 22, 2018

No longer working as of April 22nd, 2018. homebrew/dupes has been moved to homebrew/homebrew-core, and apple-gcc42 will not install on version of Mac OS newer than Mavericks "due to an upstream incompatibility."


This comment has been minimized.

Copy link
Owner Author

publicarray commented May 1, 2018

@l3laze Thanks for letting me know. 👍 As a workaround you can still symlink gcc. It's not used but for some reason this path is hard-coded in the WineskinEngineBuild. If you are worried you can just remove the symlink once done.


This comment has been minimized.

Copy link
Owner Author

publicarray commented May 1, 2018

Here is another method that does not involve compiling. I haven't tested it though.

Edit: Added an example:

# wget
tar xf portable-winehq-devel-3.7-osx64.tar.gz
echo "WS9Wine3.7-64bit" > usr/version
mv usr/ wswine.bundle
tar cf - wswine.bundle | ~/Library/Application\ Support/Wineskin/7za a -si WS9Wine3.7-64bit.tar.7z
mv WS9Wine3.7-64bit.tar.7z ~/Library/Application\ Support/Wineskin/Engines/

This comment has been minimized.

Copy link

Gcenx commented Mar 29, 2019

I wouldn’t bother with the WineskinEngineBuilder anymore even with the workarounds you mention here it won’t compile Wine-4.x.
Homebrew won’t allow that command if your above macOS Sierra.

EngineRepacking is integrated into both Unofficial Wineskin and PortingKit

At precent my project nor PortingKit are proving an updating build system, I’m working on 2 different systems but I don’t consider any of them ready for an end user.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.