Jump to content
The Dark Mod Forums

Using system-wide file locations


freyk

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

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

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

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.

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