Jump to content
The Dark Mod Forums

Using system-wide file locations


freyk
 Share

Recommended Posts

I was thinking about those system-wide files user opinions/advices.

@stgatilov

said tdm is designed by user-only.
But When someone shares his/her system with someone else, that someone get all his configs, missions and mission safes. (When that folder is writeable). And you get that write permissions problem. 

How about writing some dynamic/writeable files somewhere else.
For example, placing/writing only the fm&fm save folders, inside the user profile folder. Its a standard way, also adviced by opensuse apppackage creators and others.

I tested this a bit, up to now its works.
And to me, this isnt not be a significant change, @OrbWeaver 

(But we have to test this a bit more)

You can test it yourself, by
Renaming your fm folder (as backup)
adding a line in the config (for tdm windows):
seta fs_savepath "%APPDATA%\darkmod"
Then Start TDM and download/install/save a mission.

What do you think about it.
Should i change some more fs_ path-lines (by adding line to the config)?

@forummod: please move topic to techsupport forum, if you want. 
 

Edited by freyk
  • Like 1

Info: My portfolio and darkmod graphical installer
Amnesty for Bikerdude!

Link to comment
Share on other sites

  • freyk changed the title to Using system-wide file locations

Pretty sure you will meet more problems if you continue playing.

If you want to have separate TDM installations for several users, then you can simply install it into individual users' home directories.
That will fully comply with Windows location conventions.
In fact, Python installer does exactly that, unless you choose system-wide installation.

Link to comment
Share on other sites

1 hour ago, stgatilov said:

Pretty sure you will meet more problems if you continue playing.

If you want to have separate TDM installations for several users, then you can simply install it into individual users' home directories.
That will fully comply with Windows location conventions.
In fact, Python installer does exactly that, unless you choose system-wide installation.

That's what I tried actually but it simply won't work for user names with spaces and non-ASCII characters

Link to comment
Share on other sites

6 minutes ago, duzenko said:

That's what I tried actually but it simply won't work for user names with spaces and non-ASCII characters

You mean installer does not accept such directory name?

Well, this installer check can be disabled in principle.
Although we will probably get a bunch of bugs due to such installation path...

Link to comment
Share on other sites

1 hour ago, stgatilov said:

You mean installer does not accept such directory name?

Well, this installer check can be disabled in principle.
Although we will probably get a bunch of bugs due to such installation path...

Unfortunately the installer accepts the invalid paths but the game fails to load IIRC

I posted in the installer thread not long ago

Link to comment
Share on other sites

Once upon a time, Doom 3 worked in the standard Linux way, with game binaries in a system-wide location and user-local save game files in ~/.doom3. You could even install TDM into the user .doom3 directory and it would work correctly. So there might still be vestigial code in the TDM source to handle this situation, but I don't suppose it will Just Work without testing and fixes since it hasn't been a supported configuration for years.

  • Like 1
Link to comment
Share on other sites

4 hours ago, OrbWeaver said:

Once upon a time, Doom 3 worked in the standard Linux way, with game binaries in a system-wide location and user-local save game files in ~/.doom3. You could even install TDM into the user .doom3 directory and it would work correctly. So there might still be vestigial code in the TDM source to handle this situation, but I don't suppose it will Just Work without testing and fixes since it hasn't been a supported configuration for years.

Those were interesting times indeed...
A lot of stuff was added since then. For instance, TDM 2.0 and going standalone.

To be honest, we were discussing this question some time ago.

The problem is that I strongly favor the current system "everything in one directory", I think it must be preserved at all costs. And trying to support two different cases will simply lead to the secondary way being broken regularly. Instead of saying "yep, we support it, but yes, it's broken now, so please wait till next year", it's better to say "no, we don't support this, install into C:\games\tdm and be happy".

Link to comment
Share on other sites

22 minutes ago, stgatilov said:

The problem is that I strongly favor the current system "everything in one directory", I think it must be preserved at all costs.

I agree. Just recently due to all the ransomware attacks I noticed that Windows 10 has an in-build protection of the user document folders. When you turn that on you need to allow each app to get access to those! I can see this become the default in Windows 11 which could cause a lot of confusion by common users then...

Edited by wesp5
Link to comment
Share on other sites

Posted (edited)

Using appdata as folder for the fm and saves, the data will not be placed in the documents folder. That data will be placed in c:\users\username\appdata. When you open that location, you see that other applications place there profile data too. 

Users will not notice any differences, because they dont see the fm folder.

I dont want to see a "my tdm" (or any) folder in my homefolder. That is placed in a hidden folder in my homefolder. that is the conventional location. (Also in other OS'ses)

Tdm will use "all folders in one directory", because the fm folder is referenced in the config.

And where i expect it to go wrong, is during the use of the applications outside TDM. Like in the updater, installing/updating the three standard missions. Or in DR.

But both can be solved by using/changing referrences.

Btw Who uses a username with spaces? To me, that was always asking for technical problems in the early days, when some applications didnt used environment variables.

Edited by freyk

Info: My portfolio and darkmod graphical installer
Amnesty for Bikerdude!

Link to comment
Share on other sites

2 hours ago, freyk said:

Using appdata as folder for the fm and saves, the data will not be placed in the documents folder. That data will be placed in c:\users\username\appdata. When you open that location, you see that other applications place there profile data too. 

Users will not notice any differences, because they dont see the fm folder.

I dont want to see a "my tdm" (or any) folder in my homefolder. That is placed in a hidden folder in my homefolder. that is the conventional location. (Also in other OS'ses)

Tdm will use "all folders in one directory", because the fm folder is referenced in the config.

And where i expect it to go wrong, is during the use of the applications outside TDM. Like in the updater, installing/updating the three standard missions. Or in DR.

But both can be solved by using/changing referrences.

 

AFAIK the windows standard is to put the save games in user\[documents\]savedgames\gamename

https://docs.microsoft.com/en-us/windows/win32/shell/knownfolderid

Quote

Btw Who uses a username with spaces? To me, that was always asking for technical problems in the early days, when some applications didnt used environment variables.

It's not just spaces, it's all non-ASCII symbols too

Link to comment
Share on other sites

1 hour ago, duzenko said:

It's not just spaces, it's all non-ASCII symbols too

Given that the engine works only with 8-bit encodings, it is almost certain that no matter what you do, some paths won't work.

Link to comment
Share on other sites

5 hours ago, stgatilov said:

Given that the engine works only with 8-bit encodings, it is almost certain that no matter what you do, some paths won't work.

It's a little more complicated than that

If we fully supported 8-bit ANSI encodings, then file paths in local user locale would still work. But they don't which implies that TDM uses a fixed encoding conflicting with the system encoding

Link to comment
Share on other sites

Posted (edited)

To tell you all the truth, i am still figuring out how i managed this, during work.
On my own system it, works not quite right yet.
So have to test it a little more.

For now, i got the fms folder outside the tdm folder
(and qconsole and other files are written to it).
Using config lines:
===
seta logFile "1"
set fs_debug "1"
set fs_devpath "c:\temp\darkmod"
set fs_savepath "c:\temp\darkmod"
set fs_modSavePath "C:\temp\darkmod/fms"
===
but appdata-variable trick dont work on my system.
And the mission loader dont see the installed missions, but following console messages,
it sees the amount of missions. (Permissions?)

p.s Please move this topic to techsupport.
 

Edited by freyk

Info: My portfolio and darkmod graphical installer
Amnesty for Bikerdude!

Link to comment
Share on other sites

  • 4 weeks later...

I noticed TDM is among the few Linux games that stores settings in the local installation directory, you don't get a /home/username/.local/darkmod path. Personally it doesn't bother me so I can live with it either way. But this does seem less flexible and abnormal: Settings should be stored in a proper user directory if possible, maybe even the fms folder.

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.

 Share

  • Recent Status Updates

    • irg

      Watching warmly for The Black Parade, The Broken Goddess and Blood Death Wish Ep.4. Sometimes the best things in life actually are free.
      · 0 replies
    • STiFU

      We are taking our son on his very first holiday trip to see the sea for the first time. 🙂 Will be back in a week.
      · 2 replies
    • Gilkar

      When I was a young man my father was so ignorant I could hardly stand to have him around. As I grew older I was amazed at how much the old man had learned in such a short time.
      · 2 replies
    • jaxa

      RTX 3090 Super, RTX 3070 Ti 16 GB, RTX 2060 12 GB
      https://wccftech.com/nvidia-launching-rtx-3090-super-rtx-3070-ti-16gb-and-rtx-2060-12gb-by-january-2022/
      · 0 replies
    • duzenko

      CPU benchmark time - compiling DarkRadiant (2nd run)
      i5 8600K 6C/6T@4.4GHz DDR4 2x2133MHz 9MB cache
      Parallel builds: 1. 3:57 Parallel builds: 6 (default). 2:28 r5 1600AF 6C/12T@3.3GHz DDR4 1x2666MHz 16 MB cache, temp folder on HDD
      Parallel builds: 1. 5:05 Parallel builds: 4. 2:47 Parallel builds: 6. 2:55 Parallel builds: 12 (default). 2:57
      · 6 replies
×
×
  • Create New...