Jump to content
The Dark Mod Forums

building under Mac OS X?


malex984
 Share

Recommended Posts

Hi Guys,

 

thanks for your hard work on TDM!

 

I'm a SW developer working mainly on Linux and have a lot of experience of building from sources on Linux and Mac OS X (including D3 and the current TDM).

 

After noticing http://bugs.angua.at/view.php?id=3227 I decided to join in and spend some time on fixing the building and running of TDM natively under Mac OS X.

 

If there is nobody else willing to do that, please, let me try.

 

Best Regards,

Alex

  • Like 2
Link to comment
Share on other sites

It's good that you saw that. I was pretty sure Mac support was gone for good, but if we can get a dedicated person working on it, there's hope for it yet.

What do you see when you turn out the light? I can't tell you but I know that it's mine.

Link to comment
Share on other sites

I can set you up as Contributor and give you access to SVN.

 

Thanks, I answered via PM.

 

It's good that you saw that. I was pretty sure Mac support was gone for good, but if we can get a dedicated person working on it, there's hope for it yet.

 

It would be motivating to know that there are people our there who would be interested in Mac support and could do a bit of beta testing (playing) once there is a beta to test...

Link to comment
Share on other sites

Hi guys,

 

Looks like i managed to produce 'game' and 'libgame.dylib' by adapting the existing scons scripts to work on my mac os x + doing some hand magic. Naturally i'm very suspicious of these first fruits...

 

Is there any quick (and maybe dirty) way to check the runtime without the original D3 data files?

 

Cheers,

Alex

 

 

Link to comment
Share on other sites

You took the sconscripts? Didn't the Xcode project files work? The Xcode projects do produce universal binaries, in case these are still important nowadays.

 

Sorry, I did not look at them properly yet (only for a bit of reference on lists of needed input sources, libraries and frameworks).

It's just that I used a *faster* and newer Mac machine via ssh and worked there from command line...

But I have been planning to try those Xcode project files next. I think one can do that from command line as well, right?

 

Besides, is there some absolute minimum set of data files just in order to check that the runtime for produced binaries?

Link to comment
Share on other sites

Besides, is there some absolute minimum set of data files just in order to check that the runtime for produced binaries?

Nope, you need a set of files from darkmod/, basic materials, defs, GUIs, scripts and such. It's probably faster to check out a full 1.08 copy from SVN.

 

I don't know Xcode well enough to be able to tell whether it's providing a command line interface. Xcode is using g++ in the background, but that's as far as my knowledge gets.

Link to comment
Share on other sites

Greebo, thank for pointing out your Xcode projects.

 

I don't know Xcode well enough to be able to tell whether it's providing a command line interface. Xcode is using g++ in the background, but that's as far as my knowledge gets.

 

Well, actually it tends to use clang nowadays, which also provides frontends linked under the usual names - gcc and g++ :/

The command I was looking for is xcodebuild. Using it I was able to produce 'Doom 3.app' and 'game.dylib' much more quickly than via scons. But my previous experience with the scons scripts helped me to resolve similar building problems.

 

Now I have two sets of built binaries to choose from =) Curiosly enough the both sets behave the same way.

 

I Noted that the static boost libraries committed to svn seems to be built with -fvisibility=default which leads to quite a problem on newer OS X and Xcode. I'd recommend rebuilding them with the same settings as used in the project.

 

Nope, you need a set of files from darkmod/, basic materials, defs, GUIs, scripts and such. It's probably faster to check out a full 1.08 copy from SVN.

 

Thanks. But please do warn about the size of such a checkout!

 

Besides, does it matter if I place it on fat32?

 

I checked it out under the name darkmod and put my 'Doom 3.app' alongside it.

Additionally I replaced the game.dylib in one of the pk4 data files with my versions of it.

 

Finally It runs: the GUI with ambient music and mission downloading seems to work!!!

 

It would be nice to check the play mode now. Can I force a mission loading and starting from the d3 console or via command line?

 

The problem is that I am having trouble installing (and therefore) playing any of downloaded maps.

Also the installation-relaunch hides the mouse pointer but shows again the starting launch dialog.

