Skip to content

feat: flatpak package#45

Draft
underscorejoser wants to merge 3 commits into
craftablescience:manefrom
underscorejoser:feat/flatpak
Draft

feat: flatpak package#45
underscorejoser wants to merge 3 commits into
craftablescience:manefrom
underscorejoser:feat/flatpak

Conversation

@underscorejoser
Copy link
Copy Markdown

@underscorejoser underscorejoser commented Apr 4, 2026

How to build

  • Install flatpak and setup Flathub (recommend use --user to setup as user repo)
  • Install flatpak-builder (you can install with flatpak install org.flatpak.Builder)
  • Run flatpak run org.flatpak.Builder --user --install-deps-from=flathub --install --force-clean builddir .build-aux/flatpak/science.craftable.MareTF.yml

This will install required runtimes, build and install MareTF
More information can be found on Flatpak documentation and Flathub documentation

PR details

  • Most noticeable change is the switch to reverse-DNS names which affects all Linux builds but should be fine, also it's being built with Qt 6.10
  • Since Flatpak/Flathub builds all programs offline I created a python script (not documented) that parses the stdout of cmake configure to facilitate dependencies sources for offline builds (includes incomplete option for nix, anyone is welcome to complete)
  • Includes GitHub workflow for building flatpak
  • Misc changes include disabling autoRegister of Discord RPC, removed uppercase glob for mimetypes, and some changes to installed files

Needs testing

For Flathub release

Currently the MetaInfo file contains placeholders for description, screenshots and branding which I expect you help to fill in with proper contents following Flathub's quality guideline

Look into in the future

  • Localization for metadata files

If this goes through I'm gonna update my PR for VPKEdit including changes from here

Comment thread install/linux/metainfo.xml.in Outdated
<summary>A utility to create, edit, and display every type of VTF file ever made</summary>
<developer id="info.craftablescience">
<name translate="no">Laura Lewis</name>
<url>https://craftablescience.info</url>
Copy link
Copy Markdown
Owner

@craftablescience craftablescience Apr 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note for myself: this was changed to https://craftable.science recently

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, that's why the website was not loading, so the application id needs to change

@craftablescience
Copy link
Copy Markdown
Owner

Looking at this now, I think the cmake will need to be modified to generate the flatpak files automatically, otherwise this will be a nightmare to maintain. I'll figure this out

@underscorejoser
Copy link
Copy Markdown
Author

Sorry it took some time to reply. You mean this because of dependencies? Yeah... I took some time a while ago trying to figure it out a better way but cmake is not exactly friendly in that regards.

The way Nix does is either patching out FetchContent or using envs like I did, or FETCHCONTENT_FULLY_DISCONNECTED which is not recommended. CMake recommends Dependency Providers which should help do the process more easily but I didn't look much into.

But it still won't help about maintaining a separate file with source, version, etc. Here it's says to intercept find_package calls with CMAKE_PROJECT_TOP_LEVEL_INCLUDES but it's inconsistent and flawed in my testing and won't work with dependencies that don't use FetchContent (cryptopp). Not to mention you also depend on all cmake projects working in an uniform way, which is not the case.

So in the end the lazy and hacky way of reading stdout of cmake configure works ok and doesn't need big changes, the only minor inconvenience is needing to run the script to update the dependencies. But let me know what you think about

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants