Does anybody know a standard way to deploy programs written in ocaml to windows users. I mean to windows users which don’t have any installation of the ocaml suite or opam.
For Linux or MacOS users it is easy. There are standardized ways to get opam installed and then you just have to issue opam install .... But since opam requires cygwin for windows users, the overhead is significant and might lead windows users who just want the program but not the ocaml suite lead to the decision not to install the program.
As far as I know there isn’t an easy way to distribute programs in source form under Windows. If your target users are not developers, then distributing in binary form seems to be your best bet.
I believe there are some cross-compilation projects out there, but am not personally familiar with any of them. Perhaps other people in this forum will be able to chime in.
For using a native Windows installer, I don’t think there is anything ready-made, but it is certainly possible to use standard Windows solutions for this (eg NSIS).
Does the same work with GitHub actions and setup-ocaml? That would be a very elegant solution, because GitHub actions are very useful for other purposes as well.
opam-cross-windows works like a charm if the libraries you want are in the repository. The only issue is that the repository is still quite limited, and it needs more people contributing to it. I add new packages and new versions of new packages as I need them and as time allows.
As of building on Windows using a hosted CI, there are going to be minor variations in the build script, but the general approach is the same. I haven’t seen a project using GitHub Actions yet, but for Appveyor and CircleCI there are projects to lift the CI setup from.
Are you sure that the artefacts can be executed. I have downloaded the mac-os artefact, made it executable via chmod u+x tacs.exe and then called it via ./tacs.exe. The operating system refused to start the application with the message cannot verify developer, might be malware.