No matter what I do (I also tried running executables with the usual Doom arguments) - 'New Mission' never shows any mission being currently installed =(

Besides there are no visible items in the list of installed mission but I blindly click there and choose them anyway... Seems to be a missing font...

 

I also got similar effects while using the data files from my previous d3+tdm setup. But there I sometimes can see some of the currently downloaded missions.

 

 

As Demagogue said, its good that someone is looking at this. Im sure Greebo and the other coders welcome any extra coding help.

 

Well I will do whatever I can do.

 

Ps: I hope it's ok to post all of this Mac OS X specific stuff here (publicly)...?

The point is that I would like to attract the attention of interested Mac users and later on ask for their assistance in testing.

Link to comment
Share on other sites

As a side note: I found a reference to non-existing wiki page http://wiki.thedarkm...DM_Coding_Style on

http://wiki.thedarkm...ding_in_the_SDK

Was "TDM Coding Style" renamed or moved?

 

I don't think we ever got around to writing it :)

"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

I Noted that the static boost libraries committed to svn seems to be built with -fvisibility=default which leads to quite a problem on newer OS X and Xcode. I'd recommend rebuilding them with the same settings as used in the project.

I can look into rebuilding them, but it was a bit of a hassle. What kind of problems do they lead to exactly?

 

Thanks. But please do warn about the size of such a checkout!

Not a problem at all, that's why we have a dedicated server in the first place. Checkout as often as you want.

 

Besides, does it matter if I place it on fat32?

Except for the fact that FAT32 is a bit outdated and fragile, no, the filesystem should not be of importance.

 

Finally It runs: the GUI with ambient music and mission downloading seems to work!!!

 

It would be nice to check the play mode now. Can I force a mission loading and starting from the d3 console or via command line?

A mission download cannot be triggered through the console, but you can click yourself through the menus, or just run the training mission which needs to be mentioned in currentfm.txt, either by installing it through the menu GUI or by editing the currentfm.txt manually: it should contain training_mission.

 

Ps: I hope it's ok to post all of this Mac OS X specific stuff here (publicly)...?

The point is that I would like to attract the attention of interested Mac users and later on ask for their assistance in testing.

You can also push the binaries to SVN, the ones you have are better than what we have now (== nothing).

Link to comment
Share on other sites

A mission download cannot be triggered through the console, but you can click yourself through the menus, or just run the training mission which needs to be mentioned in currentfm.txt, either by installing it through the menu GUI or by editing the currentfm.txt manually: it should contain training_mission.

 

Note that you can also load a mission via the consola via:

 

map MAPNAMEHERE

 

Replace MAPNAMEHERE with the map name, e.g. "training_mission" (w/o quotes) or "test/window.map".

 

If you look into quick checks, you can also put the same command into a file called autocommands.cfg in your darkmod folder, everytime you launch TDM, it will execute the commands in there after loading the menu. Adding a "quit" as secone line would load the mission, then immidiately quit.

 

(If you want to get rid of that later, delete the file)

  • Like 1

"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

Note that you can also load a mission via the consola via:

 

map MAPNAMEHERE

 

Replace MAPNAMEHERE with the map name, e.g. "training_mission" (w/o quotes) or "test/window.map".

 

If you look into quick checks, you can also put the same command into a file called autocommands.cfg in your darkmod folder, everytime you launch TDM, it will execute the commands in there after loading the menu. Adding a "quit" as secone line would load the mission, then immidiately quit.

 

(If you want to get rid of that later, delete the file)

 

Thanks a lot! That did the trick. I can start and play any *map* with that!!!

 

Unfortunately I still cannot install or run any *mission*: even through currentfm.txt contains it (and it is present under fms/ directory) - there is no currently installed mission detected by "New Mission" starting screen...

 

Moreover even. "map MISSION" did not work - although I can list all the maps (with TAB) - no missions can be seen there.

 

It seems that some search locations are wrong... Do you have a list of conventions for resource search locations? Can I view them via console?

I would guess that TDM get confused by $HOME/Library/Application Support/Doom 3 even after I emptied it.

 

Beside that I noticed textures missing on some maps (I only tried test/tree, rain, snow maps for now).

At least once the application crashed due to DecodeOGG (there was a failed assert in sound/snd_decoder.cpp:517).

 

Link to comment
Share on other sites

I can look into rebuilding them, but it was a bit of a hassle. What kind of problems do they lead to exactly?

 

Just as described at http://stackoverflow.com/questions/6087292/bad-codegen-pointer-diff-in-boost-error-in-32-bit-build

 

Except for the fact that FAT32 is a bit outdated and fragile, no, the filesystem should not be of importance.

 

Well, I got some strange things reported by "svn status" directly after checkout, e.g. In guis/readables/:

? MARBLE~3.GUI

! marble_world.gui

 

A mission download cannot be triggered through the console, but you can click yourself through the menus, or just run the training mission which needs to be mentioned in currentfm.txt, either by installing it through the menu GUI or by editing the currentfm.txt manually: it should contain training_mission.

 

Oh, I tried that without any luck - see also my previous post.

 

You can also push the binaries to SVN, the ones you have are better than what we have now (== nothing).

 

Well, I am not quite sure about their correct locations =(

what if send them ('Doom 3.app/*' and game.dylib) to you?

 

Link to comment
Share on other sites

Besides I have built the default configs only and there were some debug builds involved (i guess that is why I could see the failed assertion).

 

I bet the end users would be more interested in pure release builds while beta testers should better see more debug / assertion output.

How do you usually handle the binary distribution for testing? Do you put different builds into different SVN repositories?

Link to comment
Share on other sites

Only release builds should go into SVN, debug builds are of little use for the rest of the team, and they are slow and huge in size.

 

It's probably best to open a thread in the TDM Development forum to discuss the path issues with taaaki. There have been a few changes to the filesystem handling which should make things simpler.

Link to comment
Share on other sites

Only release builds should go into SVN, debug builds are of little use for the rest of the team, and they are slow and huge in size.

 

Well then I am preparing a Release/i386/10.6 build now and will send it to you once I am satisfied with it (I noticed dependencies on global host libraries in what I had).

Do you think I should rather build fat binaries with PPC or support OS X variants earlier to 10.6?

 

Besides I am curious about where all the stuff under Doom 3.app/Contents/ should go?..

 

It's probably best to open a thread in the TDM Development forum to discuss the path issues with taaaki. There have been a few changes to the filesystem handling which should make things simpler.

Ok

Link to comment
Share on other sites

Ok guys, I am happy to say that I have Release binaries and after finding a workaround for my *mission install* problems I managed to load and play a mission (outpost) as well as several usual maps (snow, rain)!

 

Unfortunately the build seems to be very fragile and often shuts down due to segmentation faults right before the end of mission loading :'(

 

Ps: curiously enough it seems that the tilde ("~") key does not trigger the console in this build...

 

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.

 Share


  • Recent Status Updates

    • irg

      Watching warmly for The Black Parade, The Broken Goddess and Blood Death Wish Ep.4. Sometimes the best things in life actually are free.
      · 0 replies
    • STiFU

      We are taking our son on his very first holiday trip to see the sea for the first time. 🙂 Will be back in a week.
      · 2 replies
    • Gilkar

      When I was a young man my father was so ignorant I could hardly stand to have him around. As I grew older I was amazed at how much the old man had learned in such a short time.
      · 2 replies
    • jaxa

      RTX 3090 Super, RTX 3070 Ti 16 GB, RTX 2060 12 GB
      https://wccftech.com/nvidia-launching-rtx-3090-super-rtx-3070-ti-16gb-and-rtx-2060-12gb-by-january-2022/
      · 0 replies
    • duzenko

      CPU benchmark time - compiling DarkRadiant (2nd run)
      i5 8600K 6C/6T@4.4GHz DDR4 2x2133MHz 9MB cache
      Parallel builds: 1. 3:57 Parallel builds: 6 (default). 2:28 r5 1600AF 6C/12T@3.3GHz DDR4 1x2666MHz 16 MB cache, temp folder on HDD
      Parallel builds: 1. 5:05 Parallel builds: 4. 2:47 Parallel builds: 6. 2:55 Parallel builds: 12 (default). 2:57
      · 6 replies
×
×
  • Create New...