Jump to content
The Dark Mod Forums

Recommended Posts

Posted (edited)

Question:

I was wondering if installation with Flatpak is something that is considered for the future.

 

Motivation:

I recently installed Linux Mint on my laptop and found installing DR 3.0 relatively easy (ppa), so I was thinking about figuring out how to create a package for Manjaro (which I use on my main pc), but then I thought about Flatpak. Isn't that the way forward for if you want to support multiple distro's but don't have a large group of interested Linux maintainers? Currently it is:

  • Debian: There is a maintained package,
  • Ubuntu: There's a ppa
  • All other distro's: built from source

While with Flatpak it seems you just need one way of installation for all distro's. I could be wrong though.

Edited by datiswous
Posted (edited)

 

 

On 6/20/2022 at 9:05 PM, datiswous said:

I recently installed Linux Mint on my laptop and found installing DR 3.0 relatively easy (ppa),

 

Sorry for going a little bit ot.

Thanks to @thebighI learned how to compile the Radiant from the source code. He also mentioned that missing packages might cause problems and he was right.

During compiling, the console reports that the "Glue" package is missing. Went to the Mint distro site but there are three pages of packages associated with "Glue".  Which one do I have to pick?

Regarding your question, I am not sure whether I understand correctly. However, if this Flatpack thingy allows for automated installation on Mint avoiding problems as mentioned above, then I would say this is a great idea.

 

Edited by JackFarmer
  • Like 1
Posted
4 minutes ago, JackFarmer said:

Regarding your question, I am not sure whether I understand correctly. However, if this Flatpack thingy allows for automated installation on Mint avoiding problems as mentioned above, then

https://en.wikipedia.org/wiki/Flatpak

It can be installed on all distro's that support Flatpak. Normally every major distro has it's own package system.

 

In your case I don't think you need to build from source. See this post:

https://launchpad.net/~orbweaver/+archive/ubuntu/darkradiant

This should be added to the wiki I think.

  • Thanks 1
Posted

If someone can get a FlatPak of DarkRadiant working, we'll gladly add the build scripts to the repo.

I tried creating a Snap once, but ran into numerous difficulties and eventually gave up. It took ages to startup, the OpenGL functionality was non-operative, and the application could not access the desktop GTK theme (because the entire GTK stack is packaged into the Snap itself) which meant it would only display with the hideous default Windows 95 theme.

Applications I've used from Snaps or FlatPaks either draw their own theme (e.g. Blender) or include GTK themes and a theme switcher into the application itself (e.g. Inkscape). Presumably such internal theming would need to be integrated into DR unless the latest versions of Snap/FlatPak have managed to solve the theme problem some other way.

  • Like 1
Posted

I've been using Fedora Kinoite (the KDE equivalent of Silverblue) on my laptop for the past couple months as an experiment, and Flatpak is its primary package manager.  I've been looking for an excuse to learn about the Flatpak packaging process, so if nobody else gives it a go I'd be interested in trying to make a build in the near future.

  • Like 2
Posted

FlatPak or AppImage seem to be the leading options these days. I'll probably get rid of the vestigial Snap scripts; from what I've read Snap is Ubuntu's "me too" offering which is largely ignored by other distros, and was never really designed for desktop apps anyway.

I did experiment with AppImage but ran into some problems with its expectations of what should go in the build directory. Its documentation is very limited and consists largely of long example shell scripts which you are expected to read and reverse engineer for your project. The FlatPak documentation looks much better and seems to include a proper tutorial on how to make a simple package.

  • Like 1
  • 3 weeks later...
Posted

I'm giving it a go this weekend, getting the flatpak to build and start up went surprisingly smoothly.  It crashes when you try to do anything with a shader though, so this is where the last 10% is going to take 90% of the time...

 

 

  • Thanks 1
  • 4 weeks later...
Posted

I figured out the crash, it seems we will have some things to fix in order to get DarkRadiant to work with the new(ish) wxwidgets 3.2 release.

I didn't originally think wxwidgets was at fault since I got the same crash in my flatpak downgrading to 3.1.x.  It wasn't until my main system upgraded to 3.2 that I went back and looked, and realized my previous working version was 3.0.5 (they do odd/even for unstable/stable releases).  I built the flatpak against 3.0.5 and things seem to be working well now!

I'll put the flatpak through its paces, especially around file loading/saving, and make sure there is nothing else broken.  If everything looks good, there's just a couple odds and ends to clean up the permissions and this should be good to go.

I'll also file issues for the things that broke when I tried wxwidgets 3.2.  It's already the default in Arch, and since it's considered a stable release I'm sure it's going to end up everywhere else eventually too.  Fortunately we can keep the flatpak on 3.0.5 as long as needed.

  • Thanks 2
Posted

Do you still get the render issues in the texture preview window (i.e. the view is entirely white until you resize or force a render in some way, after which it works correctly)? This was always a problem with the 3.0 wxWidgets packaged with Ubuntu.

I've been thinking about wxWidgets version recently because I upgraded to Ubuntu 22.04 last week and they are still packaging wxWidgets 3.0, even though 3.2 has been out for a long time. I'm wondering if we need a way to build using a local newer version of wxWidgets that we can include without needing to rely on the distro packages (e.g. with an optional Git submodule). Although if you're getting crashes with 3.2 it sounds like the upgrade might not be as simple as I would have hoped.

Posted

The official wxWidgets 3.2.0 has been released just recently, in July, so I assume this was too late for Ubuntu 22.04.

But I'm glad that it is out at last (it took seemingly forever), now we can finally move on and remove some of the weird #if workarounds. After removing the problems and crashes, of course. 😑

  • Like 1
Posted
2 hours ago, OrbWeaver said:

Do you still get the render issues in the texture preview window (i.e. the view is entirely white until you resize or force a render in some way, after which it works correctly)? This was always a problem with the 3.0 wxWidgets packaged with Ubuntu.

Can you clarify which window you're referring to? I don't think I had this problem on Arch so I'm not sure where to look.

2 hours ago, OrbWeaver said:

I'm wondering if we need a way to build using a local newer version of wxWidgets that we can include without needing to rely on the distro packages (e.g. with an optional Git submodule).

wxWidgets 3.2 also now has a cmake build option, so that might make it easy to integrate with the DR buildsystem if we went this route. 

Posted
3 hours ago, greebo said:

The official wxWidgets 3.2.0 has been released just recently, in July, so I assume this was too late for Ubuntu 22.04.

Oh, I must have been thinking of 3.1 then, which being an "unstable" release wouldn't be expected to make it into Ubuntu repositories.

1 hour ago, jonri said:

Can you clarify which window you're referring to? I don't think I had this problem on Arch so I'm not sure where to look.

2D views, such as the preview image on the Media tab and the main part of the Textures tab, used to show completely white until resized. I haven't actually tested since my Ubuntu upgrade though so not sure if it's still a problem.

Posted
22 hours ago, greebo said:

We got a bug report here which seems to happen using wxWidgets 3.2. @jonri Is this something that looks like problems you remember running into?

https://bugs.thedarkmod.com/view.php?id=6080

Yes, that was the big one and I responded with more details.  There were some other new asserts as well. 

I updated my flatpak build script with the new DR release this week and re-tested.  I'll post the build script and some instructions soon for others to test.

From what I can tell, the standard practice is to commit the build script to Flathub instead of the project repo.  Once we agree everything looks good I can submit the PR at flathub unless@greebo would prefer to do it.

Posted

I don't insist on doing that myself, so feel free :)

I'm currently upgrading to wxWidgets 3.2 on Windows, and I had to fix a few things in terms of implicit wxIcon>wxBitmap>wxBitmapBundle conversions.

Posted (edited)

If anyone is inclined to try out the flatpak by building it locally, here are the steps:

  1. Install flatpak and flatpak-builder using your normal package manager.
  2. Create a new directory and place the attached com.thedarkmod.DarkRadiant.yml inside of it.
  3. In the directory, run `git clone https://github.com/flathub/shared-modules.git`.
  4. Run `flatpak install org.freedesktop.Platform//21.08 org.freedesktop.Sdk//21.08`.
  5. Run `flatpak-builder --user --install --force-clean build-dir com.thedarkmod.DarkRadiant.yml`.
  6. Grab a coffee while you wait for DR and all its dependencies to compile.
  7. Launch DarkRadiant from your UI, or run `flatpak run com.thedarkmod.DarkRadiant`.

Specifically, I'm interested in:

  1. Build issues: this should work pretty universally since it builds against a common SDK, but if the steps above don't work let me know.
  2. Runtime issues: this should also run universally, if it doesn't launch then something went wrong.  If it runs but you come across a specific feature that doesn't work, let me know and I'll see if we can work around it.
  3. If anyone runs Wayland, please let me know either way whether it is working.  If not, there are some permissions I should add.

