From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by sympa.inria.fr (Postfix) with ESMTPS id 140637EC6E for ; Thu, 19 Dec 2013 06:20:47 +0100 (CET) Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of monnier.florent@gmail.com) identity=pra; client-ip=74.125.82.46; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="monnier.florent@gmail.com"; x-sender="monnier.florent@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail3-smtp-sop.national.inria.fr: domain of monnier.florent@gmail.com designates 74.125.82.46 as permitted sender) identity=mailfrom; client-ip=74.125.82.46; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="monnier.florent@gmail.com"; x-sender="monnier.florent@gmail.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@mail-wg0-f46.google.com) identity=helo; client-ip=74.125.82.46; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="monnier.florent@gmail.com"; x-sender="postmaster@mail-wg0-f46.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AjUEAEaBslJKfVIulGdsb2JhbABZg0NVuGM7gQsIFg4BAQEBBwsLCRIqgiUBAQEDAUABGx0BAwELBgULDS4iAREBBQEcBogCAQMJCA2lCYxagwmNegoZJw1khhgRAQUMjQyBGBEBHTMHhDYEmBaBMI53GCmEWDuBNQ X-IPAS-Result: AjUEAEaBslJKfVIulGdsb2JhbABZg0NVuGM7gQsIFg4BAQEBBwsLCRIqgiUBAQEDAUABGx0BAwELBgULDS4iAREBBQEcBogCAQMJCA2lCYxagwmNegoZJw1khhgRAQUMjQyBGBEBHTMHhDYEmBaBMI53GCmEWDuBNQ X-IronPort-AV: E=Sophos;i="4.95,512,1384297200"; d="scan'208";a="41660051" Received: from mail-wg0-f46.google.com ([74.125.82.46]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/RC4-SHA; 19 Dec 2013 06:20:46 +0100 Received: by mail-wg0-f46.google.com with SMTP id m15so561421wgh.13 for ; Wed, 18 Dec 2013 21:20:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=Dx6x8Xz9sC+snfXlwrLupFR65gvtpMBrxNhpiwlng7U=; b=BFmK3z75DVHllCOPCro8g7vqDCo4P6mT44qBiq8GLCBRF/fNPV1Wb78x0RyMgHdx3c KRBWxMF9Nm9/dARdON+PBR3bsEpW0hqZG1Z5qd1zbvAuBZ7ttRb13xB1KBznsYY0CMDJ j89HBgDbl9EwkV4DIIzPc6t3wB5YDtqZwhJdLK9jdBheuk3bXLRzNbZTHWrsWmZHkHo1 CoaltTcFwmOmJcj/lKcmmJ3FKEAZThabu5jMVBCU7zVR0im5VyMdIVBHr0IcpFsh2Y9b O4b0+rRTmo1eY5npDwmwr0Vd8lHM/2rAs81Ewxy4xweNlNJr5p5kHbRFpxBP/biUI9wU WrzQ== MIME-Version: 1.0 X-Received: by 10.180.188.197 with SMTP id gc5mr1029676wic.42.1387430445867; Wed, 18 Dec 2013 21:20:45 -0800 (PST) Received: by 10.194.77.110 with HTTP; Wed, 18 Dec 2013 21:20:45 -0800 (PST) In-Reply-To: <4DDEBB7487B641C0834F09D522EA9918@erratique.ch> References: <4DDEBB7487B641C0834F09D522EA9918@erratique.ch> Date: Thu, 19 Dec 2013 06:20:45 +0100 Message-ID: From: Florent Monnier To: =?ISO-8859-1?Q?Daniel_B=FCnzli?= Cc: caml list Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Validation-by: monnier.florent@gmail.com Subject: Re: [Caml-list] SDL2 bindings, testers and feedback welcome 2013/12/17, Daniel B=FCnzli wrote: > Hello, Hi again, > I have written thin bindings to SDL 2 using ocaml-ctypes. The binding > is finished but should be considered unstable: it was not thoroughly > tested and may still change as it has not been *used* yet. The purpose > of this unstable release is to: > > 1) Iron out the install procedure and test on a variety of platforms. and your "README.md" file contains: > Installation [...] > If you don't use `opam` consult the [`opam`](opam) file for > build instructions and a complete specification of the dependencies. $ ./pkg/pkg-git $ ./pkg/build true ocamlfind ocamlopt unix.cmxa -I /usr/lib/ocaml/ocamlbuild /usr/lib/ocaml/ocamlbuild/ocamlbuildlib.cmxa -linkpkg myocamlbuild.ml /usr/lib/ocaml/ocamlbuild/ocamlbuild.cmx -o myocamlbuild ocamlfind ocamldep -package ctypes -modules src/tsdl.mli > src/tsdl.mli.dep= ends + ocamlfind ocamldep -package ctypes -modules src/tsdl.mli > src/tsdl.mli.depends ocamlfind: Package `ctypes' not found Command exited with code 2. In your README file there is a section contains a section "Installation" and the dependencies are listed there but in the first paragraph that should be the introduciton of what is the project. I would suggest to migrate the dependencies listing into either the "Installation" paragraph or into a new section called "Dependencies". Another small detail is that for people getting components through packages, the "Installation" paragraph is usually not usefull. At the Mageia project of software distribution, it is recommanded that when the compilation/installation are provided in a separated file than the README file, to not provide it. So if the compilation / installation informations was in an "INSTALL.txt" file then the Mageia users would escape from how such a piece of software component is compiled, installed (and optionally packaged, but this is another story). Another very small detail is that in the "README.md" file it is written: > ## Installation [...] > If you don't use `opam` consult the [`opam`](opam) file for > build instructions and a complete specification of the dependencies. so I opened the "opam" file and found these build instructions: > build: > [ > ["./pkg/pkg-git" ] > ["./pkg/build" "true" ] > ] i then half blindly trusted these commands: ./pkg/pkg-git ./pkg/build true which did "compiled" the lib but not "installed" it (the poor joke that i'm attempting to make is that the paragraph is called "Installation", and that following it doesn't lead me to a point where I get something installed.) So if some early beginners are reading this email, installation can be achieved in this following way: after the compilation step done by: ./pkg/pkg-git ./pkg/build true Then go in the build directory: _build/src/ Log into admin user, for those using the ocamlfind installer: ocamlfind install tsdl ../pkg/META *.a *.cm[iatx] *.cmx[as] *.cmti *.mli *.= so For people not using ocamlfind: OCAMLDIR=3D`ocamlc -where` DESTDIR=3D"$OCAMLDIR/tsdl" mkdir $DESTDIR cp *.a *.cm[iatx] *.cmx[as] *.cmti *.mli *.so $DESTDIR/ Then I'm able to run the samples in the test directory: ocaml unix.cma bigarray.cma -I +ctypes ctypes.cma ctypes-foreign-base.cma ctypes-foreign-unthreaded.cma -I +tsdl tsdl.cma tsdl.cma min.ml min.ml produces the expected result (on mageia linux) (by expected I mean the same than minc.c) ocamlc -c -I +tsdl fmts.ml ocaml unix.cma bigarray.cma -I +ctypes ctypes.cma ctypes-foreign-base.cma ctypes-foreign-unthreaded.cma -I +tsdl tsdl.cma tsdl.cma fmts.cmo sdlevents.ml while running sdlevents.ml I can see logs in the console about key strokes events and mouse events, but nothing for the joypad. When I'm launching an equivalent example through another project that also relays sdl2 function calls from ocaml: https://github.com/blue-prawn/OCamlSDL2/blob/master/examples/ex_event.ml https://github.com/blue-prawn/OCamlSDL2/blob/1c9608cd4b473e8b7e60ada1fa1402= c0504e56c2/examples/ex_event.ml I can see the joypad events correctly. --=20 Florent