caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Dmitry Grebeniuk <gdsfh1@gmail.com>
To: "jocelyn.serot" <caml-list@inria.fr>
Subject: Re: [Caml-list] Running ocaml programs on Windows
Date: Sun, 11 Sep 2011 21:07:35 +0300	[thread overview]
Message-ID: <CAPi0vKWNQxZMLWTRakUq6fJmruQLZwCP1uEAUyG7T0xFfkL2Zw@mail.gmail.com> (raw)
In-Reply-To: <sympa.1315746812.597.143@inria.fr>

Hello.

> What is the "best" (simplest both for the programmer and, most importantly, the
> end user) way to develop a program in Ocaml in order to distribute it to people
> having only MS Windows platforms ?

  If you want to just distribute your program, you can get
cross-compilers.  They will make the binaries that you
can distribute, of course.
  If you want to test your program (to see whether it runs,
at least!), assure the quality of your program in some
ways -- the cross-compiling is not enough, and you
should use the real windows installation or some kind
of a virtual machine.  This is caused by the differences
between many windows versions, currently installed
"windows updates", software versions (for example,
the version of installed ActiveState Tcl/Tk package
for GUI OCaml programs).

> Is there some kind of tool that could
> automatically wrap a command-line-based app into a click-to-launch app (with
> some additionnal pop-ups to enter arguments for ex) ?

  The best way is to distribute a tcl/tk-powered application
with a fair GUI (and with the tcl/tk itself).
  Also the "wish" utility from tcl/tk does exist in windows
tcl/tk installation (AFAIR), you can use it too, for simple
GUIs, for just "prompt and go" wrappers.
  Lablgtk2 is good too.
  Avoid the .bat/.cmd files generation (Sys.command too),
since cmd (the windows shell) uses some
incomprehensible ways to handle the quotes. It's more
safe to write some utility in ocaml+labltk that passes
command line options to the real working program with
Unix.create_process-like functions (the functions that
receive the argv[] list! arguments shouldn't be concat'ed
to the string).

  As for ocaml-windows-mingw-32bit developement, you
can use my project "overbld": http://overbld.sourceforge.net/ ,
it provides installers for some variants of OCaml+libraries
distribution.  I will add/fix libraries to/in the distribution.
(compiler in the overbld distribution will be updated when
OCaml 3.13 will be released, in 1..2 weeks from the OCaml
release).
  It's easy for me, since I'm fighting this issue (windows,
ocaml, libraries) for a long time.
  64 bits are not required for my windows applications, so
I'm not adding/compiling 64-bit version of overbld.  But it is
not a very hard task, as I have seen, since OCaml runs on
mingw64.  (Really, I saw it On The Internets!).

      parent reply	other threads:[~2011-09-11 18:07 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-11 13:35 jocelyn.serot
2011-09-11 13:46 ` Török Edwin
     [not found]   ` <987A8AE7-1A72-4C79-A0E2-1C1413B26E16@wanadoo.fr>
     [not found]     ` <4E6CC8C8.9030001@gmail.com>
2011-09-11 16:41       ` Jocelyn Sérot
2011-09-11 18:07 ` Dmitry Grebeniuk [this message]

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=CAPi0vKWNQxZMLWTRakUq6fJmruQLZwCP1uEAUyG7T0xFfkL2Zw@mail.gmail.com \
    --to=gdsfh1@gmail.com \
    --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).