Skip to content

Erlang/OTP vfox plugin. Use the vfox to manage multiple Erlang/OTP versions in Linux/Darwin MacOS, also Windows!!!

License

Notifications You must be signed in to change notification settings

version-fox/vfox-erlang

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

logo

E2E tests on Linux E2E tests on Darwin MacOS E2E tests on Windows E2E tests on Darwin MacOS (Prebuilt release) E2E tests on Linux (Prebuilt release)

vfox-erlang plugin

Erlang/OTP vfox plugin. Use the vfox to manage multiple Erlang/OTP versions in Linux/Darwin MacOS/Windows. all platform~

Usage

# 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

Before install Erlang/OTP in Linux/Darwin MacOS

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 in Linux (Ubuntu 20.04/22.04)

# 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 in Darwin (MacOS 13)

# install utilities
brew install autoconf libxslt fop wxwidgets openssl

You can reference the E2E test in MacOS 13: .github/workflows/e2e_test_darwin.yaml

Note

By default, vfox-erlang plugin will Build EEP-48 documentation chunks for get doc in REPL (eg: h(list).) and lsp docs hint.

erl get docs

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

install Erlang/OTP in Windows platform

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

install a prebuilt Erlang/OTP version

After vfox-erlang v1.1.0, you can also install a prebuilt Erlang/OTP version in Ubuntu linux system and MacOS.

Before install, you must disable vfox search cache. Reference: https://vfox.lhan.me/guides/configuration.html#cache-settings

Linux (Ubuntu)

This is an installation example in Bash Shell:

# install an available version, you can also a avaliable version in: https://bobs-list.kobrakai.de/
USE_PREBUILT_OTP="ubuntu-20.04" vfox search erlang
USE_PREBUILT_OTP="ubuntu-20.04" vfox install erlang@26.2.3

USE_PREBUILT_OTP var value for Linux is one of: ["ubuntu-14.04", "ubuntu-16.04", "ubuntu-18.04", "ubuntu-20.04", "ubuntu-22.04", "ubuntu-24.04"].

MacOS

For MacOS, you can use prebuilt Erlang/OTP versions from @erlef/otp_builds by setting the USE_PREBUILT_OTP environment variable:

# install a prebuilt version for MacOS (automatically detects architecture)
USE_PREBUILT_OTP=true vfox search erlang
USE_PREBUILT_OTP=true vfox install erlang@26.2.3

USE_PREBUILT_OTP can be set to any non-empty value (e.g., "1", "true", "macos") to enable prebuilt mode.

Supported architectures: amd64, x86_64, arm64, aarch64. macOS uses a dedicated prebuilt version list that differs from the Ubuntu prebuilt versions.

About

Erlang/OTP vfox plugin. Use the vfox to manage multiple Erlang/OTP versions in Linux/Darwin MacOS, also Windows!!!

Topics

Resources

License

Stars

Watchers

Forks

Contributors 4

  •  
  •  
  •  
  •