Darwine: Running an SDL game

Open forum for end-user questions about Wine. Before asking questions, check out the Wiki as a first step.
Forum Rules
motorollin
Level 2
Level 2
Posts: 26
Joined: Thu Apr 23, 2009 7:23 am

Darwine: Running an SDL game

Post by motorollin »

Hi all

I'm trying to play the game "BOH" (http://www.bohthegame.com/) on OS X using Darwine. I downloaded 1.1.19 and dragged the Darwine folder to /Applications. Then I opened the BOH installer using WineHelper and installed the game. For some reason it put the installed files inside the WineHelper application bundle. When I tried to open the game's executable using WineHelper, it appeared in the Process Window then disappeared again, with no information entered in to the Wine Log. I tried moving the game's folder to ~/.wine/drive_c/Program Files/, but I still had the same problem.

The game is written using SDL and I'm wondering whether this is part of the problem. Any ideas anyone?

TIA
motorollin
Level 2
Level 2
Posts: 26
Joined: Thu Apr 23, 2009 7:23 am

Post by motorollin »

I tried setting WINEDEBUG to +all and running the game. Without this setting, the process ran for just a few seconds before quitting. With WINEDEBUG set to +all, it ran for several hours generating loads of entries in the log. The RAM usage ran to several GB. When I came back to it after dinner WineHelper had crashed.

Is there a lower level of debugging I could use which will give me the information I need without taking so long and eventually killing WineHelper? I read this page but I don't know which options will give me the information I need.
motorollin
Level 2
Level 2
Posts: 26
Joined: Thu Apr 23, 2009 7:23 am

Post by motorollin »

Ok, running from the command line from the directory in which the application is installed gets me further:

$ cd ~/.wine/drive_c/Program\ Files/BOH/
$ /Applications/Darwine/Wine.bundle/Contents/bin/wine BOH.exe

This causes a window to open with the title "SDL_app". The game does run in a window, but doesn't have SDL_app as the window title. The window is completely black, the keyboard has no effect, and the title music doesn't play. So the game doesn't seem to get further than opening its window.

The game does run under Wine in Ubuntu, so I'm really confused about what's going on!
James Mckenzie

Darwine: Running an SDL game

Post by James Mckenzie »

motorollin <[email protected]> wrote on April 23rd:
Ok, running from the command line from the directory in which the application is installed gets me further:

$ cd ~/.wine/drive_c/Program\ Files/BOH/
$ /Applications/Darwine/Wine.bundle/Contents/bin/wine BOH.exe

This causes a window to open with the title "SDL_app". The game does run in a window, but doesn't have SDL_app as the window title. The window is completely black, the keyboard has no effect, and the title music doesn't play. So the game doesn't seem to get further than opening its window.

The game does run under Wine in Ubuntu, so I'm really confused about what's going on!
Again, and again...OpenGL is BROKEN on any Mac. This means that MOST games that rely on OpenGL 1.3 functions will not run. If you start this game in a terminal window, like you did, you should see a line about broken OpenGL functionality.

You have three courses of action:
1. Get Crossover Games for Mac ($$$$)
2. Wait until XQuartz 2.3.3 is released which will ship with fixes and incorporation of OpenGL 1.3 functions (time).
3. Ping the programs author to create a Mac specific version of the game. (not likely but possible.)

Your choice at this point.

James McKenzie
austin987
Wine Developer
Wine Developer
Posts: 2383
Joined: Fri Feb 22, 2008 8:19 pm

Darwine: Running an SDL game

Post by austin987 »

On Thu, Apr 23, 2009 at 1:22 PM, James Mckenzie
<[email protected]> wrote:
motorollin <[email protected]> wrote on April 23rd:
Ok, running from the command line from the directory in which the application is installed gets me further:

$ cd ~/.wine/drive_c/Program\ Files/BOH/
$ /Applications/Darwine/Wine.bundle/Contents/bin/wine BOH.exe

This causes a window to open with the title "SDL_app". The game does run in a window, but doesn't have SDL_app as the window title. The window is completely black, the keyboard has no effect, and the title music doesn't play. So the game doesn't seem to get further than opening its window.

