三、GTK4——Cambalache设计软件
前面先总结了Python3运行Gtk4程序,是因为 Cambalache
是用Python3运行Gtk4程序。
1 安装cambalache
cambalache下载链接:https://gitlab.gnome.org/jpu/cambalache
1.1 GTK4编译选项
为了使用 cambalache
我们在编译gtk4的时候,必须要编译网页版后端和GIR。
网页运行GTK程序,可以参考https://docs.gtk.org/gtk4/broadway.html
1.2 缺少WebKit2
WebKit2是python运行的组件,本质也是通过 WebKit2-4.1.typelib
,然后链接到相关库。
我目前使用的是 Ubuntu22.04
系统,可以从源直接下载。
1.3 缺少libhandy
libhandy下载链接:https://gitlab.gnome.org/GNOME/libhandy/-/tags