Register an account now to get access to all board features. After you've registered and logged in, you'll be able to create topics, post replies, send and receive private messages, disable the viewing of ads and more!

Building EDuke32 on Mac OS X

First of all thanks for eduke. I have been a long time user on windows but now i'm on a mac and the mac builds are a bit behind. I have built linux apps from source before but I am not very good at finding out what went wrong during a build. If anyone can help me discover what went wrong it would be greatly appreciated. Below it what I get when compiling from the latest source.

I assume you know about http://www.spam-filt...eduke32_on_os_x ?
You can try contacting rhoenie through this site or just drop by #eduke32 and ask him directly, he should be able to help you with OSX-related matters.

For my OSX build, I have SDLMain.m and SDLMain.h in the root eduke32 directory. Those files ship with the SDL libs on OSX, IIRC.

Wait... you've been compiling eDuke32 for OS X? Why haven't you been releasing your builds then. Rhoenie doesn't build them every often and hasn't done a build since March. Also he has told me that he has the same problem I have with the sectors failing to draw after a while and he usually restarts the renderer whenever that happens but that's not the ideal solution in my opinion especially since it seems that makes it even more leak'ey or something. I've been waiting for some Mac specific fixes especially since I can't get eDuke32 running via WINE so it's either the native version or nothing.

I think Rheonie is just too busy to do timely builds.

Also what would be great is if we could have an auto-build system that does it for the various platforms eDuke32 is on similar to what the doomsday and darplaces people are doing.

--Tetsuo

It's funny how the colors of the real world only seem really real when you viddy them on the screen. -- Alex Delarge, A Clockwork Orange

Also what would be great is if we could have an auto-build system that does it for the various platforms eDuke32 is on similar to what the doomsday and darplaces people are doing.

We do have such a thing, but it only cross-compiles (sorta) for Windows. You can blame Apple for that. Initially they took a perfectly sane gcc-based toolchain so you could cross-compile pretty much anything from Linux by just building their toolchain + patches for Linux (as described by eg. http://devs.openttd....ple-darwin9.txt). However with time they moved more and more of their proprietary logic into binary-only modules (such as the linker) that you can only run on OSX, preventing you from targetting any remotely recent version of OSX from Linux cross-builds, or doing any sort of universal binaries since their binary format for that is only known by their closed-source binary tools that they patched GCC to invoke directly. Basically they took the GNU toolchain for free and then proceeded to fuck it like a little bitch.

I tried doing cross-builds from Linux and produced an almost-working binary with a few patches, but that work has been lost in time, and it couldn't take advantage of any of the more recent OSX versions.

Then now is lordhavoc doing it for Darkplaces? Pretty much every auto build on his site has a mac app bundled along with the windows and linux executables and associated libraries in the zip file. Same thing with doomsday and the dolphin emulator although 1) I don't know if they are true autobuilds or not.... as in someone does it manually every time and 2) they are packaged seperately although that makes sense as when I download a darkplaces auto-build I throw away everything but what I need so it'd be a smaller download if I didn't have to download it all.

--Tetsuo

It's funny how the colors of the real world only seem really real when you viddy them on the screen. -- Alex Delarge, A Clockwork Orange

Thanks guy. I will get in contact with rhoenie but i Think i may have succedded. At least a little I got a complete build after putting SDLMain.m and SDLMain.h in the directory with the source files. Thanks Helixhorned. I'm still getting a bit of errors during the complie but i dont know if they will effect they will have as the app actually seems to run ok. I'm not sure how to make it a full eduke32.app so i stuck the resulting eduke32 and mapster32 files into the existing build. I would like to upload it for any mac users to test because if it works ok i can periodically compile it for the mac users, but I am unsure of the file linking rules of this board and don't want to get in trouble. So what would be the best way to distribute this.

Sh*t theres no music. Got some errors in edukes log
Initializing music...
Error: couldn't open any of the following files:
/etc/timidity/freepats.cfg
/etc/timidity/timidity.cfg
/etc/timidity.cfg
Error: couldn't open any of the following files:
/etc/timidity/freepats.cfg
/etc/timidity/timidity.cfg
/etc/timidity.cfg
S_MusicStartup(): failed initializing

That has to do with the MIDI music. Timidity is a MIDI music library and related to\a part of SDL mixer. You may have to download that timidity stuff from here: http://www.libsdl.or...ects/SDL_mixer/
I installed it a while back on my system here.

On the other hand there are some music packs you can download which in my opinion sound better than MIDI.

--Tetsuo

It's funny how the colors of the real world only seem really real when you viddy them on the screen. -- Alex Delarge, A Clockwork Orange

How do you know that Darkplaces OSX builds are cross-compiled? If he runs OSX on a server somewhere on a VM it's trivial to get builds, the problematic part is cross-compiling from Linux. I have no intention of giving money to Apple or supporting them in any shape or form, so unless I can cross-compile from the server that runs our synthesis builds I'll pass.

How do you know that Darkplaces OSX builds are cross-compiled? If he runs OSX on a server somewhere on a VM it's trivial to get builds, the problematic part is cross-compiling from Linux. I have no intention of giving money to Apple or supporting them in any shape or form, so unless I can cross-compile from the server that runs our synthesis builds I'll pass.

You're right I don't know. All I know is OS X builds show up virtually every time it's auto-compiled. How he accomplishes this is unknown to me.

So if you don't want to support Apple in any way shape or form why not end this now and say you don't support OS X and block or disable it being compilable on OS X? The OS X build has issues and fixes don't seem to be forthcoming from my point of view (no one has acknowledged any of the problems I have mentioned before) and obviously it's not a priority for you. I'm saying this because you seem to begrudgingly support it on OS X... why did you decide to support it in the first place?

--Tetsuo