The game does run under Wine in Ubuntu, so I'm really confused about what's going on!
Again, and again...OpenGL is BROKEN on any Mac.  This means that MOST games that rely on OpenGL 1.3 functions will not run.  If you start this game in a terminal window, like you did, you should see a line about broken OpenGL functionality.

You have three courses of action:
1.  Get Crossover Games for Mac ($$$$)
2.  Wait until XQuartz 2.3.3 is released which will ship with fixes and incorporation of OpenGL 1.3 functions (time).
3.  Ping the programs author to create a Mac specific version of the game.  (not likely but possible.)
4. Use the XQuartz beta/rc

--
-Austin
motorollin
Level 2
Level 2
Posts: 26
Joined: Thu Apr 23, 2009 7:23 am

Re: Darwine: Running an SDL game

Post by motorollin »

Thanks for your reply.
James Mckenzie wrote: Again, and again...OpenGL is BROKEN on any Mac. This means that MOST games that rely on OpenGL 1.3 functions will not run. If you start this game in a terminal window, like you did, you should see a line about broken OpenGL functionality.
I don't think that's it. I don't think this game uses OpenGL, and I get no warning about it if I run from the terminal.
James Mckenzie wrote: You have three courses of action:
1. Get Crossover Games for Mac ($$$$)
It does exactly the same thing in Crossover Games :(
James Mckenzie wrote: 3. Ping the programs author to create a Mac specific version of the game. (not likely but possible.)
Actually, the author is quite open to the possibility. I am just looking in to an alternative just in case.
motorollin
Level 2
Level 2
Posts: 26
Joined: Thu Apr 23, 2009 7:23 am

Re: Darwine: Running an SDL game

Post by motorollin »

austin987 wrote: 4. Use the XQuartz beta/rc
Is that this?

http://xquartz.macosforge.org/trac/wiki/X112.3.2.1

Do I just download and install that and then use Darwine as normal?
motorollin
Level 2
Level 2
Posts: 26
Joined: Thu Apr 23, 2009 7:23 am

Post by motorollin »

Well, I installed XQuartz, reinstalled the game using Darwine from the command line, ran the game from the command line, and it worked. The game hung when I tried to actually start a game, so I restarted the whole machine thinking perhaps the different versions of X11/Xorg and Wine were getting muddled. When I tried to launch the game again, same black screen problem :?
ryan woodsmall

Darwine: Running an SDL game

Post by ryan woodsmall »

You'll need the latest release candidate version of Xquartz. It is
not currently in release - consider it beta software:

http://static.macosforge.org/xquartz/do ... .3_rc5.dmg

Again, in big red letters: beta. If the game uses DirectX or OpenGL,
only the latest Xquartz RCs will work. Is there a demo of the game
available?

ryan woodsmall
[email protected]


"Be well, do good work, and keep in touch." - Garrison Keillor




On Apr 23, 2009, at 2:03 PM, motorollin wrote:
austin987 wrote:
4. Use the XQuartz beta/rc
Is that this?

http://xquartz.macosforge.org/trac/wiki/X112.3.2.1

Do I just download and install that and then use Darwine as normal?



ryan woodsmall

Darwine: Running an SDL game

Post by ryan woodsmall »

On Apr 23, 2009, at 1:39 PM, Austin English wrote:
4. Use the XQuartz beta/rc

--
-Austin
New, final Xquartz 2.3.3 literally *just* released ;)

http://xquartz.macosforge.org/downloads/X11-2.3.3.dmg

ryan woodsmall
[email protected]


"Be well, do good work, and keep in touch." - Garrison Keillor
motorollin
Level 2
Level 2
Posts: 26
Joined: Thu Apr 23, 2009 7:23 am

Post by motorollin »

Thanks Ryan. Sadly no demo available. I have just installed rc5 of XQuartz but it made no difference (same black window). Just to check I'm doing it right, do I just install the XQuartz package then do this:

$ cd ~/.wine/drive_c/Program\ Files/BOH/
$ /Applications/Darwine/Wine.bundle/Contents/bin/wine BOH.exe

Is it worth trying the final XQuartz 2.3.3, or is it unlikely to make any difference?
ryan woodsmall

Darwine: Running an SDL game

Post by ryan woodsmall »

Can't speak for Darwine - I've only used locally-compiled Wine from
source.

Regarding the final Xquartz 2.3.3 release, it looks like the gun was
jumped a bit. It requires Mac OS X update 10.5.7, which is not yet in
final seed. So we'll have to wait for that. I doubt very much that
the final release will change anything, particularly with Darwine.
You might have better luck compiling the MacPorts package - the "wine-
devel" port is v1.1.19, which is the latest... until tomorrow, when
1.1.20 will probably come out.

I've been meaning to write up a recipe for compiling Wine from source
on Mac OS X, but I've been somewhat busy IRL. With Xquartz 2.3.3
imminent, it might be high time to do it.

ryan woodsmall
[email protected]


"Be well, do good work, and keep in touch." - Garrison Keillor




On Apr 23, 2009, at 4:36 PM, motorollin wrote:
Thanks Ryan. Sadly no demo available. I have just installed rc5 of
XQuartz but it made no difference (same black window). Just to check
I'm doing it right, do I just install the XQuartz package then do
this:

$ cd ~/.wine/drive_c/Program\ Files/BOH/
$ /Applications/Darwine/Wine.bundle/Contents/bin/wine BOH.exe

Is it worth trying the final XQuartz 2.3.3, or is it unlikely to
make any difference?
motorollin
Level 2
Level 2
Posts: 26
Joined: Thu Apr 23, 2009 7:23 am

Post by motorollin »

@ryan
I have just downloaded the wine-1.1.19 sources. They compiled, built and installed successfully on my Leopard MacBook straight away. I ran winecfg, then ran BOH with that version of Wine. The game ran successfully and I saw the menu and heard the title music. I was able to configure the controls, but when I tried to start a game it froze. I have tried this several times with the same effect each time.

There are lots of errors in the terminal window saying things like "err:font:XFONT_BuildMetrics failed to load -misc-thonburi-medium-r-normal--100-*-100-100-p-0-koi8-r", and finally "Font metrics: 100.0% done". There are no further messages after this point :?

This is using XQuartz 2.3.3_rc5 (xorg-server 1.4.2-apple41).
ryan woodsmall

Darwine: Running an SDL game

Post by ryan woodsmall »

Did you just run a "./configure" and then make and install Wine, or
did you specify any options? Wine is in your path, correct - /usr/
local/bin by default? If you could, try to start it with:

export DYLD_FALLBACK_LIBRARY_PATH="/usr/X11/lib"
cd ~/.wine/drive_c/path/to/game
wine programname.exe

Does that get you any further?

ryan woodsmall
[email protected]


"Be well, do good work, and keep in touch." - Garrison Keillor




On Apr 24, 2009, at 3:15 AM, motorollin wrote:
@ryan
I have just downloaded the wine-1.1.19. They compiled, built and
installed successfully on my Leopard MacBook straight away. I ran
winecfg, then ran BOH with that version of Wine. The game ran
successfully and I saw the menu and heard the title music. I was
able to configure the controls, but when I tried to start a game it
froze. I have tried this several times with the same effect each time.

There are lots of errors in the terminal window saying things like
"err:font:XFONT_BuildMetrics failed to load -misc-thonburi-medium-r-
normal--100-*-100-100-p-0-koi8-r", and finally "Font metrics: 100.0%
done". There are no further messages after this point :?



motorollin
Level 2
Level 2
Posts: 26
Joined: Thu Apr 23, 2009 7:23 am

Post by motorollin »

