Jump to content


Photo

building under Mac OS X?

mac osx

  • Please log in to reply
105 replies to this topic

#26 greebo

greebo

    Heroic Coder

  • Root
  • 15987 posts

Posted 24 September 2012 - 12:07 AM

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.

#27 New Horizon

New Horizon

    Mod hero

  • Active Developer
  • PipPipPipPipPip
  • 13784 posts

Posted 24 September 2012 - 04:45 AM

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.

#28 malex984

malex984

    Member

  • Member
  • PipPip
  • 99 posts

Posted 24 September 2012 - 07:40 AM

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.


#29 Tels

Tels

    Mod hero

  • Member
  • PipPipPipPipPip
  • 15024 posts

Posted 25 September 2012 - 12:42 PM

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

#30 karlfox

karlfox

    Newbie

  • Member
  • Pip
  • 3 posts

Posted 25 September 2012 - 10:36 PM

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 :)

#31 malex984

malex984

    Member

  • Member
  • PipPip
  • 99 posts

Posted 27 September 2012 - 07:25 AM

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?

#32 New Horizon

New Horizon

    Mod hero

  • Active Developer
  • PipPipPipPipPip
  • 13784 posts

Posted 27 September 2012 - 08:33 AM

We generally don't share SVN access outside of the development team, but for testing I'm sure we can arrange something.

#33 grayman

grayman

    Master Builder, Coder

  • Active Developer
  • PipPipPipPipPip
  • 12085 posts

Posted 27 September 2012 - 12:20 PM

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

#34 malex984

malex984

    Member

  • Member
  • PipPip
  • 99 posts

Posted 27 September 2012 - 03:00 PM

@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....lication_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?




#35 grayman

grayman

    Master Builder, Coder

  • Active Developer
  • PipPipPipPipPip
  • 12085 posts

Posted 27 September 2012 - 03:10 PM

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.

#36 malex984

malex984

    Member

  • Member
  • PipPip
  • 99 posts

Posted 27 September 2012 - 03:34 PM

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.


#37 malex984

malex984

    Member

  • Member
  • PipPip
  • 99 posts

Posted 27 September 2012 - 08:09 PM

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.



#38 grayman

grayman

    Master Builder, Coder

  • Active Developer
  • PipPipPipPipPip
  • 12085 posts

Posted 28 September 2012 - 10:40 AM

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)?

#39 malex984

malex984

    Member

  • Member
  • PipPip
  • 99 posts

Posted 28 September 2012 - 04:11 PM

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.

#40 grayman

grayman

    Master Builder, Coder

  • Active Developer
  • PipPipPipPipPip
  • 12085 posts

Posted 29 September 2012 - 10:18 AM

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?

#41 malex984

malex984

    Member

  • Member
  • PipPip
  • 99 posts

Posted 29 September 2012 - 01:34 PM

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?

#42 grayman

grayman

    Master Builder, Coder

  • Active Developer
  • PipPipPipPipPip
  • 12085 posts

Posted 29 September 2012 - 01:42 PM

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.
  • malex984 likes this

#43 malex984

malex984

    Member

  • Member
  • PipPip
  • 99 posts

Posted 29 September 2012 - 01:52 PM

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

#44 grayman

grayman

    Master Builder, Coder

  • Active Developer
  • PipPipPipPipPip
  • 12085 posts

Posted 29 September 2012 - 01:56 PM

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?

#45 malex984

malex984

    Member

  • Member
  • PipPip
  • 99 posts

Posted 29 September 2012 - 03:46 PM

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

Yes, i suppose something like that.

#46 malex984

malex984

    Member

  • Member
  • PipPip
  • 99 posts

Posted 29 September 2012 - 05:00 PM

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.

#47 grayman

grayman

    Master Builder, Coder

  • Active Developer
  • PipPipPipPipPip
  • 12085 posts

Posted 29 September 2012 - 05:54 PM

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.

#48 malex984

malex984

    Member

  • Member
  • PipPip
  • 99 posts

Posted 29 September 2012 - 07:41 PM

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?

#49 grayman

grayman

    Master Builder, Coder

  • Active Developer
  • PipPipPipPipPip
  • 12085 posts

Posted 30 September 2012 - 10:09 AM

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.

#50 malex984

malex984

    Member

  • Member
  • PipPip
  • 99 posts

Posted 30 September 2012 - 12:31 PM

I posted my currently used and expected Mac OS X setup in http://forums.thedar...post__p__296378





Also tagged with one or more of these keywords: mac, osx

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users