Jump to content

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

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:

 

Link to comment
Share on other sites

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

    • STiFU

      Anyone here played Inscryption? At first, I was like "no, I am not going to play a stupid card game", but this game is so much more than that. It is so meta, full of 4th wall breaks, and feels so damn spooky and weird because of it. Absolutely recommended, if you can stand the visuals. I recommend not reading up too much on it, as that could easily spoil half the incredible surprises. Just know that what you see in the beginning is by far not everything.
      · 2 replies
    • freyk

      Tried to make a tdm advertisement commentpost at one of civvie11 youtube videos about T2. Post got marked as spam. His problem (to not discover TDM for himself),..not my problem.
      But some help of some fellow TDM yt-videocomment posters would be nice. To ask him and others, to play TDM. To get more players/creators. 
      · 2 replies
    • datiswous

      Currently Profile Information has 3 fields, these are shown in forum posts under your avatar:
      1. Gender
      2. Location
      3. Interests
      I think that it could be useful to have an extra field called "Operating system" (under location). It can be useful for tech support and to see what people use.
      Alternatively it could be a more general term, like PC system, so that you can for example state that you use an AMD gpu.
      · 2 replies
    • OrbWeaver

      Greetings fellow kids.
      · 11 replies
    • Crafty_Creeper

      Keep on Creeping on...
       
      · 3 replies
×
×
  • Create New...