It's funny how the colors of the real world only seem really real when you viddy them on the screen. -- Alex Delarge, A Clockwork Orange

Wait... you've been compiling eDuke32 for OS X? Why haven't you been releasing your builds then. Rhoenie doesn't build them every often and hasn't done a build since March. Also he has told me that he has the same problem I have with the sectors failing to draw after a while and he usually restarts the renderer whenever that happens but that's not the ideal solution in my opinion especially since it seems that makes it even more leak'ey or something. I've been waiting for some Mac specific fixes especially since I can't get eDuke32 running via WINE so it's either the native version or nothing.

I simply didn't know that there's demand, assuming that OSX users build it themselves. What are those sector glitches, and which renderer do they occur in?

Sebastian, on 12 June 2011 - 03:26 PM, said:

Whoa hey, I can use Mapster (or just Build?) on OSX?

Mapster32 should work fine, though if you're on a laptop things can get tricky since the editor expects all sorts of funny keys to be present.

@CraZyP: Have you tried using an external command-line MIDI player? You can set it with an environment variable (see wiki).

The sector problems happen in Polymer after a while playing it with Polymer on the sectors outside the one you are ins stop drawing and instead you see the skybox.... currently the only way to "fix" it is to restart the renderer. So currently I have a key bound to restartvid and whenever I notice the level not drawing outside the area I'm in and I'm just seeing the skybox I hit that key. There was a problem previous to that where the ambient lighting was rendered in reverse which was fixed around 10.6.4 with its graphics drivers so the same thing may hold true with this glitch although no other games exhibit the problem and they ALL run in OpenGL on here even the Direct3D ones (get translated to OpenGL).

BTW one other long standing bug in the OS X version is backspace (delete on the mac keyboard) doesn't work in the console or other places in the UI.

BTW, he shouldn't need to install an external command-line MIDI Player and change the environment variable. Installing TIMIDITY worked fine for me and not finding the config file for it is all his error was referencing anyway. Installing TIMIDITY fixes that.

--Tetsuo

It's funny how the colors of the real world only seem really real when you viddy them on the screen. -- Alex Delarge, A Clockwork Orange

Alright, here come the OSX binaries for x86 and x86_64. (shasum: c210b009a84f9685c33574d5370f1139467d217c). The x86 version is there because I expected classic to run faster with the asm compiled in, but strangely I didn't notice any speedup.

@mappers on laptops: how do you handle the absence of keypad keys and the like? Do you use some software to remap the existing ones, or do you simply not map there?

edit: I forgot to package the debug builds, but since I assume that only people with installed dev tools are interested in those (and moreover are able to compile their own), I'm leaving them out for the moment.

My finding are on the plus side the frame rate is still good if not better. So one thing I can say is I'm not having the performance problems others have been talking about here no lag or anything just fast frame rates and smooth gameplay.

However (and I hate to say it) the problem I was talking about earlier still persists and now when it happens and I try to restart the renderer it locks up and I have to kill the application\force quit it. There's no errors in the log file or anything it seems. Anyway here's a couple of screenshots of when the problem is happening.

I don't have any Macs myself, but I want Mac users to be able to run my mods. What can I include for Mac users that would make my mod start with certain command lines? For Windows, I include .bat files. For example, here is the .bat for WGR2:

The GUI for loading mods doesn't yet work in OS X however if it allows command line arguments to be passed along which it should (I have launched mods for Doom 3 that way). One could probably make an applescript with a line such as:

Although personally I've never done it like that I usually would go into the .app bundle and run the executable inside directly with the arguments rather than trying to pass them onto the app bundle. So I would have to download one of your mods and test that out for myself before I can be certain it would work and then make the applescript and save it as an application. The only other problem with that example I dug up is it'd be hard coded to a path and I don't like that.

--Tetsuo

It's funny how the colors of the real world only seem really real when you viddy them on the screen. -- Alex Delarge, A Clockwork Orange

wgr.sh wouldn't be double clickable you'd have to open your terminal cd to the directory and launch it via ./wgr.sh if you are going to be in the terminal you may as well just launch it from there... an applescript would be double clickable like an application... people also don't edit their $path like that in OS X.... you can't make such assumptions...

DeeperThought your WGR mod is on that page to download right? I'm downloading it now to see what I can come up with.

--Tetsuo

It's funny how the colors of the real world only seem really real when you viddy them on the screen. -- Alex Delarge, A Clockwork Orange

Alright, here come the OSX binaries for x86 and x86_64. (shasum: c210b009a84f9685c33574d5370f1139467d217c). The x86 version is there because I expected classic to run faster with the asm compiled in, but strangely I didn't notice any speedup.

Sounds cool, but how do I actually fire up Mapster?

Helixhorned, on 17 June 2011 - 05:31 AM, said:

@mappers on laptops: how do you handle the absence of keypad keys and the like? Do you use some software to remap the existing ones, or do you simply not map there?

Open up a terminal, 'cd' into the directory you where copied the binaries, and './mapster32'. Probably not the OSX way to do it, but for that you'll have to ask someone more knowledgeable than me. The archive contains just the raw binaries without any bundles and whatnot.

In order to launch mapnster32 like a normal OS X application it'd have to be put into a .app bundle... that is a folder with a specific structure that when double clicked launches like an executable but contains all the files the application needs within. Same thing with eDuke32... rhoenie offers some .app bundles which work and you can replace the executables inside to keep them up to date.... although he doesn't offer one up for mapster32... also launching it doesn't work at all it looks like it's looking for some mac specific gui files (.nib files) and is crashing when it doesn't find them so even if you launch the executable directly which you can do even double clicking on it.. it doesn't work.

--Tetsuo

It's funny how the colors of the real world only seem really real when you viddy them on the screen. -- Alex Delarge, A Clockwork Orange