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
Windows support #98
Comments
Theoretically there should be no problem in lgi itself. I guess that the most problematic part would be getting runtime GLib environment incl. fully functional GObjectInterospection. However, someone else has to do the actual work, I'm hopefully not going to touch windows again :-) |
Thanks for letting me know. When (and if) I'll try to port that stuff, I'll report my progress here. Fill free to close this if you don't want an open issue hanging around for ages. |
Eventually, I will have to touch Windows, again, for a commercial project. I think using the MingW compiler is the best choice to support Windows. The MingW provides the GNU project libraries, like glib and gtk+, on Windows. However, I will not be able to make the tests right now. |
AFAIK MingW provides a basic win32/64 toolchain but you must compile everything else (GLib and GTK+ included) by yourself.
So I could theoretically work on the former but I cannot test because of the latter. |
I was also planning on trying to use LGI on windows soon. I was going to try to use the GTK packages provided by the MSYS2 project. I haven't tried it yet but I see there are packages for GTK3 and gobject-introspection: https://github.com/Alexpux/MINGW-packages |
I managed to get LGI to work in a MSYS2 environment. Here's a branch that shows how I did it: https://github.com/nnesse/lgi/tree/msys2. I followed the standard install procedure then synced the mingw64 packages. I had to build LUA myself since the MSYS2 package didn't build it as a DLL. I made some minor changes to the Makefile and declared the luaopen function with "__declspec(dllexport)". With that I was able to run the gtk-hello sample. One thing that tripped me up for longer than it should have was that I specified MSYS paths for LUA_PATH and LUA_CPATH... |
Finally I managed to cross-compile gobject-introspection (see https://bugzilla.gnome.org/show_bug.cgi?id=658126 for the progress). Porting Now I'm able to succesfully run
the windows are arranged to accomodate the new toplevel (I'm using a tiling window manager) but then the display content is not updated. Any suggestion on where to look for? |
Ah, I forgot to add |
No idea if this is relevant but apart from a warning from Pango and the missing canberra module (I see both of them all the time when running GTK+ apps in MinGW) the only error reported (that I've never seen before) is the following one:
I see it after 5 seconds and then periodically every 60 seconds. |
Wow, this is pretty good progress. I'm not sure where the issue with GTK not working can be. Maybe it would be useful to try to compile PyGObject and try Python version of that minimalistic program above. If it works, the problem might be somewhere in lgi, otherwise it would look like an issue with GObject or GObjectIntrospection port. |
Finally I found the root cause of the rendering issue: it is the GDK thread locking called by lgi. If I remove or comment https://github.com/pavouk/lgi/blob/master/lgi/override/Gdk.lua#L23 everything starts working as expected. |
I just finished cross-compiling a Windows installer that includes lgi and a complete GTK+3 environment. It is targeted to my library but the Lua interpreter can be used for playing with plain LGI and GTK+: |
Hi Just want to inform PyGI AIO also have LuaJIT+lgi https://sourceforge.net/projects/pygobjectwin32/files/ beside GJS/Seed (Javascript). I know it seems weird combo but it would otherwise waste of runtimes size to make another installer. |
I just updated my cross-building toolchain to Lua 5.3.4 and lgi 0.9.1. I am happy to announce the GDK thread locking call is no more a problem. |
@ntd, I think this issue is already solved, isn’t it? Many thanks for your help. |
For the record: |
Does LGI support Windows? Has anyone succeeded in running GTK+ application on it? I'll probably need that in the near future but I actually do not own a Windows box so any information would be appreciated.
The text was updated successfully, but these errors were encountered: