Jump to content
The Dark Mod Forums

Recommended Posts

Posted
20 hours ago, jonri said:

Allowing access to the whole filesystem is strongly discouraged, but hard to avoid if we want to support arbitrary TDM paths.  Would it be reasonable to assume that most people install TDM in their /home directories, or would accept that limitation if they were using the flatpak DR?

Why is it not possible to give access to other places than home (mounted partitions)?

Posted
4 hours ago, datiswous said:

Why is it not possible to give access to other places than home (mounted partitions)?

One of flatpak's strengths and limitations is that it tries to sandbox off anything that is not required for the application to run. Since TDM can be installed anywhere, the only way to support that is to let the application have access to the whole filesystem, which essentially defeats the sandbox.

There's a concept of "portals" that lets the user poke holes in the sandbox to load and save files, but I think DR does too much file access behind the scenes for this to work.  I need to do more research here.

If we can't find a good way forward, in the worst case we could provide instructions on how the user can use flatseal to change the flatpak's permissions and allow access to their chosen TDM install path after installation.

Posted

Flatpak has a default install location though, why would it even be necessary to give it access to the non-default location at all?

To my understanding, leaving the install paths where they are is part of the point with flatpak: it isn't meant to be tampered with or moved by users. That said, running the binaries directly by encouraging the old execution process (./example-executable or double-clicking) isn't how we want users to do this anyway because it could bypass the flatpak sandbox.

I think the solution here would be to just include a .desktop file with the game, but do correct me if I'm misunderstanding something Lol

Posted
5 hours ago, Neko-san said:

Flatpak has a default install location though, why would it even be necessary to give it access to the non-default location at all?

I'm not concerned about the DR flatpak install location, but rather being able to access the TDM game files in whatever arbitrary location the user has installed them.

1. We need to read the game files for the user to make use of any game assets in their map.

2.  We need to write the map and its supporting files to this location for them to be loadable in-game.

 

Posted
Quote

but rather being able to access the TDM game files in whatever arbitrary location the user has installed them

Why would any of the game files be in an arbitrary location if all the files should be where you expect them?

They shouldn't be anywhere else; for that, why even bother making that a concern for supporting with Flatpak at all?

Posted
1 hour ago, Neko-san said:

Why would any of the game files be in an arbitrary location if all the files should be where you expect them?

They shouldn't be anywhere else; for that, why even bother making that a concern for supporting with Flatpak at all?

Where should we expect the files to be? The darkradiant flatpak is separate from the game itself. Since TDM has its own installer, the files could be anywhere the user decides.

Posted (edited)
On 9/9/2022 at 10:35 PM, jonri said:

Allowing access to the whole filesystem is strongly discouraged, but hard to avoid if we want to support arbitrary TDM paths.  Would it be reasonable to assume that most people install TDM in their /home directories, or would accept that limitation if they were using the flatpak DR?

I think this is the only outstanding issue left.  Instead of requiring TDM to be in /home, my alternative idea is to provide instructions for the user to modify the permissions after installation.  This can either be done with a single command along the lines of

flatpak override --user --filesystem=/path/to/tdm net.darkradiant.DarkRadian

or by using Flatseal to so the same graphically.

I propose putting these instructions in a wiki article that we link to in the package description, and possibly a little sentence on the Game Setup dialog in the next version of DR saying "Can't find your game path? Click here for instructions" that would show up in the flatpak version only.

This process seems to be what various media players have settled on doing when they need persistent access to an arbitrary directory.  As long as your TDM path doesn't change, this would be a one-time process.

Edited by jonri
  • Like 1
Posted
40 minutes ago, OrbWeaver said:

If, hypothetically speaking, a future FlatPak containing the game itself were to be created, would this be an easier problem to solve? Or is linking between FlatPak directories just as hard as gaining access to an arbitrary directory?

I think it would actually make things harder... :unsure:

Posted (edited)

I installed the Flatpak version via my disto (Manjaro) package manager without problem. I think it should state: 3D level editor for The Dark Mod and Doom 3, instead of the other way around.

software-installer-manjaro.thumb.jpg.3c68c48aece9a962c20807b155bf384e.jpg

Originally DR takes over the system theme that is selected. So in my case the dark theme, but with the Flatpak install, only the light theme is used. It doesn't take over the system theme. Is there a way to force the system theme? I guess using the light theme does have the benefit of good looking icons.

Edited by datiswous
Posted
22 minutes ago, datiswous said:

I think it should state: 3D level editor for The Dark Mod and Doom 3, instead of the other way around.

I just copied this information out of the .desktop file.  It wouldn't hurt to clean some of those up though, the longer description was also there but might be a bit brief for a graphical package browser too.

24 minutes ago, datiswous said:

Is there a way to force the system theme?

Not DarkRadiant specific, but I think you usually just have to install the Flatpak version of your system theme.  For me (KDE / Breeze), I had to install https://github.com/flathub/org.gtk.Gtk3theme.Breeze and apply the workaround from the readme.

  • Thanks 1
Posted
On 9/13/2022 at 4:16 PM, jonri said:

I think this is the only outstanding issue left.  Instead of requiring TDM to be in /home, my alternative idea is to provide instructions for the user to modify the permissions after installation.  This can either be done with a single command along the lines of

flatpak override --user --filesystem=/path/to/tdm net.darkradiant.DarkRadian

or by using Flatseal to so the same graphically.

I propose putting these instructions in a wiki article that we link to in the package description, and possibly a little sentence on the Game Setup dialog in the next version of DR saying "Can't find your game path? Click here for instructions" that would show up in the flatpak version only.

This process seems to be what various media players have settled on doing when they need persistent access to an arbitrary directory.  As long as your TDM path doesn't change, this would be a one-time process.

Hey! Have you had a chance to try this with the flatpak manifest I'm working on? I'm curious if one flatpak app can access another's dir in ~/.var or if it's completely disabled. If it's the latter, we need to change the default installation path in the darkmod flatpak:

 

Posted
10 hours ago, Ludvig said:

Hey! Have you had a chance to try this with the flatpak manifest I'm working on? I'm curious if one flatpak app can access another's dir in ~/.var or if it's completely disabled. If it's the latter, we need to change the default installation path in the darkmod flatpak:

I haven't, but I'll certainly try it out!  Ordinarily Flatpak packages can't get to each other's files, but if it can be installed to an agreed-upon location outside the sandbox we should be able to make this work.

  • Like 1
  • 4 months later...
Posted (edited)

Every time I install the DR flatpack version it downloads an amount of different nvidia GL runtimes, but I already found out I only need one and the rest is just wasted storage. What is the reason for that?

Edited by datiswous
Posted

I doubt it's something on our end, as we just tell flatpak that we need OpenGL support and it's supposed to figure out the rest.  I'll see if I can read up on it a little though.  Flatpak has many advantages, but storage space efficiency is not one of them.

  • Like 1
Posted

Yeah, that's something that flatpak does, and only for nvidia since the driver isn't fully open source. Basically flatpak checks what version of the driver your system is using and tries to install a corresponding version for the runtime. These need to match for hardware acceleration to work within flatpak.

You can see if you have any old nvidia runtimes that can be removed by running

flatpak remove --unused

 

  • Thanks 1
Posted
2 hours ago, Ludvig said:

You can see if you have any old nvidia runtimes that can be removed by running

flatpak remove --unused

This info should go in the topic post I think. Works really well.

Posted
9 hours ago, datiswous said:

This info should go in the topic post I think. Works really well.

Yeah that might be a good idea, but it's not something specific to this package. :)

  • Like 1

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

      Cool thing: Thanksgiving break means I don't have to get my son up before dawn

      Not cool thing: My son stays up all night on my PC so I don't get much TDM time...
      · 3 replies
    • datiswous

      Does anyone know if the mission/map in this video posted by @Springheel can still be found somewhere and played? Looks like fun.
       
      · 1 reply
    • taffernicus

      I'm curious about doom and thief multiplayer netcode 😂 or how these games handle networking for multiplayer in general
      a youtube channel called battle(non)sense sometimes posts about netcode analysis
      · 2 replies
    • The Black Arrow

      Hey @Ansome, are you still around? I think it's been about 3 months since you've had an issue with an SSD, right?
      · 4 replies
    • Sotha

      Brushes: ~1300
      Patches: ~990
      Entities: ~960
      Ambients: Done, EFX: Done, Objectives: Done, Briefing, Done, Location System: Done.
      Going to final polishings before beta.
      · 0 replies
×
×
  • Create New...