Jump to content
The Dark Mod Forums

building under Mac OS X?


malex984

Recommended Posts

Welcome karlfox! Thanks for your interest in testing TDM under OSX.

I would assume that you might need to checkout the drkmod SVN repo, which is rather huge to share in any other way...

Other than that I could of course share my binaries directly but

1. they will be probably useless without that checkout(?)

2. being new here I would rather wait somebody from the TDM team to state their preferences concerning this. Guys?

 

A quick "peep" from this corner-- we'll obviously defer to New Horizon on this, but if it's easier to share source and have me compile it, that's also fine. I'm in research physics, so compiling/linking/patching is nothing new (I just don't have your depth of knowledge to package things nicely; my code works, but it tends to be ugly). Cheers!

  • Like 1
Link to comment
Share on other sites

 

 

A quick "peep" from this corner-- we'll obviously defer to New Horizon on this, but if it's easier to share source and have me compile it, that's also fine. I'm in research physics, so compiling/linking/patching is nothing new (I just don't have your depth of knowledge to package things nicely; my code works, but it tends to be ugly). Cheers!

Well, sharing binaries is not a problem, provided TDM team lets me do that, Guys?

 

Besides, @New Horizon, if you have the darkmod svn access - I put universal binaries there some time ago - it would be nice if somebody other than me tries them out...

Link to comment
Share on other sites

 

 

A quick "peep" from this corner-- we'll obviously defer to New Horizon on this, but if it's easier to share source and have me compile it, that's also fine. I'm in research physics, so compiling/linking/patching is nothing new (I just don't have your depth of knowledge to package things nicely; my code works, but it tends to be ugly). Cheers!

 

Besides, there will be several issues of compiling TDM under OSX from the current SVN sources as I did not committed my fixes there yet since I was trying to fix the filesystem/path related parts.

I can of course provide a patch to be applied on top of current SVN.

Link to comment
Share on other sites

I can of course provide a patch to be applied on top of current SVN.

 

That would be really useful.

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

Link to comment
Share on other sites

Ok, my patch is on ftp now: http://ftp.thedarkmo...tation.patch.7z

 

If it is ok, i can submit it to darkmod_src, but i am no sure since i have heard it to be frozen now...?

 

Note: the patch TDM is tested on Mac OS X 10.6.8 using Xcode 3.2.6 + SDK for 10.6 with gcc 4.2)

 

Running the following commands produce universal dynamic library 'game.dylib' and application bundle 'Doom 3.app/' in created directory: 'sys/osx/build/Release'

 

cd sys/osx/
xcodebuild -project Doom3.xcodeproj 'ARCHS=i386 ppc' -configuration Release -sdk macosx10.6

 

For debug build use "-configuration Debug" (results will be in sys/osx/build/Debug)

 

Note: using "-sdk macosx10.5" (for minimal required OSX 10.5) required me to rebuilding libcurl for example with the following configuration:

env MACOSX_DEPLOYMENT_TARGET=10.5 CFLAGS="-m32 -arch i386" LDFLAGS="-m32 -arch i386" ./configure --disable-ldap --without-libidn --without-zlib --without-ssl --enable-hidden-symbols --disable-shared --disable-debug --disable-dependency-tracking

(and the same for ppc + combining universal binaries as per your wiki)

 

due to the following error

Undefined symbols:
 "_fopen$UNIX2003", referenced from:
  _Curl_cookie_output in libcurl.a(cookie.o)
  _Curl_cookie_init in libcurl.a(cookie.o)
  _file_do in libcurl.a(file.o)
  _file_do in libcurl.a(file.o)
  _Curl_parsenetrc in libcurl.a(netrc.o)
  _readfromfile in libcurl.a(formdata.o)
  _Curl_getFormData in libcurl.a(formdata.o)
ld: symbol(s) not found
collect2: ld returned 1 exit status

Link to comment
Share on other sites

Beside the minimal-changeset patch from above I am prepearing another one with some further modifications to path-related functions and fixes to idlib itself which might be good for TDM in general, but IMHO it would be better to test them on Linux and windows beforehand...

 

 

Link to comment
Share on other sites

I can't comment on the technical contents of the patch. greebo was able to build it for 1.07, so he knows more than I do about the build.

 

My interest would be:

 

1 - Does it build w/o errors?

2 - Have Mac TDM users tested it?

3 - How does tdm_update handle the *.app bundle?

 

I would have to deal with #3, and I won't be looking at it for a while.

 

The source code is frozen for 1.08, which is in its own branch.

 

Once someone's perused the patch, you can commit it to the trunk, even before we've released 1.08. We'll have to figure out how to do a TDM 1.08-based package just for Mac after the 1.08 Windows and Linux versions are released, since we're not holding 1.08 for the Mac version.

Link to comment
Share on other sites

1 - Does it build w/o errors

Yeah it does for me, but it depends on used gcc (Xcode) and SDK versions due to the way

how the static libraries boost and curl were build, as I reported at the very beginning :(

 

Do you know *exactly* which libcurl version is being used?

 

The source code is frozen for 1.08, which is in its own branch.

 

Once someone's perused the patch, you can commit it to the trunk, even before we've released 1.08. We'll have to figure out how to do a TDM 1.08-based package just for Mac after the 1.08 Windows and Linux versions are released, since we're not holding 1.08 for the Mac version.

Well, you could point users to an additional patch if you are against incorporating it into the official 1.08...

Link to comment
Share on other sites

 

 

Happy to test on a Mac 10.5 system if getting a hold of the 1.08 branch isn't too much of a hassle. Let me know-- I've got this thread subscribed.

 

As I said i can easily provide Mac OS X binaries (and they are already In darkmod repo) but suspect that they will probably be useless without recent data files... no?

Link to comment
Share on other sites

1 - Does it build w/o errors?

2 - Have Mac TDM users tested it?

 

Please note that my patch is minimal one to let one to build TDM - the resulting binary may not do everything one expects.

Therefore I'd advise testes to use binaries from darkmod SVN where I made some path&framework-related (quick-and-dirty + only for testing on Mac OS X) changes, or just wait a bit for another correcting patch, which I guess I will produce only after a good look at the final official 1.08 data files structure, e.g. on Linux.

Link to comment
Share on other sites

  • 2 weeks later...

I am having a bit of unexpected trouble running TDM on OSX: i needed to correct doom.script but it still fails to set player data due to a dictionary memory corruption while loading a map (rain.map from darkmod resources repo) :-(

 

Maybe instead of using the most recent trunk sources I really have to use the 1.8 branch?

Do you still have sources for the recently updated version of boost in trunk, so that I could update macosx OSX binaries without touching headers as well?

 

Besides, the downloadable current official tdm_update.macosx is supposed to prove the same recent data files under OSX as one would get by updating now under Linux, right?

Link to comment
Share on other sites

Maybe instead of using the most recent trunk sources I really have to use the 1.8 branch?

 

Yes.

 

Do you still have sources for the recently updated version of boost in trunk, so that I could update macosx OSX binaries without touching headers as well?

 

Perhaps greebo can answer that.

 

Besides, the downloadable current official tdm_update.macosx is supposed to prove the same recent data files under OSX as one would get by updating now under Linux, right?

 

Right.

  • Like 1
Link to comment
Share on other sites

  • 1 month later...
  • 2 weeks later...

When I asked that same question in the public forums, back before we released 1.08, no one replied. Then one new member said he'd just found TDM and was running it (version 1.07) on OSX.

 

So while there might be a small handful of people interested in OSX, AFAIK there's been no outpouring of interest in it. At least no one's speaking up on the forums.

Link to comment
Share on other sites

oh, well... i'd like somebody else to try running the build which works for me just in order to make sure that it doesn't contain any implicit assumptions/dependencies about the host setup... but if nobody is up to it - i guess i will try to find out which of my experiments where unnecessary and prepare a minimal patch which would be immediately useable without any unusual fingering.

Link to comment
Share on other sites

This thread:

 

http://forums.thedarkmod.com/topic/14339-graphical-darkmodinstaller-for-mac-os-x-or-linux/

 

about making a graphical installer for mac and linux had a ton of activity recently so I bumped

the thread here to try and get you and freyk to work with each other.

 

As soon as I bumped the thread, freyk was not heard from...

Please visit TDM's IndieDB site and help promote the mod:

 

http://www.indiedb.com/mods/the-dark-mod

 

(Yeah, shameless promotion... but traffic is traffic folks...)

Link to comment
Share on other sites

here it goes: http://ftp.thedarkmo...OSX10_6_i386.7z

 

edit:

Oh, well... OSX10_6_i386.7z can now be found on http://www.mydrive.ch (login: "darkmod@malex984", Password: "darkmod").

 

unpack it into your "$HOME/Library/Application Support/Doom 3/",

update TDM (for instance using tdm_update.macosx),

copy over the contents of darkmod/debug/ or darkmod/release/ into "$HOME/Library/Application Support/Doom 3/darkmod"

 

now you should have the required layout:

 

~/Library/Application Support/Doom 3/darkmod:
 TDM.app/
 tdm_game03.pk4
 currentfm.txt  
 gdb.sh	// just for convenience of running gdb upon TDM.app
 tdm_update.macosx
 fms/...

~/Library/Application Support/Doom 3/base:   // (recommended)
 pak00*.pk4

 

Openning 'gdb.sh' in Terminal.app will run TDM.app under GNU debugger (also works with release binaries but with less details)

 

ps: it is quite a miracle that i managed to produce somewhat playable (at least on 'outpost' fms) binaries since i believe now that my Unix approach was wrong since D3 appears to use Windows approach to dynamic linking :(

Therefore, it would be great if someone runs and manages to start playing, but be wary that these binaries are VERY unstable and crashes are to be expected :-)

 

pss: does anybody have a good idea about the communication between D3 and game? shared global data? dynamic linking of game?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recent Status Updates

    • Petike the Taffer

      I've finally managed to log in to The Dark Mod Wiki. I'm back in the saddle and before the holidays start in full, I'll be adding a few new FM articles and doing other updates. Written in Stone is already done.
      · 1 reply
    • nbohr1more

      TDM 15th Anniversary Contest is now active! Please declare your participation: https://forums.thedarkmod.com/index.php?/topic/22413-the-dark-mod-15th-anniversary-contest-entry-thread/
       
      · 0 replies
    • JackFarmer

      @TheUnbeholden
      You cannot receive PMs. Could you please be so kind and check your mailbox if it is full (or maybe you switched off the function)?
      · 1 reply
    • OrbWeaver

      I like the new frob highlight but it would nice if it was less "flickery" while moving over objects (especially barred metal doors).
      · 4 replies
    • nbohr1more

      Please vote in the 15th Anniversary Contest Theme Poll
       
      · 0 replies
×
×
  • Create New...