Jump to content
The Dark Mod Forums

Darkradiant install with Flatpak? (Linux)


Recommended Posts

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)?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

 

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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
Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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:

Link to comment
Share on other sites

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
Link to comment
Share on other sites

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

    • nbohr1more

      Anyone have any luck with light.setShader( string ) ? It seems to make whichever light you apply it to full-bright on the initial invoke?
      · 0 replies
    • thebigh

      I'm starting to think we need another mapping contest.
      · 4 replies
    • kano

      Don't you hate it when there's a quality discussion on a forum somewhere online about something, but then two disagreeing users derail and transform it into a back-and-forth poo slinging competition at one another?
      · 9 replies
    • Diego

      Oh look the status updates are back! 
      · 2 replies
    • JackFarmer

      After watching the first three and a half episodes of "The Sandman" last night, I realize once again that overly imaginative narratives are not for me. Also, the main actor looks like he has a toothache.
      Which makes me wonder, is there a Dark Mod mission with a medieval dentist?
      · 4 replies
×
×
  • Create New...