Jump to content
The Dark Mod Forums

Building Doom 3 On Linux With Eclipse


OrbWeaver

Recommended Posts

Has anybody successfully set this up to work yet? I have got Eclipse to compile the D3 SDK code, but for some reason it (or Scons, I don't know which) is not using an incremental build - instead the entire project is rebuilt from scratch even if only a single file has changed.

 

Is there some flag you have to set in either Eclipse or SCons to use an incremental build, or is there some other problem which causes one of the tools to think that an complete rebuild is necessary?

Link to comment
Share on other sites

I am just using the vanilla D3 SDK at the moment, I don't have the TDM source code. I would like to get into a state where "hacking" on the D3 source is easy to do with Eclipse, which I find a particularly user-friendly IDE.

Link to comment
Share on other sites

OK, sorted it. For some reason SCons did not appear to be accessing the file signatures correctly when run under Eclipse causing it to perform a complete rebuild everytime.

 

I added the following line to src/SConstruct to tell SCons to use file timestamps rather than its own hash database to detect changes:

 

SourceSignatures('timestamp')

 

Now the problem appears solved.

Link to comment
Share on other sites

@Spar, would you say the things we have to get working in order to port to Linux are the rendering pipe for the lightgem, and the keyboard handler? Hopefully the keyboard handle should be pretty do-able, if we can find the source for one for Linux we can put it into the linux version of the src and make sure the outer function calls are the same (maybe we'll have to write some sort of outer function layer so that the calls within D3 to see which keys are pressed are translated into the specific kb handler calls for the platform?)

Link to comment
Share on other sites

Why does TDM need its own keyboard handler? Is the standard D3 functionality not sufficient?

 

I have also set up GtkRadiant so it compiles and builds properly under Eclipse, which would actually make parallel development very streamlined, especially with the really tight CVS/SVN integration.

Link to comment
Share on other sites

@Spar, would you say the things we have to get working in order to port to Linux are the rendering pipe for the lightgem, and the keyboard handler?

 

Yes. The pipe stuff should be easy and pretty straightforward, but I'm not sure about the keyboardhandler.

 

Hopefully the keyboard handle should be pretty do-able, if we can find the source for one for Linux we can put it into the linux version of the src and make sure the outer function calls are the same (maybe we'll have to write some sort of outer function layer so that the calls within D3 to see which keys are pressed are translated into the specific kb handler calls for the platform?)

 

Finding the source for the keyboardhandler is easy. I can give it to you right now. :) After all, this is Linux and I have all kind of kernel sources on my system. The problem is NOT to get the source, but to properly make it work in the Linux/Unix environment.

Gerhard

Link to comment
Share on other sites

Why does TDM need its own keyboard handler? Is the standard D3 functionality not sufficient?

 

In Doom 3 there are buttons and impulses. impulses can be an unlimited number (i.e. as many as you keyboard has keys), but buttons are limited to eight. Several of them are already used up like ATTACK, MOVE FORWARD, LEFT, RIGHT, BACKWARD so there are only three left. Because of a bug it's actually onlyu two left now, but I think this was fixed in the latest patch. Nevertheless if you want to have leaning reacting properly, instead of a toggle, then we need three directions for leaning already, which leaves no room for other stuff. I implemented a solution that you can make all keys into buttons, and this has to be ported on Linux as well.

Gerhard

Link to comment
Share on other sites

Finding the source for the keyboardhandler is easy. I can give it to you right now. After all, this is Linux and I have all kind of kernel sources on my system. The problem is NOT to get the source, but to properly make it work in the Linux/Unix environment.

 

Could you explain what "make it work" means in more detail? I'm not trying to argue, just curious.

Link to comment
Share on other sites

Well, the problem is that there is no direct keyboard handler in Unix. You are reding data from a terminal. I don't know how it would work if I would start to processes reading from the same terminal, I guess it simply wouldn't work. In Windows this is easier, because the API provides an interface for such a situation, but I'm not aware of such a mechanism on Unix. The code for that part is in the non-accessible area of Doom 3. the one where we have no keycard for. :) So we probably can't even take it from the keyboard and feed it in. But I have to look at this in more detail, because I'm not THAT good in such deep down Unix programming and usually you don't really need to ensure such hardware access. It might even be needed to write a kernel modul to support what we need. Sounds harder than it is though, because I experimented with that some time ago.

Gerhard

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

    • nbohr1more

      The FAQ wiki is almost a proper FAQ now. Probably need to spin-off a bunch of the "remedies" for playing older TDM versions into their own article.
      · 1 reply
    • nbohr1more

      Was checking out old translation packs and decided to fire up TDM 1.07. Rightful Property with sub-20 FPS areas yay! ( same areas run at 180FPS with cranked eye candy on 2.12 )
      · 3 replies
    • taffernicus

      i am so euphoric to see new FMs keep coming out and I am keen to try it out in my leisure time, then suddenly my PC is spouting a couple of S.M.A.R.T errors...
      tbf i cannot afford myself to miss my network emulator image file&progress, important ebooks, hyper-v checkpoint & hyper-v export and the precious thief & TDM gamesaves. Don't fall yourself into & lay your hands on crappy SSD
       
      · 7 replies
    • OrbWeaver

      Does anyone actually use the Normalise button in the Surface inspector? Even after looking at the code I'm not quite sure what it's for.
      · 7 replies
    • Ansome

      Turns out my 15th anniversary mission idea has already been done once or twice before! I've been beaten to the punch once again, but I suppose that's to be expected when there's over 170 FMs out there, eh? I'm not complaining though, I love learning new tricks and taking inspiration from past FMs. Best of luck on your own fan missions!
      · 4 replies
×
×
  • Create New...