Compiling Wine 32-bit for MacOS X 10.6+ without X11/XQuartz

Questions about Wine on macOS.
Locked
Icona
Newbie
Newbie
Posts: 3
Joined: Wed Sep 10, 2014 3:45 am

Compiling Wine 32-bit for MacOS X 10.6+ without X11/XQuartz

Post by Icona »

I'm trying to compile Wine to wrap a 32-bit Windows application so that it can be used on MacOS X systems from Snow Leopard up to Yosemite. I've successfully done this some time ago using X11, but now I'm trying to strip it away so that my company's customers do not need to download and install XQuartz.

I've tried many times to compile Wine and everything seems to be fine until I try to run the resulting application. There are two cases: if I compile Wine using Snow Leopard, the application does not even start on any system; if I compile on Mavericks, the application works correctly on Mavericks, but on any other system, application windows do not show any font.

This is the command I use to configure the makefile ($PREFIX is a custom folder on my desktop):

Code: Select all

./configure --verbose --without-x --prefix=$PREFIX --disable-win16 --disable-tests

I'm using the latest Wine development release, "1.7.26".
I've also installed the freetype library, compiling it using CFLAGS="-arch i386".


Is there anyone who successfully did it and can help me, please?


NB: unfortunately, I can NOT use any third-party application like WineBottler or Wineskin.
doh123
Level 8
Level 8
Posts: 1227
Joined: Tue Jul 14, 2009 1:21 pm

Re: Compiling Wine 32-bit for MacOS X 10.6+ without X11/XQua

Post by doh123 »

Why can't you use Wineskin? Already does this for you... same LGPL license as Wine. Even has WineskinX11 built in with no need for XQuartz.

Anyways, I get successful 10.6+ builds building currently on 10.8 using the old 10.6 SDK.
Here are some excerpts that may be useful from the build script for Wineskin engines... I think these are the main parts needed if I recall. I believe using the old SDK fixed a lot of issues for me (was a long time ago, but I still do it), as well as setting MACOSX_DEPLOYMENT_TARGET which Apple compilers will use.

export OSXVERSIONMIN="10.6"
export OSXSDK="/Developer/SDKs/MacOSX${OSXVERSIONMIN}.sdk"
export MACOSX_DEPLOYMENT_TARGET=${OSXVERSIONMIN}
export CFLAGS="-arch i386 -m32 -Os ${OSXSDK+-isysroot $OSXSDK} ${OSXVERSIONMIN+-mmacosx-version-min=$OSXVERSIONMIN}"
Icona
Newbie
Newbie
Posts: 3
Joined: Wed Sep 10, 2014 3:45 am

Re: Compiling Wine 32-bit for MacOS X 10.6+ without X11/XQua

Post by Icona »

Why can't you use Wineskin? Already does this for you... same LGPL license as Wine. Even has WineskinX11 built in with no need for XQuartz.
Because the resulting app would be way too big for the customers to be downloaded quickly. I must be able to compile only what I need to run the the Windows application.
Anyway, at the moment I want to compile Wine successfully, no matter how big it becomes.

Anyways, I get successful 10.6+ builds building currently on 10.8 using the old 10.6 SDK.
Here are some excerpts that may be useful from the build script for Wineskin engines... I think these are the main parts needed if I recall. I believe using the old SDK fixed a lot of issues for me (was a long time ago, but I still do it), as well as setting MACOSX_DEPLOYMENT_TARGET which Apple compilers will use.

export OSXVERSIONMIN="10.6"
export OSXSDK="/Developer/SDKs/MacOSX${OSXVERSIONMIN}.sdk"
export MACOSX_DEPLOYMENT_TARGET=${OSXVERSIONMIN}
export CFLAGS="-arch i386 -m32 -Os ${OSXSDK+-isysroot $OSXSDK} ${OSXVERSIONMIN+-mmacosx-version-min=$OSXVERSIONMIN}"
I'm sad to say that it didn't work. I tried to compile using these flags in 10.6, 10.8 and 10.9, but the resulting app always crashes on launch or does not show any font in the windows. Maybe I'm missing some dependencies that I thought were not mandatory.

Can you explain me step by step how to do it? All of the documentation for the MacOS X compiling seems to be a little outdated (as it says that X11/XQuartz is mandatory)..
doh123
Level 8
Level 8
Posts: 1227
Joined: Tue Jul 14, 2009 1:21 pm

Re: Compiling Wine 32-bit for MacOS X 10.6+ without X11/XQua

Post by doh123 »

There is a lot you can strip out of a Wineskin wrapper if you aren't using WineskinX11 to save space... but it runs more like a native Mac App with WineskinX11 than with the Mac Driver.

I only compile Wine for Wineskin, so things are slightly different, as i don't use a standard build location, all my dylibs and includes and such are all in different than normal locations... all my supporting libraries are built to run at /tmp/Wineskin, instead of /usr/local or /opt/local or whatever most other methods use. This is mainly to get around some X11 start up issues, since its easy to make a symlink in /tmp for a few milliseconds its needed.

If you have Wineskin Winery, and go to custom build an engine, and get it to download the latest engine base... you can go to ~/Library/Application Support/Wineskin/EngineBase and find the WineskinEngineBuild script thats used to do the build. Its sort of long, and most things you won't need for what your doing... but may lead to answers for what issues you're having.

I also have never tried building without X support. I see no reason to, even if you don't want to use X... maybe something is broken if you try to build without it.
Icona
Newbie
Newbie
Posts: 3
Joined: Wed Sep 10, 2014 3:45 am

Re: Compiling Wine 32-bit for MacOS X 10.6+ without X11/XQua

Post by Icona »

I wonder if there's really a chance to compile Wine without X11 as claimed. :roll:

Anyway, I've taken a look at your application (Wineskin) and I would like to say that it's really well done. :wink:
It's sad that I can not use it because I need to use my own wrapper as it doesn't open Wine only, it does other things as well. But I'll take a look at that script you told me.

In the meantime, thank you for your support. I really appreciate it. :)
Locked