Jump to content

  • Log in with Facebook Log in with Twitter Log In with Google      Sign In   
  • Create Account

Tutorial info

  • Added on: Sep 05 2017 03:16 PM
  • Date Updated: Sep 05 2017 03:18 PM
  • Views: 2741

* * * * *
0 Ratings

Compile from source on MacOS 10.12.x

Updated instructions on compiling your own Wineskin engines.

Posted by -------- on Sep 05 2017 03:16 PM
10.8 SDK


Guide for Compiling Your Own Engine (Applicable to macOS Sierra with 10.6 SDK)
  • Install Xcode and Developer Tools from Apple

  • Create the following folder in root partition


  • Put your SDKs the folder we have created in step 2

  • Install Wineskin Winery / Install Wineskin Wrapper / Install EngineBase

  • Put given files to


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

  • Install Homebrew and Cask (execute given commands below in terminal)

    /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
    brew tap caskroom/cask

  • Install Wine deps (execute given commands below in terminal)                    

    brew install $(brew deps wine) --universal

    brew install libxml2 --universal

  • Install XQuartz                    

    brew cask install xquartz

  • Install Clang 3.9 (download from llvm's website)                    


  • Create directory for building wine; for example:


  • Download staging version of wine as zip from here:


  • Extract downloaded archive and put it into each folder we have created in step 10                    

  • Optional Step for compiling on macOS Sierra with 10.6 SDK                    

                                    Thanks to ScoPezz for that, helped me out for finding the root cause of why wine builds were failing on macOS Sierra with 10.6 SDK. It's been caused due to absent of some stuff such as "strnlen", for more details:

                                    We need to patch following files (go to root of extract wine folder):


                                    after line 245 add:

    										size_t strnlen(const char *str, size_t max)															
    															const char *end = memchr (str, 0, max);
    															return end ? (size_t)(end - str) : max;


                                    after line 145 add

    										// Use this if strnlen is missing.										  
    										size_t strnlen(const char *str, size_t max)
    															const char *end = memchr (str, 0, max);
    															return end ? (size_t)(end - str) : max;

  • Open following .txt files under EngineBase and change lines appropriately                    


                                    Line 1 - Adjust path to extracted wine staging folder during step 10
                                    Line 2 - Give a name to your engine such as "wine-staging-x32-2.2"
                                    Line 5 - /Users/your-username/Library/Application Support/Wineskin/7za Change "your-username" it to yours
                                    Line 6 - Choose SDK for compiling wine. For example 10.6

                                    Do that for both wse-x32 and wse-x64 .txt files

  • Go to Xcode SDKs folder and create symlinks (execute give commands below in terminal for symlink for each SDK)                    

     sudo ln -s /Developer/SDKs/MacOSX10.6.sdk
     sudo ln -s /Developer/SDKs/MacOSX10.8.sdk
     sudo ln -s /Developer/SDKs/MacOSX10.11.sdk

  • Modify minimum applicable SDK version of Xcode: (open given .plist and change following line)                    

    "MinimumSDKVersion" change it to 10.6

  • Delete everything inside of these folders:

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

  • Open terminal and run following commands                    

    ~/Library/Application\ Support/Wineskin/EngineBase/W2.5.5v1EngineBase/wse-x32
    ~/Library/Application\ Support/Wineskin/EngineBase/W2.5.5v1EngineBase/wse-x64
Enjoy with your engines :P


You can enable CSMT on wine-staging as shown in picture below:

Posted Image
I finally took the time to sit down and follow this tutorial so I could start building my own engines again and I was a bit stumped as I was not able to get it to work.

I did a bit of research and now am building engines again. The tutorial was very useful however two steps I needed to augment a bit to get this to work....here's what I did

At this step....

brew install $(brew deps wine) --universal

I kept getting an error at the end saying the brew command needed an argument. I followed these steps...

brew install jpeg --universal
brew install jasper --universa
brew install libpng --universal
brew install libicns --universal
brew install libtiff --universal
brew install little-cms --universal
brew install libtool --universal
brew install gd --universal

Then I ran the

brew install libxml2 --universal

And just to absolutely certain, I decided to tun these last three commands...

brew reinstall $(brew deps libgphoto2) --universal
brew reinstall $(brew deps little-cms) --universal
brew reinstall $(brew deps wine) --universal

I received no errors this time when running the brew deps wine command

After that, I thought all was good, then I got errors while trying to build. After a bit of digging, I decided to dump the contents from:

Home/Library/Application Support/Wineskin/EngineBase/W2.5.5v1EngineBase/include
Home/Library/Application Support/Wineskin/EngineBase/W2.5.5v1EngineBase/lib


To complete that last step, you will need administrative privileges and you must also expose hidden folders to access

complete this by running this command in Terminal

defaults write com.apple.finder AppleShowAllFiles -bool true ; killall Finder

to hide the folders again run this command after the previous step has been completed

defaults write com.apple.finder AppleShowAllFiles -bool false ; killall Finder

brew deps wine info I used can be found here:
  • Report
This tutorial is outdated, please do not use it anymore. I have been using MacPorts instead of Homebrew since years but was not able to find enough time for keeping that up-to-date.
  • Report
Powered by Tutorials 1.3.1 © 2021, by Michael McCune