Hello, I’m developing an application using python, flatpak and gtk4 and I have some questions.
Context: the app uses a fair amount of yaml files to define the content of some Gtk.Dropdowns. The reason for using these files is to make it possible for the user to create and upload their own files to add options beyond the default ones of the app.
How to deal with this? I thought of a few approaches:
-
Compress the directory containing the files and add the compressed file to gresources. Then uncompress the content in xgd_user_data_dir and use the content of xgd_user_data_dir to populate the dropdowns. Problem: I couldn’t figure out how to uncompress and write to the xgd_user_data_dir directory.
-
Add the directory containing the files directly to the app’s directory structure and then copy the files to xgd_user_data_dir. Problem: I can’t find the correct path to use, and even after installing it, I don’t know which path to use in the application code to reference and find the files within the application’s directory tree (in /var/lib/flatpak/app).
I accept other suggestions for approaches, I didn’t want to use a database for this because using yaml the files are easy to create and edit for lay people. It’s possible that there is a simple solution for this via meson but I don’t have enough knowledge of meson to figure it out.