Jump to content
The Dark Mod Forums

building under Mac OS X?


malex984

Recommended Posts

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

I don't have any idea whether this is still necessary nowadays. Doom 3 was released 2004 where things were different, I can't say how many machines are still Power PCs. Lacking this knowledge, I always produced universal binaries.

Link to comment
Share on other sites

I still run my powerbook G4 here at home and would test on it if PPC builds were available, but if it's easier / more efficient to focus on intel based builds then I probably wouldn't worry about PPC at this point.

 

Ok then I will try to produce them next. What Mac OS X do you use?

 

Update: I built release fat universal binaries for min. 10.5 and put them to the darkmod SVN repo.

 

Link to comment
Share on other sites

The point is that "~" worked in default (partially debug) build but it changed in release build... which was quite unexpected for me =) Ps: same sources, build projects, configs and resources.

 

The console key is in Darkmod.cfg, so theoretically it is not depending on the .exe you build.

 

As for the "segmentation faul before loading a mission", could you get a stacktrace with a debug build? Maybe it is general problem we want to fix.

"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

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

 

(and)

 

Ok then I will try to produce them next. What Mac OS X do you use?

 

Update: I built release fat universal binaries for min. 10.5 and put them to the darkmod SVN repo.

 

Wow - quite the flurry of activity here! I have i386 and PPC systems running 10.5, so I'd be happy to help beta test your builds as needed. There can't be much of a market for PPC support at this point, but I'd love to have TDM up and working on the x86/10.5 system. I actually spent a short while last December(?) trying to get v1.07 working, as the install via auto-updater was pretty well broken, and made some headway in patching the source before getting stuck / busy with life. Ah well..

 

malex-- thanks much for taking on this project! (and TDM team, an even bigger thank you for taking on *your* project--it's been years since I frequented TTLG, but I remember excitedly following your development there--what a masterpiece you've created!) Also, hello forums :)

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

@malex,

 

Could you explain what each of the files does in the new folder thedarkmod.app? Are any of them needed in a TDM release for running on OSX, or is this just a place to house stuff?

 

What is the name of the executable for OSX?

 

What is the name of the DLL for OSX?

 

I need to make changes to tdm_update so it understands TDM on OSX.

Link to comment
Share on other sites

@malex,

 

Could you explain what each of the files does in the new folder thedarkmod.app? Are any of them needed in a TDM release for running on OSX, or is this just a place to house stuff?

 

What is the name of the executable for OSX?

 

What is the name of the DLL for OSX?

 

I need to make changes to tdm_update so it understands TDM on OSX.

 

OSX native applications always look like that, see http://en.wikipedia.org/wiki/Application_bundle

The DLL extension specific to OSX is .dylib but .so also often appears for some shared modules.

Like in Unix - no special executable extension in favor of a file system attribute. That is why please consider it to be just a Linux with a twist that one has a whole .app directory instead of a single executable.

 

What is your deployment concept? What resources do you expect to be present on host system and where?

 

Note that putting thedarkmod.app directly into /darkmod/ would not work right now...

But it is easy to change to make the application look for resources similar to the Linux variant. Would it be appropriate? What is the expected resource locations and their directory structures under Linux?

 

 

 

Link to comment
Share on other sites

In Windows and Linux, we're providing an executable (*.exe or *.x86), a DLL (*.dll or *.so) and a whole bunch of O/S-independent data files, all of which live in the darkmod directory. The executable runs from that directory. Through 1.08, we've also relied on Doom 3 data files that live wherever the user has placed Doom 3. I think on OSX, TDM goes through a list of possible directories on startup, looking for this data.

 

If a Mac version is just "Linux with a twist" then I'd expect we'd only need to deliver two files: an executable and a DLL.

Link to comment
Share on other sites

Well, the twist is that you actually need the whole .app directory instead of a single executable as for Linux.

 

In the future one could also consider to try adapting the Linux code base to work under Mac OSX and thus get rid of that Apple Application Bundle but that would be quite a challenge as one would have to deal with XServer intead of using the Apple GUI frameworks, and XServer may even be absent on a host.

 

Link to comment
Share on other sites

Well, does the following path setup seem fine for TDM?

 

Let's say that SOME_PATH/anything/ contains the "thedarkmod.app/" (directory name 'anything' is not relevant).

 

Then:

SOME_PATH/darkmod/ is expected to contain TDM resources and SOME_PATH/base/ may contain D3 resources,

$HOME/Library/Application Support/Doom 3/darkmod/ is used ONLY for downloading/saving/loading fms

and contains the only relevant 'currentfm.txt' which appears there after "Install Mission"

 

But: $HOME/Library/Application Support/Doom 3/darkmod and $HOME/Library/Application Support/Doom 3/base are not used for searching resources.

 

 

Link to comment
Share on other sites

I need to make changes to tdm_update so it puts the Mac file(s) in the right place.

 

Does thedarkmod.app live in the darkmod folder?

 

I also need to make changes to the packaging instructions. Is thedarkmod.app a single file that is built under XCode? Why is the folder of Mac files under darkmod in SVN called thedarkmod.app (the same name as the executable)?

