Erlang/OTP vfox plugin. Use the vfox to manage multiple Erlang/OTP versions in Linux/Darwin MacOS/Windows. all platform~
# install plugin
vfox add --source https://github.com/version-fox/vfox-erlang/archive/refs/heads/main.zip erlang
# install an available version
vfox search erlang
# or specific version
vfox install erlang@25.3.2.10
vfox-erlang plugin would install Erlang/OTP through the Erlang/OTP source code compilation. So you must have the utilities mentioned in the document -> Building and Installing Erlang/OTP.
Here are examples of installing on Ubuntu 20.04 and MacOS 13.
# install utilities
sudo apt-get -y install build-essential autoconf m4 libncurses5-dev libwxgtk3.0-gtk3-dev libwxgtk-webview3.0-gtk3-dev libgl1-mesa-dev libglu1-mesa-dev libpng-dev libssh-dev unixodbc-dev xsltproc fop libxml2-utils libncurses-dev openjdk-11-jdk
You can reference the E2E test in Ubuntu 20.04: .github/workflows/e2e_test_linux.yaml
# install utilities
brew install autoconf libxslt fop wxwidgets openssl
You can reference the E2E test in MacOS 12: .github/workflows/e2e_test_darwin.yaml
By default, vfox-erlang plugin will Build EEP-48 documentation chunks for get doc in REPL (eg: h(list).) and lsp docs hint.
You cal also use the OTP_CONFIGURE_ARGS
environment variable to control install behavior. reference this documentation https://github.com/erlang/otp/blob/master/HOWTO/INSTALL.md#configuring-1 for more configuration. eg:
# example
export OTP_CONFIGURE_ARGS="--enable-jit --enable-kernel-poll"
vfox install erlang@25.3.2.10
Building Erlang/OTP on a relatively fast computer takes approximately 5 minutes. To speed it up, you can utilize parallel make with the -j<num_jobs>
option. for example:
export MAKEFLAGS=-j8
vfox install erlang@25.3.2.10
In windows, the vfox-erlang plugin downloads the Erlang/OTP version of the exe installer from the Erlang/OTP releases and executes it for you.
This is an installation example in PowerShell:
vfox install erlang@25.3.2.12
vfox use erlang@25.3.2.12
Invoke-Expression "$(vfox activate pwsh)"
# Test the installation results
& erl.exe -eval 'erlang:display({otp_release, erlang:system_info(otp_release)}), halt().' -noshell
You can reference the E2E test in in windows-2022: .github/workflows/e2e_test_windows.yaml