I just did ./configure then make and install. I used a guide on how to compile Wine on OS X Tiger (I'm using Leopard though) and that was pretty much all it said, apart from satisfying dependencies. Should I have specified some options?

My path is as follows:

/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin

Does that look ok?

I have deleted the version I compiled myself to try another one, so will recompile it and try what you suggested. Also, could you confirm I'm using the correct sources? I downloaded from here:

http://sourceforge.net/project/showfile ... e_id=77449

When that didn't work, I tried using the Darwinports version, but that just gave me the good old black screen again.
ryan woodsmall

Darwine: Running an SDL game

Post by ryan woodsmall »

/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin
Path looks fine - that's the default.
I have deleted the version I compiled myself to try another one, so
will recompile it and try what you suggested. Also, could you
confirm I'm using the correct sources? I downloaded from here:
I normally grab the source from ibiblio.org, since it's wget-/curl-
friendly:

http://ibiblio.org/pub/linux/system/emu ... 19.tar.bz2

As far as dependencies, SDL might or might not be using some image
libraries in the background. I normally grab FreeType, jpeg, tiff,
libpng, libxml2 and libxslt, then compile those, THEN build Wine
against those libraries. This is a relatively involved process, of
course...

If you're building from MacPorts, make sure you're using the "wine-
devel" package. And before you do anything, make sure MacPorts itself
is up-to-date:

sudo port -v selfupdate

Note that MacPorts places itself at the beginning of your PATH, so
binaries in /opt/local (or wherever you install it) are used before
system binaries. That behavior can be changed in ~/.bash_profile or
equivalent.

ryan woodsmall
[email protected]


"Be well, do good work, and keep in touch." - Garrison Keillor
motorollin
Level 2
Level 2
Posts: 26
Joined: Thu Apr 23, 2009 7:23 am

Re: Darwine: Running an SDL game

Post by motorollin »

ryan woodsmall wrote: As far as dependencies, SDL might or might not be using some image
libraries in the background. I normally grab FreeType, jpeg, tiff,
libpng, libxml2 and libxslt, then compile those, THEN build Wine
against those libraries. This is a relatively involved process, of
course...
Ok, I'll try to build those libraries first. Would you be able to tell me the correct parameters to configure Wine? I really don't get configure ;)
ryan woodsmall wrote: If you're building from MacPorts, make sure you're using the "wine-
devel" package. And before you do anything, make sure MacPorts itself
is up-to-date:

sudo port -v selfupdate
Yep, I updated before I installed it.
ryan woodsmall wrote: Note that MacPorts places itself at the beginning of your PATH, so
binaries in /opt/local (or wherever you install it) are used before
system binaries. That behavior can be changed in ~/.bash_profile or
equivalent.
I found the binaries in /opt/local/bin, but as I said it didn't work. I (perhaps stupidly) installed MacPorts 'wine' first, then when that didn't work removed it and used MacPorts 'wine-devel'. Could that be why it didn't work?
James Mckenzie

Darwine: Running an SDL game

Post by James Mckenzie »

motorollin <[email protected]> wrote on April 24th:

ryan woodsmall wrote:
As far as dependencies, SDL might or might not be using some image
libraries in the background. I normally grab FreeType, jpeg, tiff,
libpng, libxml2 and libxslt, then compile those, THEN build Wine
against those libraries. This is a relatively involved process, of
course...
One suggestion: Grab the build environment from Mike Kronenberg. It includes all of these libraries and then you can build against XQuartz 2.3.3.

BTW, Wine 1.1.20 was released today as well.

James Mckenzie
ryan woodsmall

Darwine: Running an SDL game

Post by ryan woodsmall »

On Apr 24, 2009, at 1:17 PM, James Mckenzie wrote:
One suggestion: Grab the build environment from Mike Kronenberg.
It includes all of these libraries and then you can build against
XQuartz 2.3.3.

BTW, Wine 1.1.20 was released today as well.
Mike can keep Darwine ;) I'm a Linux admin by trade; building software
like Wine (and its dependencies) from source and running everything
from the terminal is simply more comfortable to me. I also use a
number of WINEPREFIXES, leave multiple versions of Wine installed for
testing and can easily build and install new deps without any issues.
Not very Mac-like, I know, but it works for me.

All the apps I use are up and running in 1.1.20 already - just
compiled and verified!

ryan woodsmall
[email protected]


"Be well, do good work, and keep in touch." - Garrison Keillor
motorollin
Level 2
Level 2
Posts: 26
Joined: Thu Apr 23, 2009 7:23 am

Post by motorollin »

@ryan
Any chance of a quick run-through of how you compiled it? TBH anything beyond './compile', 'make' and 'make install' is beyond me. I'm willing to learn, but there comes a point where I just want it working :wink:
James McKenzie

Darwine: Running an SDL game

Post by James McKenzie »

ryan woodsmall wrote:
On Apr 24, 2009, at 1:17 PM, James Mckenzie wrote:
One suggestion: Grab the build environment from Mike Kronenberg. It
includes all of these libraries and then you can build against
XQuartz 2.3.3.

