View Issue Details

IDProjectCategoryView StatusLast Update
0002966The Dark ModCodingpublic17.10.2013 11:16
Reportertels Assigned Totels  
PrioritynormalSeveritynormalReproducibilityN/A
Status resolvedResolutionfixed 
Product VersionTDM 1.07 
Target VersionTDM 2.00Fixed in VersionTDM 2.00 
Summary0002966: Get rid of hardcoded ~/doom3 path on Linux
DescriptionInstead the current directory of thedarkmod.x86 should be used, that would be a step towards a D3 free TDM and allow installation of TDM in any path the user chooses.
TagsNo tags attached.
Attached Files

Relationships

related to 0003214 resolvedtels darkmod.ini uses hardcoded path on linux 
related to 0003125 resolvedtaaaki Revising Framework/FileSystem for clarity 
related to 0003567 assignedtaaaki TDM incapable of being ran from a read-only directory as a normal user 

Activities

taaaki

taaaki

15.04.2012 19:29

administrator   ~0004465

These seems fairly easy to do (probably only need to modify lines 248 and 249 in DarkModGlobals.cpp). I haven't actually played around with the Linux build (need to get a VM up), so I'm not sure what TDM reads/writes to the ~/.doom3 path.

I would assume that this would just be config files? Just need to make sure that I don't break anything unexpected.
tels

tels

16.04.2012 17:07

reporter   ~0004468

Hm, not, not only config files. On my system, it is like this ("~" denotes the home directory here on linux):

* The base is "~/games/doom3/" - this is where doom.x86, doom3, darkmod.log, base/ etc are located (basically the doom3 legacy stuff, which we hope to replace - anything would be so much easier if TDM was already standalone)
* under ~/.doom3/ we have darkmod/ (and formerly, the FM paths)

The problem is/was that you could install doom3 under anything (most used was /opt/games/), but there had still to be one ~/.doom3 directory for every user.

Not sure what the best options here are. If TDM was stand-alone we could simply ignore any of that D3 stuff.
taaaki

taaaki

16.04.2012 17:24

administrator   ~0004469

I see. From what you have described and the previously mentioned code, it seems that ~/.doom3 is the only hardcoded path in the equation and that is an easy fix (that can be changed to a #define pointing to something like ~/.tdm

However, with the changes to the FM locations and the associated savegame/screenshot locations, I suspect that we are breaking the Linux convention of keeping user files in the user dir. Files such as savegames and screenshots probably shouldn't land up in places like /opt/<insert tdm dir here> or /local/<blah> or whichever non-/home dir where TDM was installed. I don't want to get too pedantic about file locations, but I do feel that we need to rethink savegame/config/screenshot/log locations (for Linux at least).
tels

tels

17.04.2012 18:28

reporter   ~0004473

No, for linux, these land under "~/.doom3/darkmod/fms", so this is covered. The only things that land under "/opt/d3dir" are the base pack etc. E.g. the original d3 installaton.

Even thedarkmod.x86 lands under "~/.doom3/" (at least it should, I think the updater does not yet do this copying around, either) and can be started from there.
grayman

grayman

07.09.2012 16:16

viewer   ~0004800

Moved target from 1.08 to 1.09 per Tels' suggestion.
tels

tels

12.05.2013 16:21

reporter   ~0005422

Now that TDM v2.00 will be standalone, we need to adress this. To summarize:

./thedarkmod.x86 should not assume the darkmod directory is in ~/.doom3, but instead in the directory it currently runs from.

This would allow one to keep a "darkmod/" folder and the thedarkmod.x86 and just run it. That would also allow also no-install runs, e.g. from an USB stick.

Files like savegames etc can land under "./darkmod/fms/" as usual. If the user wants them to land somewhere else, he can always us a symlink.

Testing different versions would then as easy as having two directories and running the right executable in the right directory.
warlock053

warlock053

12.05.2013 17:08

reporter   ~0005423

Normally the installdir is set by the user during install time and the bin would have a variable that reads the basedir from a config. It would parse installdir + basedir or some such behavior. I would suggest rolling back to alpha and aligning the code base with the project's goals before more extensive map testing. It's easier to squash bugs that way. Just a friendly suggestion. :)
warlock053

warlock053

12.05.2013 18:40

reporter   ~0005427

Normally the installdir is set by the user during install time and the bin would have a variable that reads the basedir from a config. It would parse installdir + basedir or some such behavior. I would suggest rolling back to alpha and aligning the code base with the project's goals before more extensive map testing. It's easier to squash bugs that way. Just a friendly suggestion. :)

Workaround: created a 'base' folder in 'trunk and copied all folders and pk4's to base.
tels

tels

13.05.2013 09:50

reporter   ~0005439

TDM isn't really "installed"; instead it is just downloaded (or copied) and then run directly.

So the paths shouldn't (and never have been) in an .ini file or something like that.

I'll fix the paths on linux and make the .x86 load everything from "./", "./darkmod" and "./base" (for legacy reasons, although this directory does not exist).
tels

tels

13.05.2013 10:23

reporter   ~0005441

Last edited: 13.05.2013 10:23

As a first step I removed the loading of assets from "/usr/local/games/doom3", and replaced it with the current path. Revision 0005768.

The linux side still uses (and creates if it doesn't exist) /home/username/.doom3/darkmod, so this still needs fixing.

tels

tels

13.05.2013 12:04

reporter   ~0005442

Fixed with revision 0005773.

./thedarkmod.x86 now looks into ./darkmod and ./base to find the assets. (the later will be removed later, so put everything into ./darkmod)

Issue History

Date Modified Username Field Change
06.01.2012 09:36 tels New Issue
15.04.2012 19:29 taaaki Note Added: 0004465
16.04.2012 17:07 tels Note Added: 0004468
16.04.2012 17:24 taaaki Note Added: 0004469
17.04.2012 18:28 tels Note Added: 0004473
09.05.2012 19:20 taaaki Relationship added related to 0003125
31.08.2012 09:56 tels Relationship added related to 0003214
07.09.2012 16:16 grayman Note Added: 0004800
07.09.2012 16:16 grayman Target Version TDM 1.08 => TDM 2.00
12.05.2013 16:21 tels Note Added: 0005422
12.05.2013 17:08 warlock053 Note Added: 0005423
12.05.2013 18:40 warlock053 Note Added: 0005427
12.05.2013 18:40 warlock053 File Added: tdm-2.0_Issue-0002966_Workaround.png
13.05.2013 09:47 tels Assigned To => tels
13.05.2013 09:47 tels Status new => assigned
13.05.2013 09:50 tels Note Added: 0005439
13.05.2013 10:23 tels Note Added: 0005441
13.05.2013 10:23 tels Note Edited: 0005441
13.05.2013 12:04 tels Note Added: 0005442
13.05.2013 12:04 tels Status assigned => resolved
13.05.2013 12:04 tels Fixed in Version => TDM 2.00
13.05.2013 12:04 tels Resolution open => fixed
17.10.2013 11:16 taaaki Relationship added related to 0003567