From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by walapai.inria.fr (8.13.6/8.13.6) with ESMTP id p8BI7aBJ023361 for ; Sun, 11 Sep 2011 20:07:38 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: At8CAH34bE7RVdW2kGdsb2JhbABBhFWdB4Y2CBQBAQEBCQkNBxQEIoFSAQEEARICDx0BGx4DAQsGBQsPAiYCAiIBEQEFAQ4BDQYbGodVmHQKin5CgleDYTuIbQIDBoEmhDGBEQSHZ4tUjHQ9g3A X-IronPort-AV: E=Sophos;i="4.68,364,1312149600"; d="scan'208";a="119247967" Received: from mail-yx0-f182.google.com ([209.85.213.182]) by mail1-smtp-roc.national.inria.fr with ESMTP/TLS/RC4-SHA; 11 Sep 2011 20:07:37 +0200 Received: by yxk36 with SMTP id 36so4369984yxk.27 for ; Sun, 11 Sep 2011 11:07:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=yMgUtOFA7bAuIOsm14brxh6EUBf+LO5A0LG3P7Tj42Y=; b=CRR11FQz5t9v96d2MKkXVyjwGyVCjW170d77KVhLlxQcvxIPFmFRxr32HcdzKoBnw7 ypwaViGrypr2c4A4sGxG5kKnWtmgp9SV4s/deCTRxzTLClBYzFhPQaW8TX6czJ4IJ7yg /EA8FZ1VZLvwjxR1SdAGhw/HklUC898rp8dLI= MIME-Version: 1.0 Received: by 10.42.197.67 with SMTP id ej3mr227513icb.213.1315764455399; Sun, 11 Sep 2011 11:07:35 -0700 (PDT) Received: by 10.42.218.10 with HTTP; Sun, 11 Sep 2011 11:07:35 -0700 (PDT) In-Reply-To: References: Date: Sun, 11 Sep 2011 21:07:35 +0300 Message-ID: From: Dmitry Grebeniuk To: "jocelyn.serot" Content-Type: text/plain; charset=UTF-8 Subject: Re: [Caml-list] Running ocaml programs on Windows 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!).