# Windows installers that don't need network access

**URL:** <https://discuss.ocaml.org/t/windows-installers-that-dont-need-network-access/15564>\
**Category:** Ecosystem\
**Tags:** windows, install\
**Created:** [November 6, 2024, 3:34pm UTC](https://discuss.ocaml.org/t/windows-installers-that-dont-need-network-access/15564 "2024-11-06T15:34:02Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![yallop](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ocaml.org/yallop/32/517_2.png) [@yallop](https://discuss.ocaml.org/u/yallop)\
**Post date:** [November 6, 2024, 3:34pm UTC](https://discuss.ocaml.org/t/windows-installers-that-dont-need-network-access/15564/1 "2024-11-06T15:34:02Z")

</div>

Are there any OCaml installers for Windows that can run in an environment without network access?

---

<div class="post-metadata">

**Author:** ![dra27](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ocaml.org/dra27/32/5294_2.png) [@dra27](https://discuss.ocaml.org/u/dra27)\
**Post date:** [November 6, 2024, 4:46pm UTC](https://discuss.ocaml.org/t/windows-installers-that-dont-need-network-access/15564/2 "2024-11-06T16:46:46Z")

</div>

I don’t think so - IIRC fdopen’s “OCaml for Windows” installer still downloaded Cygwin every time and I don’t think DkML can be done entirely offline either. I’ve been musing restoring a graphical installer for OCaml (with opam 2.2, etc.) partly just “so that we have one”. Installing Cygwin without network access is cumbersome, but not impossible. What’s your usecase/audience?

---

<div class="post-metadata">

**Author:** ![yallop](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ocaml.org/yallop/32/517_2.png) [@yallop](https://discuss.ocaml.org/u/yallop)\
**Post date:** [November 6, 2024, 5:43pm UTC](https://discuss.ocaml.org/t/windows-installers-that-dont-need-network-access/15564/3 "2024-11-06T17:43:49Z")

</div>

I’m considering teaching a short online course using OCaml, and some of the students might be behind a firewall.

---

<div class="post-metadata">

**Author:** ![floyer](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ocaml.org/floyer/32/2526_2.png) [@floyer](https://discuss.ocaml.org/u/floyer)\
**Post date:** [November 6, 2024, 6:51pm UTC](https://discuss.ocaml.org/t/windows-installers-that-dont-need-network-access/15564/4 "2024-11-06T18:51:28Z")

</div>

OCaml is among the Cygwin packages (in version 4.14.2).

You may download a minimal Cygwin set of package, then propose to install Cygwin from a local repository.

(Note, you may need ocaml and ocaml-dune)

---

<div class="post-metadata">

**Author:** ![jbeckford](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ocaml.org/jbeckford/32/3027_2.png) [@jbeckford](https://discuss.ocaml.org/u/jbeckford)\
**Post date:** [November 6, 2024, 6:57pm UTC](https://discuss.ocaml.org/t/windows-installers-that-dont-need-network-access/15564/5 "2024-11-06T18:57:28Z")

</div>

Yeah, DkML does not support offline anymore (no one seemed interested at the time).

If you are fine with bytecode, you can use the mostly portable Windows zips from DkCoder. Example: [https://gitlab.com/api/v4/projects/52918795/packages/generic/stdexport/2.1.4-r3/stdexport-windows\_x86\_64.zip](https://gitlab.com/api/v4/projects/52918795/packages/generic/stdexport/2.1.4-r3/stdexport-windows_x86_64.zip) with [checksums and version numbers here](https://github.com/diskuv/dkcoder/blob/1.0/__dk.cmake) and its [license here](https://github.com/diskuv/dkcoder?tab=readme-ov-file#licenses).

Since I haven’t added an OCaml pass-through (yet) for DkCoder, I would suggest for your students:

- unzipping to a common place (`<drive>:\ocaml`)
- edit the first two paths in `lib/findlib.conf`
- make a wrapper `ocamlc.bat` and `ocamlrun.bat` that sets `OCAMLLIB`, `OCAMLFIND_CONF`, `CAML_LD_LIBRARY_PATH` and `PATH` (confer [\_\_dk.cmake lines 657-680](https://github.com/diskuv/dkcoder/blob/5fabd406e865ccccbfe8faee89d9c3e2162343b6/__dk.cmake#L657-L680))

The end result is you’ll have a lot of useful binaries (ocamllsp, dune, etc.) and many findlib packages available offline.

EDIT: You would also install the vcruntime DLLs from [Latest supported Visual C++ Redistributable downloads | Microsoft Learn](https://learn.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist?view=msvc-170#latest-microsoft-visual-c-redistributable-version) if they have brand new PCs. Visual Studio will _not_ be needed.