BTW, Wine 1.1.20 was released today as well.
Mike can keep Darwine ;) I'm a Linux admin by trade; building software
like Wine (and its dependencies) from source and running everything
from the terminal is simply more comfortable to me. I also use a
number of WINEPREFIXES, leave multiple versions of Wine installed for
testing and can easily build and install new deps without any issues.
Not very Mac-like, I know, but it works for me.

All the apps I use are up and running in 1.1.20 already - just
compiled and verified!
Watch out, I'm a Solaris admin...

I like the fact that I can use packages on the Mac (they go by the name
of applications....)

The best part of using Mike's and Zach's builds is the Winehelper
application.

Anyway, thank you for the update. I'll have to see what Mike is going
to do now that XQuartz 2.3.3 is out. Hopefully this will fix running
dOOm on the Mac, finally.

James McKenzie
James McKenzie

Darwine: Running an SDL game

Post by James McKenzie »

motorollin wrote:
@ryan
Any chance of a quick run-through of how you compiled it? TBH anything beyond './compile', 'make' and 'make install' is beyond me. I'm willing to learn, but there comes a point where I just want it working [Wink]
Motorollin:

As Ryan stated, you have to follow the instructions. I use Mike
Kronenberg's build environment and will ask him what the .plan is for
XQuartz 2.3.3 and if he plans on using it. There are several fixes out
for video problems on the Mac with Wine.

One suggestion, can you try using CrossOver Office for Mac with this
game? I found that dOOm would not runn very well on CrossOver Game for
the Mac 7.1. I don't know why this is so, but that is what happens here.

James McKenzie
motorollin
Level 2
Level 2
Posts: 26
Joined: Thu Apr 23, 2009 7:23 am

Re: Darwine: Running an SDL game

Post by motorollin »

James McKenzie wrote: As Ryan stated, you have to follow the instructions.
The only instructions I can find are the README in wine-1.1.19. This basically states that you have to run tools/wineinstall, and that you need XCode >= 2.4 to compile properly on a Mac. I have done all this but it still doesn't work. Are there some more instructions I should be looking at? I'm still confused about the business of linking to XQuartz. Do I need to tell it to do that, or will it happen automatically?
James McKenzie wrote: I use Mike
Kronenberg's build environment
Is that from http://www.kronenberg.org/darwine/ ? All I can find there is binaries.
James McKenzie wrote: There are several fixes out
for video problems on the Mac with Wine.
Again, I have no idea how these should be incorporated in to a build of Wine.
James McKenzie wrote: One suggestion, can you try using CrossOver Office for Mac with this
game? I found that dOOm would not runn very well on CrossOver Game for
the Mac 7.1.
I have tried the latest versions of Crossover Mac and Crossover Games but both have the same problem.
James McKenzie

Darwine: Running an SDL game

Post by James McKenzie »

motorollin wrote:
James McKenzie wrote:
As Ryan stated, you have to follow the instructions.
The only instructions I can find are the README in wine-1.1.19. This basically states that you have to run tools/wineinstall, and that you need XCode >= 2.4 to compile properly on a Mac. I have done all this but it still doesn't work. Are there some more instructions I should be looking at? I'm still confused about the business of linking to XQuartz. Do I need to tell it to do that, or will it happen automatically?


James McKenzie wrote:
I use Mike
Kronenberg's build environment
Is that from http://www.kronenberg.org/darwine/ ? All I can find there is binaries.
Look very carefully at the page. There is a link to the right of the
devel/unstable that lists the build env (unstable/1.1.X/build env).
Download that file to your system. It is a bzip compressed folder with
all of the items that Mike uses to build Wine for MacOSX.

Once unbzipped, you should look in the folder. There is one shell
script (.sh) file that you can use to build your own Darwine.

James McKenzie
motorollin
Level 2
Level 2
Posts: 26
Joined: Thu Apr 23, 2009 7:23 am

Post by motorollin »

Ah, thanks! Is there any benefit to building that myself, or is it likely to perform the same as the binary? Also, do I have to do anything to make it build against XQuartz, or will that happen automatically?
Locked