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

Build on Windows #7

Open
ysbaddaden opened this issue May 2, 2023 · 2 comments
Open

Build on Windows #7

ysbaddaden opened this issue May 2, 2023 · 2 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@ysbaddaden
Copy link
Owner

Gtk3 is available for Windows.

The problem is figuring out how to install Gtk3 dev and gintrospection, then get to a point where the gobject shard is running (you can compile and run samples).

Once Crystal and Gtk3 are setup, you should be able to build an executable for Windows?

@ysbaddaden ysbaddaden added enhancement New feature or request help wanted Extra attention is needed labels May 2, 2023
@ysbaddaden
Copy link
Owner Author

ysbaddaden commented May 2, 2023

I have zero knowledge of Windows. Help is welcomed!

@ysbaddaden
Copy link
Owner Author

ysbaddaden commented May 2, 2023

Probably blocked by crystal-lang/crystal#13419 since the app relies on MT, or we shall use another hack (call Fiber.yield in GLib.timeout_milliseconds callback) on Windows.

Alternatively we could try to integrate the Gtk event loop with Crystal event loop (see g_main_context_set_poll_func). The difficulty being that we can't block forever waiting for an event (the GPollFunc callback receives a timeout parameter), otherwise we'd block the UI.

Last alternative, start a thread to run Gtk and add a mechanism to exit the main thread when the Gtk thread has terminated (not before). I implemented that (to avoid some hacks) but we still need preview_mt to turn on thread safety guards.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant