wingtk / gvsbuild

GTK stack for Windows
GNU General Public License v2.0
432 stars 163 forks source link

`gvsbuild build libadwaita --enable-gi` does not create Adw*.typelib / Unclear how to build Adw typelib #1254

Closed VOsakosa closed 4 months ago

VOsakosa commented 6 months ago

In order to use libadwaita with python, I wanted to also build libadwaita, but even the "--enable-gi" option does not seem to create the Adw typelib. I eventually succeeded by manually editing the meson.build file in the checkout, removing the if introspection part, but wanted to ask what the "right way" to build libadwaita with introspection in Gvsbuild is.

I think it would be good if the documentation was a bit more clear about how to do that.

danyeaw commented 4 months ago

Hi @VOsakosa, when I build libadwaita with gvsbuild build --enable-gi --py-wheel gobject-introspection gtk4 libadwaita pygobject pycairo adwaita-icon-theme, I get an typelib at C:\gtk-build\gtk\x64\release\lib\girepository-1.0\Adw-1.typelib

What command were you using to build so that I can try to reproduce this?

VOsakosa commented 4 months ago

Thanks for your time, and sorry for my late answer.

I deleted the C:\\gtk-build\build and C:\gtk-build\gtk folders and ran gvsbuild build libadwaita --enable-gi --py-wheel and got the typelib at C:\gtk-build\gtk\x64\release\lib\girepository-1.0\Adw-1.typelib. So my setting is not at fault.

It is some while ago, so I don't remember what I did. I ran into problems after I used the Microsoft Store's python to run gvsbuild and don't know what I did anymore. But my history shows that I seemingly ran gvsbuild build libadwaita without the python flags first (after gvsbuild build gtk4 --enable-gi --py-wheel), so I guess that was what caused the problem.

Running

gvsbuild build gtk4 --enable-gi --py-wheel
gvsbuild build libadwaita
gvsbuild build libadwaita --enable-gi --py-wheel

reproduces the state I got last time. This is obviously improper operation. I'm sorry and I'm closing this issue.

Thanks for the project, I would be at a loss if I could not use my GTK programs on Windows.