Known issues:

  1. The flatpak currently can't find the icon.  It should just be a matter of getting the build file to copy it to the right place, so I can resolve that easily.
  2. This doesn't use flatpak's portals for file access.  One of flatpak's advantages is its sandboxing features, but I currently have this app's permissions set to allow the whole filesystem (even so, technically there are some things flatpak still sandboxes away).  It would take a some development to use portals for file dialog boxes, the big unknown to me is how to deal with accessing the game directory which could be anywhere.  This doesn't prevent us from releasing, but it might be nice to look at in the future.

If everything looks good, I'm planning to get this up on flathub this weekend.

com.thedarkmod.DarkRadiant.yml

Edited by jonri
  • Thanks 1
Posted

Unfortunately I can only get as far as step 5:

$ flatpak-builder --user --install --force-clean build-dir com.thedarkmod.DarkRadiant.yml

(flatpak-builder:15593): Json-WARNING **: 20:22:26.374: Failed to deserialize "config-opts" property of type "GStrv" for an object of type "BuilderModule"
Downloading sources
Downloading https://downloads.sourceforge.net/project/glew/glew/2.2.0/glew-2.2.0.tgz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   327  100   327    0     0    496      0 --:--:-- --:--:-- --:--:--   496
100  816k  100  816k    0     0   600k      0  0:00:01  0:00:01 --:--:-- 3296k
Downloading https://mesa.freedesktop.org/archive/glu/glu-9.0.2.tar.xz
100   162  100   162    0     0    567      0 --:--:-- --:--:-- --:--:--   567
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
Failed to download sources: module glu: server certificate verification failed. CAfile: none CRLfile: none

I'm assuming this is more an Ubuntu problem rather than a Flatpak problem, since nothing in the manifest specifies the SSL certificates. However I don't know how to rectify it. I'm not even sure what it's using to do the download: wget downloads that URL fine, whereas curl returns a "301 Moved Permanently" page but does not otherwise complain about SSL certificates.

EDIT: This works fine and provides similarly-formatted output, so I assume Flatpak is using curl behind the scenes.

$ curl -OL https://mesa.freedesktop.org/archive/glu/glu-9.0.2.tar.xz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   162  100   162    0     0    516      0 --:--:-- --:--:-- --:--:--   515
100  425k  100  425k    0     0   296k      0  0:00:01  0:00:01 --:--:-- 1076k

Perhaps it is something to do with sandboxing used by Flatpak, interfering with the ability of curl to find its SSL certificates?

Posted

It turns out that Ubuntu are shipping a broken version of flatpak-builder.

