On Windows we have erl.exe in two directories: OTP/bin/erl.exe and
OTP/erts-VSN/bin/erl.exe. The executable is identical but what is
different is the latter, the erts one, contains erlexec.dll which needs
to be present for the VM to start.
Interestingly, regardless of OS, the erl[.exe] executable always
prepends the OTP/erts-VSN/bin and OTP/bin directories to the PATH:
iex> System.get_env("PATH") |> String.split(":") |> Enum.take(2)
["/Users/wojtek/.asdf/installs/erlang/25.1.2/erts-13.1.2/bin",
"/Users/wojtek/.asdf/installs/erlang/25.1.2/bin"]
Manually prepending the erts bin directory to the PATH, which makes the
erl.exe that is to be launched to be the erts one, fixed the issue.
Summary of changes:
- Vendor OTP at: rel/vendor/otp
- Remove rel/vendor/otp/lib/*/src
- Include /usr/local/bin in $PATH. This is not there by default and that's where homebrew (on x86_64) installs things so it should make it easier to build some packages with NIFs.
1. Add `:event_handler` app option. It is a process that will receive
the app events, the `:open_app`, `{:open_url, url}`, and
`{:open_file, path}` messages.
2. Add `AppBuilder.init/0`. This reads the `APP_BUILDER_INPUT` env
variable which contains the app event the release was started with.
3. Use <https://github.com/wojtekmach/otp/tree/wm-WX_MACOS_NON_GUI_APP>
branch which contains wx fix that hasn't been merged yet.
1. Replace `mix release mac_app|mac_app_dmg|windows_installer` with a single `mix release app`
2. Extract templates (Launcher.swift, Launcher.vbs, etc) into separate
files in app_builder/lib/templates
3. Don't verify vc_redist.x64.exe checksum as the Microsoft publishes
new releases on the same URL
Since we're building our own OTP for Mac, the idea was not to
accidentally building agains something we happen to be testing at the
moment, like the latest RC. This check turned out to be a little bit
too annoying in practice though. We plan to automate builds on CI
in the near future so we wouldn't need it the anyway.
Closes#1177
* Run in interactive mode: it uses less memory and improves
boot time, which is the most desired properties for a dev tool
* Do not use releases/cookie, instead generate one on boot