Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate to independent Flatpak app #189

Merged
merged 48 commits into from May 19, 2024
Merged

Migrate to independent Flatpak app #189

merged 48 commits into from May 19, 2024

Conversation

ryonakano
Copy link
Member

Fixes #187
Fixes #161
Fixes #5

I'll submit Tweaks to Flathub once this PR is merged.

(FYI) Inputs for Review

Changes Summary

  • Make Tweaks an independent GTK app instead of a plugin of System Settings
  • Use Flatpak for packaging

File Changes Summary

  • .github/workflows/main.yml
    • Update CI to build using Flatpak
  • .gitignore
    • Add build directory of flatpak-builder
  • README.md
    • Update installation methods
  • data/icons/128/pantheon-tweaks.svg
  • data/icons/32/pantheon-tweaks.svg
  • data/icons/48/pantheon-tweaks.svg
  • data/icons/64/pantheon-tweaks.svg
  • data/meson.build
    • Install our new icons and .desktop file
    • Icons, .dekstop file, and .metainfo.xml file needs renaming to the format that Flatpak expects (otherwise building fails)
  • data/pantheon-tweaks.desktop.in
    • Add the file
  • data/pantheon-tweaks.metainfo.xml.in
    • Change appdata to the format of desktop-application
  • data/screenshot.png
    • Update screenshot
  • dconf-override.patch
    • Patch dconf to get correct path to user-db in the sandboxed Tweaks
  • io.github.pantheon_tweaks.pantheon-tweaks.yml
    • Add the file
  • meson.build
    • Drop switchboard-2.0 from dependencies
    • Drop -plug prefix from translation related names
    • Build an executable file instead of a shared module
  • po/POTFILES
    • Update file list
  • po/meson.build
    • Drop -plug prefix from .pot file
  • po/pantheon-tweaks.pot
    • Drop -plug prefix from .pot file
    • Update the file with ninja pantheon-tweaks-pot command
  • src/MainWindow.vala
    • Add the file
  • src/Settings/GtkSettings.vala
  • src/Settings/ThemeSettings.vala
    • Make sure we can get correct path in the sandboxed Tweaks
  • src/Tweaks.vala
    • Subclass Gtk.Application
    • Add runtime check for desktop environment
  • src/Widgets/Categories.vala
    • Fix the following message is shown every time we change the selected pane from the left list or scrolling the right pane
    • (pantheon-tweaks:2): Gtk-CRITICAL **: 22:56:16.419: _gtk_widget_get_preferred_size_for_size: assertion 'size >= -1' failed
  • start-pantheon-tweaks.sh
    • Add the file

Works Confirmation

  • Confirmed changing preferences works as expected on elementary OS 7.1
  • Confirmed changing preferences works as expected on elementary OS 6.1
  • Confirmed Tweaks is not shown in app launcher on Ubuntu 23.10
  • Confirmed running flatpak run io.github.pantheon_tweaks.pantheon-tweaks blocks running Tweaks as expected on Ubuntu 23.04

Also review some comments
Installation instruction in README needs to be reviewed after investigation
The following message is shown every time we change the selected pane from the left list or scrolling the right pane

(pantheon-tweaks:2): Gtk-CRITICAL **: 22:56:16.419: _gtk_widget_get_preferred_size_for_size: assertion 'size >= -1' failed
From https://docs.flatpak.org/en/latest/conventions.html#application-ids:

    For some practical examples of bad IDs
    ...

    - `com.github.foo.Bar` or `com.gitlab.foo.Bar`
      While a project may be hosted on GitHub or GitLab it does not have any control over the `github.com`
      or `gitlab.com` domain. Instead you should use `io.github` or `io.gitlab` as shown above.
Just copied from Reco :-P
Seems like "Setting" category is blocklisted?
As recommended in https://docs.flathub.org/docs/for-app-authors/requirements/?manifest-language=yml#desktop-files:

    If you need to change the desktop file, use the command desktop-file-edit on a post installation rule.
As per https://docs.flathub.org/docs/for-app-authors/requirements/?manifest-language=yml#branches-and-runtimes:

    Applications must be built against an SDK that is itself hosted on Flathub.

elementary SDK is not hosted on Flathub, so we need to use GNOME SDK and setup stylesheets and granite manually instead.
@ryonakano ryonakano marked this pull request as ready for review January 8, 2024 13:57
@ryonakano
Copy link
Member Author

@Philip-Scott Now it's ready. Would you test and review this PR?

@ryonakano
Copy link
Member Author

@Philip-Scott Would it be possible for you to review/test this branch? (or should I go ahead to merge it by myself…?)

@ryonakano
Copy link
Member Author

@Philip-Scott I'll merge this and try submitting to Flathub today. Please let me know at any time if you observed strange code or behavior.

@ryonakano ryonakano merged commit f727366 into dev May 19, 2024
3 checks passed
@ryonakano ryonakano deleted the migrate-to-flatpak-app branch May 19, 2024 02:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant