Duke4.net Forums: Building EDuke32 on Mac OS X - Duke4.net Forums

Jump to content

  • 7 Pages +
  • 1
  • 2
  • 3
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

Building EDuke32 on Mac OS X

User is offline   CraZyP 

#1

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.

Spoiler


Edit by MB: I spoilered this because it rapes HScroll.

This post has been edited by Hendricks266: 24 May 2012 - 09:07 PM
Reason for edit: fixed name of source port

0

User is offline   Helixhorned 

  • EDuke32 Developer

#2

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.
0

User is offline   Plagman 

  • Former VP of Media Operations

#3

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.
0

User is offline   Tetsuo 

#4

View PostHelixhorned, on 12 June 2011 - 03:57 AM, said:

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.

This post has been edited by Tetsuo: 12 June 2011 - 02:45 PM

0

User is offline   Sebastian 

#5

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

User is offline   Tetsuo 

#6

No, not if you rely on what Rhoenie is doing you can't since he only compiles the eDuke32 and not mapster or build.
0

User is offline   Plagman 

  • Former VP of Media Operations

#7

View PostTetsuo, on 12 June 2011 - 02:27 PM, said:

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.
0

User is offline   Tetsuo 

#8

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.

This post has been edited by Tetsuo: 12 June 2011 - 04:18 PM

0

User is offline   CraZyP 

#9

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.


Here are the errors i'm still getting incase they are of any help.
Spoiler


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

This post has been edited by CraZyP: 12 June 2011 - 04:51 PM

0

User is offline   Tetsuo 

#10

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.

This post has been edited by Tetsuo: 12 June 2011 - 05:44 PM

0

User is offline   Plagman 

  • Former VP of Media Operations

#11

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.
0

User is offline   Hendricks266 

  • Weaponized Autism

  #12

We need a MINE, eh? It's a shame that cross-compiling is blocked in such a way even though both OSs share UNIX background.

This post has been edited by Hendricks266: 12 June 2011 - 06:29 PM

0

User is offline   Tetsuo 

#13

View PostPlagman, on 12 June 2011 - 06:11 PM, said:

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?

This post has been edited by Tetsuo: 12 June 2011 - 07:57 PM

0

User is offline   Hendricks266 

  • Weaponized Autism

  #14

View PostTetsuo, on 12 June 2011 - 07:44 PM, said:

So if you don't want to support Apple in any way shape or form

He's talking about buying their products. He would have to purchase a Mac or an OS X license for VM in order to compile them himself.

This post has been edited by Hendricks266: 12 June 2011 - 08:54 PM

0

User is offline   Helixhorned 

  • EDuke32 Developer

#15

View PostTetsuo, on 12 June 2011 - 02:27 PM, said:

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?

View PostSebastian, 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).
0

User is offline   Tetsuo 

#16

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. :dukecry: 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.

This post has been edited by Tetsuo: 14 June 2011 - 01:28 PM

0

User is offline   Helixhorned 

  • EDuke32 Developer

#17

I succeeded in compiling an x86 binary on a 64-bit host, but it's littered with null address references in all kinds of places, for example:

0012fd3f	leal	0xe8(%ebp),%eax
0012fd42	movl	%eax,(%esp)
0012fd45	calll	0x00148394	; symbol stub for: _CPSSetFrontProcess
0012fd4a	testw	%ax,%ax
0012fd4d	jne	0x0012fd67
0012fd4f	movl	0x06cb213c,%eax
0012fd54	movl	%eax,%edx
0012fd56	movl	0x06cb20c0,%eax
0012fd5b	movl	%eax,0x04(%esp)
0012fd5f	movl	%edx,(%esp)
0012fd62	calll	0x001486b8	; symbol stub for: _objc_msgSend
0012fd67	movl	0x00000000,%ebx    ; WTF?

; note, it's not $0x00000000 !!


Anyone have an idea what's up with that? I'm passing "-arch i386" to all stages.
0

User is offline   Helixhorned 

  • EDuke32 Developer

#18

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.

Edit 20150218: made URL invalid.
0

User is offline   Danukem 

  • Duke Plus Developer

#19

Great news for OSX users! Hopefully those binaries will be posted here: http://www.spam-filt...eduke32_on_os_x and/or on the EDuke32 site.
0

User is offline   Hendricks266 

  • Weaponized Autism

  #20

Since Helix is a eduke32 dev, perhaps Plagman could give him access so he could upload them to the dukeworld synthesis.

This post has been edited by Hendricks266: 14 February 2012 - 06:00 PM

0

User is offline   Tetsuo 

#21

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.

{Screenshot 1}
{Screenshot 2}
0

User is offline   Danukem 

  • Duke Plus Developer

#22

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:

EDuke32.exe -grpWGR2/WGR2.GRP -xWGR2GAME.con -game_dir WGR2
0

User is offline   Tetsuo 

#23

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:

do shell script "open -a /Applications/EDuke32.app -grpWGR2/WGR2.GRP -xWGR2GAME.con -game_dir WGR2"

using this one as an example:

do shell script "open -a /Applications/Firefox.app --args -P default -no-remote"

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.
0

User is offline   Danukem 

  • Duke Plus Developer

#24

Thanks for the reply, but I would definitely not want it hardcoded to a particular path. Surely there must be some solution?
0

User is offline   Helixhorned 

  • EDuke32 Developer

#25

Why not do it the *nix way, i.e. place
#!/usr/sh
eduke32 -gWGR2/WGR2.GRP -xWGR2GAME.con -game_dir WGR2

into something like wgr.sh, and assume that users have eduke32 in their $PATH?
0

User is offline   Tetsuo 

#26

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.

This post has been edited by Tetsuo: 20 June 2011 - 06:06 AM

0

User is offline   Sebastian 

#27

View PostHelixhorned, on 17 June 2011 - 05:31 AM, said:

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?

View PostHelixhorned, 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?

I plug in an external Windows keyboard whenever I map.

[Edit by Helixhorned 20150218: made URL in quote invalid.]
0

User is offline   Helixhorned 

  • EDuke32 Developer

#28

Revision 1911 is here (shasum: 4e458b8579eabb3702d1a12c408c8e9801e72d7d).


View PostSebastian, on 20 June 2011 - 10:54 AM, said:

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

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.

Edit 20150218: made URL invalid.
0

User is offline   Tetsuo 

#29

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.
0

User is offline   duke3d 

#30

Hi I'm having truble with running the read to run app for Eduke23 ever time i open it. it go's unresponsive

the OS i using is 10.4.11 the computer is a G5. so can you fix this problem

thax's Duke3d
0

Share this topic:


  • 7 Pages +
  • 1
  • 2
  • 3
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic


All copyrights and trademarks not owned by Voidpoint, LLC are the sole property of their respective owners. Play Ion Fury! ;) © Voidpoint, LLC

Enter your sign in name and password


Sign in options