|
1 | | -# Windows Users |
| 1 | +# Windows users |
2 | 2 |
|
3 | 3 | > Exqlite uses an [Erlang NIF](https://erlang.org/doc/tutorial/nif.html) under the hood. |
4 | | -> Means calling a native implementation in C. |
5 | | -> For Windows users this means compiling Exqlite does not magically just work. |
| 4 | +> Means calling a native implementation in C. |
| 5 | +
|
| 6 | +For Windows users this means compiling Exqlite does not magically just work. |
| 7 | +Of course, using **WSL 2** can be an alternative. |
6 | 8 |
|
7 | 9 | ## Requirements |
8 | 10 |
|
9 | | -### Install Microsoft Visual C++ Build Tools |
| 11 | +### Install Microsoft Visual C++ build tools |
10 | 12 |
|
11 | 13 | Download page: |
12 | 14 | [visualstudio.microsoft.com/visual-cpp-build-tools](https://visualstudio.microsoft.com/visual-cpp-build-tools/) |
13 | 15 |
|
14 | 16 | Alternative direct download link: |
15 | 17 | [aka.ms/vs/16/release/vs_buildtools.exe](https://aka.ms/vs/16/release/vs_buildtools.exe) |
16 | | -_for Visual Studio 2019 - version 16_ |
| 18 | +_(aligned with Visual Studio 2019 - version 16)_ |
| 19 | + |
| 20 | +You need to install the **C++ build tools** workload with the default optional components. |
17 | 21 |
|
18 | | -## Building |
| 22 | +## Building environment |
19 | 23 |
|
20 | 24 | ### Start command prompt with necessary environment |
21 | 25 |
|
22 | | -> Assuming you want to build for Windows x64. |
| 26 | +> Assuming you are building for Windows x64. |
23 | 27 |
|
24 | | -Within Windows Start menu search for: |
| 28 | +Within Windows start menu search for: |
25 | 29 | x64 Native Tools Command Prompt |
26 | 30 |
|
27 | | -Starting this command prompt all necessary environment variables for compiling should be ready. |
| 31 | +Starting this command prompt all necessary environment variables |
| 32 | +for compiling should be ready within the prompt. |
28 | 33 |
|
29 | | -Means ready to run: |
30 | | -```cmd |
| 34 | +Ready to run: |
| 35 | +```powershell |
31 | 36 | mix deps.compile exqlite |
32 | 37 |
|
33 | 38 | # or |
34 | 39 | mix compile |
35 | 40 | mix test |
| 41 | +... |
36 | 42 | ``` |
37 | 43 |
|
38 | 44 | **Alternative way to start prompt** |
39 | 45 |
|
40 | | -Assuming you have _latest_ version of Build Tools (Visual Studio 2019) installed. |
| 46 | +> Assuming you have _latest_ version of Build Tools, aligned with Visual Studio **2019**, |
| 47 | +installed in its default installation path. |
41 | 48 |
|
42 | | -``` |
| 49 | +```powershell |
43 | 50 | cmd /k "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Auxiliary\Build\vcvars64.bat" |
44 | 51 | ``` |
| 52 | + |
| 53 | +## Visual Studio Code users using ElixirLS |
| 54 | + |
| 55 | +> Assuming you have _latest_ version of Build Tools, aligned with Visual Studio **2019**, |
| 56 | +installed in its default installation path. |
| 57 | + |
| 58 | +Start Visual Studio Code from a PowerShell prompt within your project folder. |
| 59 | + |
| 60 | +```powershell |
| 61 | +cmd /k '"C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Auxiliary\Build\vcvars64.bat" && code .' |
| 62 | +``` |
| 63 | + |
| 64 | +With starting Visual Studio Code this way, ElixirLS should work |
| 65 | +and even your integrated terminal should be aware or the build tools. |
| 66 | + |
| 67 | +Probably make yourself a shortcut for this. |
| 68 | + |
| 69 | +**Integrated terminal only** |
| 70 | + |
| 71 | +Within your global `settings.json` or your workspace `.vscode\settings.json` add: |
| 72 | + |
| 73 | +```json |
| 74 | +{ |
| 75 | + "terminal.integrated.shell.windows": "cmd.exe", |
| 76 | + "terminal.integrated.shellArgs.windows": [ |
| 77 | + "/k", |
| 78 | + "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Auxiliary\\Build\\vcvars64.bat", |
| 79 | + ] |
| 80 | +} |
| 81 | +``` |
0 commit comments