caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Richard Jones <rich@annexia.org>
To: caml-list@inria.fr
Subject: OCaml + Windows cross-compilation (code from the short talk today)
Date: Wed, 4 Feb 2009 22:17:38 +0000	[thread overview]
Message-ID: <20090204221738.GA18009@annexia.org> (raw)

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


                 reply	other threads:[~2009-02-04 22:31 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090204221738.GA18009@annexia.org \
    --to=rich@annexia.org \
    --cc=caml-list@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).