AparokshaUI / adwaita-swift

A framework for creating user interfaces for GNOME with an API similar to SwiftUI
https://aparokshaui.github.io/adwaita-swift/
MIT License
750 stars 16 forks source link

libadwaita version dependency #25

Open felixf4xu opened 2 months ago

felixf4xu commented 2 months ago

Is your feature request related to a problem? Please describe.

No response

Describe the solution you'd like

Use libadwaita in system default version (like in Ubuntu 22's, libadwaita is v1.1.0)

--

or, is it possible to conditionally compile this project by libadwaita version?

Describe alternatives you've considered

I tried to compile this project and found out that libadwaita version >= 1.4 (at least) is used.

If the locally installed libadwaita is not new, many CAdw functions are not available, like

error: cannot find 'adw_navigation_view_pop' in scope

Additional context

my libadwaita version is: 1.3.2

david-swift commented 2 months ago

I really recommend developing either inside a Flatpak, take a look at the ŧemplate repository with a sample Flatpak manifest, or using Homebrew as a package manager. Using the latest GNOME runtime in the Flatpak, you always get the latest libadwaita version, and I try not to switch to the latest Libadwaita version faster than Homebrew.

I don't think there's a simple way to check the installed version and define which functions are available based on this (it is possible for Swift or platform versions, but not for system libraries).

Libadwaita 1.5 is required for this package to compile.