Jump to content
The Dark Mod Forums

I've created a manifest for a flatpak package


Ludvig

Recommended Posts

On 10/5/2022 at 7:11 PM, jonri said:

@Ludvig nice to see you're getting this ready for Flathub!  Since I just went through this with DarkRadiant, I took a look at your manifest to see if there's anything that will trip up the process:

  • Comments are fine, but they don't like commented out lines so you'll want to clean those up before submitting.
  • They require a 64x64 and a 128x128 icon file, and the one you're providing is 48x48.  You might need to go hunting in the assets or on the wiki, or see if someone here has a suitable icon lying around.
  • I'm not sure about having --socket=wayland and --socket=x11 together.  If we don't have explicit wayland support then --socket=x11 should be sufficient on its own; if we do, then I think you use --socket=wayland with --socket=x11-fallback.
  • You have --talk-name=org.freedesktop.Notifications but I don't remember anything in TDM or the installer that would make use of it.  If there is, feel free to correct me 🙂
  • You'll need a flathub.json file that tells their build system which CPU architectures to support or skip.  Without this, I think it will try to make an ARM package too.

Once you've got an appstream file I'll gladly check it over for you too.

 

Thank you for the feedback!

Yeah I should clean out commented lines. The manifest was just based on a template I've used for other projects, so I haven't gotten around to that, same with the --talk and --socket permissions. The icon thing is correct, I just used the one from the project but I need to find a bigger one (or just upscale this one, as a last resort maybe). As for the flathub.json I just copied the one from DarkRadiant. Hope you don't mind! :D

Regarding DarkRadiant, changing the install location for this is probably a good idea, because of the restrictions you described in the other thread, the question is what to use. Ideally flatpaks shouldn't have more permissions than what they need (so preferably no --filesystem=host or --filesystem=home if not absolutely necessary). The XDG specification also doesn't seem to have a default directory for games, but one work-around would be to use the actual XDG_DATA_DIR (usually defaults to /home/$USER/.local/share), which would fit with how other applications store their data. This would make the game folder kind of hard to navigate to from DarkRadiant though, maybe? Would it be possible to set the default search-path for DarkRadiant to something like ~/.local/share/darkmod? In that case DarkRadiant would just need --filesystem=xdg-data/darkmod for its permission.

I've modified the manifest with your suggestions and the proposed change in default location. If you want to give it a try, I suggest deleting ~/.var/app/com.thedarkmod.TheDarkMod first so there are no conflicts with the old game installation.

Edit: I used https://steamuserimages-a.akamaihd.net/ugc/155775322931431372/F03A45CA10D985E847A7D694AA3A91D6F829F77E/?imw=637&imh=358&ima=fit&impolicy=Letterbox&imcolor=%23000000&letterbox=true as a basis and created a new 128x128 icon for the app. Would this be acceptable, you think?

com.thedarkmod.TheDarkMod.yml

com.thedarkmod.TheDarkMod.png

Edited by Ludvig
Added image
Link to comment
Share on other sites

13 hours ago, Ludvig said:

Would it be possible to set the default search-path for DarkRadiant to something like ~/.local/share/darkmod? In that case DarkRadiant would just need --filesystem=xdg-data/darkmod for its permission.

I like this approach, it seems like it would be easy to have some logic in DR that if the game path isn't set and that directory exists, then set it by default.  This would keep it from affecting anyone that isn't using the flatpak version, and for anyone who just installs both flatpaks things will already be set up with the right paths.

