datiswous Posted June 20, 2022 Report Posted June 20, 2022 (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 June 20, 2022 by datiswous Quote
JackFarmer Posted June 25, 2022 Report Posted June 25, 2022 (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 June 25, 2022 by JackFarmer 1 Quote
datiswous Posted June 25, 2022 Author Report Posted June 25, 2022 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. 1 Quote
OrbWeaver Posted June 27, 2022 Report Posted June 27, 2022 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. 1 Quote DarkRadiant homepage ⋄ DarkRadiant user guide ⋄ OrbWeaver's Dark Ambients ⋄ Blender export scripts
jonri Posted June 29, 2022 Report Posted June 29, 2022 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. 2 Quote
OrbWeaver Posted July 6, 2022 Report Posted July 6, 2022 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. 1 Quote DarkRadiant homepage ⋄ DarkRadiant user guide ⋄ OrbWeaver's Dark Ambients ⋄ Blender export scripts
datiswous Posted July 6, 2022 Author Report Posted July 6, 2022 Quote Following the decision made by Canonical to replace parts of APT with Snap and have the Ubuntu Store install itself without users knowledge or consent, the Snap Store is forbidden to be installed by APT in Linux Mint 20. Also, Linux Mint disabled the Snap store in their distro, https://linuxmint-user-guide.readthedocs.io/en/latest/snap.html Quote
jonri Posted July 23, 2022 Report Posted July 23, 2022 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... 1 Quote
jonri Posted August 19, 2022 Report Posted August 19, 2022 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. 2 Quote
OrbWeaver Posted August 19, 2022 Report Posted August 19, 2022 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. Quote DarkRadiant homepage ⋄ DarkRadiant user guide ⋄ OrbWeaver's Dark Ambients ⋄ Blender export scripts
greebo Posted August 19, 2022 Report Posted August 19, 2022 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. 1 Quote
jonri Posted August 19, 2022 Report Posted August 19, 2022 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. Quote
OrbWeaver Posted August 19, 2022 Report Posted August 19, 2022 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. Quote DarkRadiant homepage ⋄ DarkRadiant user guide ⋄ OrbWeaver's Dark Ambients ⋄ Blender export scripts
greebo Posted August 24, 2022 Report Posted August 24, 2022 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 Quote
jonri Posted August 25, 2022 Report Posted August 25, 2022 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. Quote
greebo Posted August 25, 2022 Report Posted August 25, 2022 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. Quote
jonri Posted August 26, 2022 Report Posted August 26, 2022 (edited) If anyone is inclined to try out the flatpak by building it locally, here are the steps: Install flatpak and flatpak-builder using your normal package manager. Create a new directory and place the attached com.thedarkmod.DarkRadiant.yml inside of it. In the directory, run `git clone https://github.com/flathub/shared-modules.git`. Run `flatpak install org.freedesktop.Platform//21.08 org.freedesktop.Sdk//21.08`. Run `flatpak-builder --user --install --force-clean build-dir com.thedarkmod.DarkRadiant.yml`. Grab a coffee while you wait for DR and all its dependencies to compile. Launch DarkRadiant from your UI, or run `flatpak run com.thedarkmod.DarkRadiant`. Specifically, I'm interested in: 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. 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. 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: 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. 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 August 26, 2022 by jonri 1 Quote
OrbWeaver Posted August 30, 2022 Report Posted August 30, 2022 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? Quote DarkRadiant homepage ⋄ DarkRadiant user guide ⋄ OrbWeaver's Dark Ambients ⋄ Blender export scripts
OrbWeaver Posted August 30, 2022 Report Posted August 30, 2022 It turns out that Ubuntu are shipping a broken version of flatpak-builder. In order to build on Ubuntu, you need to: Uninstall the .deb package of flatpak-builder if it is installed. Install the Flatpak version with [sudo] flatpak install flathub org.flatpak.Builder 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. Quote DarkRadiant homepage ⋄ DarkRadiant user guide ⋄ OrbWeaver's Dark Ambients ⋄ Blender export scripts
OrbWeaver Posted August 30, 2022 Report Posted August 30, 2022 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. 1 Quote DarkRadiant homepage ⋄ DarkRadiant user guide ⋄ OrbWeaver's Dark Ambients ⋄ Blender export scripts
jonri Posted August 31, 2022 Report Posted August 31, 2022 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. Quote
ashpl Posted September 1, 2022 Report Posted September 1, 2022 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 1 1 Quote
jonri Posted September 6, 2022 Report Posted September 6, 2022 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. 3 Quote
jonri Posted September 10, 2022 Report Posted September 10, 2022 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. Quote
greebo Posted September 10, 2022 Report Posted September 10, 2022 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. 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. 1 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.