-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Windows
All things related to Elixir on Windows.
The recommended way to build Elixir on Windows is with tools provided by MinGW and MSYS. Although MinGW is used for building Elixir, it is not necessary for running Elixir. In addition to MinGW, you'll need Git and Erlang on your system.
First, if you don't already have the MinGW Installation Manager on your system, download mingw-get-setup.exe here and run it. This will provide a package manager interface from which you can install the necessary MinGW/MSYS components. In the interface, mark the following packages for installation:
- msys-bash (bin)
- msys-grep (bin)
- msys-make (bin)
Then, in the Installation menu, select Apply Changes.
Finally, you'll need to add the directory containing these packages to your system's Path environment variable. By default the path is C:\MinGW\msys\1.0\bin
. To do this:
- Press
Win
+R
to open the Run dialog - Type "SystemPropertiesAdvanced.exe" and press
Enter
. - Click "Environment Variables..."
- Under "System variables", select "Path" and then click "Edit..."
- Append the directory to the variable value, using a semicolon to separate the directory form the other entries.
- Click "OK" in each of the open windows.
If you don't already have Git installed, you can download it here and install it. A directory containing git.exe
needs to be in your Path environment variable (see above for how to add it). By default, the installation puts git.exe
in C:\Program Files (x86)\Git\cmd
.
If you don't already have Erlang installed, you can download it here and install it. A directory containing erl.exe
needs to be in your Path environment variable (see above for how to add it). By default, the installation puts erl.exe
in C:\Program Files\erlX.Y\bin
or C:\Program Files (x86)\erlX.Y\bin
.
Once you have the necessary tools, open up a Command Prompt in your favorite directory and follow these steps to compile Elixir:
- Clone the Elixir repo to your system using
git clone https://github.com/elixir-lang/elixir.git
- Change into the repo directory using
cd elixir
- Run
make
.
It's that simple!
Here are some snags you might run into while working with Elixir on Windows.
- Symlinks creation requires Administrator privileges;
File.ln_s/2
will return{:error, :eperm}
if the associatederl.exe
orwerl.exe
process is not running as an Adminsitrator. - Paths with backslashes aren't supported because the backslash is used for escape characters. For example,
C:\Users\Chris
doesn't work, butC:/Users/Chris
orC:\\Users\\Chris
do.