I am using distillery 1.5.2 and trying to build a release on Windows 10.
where werl.exe
C:\ProgramData\chocolatey\bin\werl.exe
rel/config.exs includes …
environment :win64 do
set include_erts: "C:\ProgramData\chocolatey\bin"
set include_src: false
end
mix release --env=win64
Generated myAppName app
==> Assembling release..
==> Building release neuron:1.0.1 using environment win64
==> Multiple errors detected:
- Invalid ERTS: missing erts-* directory:
Please check the path you provided to the `include_erts` option.
- Invalid ERTS: missing bin directory
The path you provided to `include_erts` does not contain
`erts-*/bin`, please confirm the path is correct.
- Invalid ERTS: missing lib directory
The path you provided to `include_erts` does not contain
`erts-*/lib`, please confirm the path is correct.
I just pushed a commit to master which fixes some bugs in the WIndows script as well, it should be going out in a release today I hope.
You don’t necessarily need to include ERTS either, as long as you have Erlang installed and available on the PATH exposed to the service; but it depends on what else you are running on that machine (if you have multiple releases, you may want to run different ERTS between them).
Thanks for the thought, but I actually did double slash in the file. They got escaped-out when I posted them. I just updated that in the question text (with four slashes :-0) So that at least should be clearer.
I think part of the issue is that distillery is expecting a directory structure like erts-*/bin but chocolatey just dumps an exe file: werl.exe
Well, this is probably more chocolatey related then distillery, but probably you need to put the pass to the erlang installation, not the path to chocolateys binstub folder.
Chocolatey adds this folder to not need to append to the PATH for every program you install, since in windows the PATH is limited to a max size of 1k or 4k depending on your version of windows…
I do get a runtime dialog box saying that “MSVCR120.dll is missing”
So my particular hex package requirements will however require me to install the the Visual C++ Redistributable Packages before I run my Elixir app.
I was just able to get this to run without installing the Visual C++ Redistributable Packages. I ran into the same problem described above, MSVCR120.dll not found.
The workaround was to grab MSVCR120.dll from a Windows VM where the C++ Packages had been installed (by the elixir installer). On the bare system where I was installing my distillery release, I copied the dll into <path to release>/erts-9.2/bin, and the service was able to start.
Maybe on Windows distillery should ship the dll with erts? Or maybe there could be a separate configuration option to do so? I’m not sure if this would cause a license conflict… at the very least, this could be added somewhere in the documentation, though I’m not sure where the best place would be.
Except the Microsoft Visual C Runtimes need to be installed systemwide. ‘Sometimes’ you can put them in the same directory, but you cannot trust that to always work.
Maybe documentation is the answer. It might be helpful to have a Windows section in the Getting Started guide, like there is for systemd. There are some things that we’re discovering behave differently in Win 10 than on Linux or our Darwin workstations, and having a checklist of gotchas as well as some descriptions of why things are different on different platforms might save discovery time for other people.