Jump to content
The Dark Mod Forums

Compiling on OSX


Recommended Posts

Of course, that's understandable. It's still possible to please those folks by writing up some instructions how to get it running (this would be placing a symlink in Application Support, pointing at the tdmlauncher.macosx in Desktop/Doom 3/darkmod, wouldn't it?)

 

TDM would follow the symlink? Should work.

 

I'd merely like to have a "recommended" setup that's requiring the least amount of work and is less error-prone than anything else, and document it on the wiki and the website. The simpler the better.

 

Agreed.

Link to post
Share on other sites
  • Replies 145
  • Created
  • Last Reply

Top Posters In This Topic

Ok, I'll see to get the changes into the SVN sources, adjusting both tdmlauncher and the code section restarting the game after FM installs.

Link to post
Share on other sites

Here's yet another game PAK for testing: http://www.dramtheth.../tdm_game03.pk4

 

And here's a new tdmlauncher.macosx: http://www.dramtheth...launcher.macosx

 

Changed in tdmlauncher.macosx:

 

If no argument is supplied, tdmlauncher.macosx will be looking in two more locations, in the tdmlauncher-relative ../Doom 3.app/Contents/MacOS/Doom 3 and if that is failing too a last hardcoded attempt is made at ~/Desktop/Doom 3/Doom3.app/Contents/MacOS/Doom 3.

 

Changed in tdm_game03.pk4:

 

When restarting after installing an FM, the game will look for tdmlauncher.macosx in the usual location ~/Library/Application Support/Doom 3/darkmod first (this is as before). If that fails, another attempt is made to find the tdmlauncher.macosx near the game engine: That would be ~/Desktop/Doom 3/Doom3.app/Contents/MacOS/../../../darkmod/tdmlauncher.macosx in grayman's case - this change is not yet tested since I can't run D3 here.

 

I'd be grateful if you two could once more test this build, also with the LogClass_MAINMENU switched on in darkmod.ini (along with all log types enabled, ERROR, WARNING, DEBUG and INFO). Since the Darkmod.log is now properly written to ~/Library/Logs/ this should give more insight.

Link to post
Share on other sites

Failed.

 

I placed tdmlauncher.macosx in the binary area, and an alias (symlink) to it in the App Support area.

 

I replaced the game pk4.

 

I set the logging stuff in darkmod.ini.

 

I started TDM using the launch helper and it came up okay.

 

I used the download screen to grab a copy of Outpost.

 

I asked to install and start Outpost. TDM said it couldn't find tdmlauncher.

 

I couldn't find Darkmod.log anywhere. I looked in Library/Logs first, then in the binary folders, then in the App Support folders. I used Spotlight, but it came up empty.

 

I moved my Doom 3 binary folders over to the App Support area and tried again.

 

TDM came up fine, it found the training mission. I asked it to install that and start it. TDM went away and didn't come back.

 

The missions are being unpacked and set up with their own directories for play, but TDM isn't relaunching successfully.

 

Again, no LOG file.

 

At this point I'm inclined to wipe everything, reinstall Doom 3 in the App Support area, and lay in darkmod alongside it and try again.

 

Before I do that, is there anything else you want me to try?

Link to post
Share on other sites

Where exactly is the symlink, directly in Application Support? It should be in a "Doom 3/darkmod/" folder within application support.

 

Also, I just tested removing the Darkmod.log file on my system and it doesn't seem to be re-creating it, but it will happily update it when it is there. Can you create this log file in ~/Library/Logs/ (i.e. enter 'echo "test" > ~/Library/Logs/Darkmod.log' in terminal) and see if relaunching after doing this updates the log file?

 

One more thing...

 

You mentioned performance was poor, have you applied the Universal Binary patch for Doom 3 Mac? Doom 3 was released during the transition to Intel and was still a PowerPC build, meaning that without the Universal Binary Doom 3 will be run through a translation layer (Rosetta) which translates PowerPC instructions to Intel, causing a huge performance hit. Even with this patch I'm still getting occasional sluggishness on my notebook (unsurprisingly), but it would probably be worth adding this to any installation instructions. Interesting to note as well that the next release of OS X will probably not support Rosetta at all, so the UB patch may be a requirement.

Edited by Midnight
Link to post
Share on other sites

Here are my Darkmod.log files.

 

Darkmod_before_restart_success.txt

This log was generated after installing a FM (before restarting) and after restarting the FM loaded fine.

 

Darkmod_restart_failed.txt

 

This log was generated after installing a FM, but after the restart Doom 3 failed to load (same issue mentioned in previous page, possibly same issue that grayman reported).

Link to post
Share on other sites

I don't recall where the symlink was.

 

I went to check my Doom rev, and the game won't start in its new home.

 

So I wiped it and am starting over, installing in the App Support folder.

 

Back l8r.

Link to post
Share on other sites

I reinstalled Doom 3 from disk to my Application Support folder.

 

I placed the 'darkmod' folder in the 'Doom 3' folder, next to 'base'.

 

I went to the /Library/Logs folder and created the Darkmod.log file.

 

I started TDM using the latest launcher helper.

 

Everything went well.

 

The only glitch I encountered was that after downloading a new mission (Awaiting the Storm) using the Download Page, TDM told me I would find it on the New Missions Page, and when I went back there, it wasn't listed.

 

I quit TDM and checked on the Darkmod.log file. Nothing other than the original "test" line when I created it.

 

I realized that /Library/Logs was not ~/Library/Logs, and created a "test" Darkmod.log file in ~/Library/Logs.

 

I restarted TDM. This time Awaiting the Storm was present.

 

I downloaded Alchemist, went back to the New Missions Page and it wasn't listed.

 

I played about 30s of Awaiting the Storm, then left.

 

This time Darkmod.Log was present, with meaningful stuff. All the requested logging was turned on. You can grab it here.

 

So it looks like TDM fails to create a new Darkmod.log file if one can't be found. You can see that the original "test" is gone, so it is overwriting what it finds.

Link to post
Share on other sites

Oh, and I installed the 1.3.1A patch, and saw no improvement. I bought Doom 3 five months ago, and the patch is dated Jan 2007, so I was probably already using it (though my installation process said I needed to install Rosetta to run the game, which I did).

Link to post
Share on other sites

I posted a bug report about the missions not appearing immediately as it's affecting my install as well.

 

Regarding the patch, you're probably right about it already using it if it didn't make any difference, I believe that none of the integrated graphics Macs (i.e. Mac Mini, Macbooks and early MBPs) are really going to be able to handle Doom 3 unfortunately.

Link to post
Share on other sites

Thanks for testing, you both. The amount of little problems is a bit disheartening.

 

In any case: @Midnight

 

Darkmod_restart_failed.txt

 

This log was generated after installing a FM, but after the restart Doom 3 failed to load (same issue mentioned in previous page, possibly same issue that grayman reported).

You said TDM didn't come up in the second case - I see that tdmlauncher was invoked with some arguments so I'm curious is there a tdmlauncher.log created as well? It seems the command line arguments might get messed up (maybe due to spaces in them). The game doesn't report that tdmlauncher.macosx was missing and it doesn't report any launch failures, so there should be a tdmlauncher.log somewhere (let's hope).

 

The FM package not being recognised: that seems to be a problem related to the way PK4s are located in Mac or Linux. In Windows there is only ever one fms/ folder and the situation is always as simple as that. The game reports merely relative paths to the PK4s in the fms/ folder, and the code that is looking through the PK4s might be not flexible enough.

 

I got my old G1S laptop back from the repairs, and I'm going to attempt setting up OSX on it (the internet says it's possible), so let's hope I can debug some of these annoyances myself soon.

Link to post
Share on other sites

I tried removing all tdmlauncher.log files, and after starting TDM it created one in ~/ (which included the current installed FM).

 

Next, installed a different FM, restarted okay but this time tdmlauncher.log was created in the 'Resources' folder, original tdmlauncher.log file is unchanged.

 

Installed another FM, but the restart failed, tdmlauncher.log in 'Resources' is updated with new name (one in ~/ is still unchanged)

 

I did a file comparison between this most recent log and the previous two which worked (from the two different locations), the only difference is the name of the FM in the log file.

 

The only error I get when this failure to restart happens is from the terminal (if I'm not using the helper scripts). I've attached the console output from first loading Chalice (which loaded fine), then Alchemist (which failed to load).

 

The error from the console that it fails on seems to be the "unknown command 'vid_restart'", but I noticed on line 635 there's mention of an unknown command 'Support/Doom' which would be a problem caused by spaces in the path:

 

initerror.txt

Edited by Midnight
Link to post
Share on other sites

Well, no luck getting Doom 3 to run on my G1S. The graphics card is recognised correctly by D3 (I can see the console output), but when I launch the vanilla game (no TDM yet) the screen goes all wonky, just weird output where the intro video should be (and I can't even terminate the app, I have to reboot the hard way). I tried running it with r_fullScreen 0 and this gives me a 640x480 D3 window in plain grey.

 

Updating to 1.3.1 makes the game not launch at all. Back to square one on this, very frustrating overall. I certainly won't buy an Intel Macbook just for this!

Link to post
Share on other sites

I've got an updated tdm_game03.pk4 with different code to search for new missions. This might address the no-new-mission-found-after-downloading issue.

 

http://www.dramtheth.../tdm_game03.pk4

 

Please test if downloading missions works here, and whether they're properly showing up after download, or if you need to fully restart the game to make them show up. If it fails, please send me the logs for that download session where it failed to display the mission.

 

You might want to monitor your fms/ folder for what's happening too: During download, a file called _alchemist.pk4 (with underscore prefix) is there, which is renamed to alchemist.pk4 and then moved into its subfolder. You might not see "alchemist.pk4" since it's supposed to be moved away right after download, so that filename should be barely visible if at all. If the subfolder is created properly and the PK4 is there, please tell me if the darkmod.txt and readme.txt is being extracted from it. This should all happen without having to restart the game.

Link to post
Share on other sites

The _alchemist.pk4 file is created during download and renamed to alchemist.pk4 successfully, it is then moved to a new alchemist folder as well.

The darkmod.txt and readme.txt files aren't in this folder though, just the pk4 file. These txt files only appear after a restart. I tried downloading two missions at the same time and both missions only show up after a restart once the txt files are created. Strangely the tdmlauncher.log file wasn't created at all until the restart as well, when it was created in the Resources folder. The Darkmod.log file remained the same after the restart. I've attached these files as well as the output from terminal:

 

Darkmod_before_restart.txt

tdmlauncher.txt

terminal.txt

 

Also, this time around the prompt 'New missions available' appears when I go to the main screen immediately after download, but the prompt doesn't display any missions, it's blank (I assume this is because of the different code for downloads).

Edited by Midnight
Link to post
Share on other sites

It's a step forward, since the dialog appears. The blank line is probably due to some other code section which needs to be updated as well.

 

Unfortunately the darkmod_before_restart.log didn't have the MAINMENU logclass switched on:

 

[DarkMod/DarkModGlobals.cpp ( 523):FRC (FORCE) FR: 0] LogClass_MAINMENU: 0

 

That's why it's completely empty - can you please try it again with the log classes enabled in darkmod.ini:

 

LogError=1

LogDebug=1

LogWarning=1

LogInfo=1

LogClass_MAINMENU=1

Link to post
Share on other sites

Thank you for the detailed output, I think I've identified the faulty section. Here's a new game Pk4: http://www.dramtheth.../tdm_game03.pk4

 

Does the game recognise the missions after download now?

 

If that works, there seems to be some caching going on in the background of the closed source idFileSystem implementation. The engine might not return the newly created folders and the TDM code is tricked into believing there are no new mods available.

Link to post
Share on other sites

Using the latest pk4, TDM now sees a downloaded mission on the New Missions page. I downloaded "Betrayal", it showed up on the NM page, I installed it, TDM restarted, and I started the mission.

 

So far, so good.

 

I then downloaded 5 missions. All showed up on the NM page. I asked to install "Chalice", TDM went away, but didn't come back.

 

In Doom 3/chalice/, I see chalice.pk4, config.spec, and DoomConfig.cfg.

 

In Doom 3/darkmod/fms/chalice/, I see chalice.pk4, darkmod.txt, install_splash.tga, and readme.txt.

 

Darkmod.log.txt

 

Link to post
Share on other sites

Excellent, FMs are showing up immediately now and everything appears to work as expected!

 

I see the bug report has been updated confirming this affects (some / all?) Linux distros as well, presumably this fix is also suitable for that platform?

Link to post
Share on other sites

Excellent, FMs are showing up immediately now and everything appears to work as expected!

 

Yes and no. TDM didn't come back after I dl'ed 5 missions and asked to install one of them.

 

Great progress, though.

Link to post
Share on other sites

TDM went away, but didn't come back.

I'm guessing this is the same issue as post 88 (above), not actually related to downloads but an occasional problem restarting the mod. I can confirm it isn't memory related as I tested it with nothing else running, maybe the previous Doom3 process hadn't fully shutdown yet?

Link to post
Share on other sites

I'm guessing this is the same issue as post 88 (above), not actually related to downloads but an occasional problem restarting the mod. I can confirm it isn't memory related as I tested it with nothing else running, maybe the previous Doom3 process hadn't fully shutdown yet?

tdmlauncher is designed to wait until the Doom 3 process is terminated (max. 10 seconds), so that's rather unlikely. I'll do some research with regards to passing the command line arguments, maybe there is some special handling needed for spaces.

 

Is the problem reproducable (always on the second restart?) or is it seemingly random? Any pattern?

Link to post
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.


×
×
  • Create New...