chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Compiling Chicken app for Windows from linux with Docker


From: Théo Cavignac
Subject: Re: Compiling Chicken app for Windows from linux with Docker
Date: Sun, 27 Jun 2021 14:43:49 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.2

Hello Vasilij, thank you for your answer !
First, here is the right docker hub link: https://hub.docker.com/r/lattay/chicken-mingw I did not realize that I send the link to my private dashboard for the image.

> That does sound interesting, though I'm not sure whether this won't be an issue later on for foreign dependencies

That may be a problem indeed, I am going to try more complex apps.
Also the build environment itself should be usable for dynamic binaries I think You just would have to copy everything from /mingw-chicken-rt (in container) and put it specifically in C:\chicken (on target system).

> I'd start with the trivial applications first. The gl-utils egg has some examples that create graphical windows.

It seem like a good idea ! I will try that.

> I have seen a few attempts at creating Windows-specific eggs, but so far
> the only applications I've spotted were Kooda's games (which are
> cross-compiled in a similar manner to your Docker setup). You can find
> them here: <https://kooda.itch.io/>

I think I will try to compile https://kooda.itch.io/smlilme. Not sure how hard I will try though, the dependency list seems a bit hard to fullfill for a test.

>  I suspect the main problem is that Scheme applications are CLI-only unless you somehow get GLFW3/SDL2/IUP running

Yes, I'd like to work on that problem next, because I would like to be able to develop concrete non CLI apps with Chicken.

I think if I find a framework for GUI programming that suits me I may provide a ready to go docker env for that specific use case so that it is easy to build GUI apps for both linux and Windows from the comfort of linux (or from CI/CD pipelines, which is nice).

> Even a console application can make use of GLFW3 to launch a graphical
> window to perform OpenGL drawing in, so the distinction is rather
> technical: <https://stackoverflow.com/a/574918/8729149>

I see, there is no reason that my setup does not work then.


Théo

Le 27/06/2021 à 13:00, Vasilij Schneidermann a écrit :
Hello Théo,

Using the cross development article on the wiki, digging through the build
system a bit and fiddling a lot I created a MinGW-w64 based environment that
let you build standalone apps from your chicken code and your favorite eggs
that can be distributed as a single binary without needing dev oriented
dependencies like cygwin or MSYS2.
That does sound interesting, though I'm not sure whether this won't be
an issue later on for foreign dependencies.

Here is an image ready to go (because compiling chicken twice is pretty
long): https://hub.docker.com/repository/docker/lattay/chicken-mingw
That link redirects me to a login page.

Currently my testing of this environment is pretty limited. I did a test
with the args egg but I don't know how well it would perform with more
complex eggs like bind based one.
I've done some manual testing in a MinGW64-msys2 environment and managed
to get most of my eggs to work. You can for example try to get the
breadline or taglib egg running as they only need readline/taglib
respectively.

I don't have a non trivial app that would work on windows to test with this
process.
I'd start with the trivial applications first. The gl-utils egg has some
examples that create graphical windows.

Hence, I would be interested in some real world Windows ready app for this.
I have seen a few attempts at creating Windows-specific eggs, but so far
the only applications I've spotted were Kooda's games (which are
cross-compiled in a similar manner to your Docker setup). You can find
them here: <https://kooda.itch.io/>

My testing of egg installation under MinGW unveiled 94 errors, with
Cygwin being somewhat better off. I suspect the main problem is that
Scheme applications are CLI-only unless you somehow get GLFW3/SDL2/IUP
running and that is enough of a roadblock to deter all but the most
enthusiast users from spending more time with this Scheme system (and
instead use Racket's built-in cross-platform GUI or something else).

Also, I have yet to understand what is the difference between console and
GUI app in windows and how this environment could be used to build graphical
apps.
Even a console application can make use of GLFW3 to launch a graphical
window to perform OpenGL drawing in, so the distinction is rather
technical: <https://stackoverflow.com/a/574918/8729149>

Vasilij



reply via email to

[Prev in Thread] Current Thread [Next in Thread]