Locking down the filesystem for DR may be a minor inconvenience to anyone who keeps multiple TDM installs around (dev builds, etc), but in this case Flatseal provides an easy, one time solution to open up full access (I've already documented the reverse in the wiki).

Your 128px icon looks fine to me, seems to be from the same original source as the 48px icon.  Does it look ok if you derive a 64px icon from it too?

 

Link to comment
Share on other sites

On 10/8/2022 at 5:02 AM, jonri said:

I like this approach, it seems like it would be easy to have some logic in DR that if the game path isn't set and that directory exists, then set it by default.  This would keep it from affecting anyone that isn't using the flatpak version, and for anyone who just installs both flatpaks things will already be set up with the right paths.

Locking down the filesystem for DR may be a minor inconvenience to anyone who keeps multiple TDM installs around (dev builds, etc), but in this case Flatseal provides an easy, one time solution to open up full access (I've already documented the reverse in the wiki).

Your 128px icon looks fine to me, seems to be from the same original source as the 48px icon.  Does it look ok if you derive a 64px icon from it too?

 

Yeah, the permission then should be --filesystem=xdg-data/darkmod:create for the manifest for DR too, so either the darkmod installer or DR can create the dir. The launcher script I made already checks if the folder exists, and if not it creates it, so it'll handle the folder already existing.

And yeah I think it's reasonable to lock down access by default, and the people with advanced use-cases should be able to find information on how to customize their install. However, I don't think it's possible to customize the install path for the flatpak, since the launcher script currently assumes it's installed in the default location. So currently, if they want to install multiple versions, they'll need to use another installation method. Fixing this would be difficult as it is now, I think, because we'd need to get the install path from the installer somehow, and we'd have to include a lot more logic checks in the launcher script I think. The idea then would be that the launcher script would check the default game directory for a log, and extract the actual install path. But I don't think that's currently feasible.

Of course, having one flatpak installation of DM and another non-flatpak installaton will work just fine!

I made a quick 64x64 icon by scaling down the 128 icon with linear scaling in gimp. Looks a little blurry to me. :)

com.thedarkmod.TheDarkMod-48.png

Link to comment
Share on other sites

On 10/10/2022 at 1:07 PM, Ludvig said:

I made a quick 64x64 icon by scaling down the 128 icon with linear scaling in gimp. Looks a little blurry to me.

com.thedarkmod.TheDarkMod_64x64.png.4bb06ea73f6cc3ffa9f6f5c816a37edf.png

I took a stab at it, here's what I did in case you want to try to improve it some more. In Gimp I used scaling with NoHalo interpolation, and then I adjusted the contrast to +30.

Link to comment
Share on other sites

  • 2 weeks later...

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

    • Ansome

      Turns out my 15th anniversary mission idea has already been done once or twice before! I've been beaten to the punch once again, but I suppose that's to be expected when there's over 170 FMs out there, eh? I'm not complaining though, I love learning new tricks and taking inspiration from past FMs. Best of luck on your own fan missions!
      · 4 replies
    • The Black Arrow

      I wanna play Doom 3, but fhDoom has much better features than dhewm3, yet fhDoom is old, outdated and probably not supported. Damn!
      Makes me think that TDM engine for Doom 3 itself would actually be perfect.
      · 6 replies
    • Petike the Taffer

      Maybe a bit of advice ? In the FM series I'm preparing, the two main characters have the given names Toby and Agnes (it's the protagonist and deuteragonist, respectively), I've been toying with the idea of giving them family names as well, since many of the FM series have named protagonists who have surnames. Toby's from a family who were usually farriers, though he eventually wound up working as a cobbler (this serves as a daylight "front" for his night time thieving). Would it make sense if the man's popularly accepted family name was Farrier ? It's an existing, though less common English surname, and it directly refers to the profession practiced by his relatives. Your suggestions ?
      · 9 replies
    • nbohr1more

      Looks like the "Reverse April Fools" releases were too well hidden. Darkfate still hasn't acknowledge all the new releases. Did you play any of the new April Fools missions?
      · 5 replies
    • The Black Arrow

      Hope everyone has the blessing of undying motivation for "The Dark Mod 15th Anniversary Contest". Can't wait to see the many magnificent missions you all may have planned. Good luck, with an Ace!
      · 0 replies
×
×
  • Create New...