fccm / ocaml-xlib

OCaml bindings for the Xlib library.
http://decapode314.free.fr/ocaml/Xlib/
MIT License
14 stars 3 forks source link

opam package? #4

Open vzaliva opened 5 years ago

vzaliva commented 5 years ago

It would be nice if this library is installable via OPAM

fccm commented 5 years ago

Why?

vzaliva commented 5 years ago

convenience mostly. I wanted to use it in a small project. But it looks like it is out of date and does not compile with recent versions of OCaml. In OPAM it could depend on older OCaml version which would make it possible to install it.

fccm commented 5 years ago

Have you tryed to compile this fork from 2017: https://github.com/fccm/ocaml-xlib/pull/2 ? The description says: "Fixes for ocaml >= 4.04" So it would maybe resolve your problem to install it with recent version of OCaml.

fccm commented 3 years ago

Hi @vzaliva, I've just added an opam file! So now you can install this code repository with:

opam install .
vzaliva commented 3 years ago

Thanks. You may also consider submitting it to OPAM repository.

fccm2 commented 1 month ago

If I submit it to the opam-repository, I'm worry that some people play with it, and don't realise that they can crash their x-server with it, and loose the files that they haven't saved yet. (I forgot to add a warning about it.)

This package still compiles on my computer with one of the last ocaml4 versions. The API of ocaml5 is maybe different, I don't know, because I haven't try to use 5 yet, but if you use opam, you can easily use a switch with one of the last 4 version.

I compiled this bindings yesterday, it still does compile, with some warnings. I had to add "[@@boxed]" at the end of "xKeymapEvent_contents" and "xVisibilityEvent_contents" type definitions to avoid some of the warnings. I haven't started to learn the new api of ocaml5, so I don't know the differences yet.