In order to build on Ubuntu, you need to:

  1. Uninstall the .deb package of flatpak-builder if it is installed.
  2. Install the Flatpak version with [sudo] flatpak install flathub org.flatpak.Builder 
  3. This will install the Flatpak but not put the command into your path, so you need to run /var/lib/flatpak/exports/bin/org.flatpak.Builder (or your local version, if you didn't install system-wide) manually, or symlink it into /usr/local/bin/flatpak-builder for convenience.
Posted

OK, I got it built and installed.

  • Main functionality looks good. Basic map loading and rendering is working as expected.
  • I don't know where the preferences are being stored. The existing preferences from ~/.config/darkradiant/3.1 are not loaded, however newly-set preferences are saved and loaded in the next session. So it is storing preferences somewhere, just not in the normal location.
  • The wxWidgets GL rendering issue does reproduce for me. The easiest way to trigger it is to click on the Media tab then on the Textures tab. The contents of the Media tab continue to be visible until you do something which triggers a re-render (e.g. move the camera or just click in one of the 3D views). This will probably require an update to wxWidgets 3.2 when possible.
  • Missing icon confirmed, but this is already planned to be fixed before release.
  • Like 1
Posted

Thanks for taking a look!

5 hours ago, OrbWeaver said:

I don't know where the preferences are being stored. The existing preferences from ~/.config/darkradiant/3.1 are not loaded, however newly-set preferences are saved and loaded in the next session. So it is storing preferences somewhere, just not in the normal location.

I think this is to be expected, flatpak should keep configuration files within the app's sandbox.

5 hours ago, OrbWeaver said:

The wxWidgets GL rendering issue does reproduce for me. The easiest way to trigger it is to click on the Media tab then on the Textures tab. The contents of the Media tab continue to be visible until you do something which triggers a re-render (e.g. move the camera or just click in one of the 3D views). This will probably require an update to wxWidgets 3.2 when possible.

I think figured out the difference - I normally run in SplitPane layout and this doesn't happen there.  I was able to reproduce it in the default layout.

5 hours ago, OrbWeaver said:

Missing icon confirmed, but this is already planned to be fixed before release.

It's been surprisingly harder to fix than expected.  The directive in the build script that's supposed to do it can't find the original icon.  At worst I'll just make a copy of the icon and a new .desktop file to go with it.

 

I should also be able to give it a test on a KDE wayland session.

 

Posted

Hello,

I followed the build procedure on a fresh Debian Stable 11 (Bullseye), KDE with X11.

The build went without an error, and I tried it by loading a small map I had around. I didn't test it extensively but I didn't met any runtime problems so far. Looking forward to see Darkradiant on flathub, though installing it this way is already a big step forward from building it from source the traditional way 

  • Like 1
  • Thanks 1
Posted

I think I've got this in good shape:

  • Upgraded to the new DarkRadiant release 3.2.0
  • Icon is now installed correctly
  • Tested wxgtk 3.2.0, it works better than it did before but still found issues (bug report to come tomorrow) so I will keep the flatpak on wxgtk 3.0 for now.
  • Tested on wayland
    • wxgtk-3.0 does not work in native wayland mode, but seems to be ok in xwayland
    • wxgtk-3.2 will likely work natively on wayland once remaining issues are fixed
    • In either case, a user on wayland won't have to worry about it, the flatpak manifest is configured to do the right thing

I'll submit this to flathub for review tomorrow.

  • Like 3
Posted

Got a small laundry list of things to fix up to pass validation:

  • We need a content rating, I'm looking at how to generate that now.
  • We need a 128x128 icon.  I found this so I was wondering @greeboif you had any other icon source files lying around.  If not I'll just upscale the 64x64 icon to meet the requirement.
  • Screenshots of the application are also mandatory.  I could make a wiki page to host them and it would probably be fine, but for maximum stability of the links could we put a Screenshots page on www.darkradiant.net without too much trouble?
  • 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?

A couple other side notes:

  • I realized that net.darkradiant.DarkRadiant would be a more accurate package name than com.thedarkmod.DarkRadiant, so anyone who built the test version will want to uninstall it once the flathub version comes out.
  • I had to make an appstream metadata file, ultimately this can go in the main DR repo and will probably need to be updated with the new version number on each release.
Posted
24 minutes ago, jonri said:

We need a 128x128 icon.  I found this so I was wondering @greeboif you had any other icon source files lying around.  If not I'll just upscale the 64x64 icon to meet the requirement.

image.png

24 minutes ago, jonri said:

Screenshots of the application are also mandatory.  I could make a wiki page to host them and it would probably be fine, but for maximum stability of the links could we put a Screenshots page on www.darkradiant.net without too much trouble?

Yes, I can upload them to darkradiant.net, no problem. If you want to place them yourself, you can clone https://github.com/codereader/codereader.github.io and create a Pull Request with the screenshots you want to have added. There's already an images/screenshots/ directory in that repo.

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

    • jivo

      I just uploaded a new version of the Visible Player Hands mod. It's been updated for TDM 2.13 and has new animations. Check out the post if you're interested!
      · 0 replies
    • datiswous

      I moved from Manjaro Linux (rolling release) to Linux Mint (LTS). One of the reasons was that I found the updates a bit too often and long. But now on Mint I get updates every day, although they're usually small updates.
      · 3 replies
    • JackFarmer

      "Hidden Hands: Vitalic Fever" - new update available including subtitles & compressed briefing video (thanks to @datiswous) and several fixes.
      · 0 replies
    • Wolfmond

      🇬🇧

      2025-04-20
      I'd like to track my level design progress a bit more often now, so I'm using the feed in my profile here.
      I've been working intensively on Springheel's YouTube course over the past few days. I'm currently up to lesson 8. There is so much information that needs to be processed and practiced. 
      I have started to create my own house. As I don't have the imagination to create a good floor plan, I grabbed a floor plan generator from Watabou and experimented with it. I chose a floor plan that I will modify slightly, but at least I now have an initial idea. 
      I used two guards as a measuring tape: The rooms are two guards high. It turned out that I can simply double the number of boxes in DarkRadiant in grid size 8 that are drawn in the floor plan. 
      I practiced the simplest things on the floor plan first. Drawing walls, cutting walls, inserting doors, cutting out frames, creating VisPortals, furnishing rooms.
      I have had my first success in creating a book. Creating a book was easier than I thought. I have a few ideas with books. The level I'm creating will be more or less a chill level, just for me, where I'll try out a few things. I don't have an idea for my own mission yet. I want to start small first.
      For the cellar, I wanted to have a second entrance, which should be on the outside. I'm fascinated by these basement doors from the USA, I think they're called Bilco basement doors. They are very unusual in Germany, but this type of access is sometimes used for deliveries to restaurants etc., where barrels can be rolled or lifted into the cellar. 
      I used two Hatch Doors, but they got completely disoriented after turning. I have since got them reasonably tamed. It's not perfect, but it's acceptable. 
      In the cellar today I experimented with a trap door that leads to a shaft system. The rooms aren't practically finished yet, but I want to continue working on the floor plan for now. I'll be starting on the upper floor very soon.

      __________________________________________________________________________________
      🇩🇪

      2025-04-20

      Ich möchte nun mal öfters ein bisschen meinen Werdegang beim Leveldesign tracken, dazu nutze ich hier den Feed in meinem Profil.
      Ich habe mich in den vergangenen Tagen intensiv mit dem Youtube-Kurs von Springheel beschäftigt. Aktuell bin ich bis zu Lektion 8 gekommen. Das sind so viele Informationen, die erstmal verarbeitet werden wollen und trainiert werden wollen. 

      Ich habe mich daran gemacht, ein eigenes Haus zu erstellen. Da mir die Fantasie fehlt, einen guten Raumplan zu erstellen, habe ich mir einen Grundrissgenerator von Watabou geschnappt und damit experimentiert. Ich habe mich für einen Grundriss entschieden, den ich noch leicht abwandeln werde, aber zumindest habe ich nun eine erste Idee. 

      Als Maßband habe ich zwei Wächter genommen: Die Räume sind zwei Wächter hoch. Es hat sich herausgestellt, dass ich in DarkRadiant in Gittergröße 8 einfach die doppelte Anzahl an Kästchen übernehmen kann, die im Grundriss eingezeichnet sind. 

      Ich habe bei dem Grundriss erstmal die einfachsten Sachen geübt. Wände ziehen, Wände zerschneiden, Türen einsetzen, Zargen herausschneiden, VisPortals erstellen, Räume einrichten.

      Ich habe erste Erfolge mit einem Buch gehabt. Das Erstellen eines Buchs ging leichter als gedacht. Ich habe ein paar Ideen mit Bücher. Das Level, das ich gerade erstelle, wird mehr oder weniger ein Chill-Level, einfach nur für mich, bei dem ich ein paar Sachen ausprobieren werde. Ich habe noch keine Idee für eine eigene Mission. Ich möchte erst einmal klein anfangen.

      Beim Keller wollte ich gerne einen zweiten Zugang haben, der sich außen befinden soll. Mich faszinieren diese Kellertüren aus den USA, Bilco basement doors heißen die, glaube ich. Diese sind in Deutschland sehr unüblich, diese Art von Zugängen gibt es aber manchmal zur Anlieferung bei Restaurants etc., wo Fässer dann in den Keller gerollt oder gehoben werden können. 
      Ich habe zwei Hatch Doors verwendet, die allerdings nach dem Drehen vollkommen aus dem Ruder liefen. Inzwischen habe ich sie einigermaßen gebändigt bekommen. Es ist nicht perfekt, aber annehmbar. 
      Im Keller habe ich heute mit einer Falltür experimentiert, die zu einem Schachtsystem führt. Die Räume sind noch quasi nicht eingerichtet, aber ich möchte erstmal am Grundriss weiterarbeiten. In Kürze fange ich das Obergeschoss an.



      · 2 replies
    • JackFarmer

      On a lighter note, thanks to my cat-like reflexes, my superior puzzle skills and my perfect memory, I was able to beat the remastered version of "Tomb Raider: The Last Revelation" in a new superhuman record time of 23 h : 35 m, worship me!
      · 5 replies
×
×
  • Create New...