From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: * X-Spam-Status: No, score=1.3 required=5.0 tests=AWL,SPF_FAIL,URIBL_SBL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by yquem.inria.fr (Postfix) with ESMTP id 1EB8CBBAF for ; Wed, 4 Feb 2009 23:31:22 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AiIGAC+miUlQRFuwX2dsb2JhbACUJxcLCgQUvCGEFgY X-IronPort-AV: E=Sophos;i="4.37,381,1231110000"; d="scan'208";a="20651594" Received: from furbychan.cocan.org ([80.68.91.176]) by mail2-smtp-roc.national.inria.fr with ESMTP; 04 Feb 2009 23:31:21 +0100 Received: from rich by furbychan.cocan.org with local (Exim 4.63) (envelope-from ) id 1LUq3u-0004iH-Sx for caml-list@inria.fr; Wed, 04 Feb 2009 22:17:38 +0000 Date: Wed, 4 Feb 2009 22:17:38 +0000 To: caml-list@inria.fr Subject: OCaml + Windows cross-compilation (code from the short talk today) Message-ID: <20090204221738.GA18009@annexia.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.13 (2006-08-11) From: Richard Jones X-Spam: no; 0.00; ocaml:01 tarball:01 tarball:01 ocaml:01 lablgtk:01 wiki:01 mingw:01 mingw:01 wiki:01 deps:01 autoconf:01 gtk:01 10,:98 wine:98 wine:98 The code is here: http://www.annexia.org/tmp/ocaml-mingw-gtk The README from the tarball is also attached below. Rich. ---------------------------------------------------------------------- This tarball / directory contains an example of cross-compiling OCaml LablGtk programs for Windows, which I originally demonstrated at the OCaml Users Conference meeting Feb 2009. You will need to start here: http://www.fedoraproject.org/wiki/MinGW It's a good idea to join the Fedora MinGW mailing list (mentioned on the above page), and if you have any problems post them on the mailing list. - - - You must install Fedora 10 which you will need to upgrade to Fedora Rawhide (the development version): https://fedoraproject.org/wiki/Releases/Rawhide If you don't have Fedora Rawhide already, try installing it in a virtual machine. OCaml cross-compilation is _not_ supported on RHEL, EPEL, CentOS, Fedora <= 10, etc at this time, although we may add these distributions in future. The software required is partially in Rawhide and partially in a separate repository. Create and edit a file /etc/yum.repos.d/mingw.repo containing: [mingw] name=MinGW baseurl=http://www.annexia.org/tmp/mingw/fedora-rawhide/x86_64 enabled=1 gpgcheck=0 Replace "x86_64" with "i386" if you have a 32 bit machine. We do not compile the temporary repository for non-x86 architectures at this time. Now install the packages and their deps by typing this command (as root): yum install \ ocaml ocaml-x11 ocaml-findlib-devel \ mingw32-gcc \ mingw32-ocaml mingw32-ocaml-findlib mingw32-ocaml-lablgtk2 \ mingw32-nsis mingw32-nsiswrapper \ wine autoconf automake You should now be able to compile the Windows demo by doing: mingw32-configure make and then run/test it in Wine by doing: wine gtk_test.exe To compile the Windows installer you will first need to install the program (this is an arcane requirement which will be fixed in future). As root do: make install Then as a normal user do: make installer.exe Copy installer.exe to a Windows machine to try it. - - - Developers: The only files you need to copy in order to create an autotools package are 'configure.ac' and 'Makefile.am'. After copying these to a new directory, run: autoreconf -i (You may need to create empty files 'README', 'NEWS' etc. as instructed). - - - For questions/problems please join the Fedora MinGW mailing list. - Richard Jones, Feb 2009 -- Richard Jones Red Hat