Link to comment
Share on other sites

I need to make changes to tdm_update so it puts the Mac file(s) in the right place.

 

Does thedarkmod.app live in the darkmod folder?

 

I also need to make changes to the packaging instructions. Is thedarkmod.app a single file that is built under XCode? Why is the folder of Mac files under darkmod in SVN called thedarkmod.app (the same name as the executable)?

 

Oh. That folder IS the Apple application bundle and it contains an executable module Together with all the necessary resource files. Mac OS X users need that folder as it is ( of course without the svn stuff )!

 

And yes it can live in any folder provided there is the darkmod/ resource folder is its parent directory (which should also contain "base/" with D3 resources). For instance it can live in the directory named darkmod containing all the TDM resources.

This is the result of my changes to the meanings and setting of fs_* variables, according to your note #35 above.

Link to comment
Share on other sites

If tdm_update packages "thedarkmod.app" as a folder with its contents, and that folder is placed inside the darkmod folder on OSX, will the player's double-clicking on "thedarkmod.app" start TDM correctly?

Yes. Provided the folder is named "darkmod", and optional D3 resources are in the folder named "base", which is in the same place as the "darkmod" folder.

 

Could one test your delivery mechanism before it goes public?

Link to comment
Share on other sites

I have to look into adding thedarkmod.app to the packaging process. It may or may not require code changes to tdm_update.

 

While I'm doing that, could you see if you can do an OSX build of tdm_update? The source code sits in the directory darkmod_src/tdm_update. There's a scons shellscript in there (macasx_build.sh), but I don't know if there's an XCode project set up.

 

If you can do that, and check a new tdm_update.macosx (or whatever's appropriate) to SVN, I could try a Mac installation/upgrade myself.

  • Like 1
Link to comment
Share on other sites

I have to look into adding thedarkmod.app to the packaging process. It may or may not require code changes to tdm_update.

 

While I'm doing that, could you see if you can do an OSX build of tdm_update? The source code sits in the directory darkmod_src/tdm_update. There's a scons shellscript in there (macasx_build.sh), but I don't know if there's an XCode project set up.

 

If you can do that, and check a new tdm_update.macosx (or whatever's appropriate) to SVN, I could try a Mac installation/upgrade myself.

 

Ok. I will take a look at that.

 

Besides I wanted to note that the current MacOsX build will only try to change $HOME/Library/Application Support/Doom 3/ and its children. For instance it will create "darkmod" there for storing downloaded fms and currentfms.txt.

Which also means that fms folder and currentfms.txt from the delivered "darkmod" folder are ignored (unless it is placed in the location mentioned previously).

Link to comment
Share on other sites

Which also means that fms folder and currentfms.txt from the delivered "darkmod" folder are ignored (unless it is placed in the location mentioned previously).

 

So if we deliver something in darkmod/fms, tdm_update would have to move it to $HOME/Library/Application Support/Doom 3/darkmod/fms?

Link to comment
Share on other sites

While I'm doing that, could you see if you can do an OSX build of tdm_update? The source code sits in the directory darkmod_src/tdm_update. There's a scons shellscript in there (macasx_build.sh), but I don't know if there's an XCode project set up.

 

If you can do that, and check a new tdm_update.macosx (or whatever's appropriate) to SVN, I could try a Mac installation/upgrade myself.

 

Building goes without any problems whatsoever. New tdm_update.macosx is in SVN now. No need in a XCode project as it is not an Apple application bundle.

Link to comment
Share on other sites

Okay, that's good news. I'll take a look at packaging thedarkmod.app as a folder and getting it moved to the appropriate location. I also have to look at moving the fms folder in its entirety to the appropriate location.

 

You might not hear from me for a while on this; it's going to take some research.

Link to comment
Share on other sites

Okay, that's good news. I'll take a look at packaging thedarkmod.app as a folder and getting it moved to the appropriate location. I also have to look at moving the fms folder in its entirety to the appropriate location.

 

You might not hear from me for a while on this; it's going to take some research.

Alternatively, rather than doing all of that I could simply change the meanings and initialization of fs_* variables instead, for instance as follows:

look for everything in current directory (where the .app binary is located),

for missions use ./fms/,

forget about $HOME/Library/.... altogether.

 

But where should I look for D3 stuff with this alternative..?

 

What do you say?

Link to comment
Share on other sites

On my Mac, I have:

 

/Users/rsphares/Library/Application Support/Doom 3/

 

And inside Doom 3 I have:

 

base

darkmod

 

Unless 'base' and 'darkmod' each have their own fs_* variable, they should live side by side.

 

But I don't know if this tree structure is used by every Mac player.

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  »  DeTeEff

      I've updated the articles for your FMs and your author category at the wiki. Your newer nickname (DeTeEff) now comes first, and the one in parentheses is your older nickname (Fieldmedic). Just to avoid confusing people who played your FMs years ago and remember your older nickname. I've added a wiki article for your latest FM, Who Watches the Watcher?, as part of my current updating efforts. Unless I overlooked something, you have five different FMs so far.
      · 0 replies
    • 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.
      · 4 replies
    • 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
×
×
  • Create New...