|
1 | 1 | ---
|
2 | 2 | title: Installing dependencies
|
3 |
| -description: Installing dependencies |
| 3 | +description: Installing all necessary tools to use Daxa as a dependency |
4 | 4 | slug: "introduction/installing-dependencies"
|
5 | 5 | editUrl: https://github.com/learndaxa/Tutorial/edit/main/docs/01 Introduction/01_Installing_dependencies.md
|
6 | 6 | ---
|
7 | 7 |
|
8 |
| -## Important |
| 8 | +This guide walks you through installing the tools you need for Daxa development on **Windows** and **Linux**. If you’re experienced with Vulkan or C++, you may already have some of these tools. |
9 | 9 |
|
10 |
| -This page will explain how to install all the necessary tools to compile the Daxa repository itself, though these things are also required for consumers of Daxa as a dependency. We'll go over using Daxa as a dependency in the next page. If you have previously worked with Vulkan or C++, you can skip some of these steps. Since those steps are different for Windows and Linux, this page is split into multiple parts. Make sure you follow the steps from the correct heading. |
| 10 | +:::note |
| 11 | +It’s recommended to follow these steps carefully if you’re new to Vulkan or C++. |
| 12 | +::: |
| 13 | + |
| 14 | +--- |
11 | 15 |
|
12 | 16 | ## Windows
|
13 | 17 |
|
14 |
| -### Visual Studio |
| 18 | +### 1. Visual Studio |
| 19 | + |
| 20 | +We’ll use the **Visual Studio compiler** on Windows (instead of Clang) due to current issues with Clang on Windows. You can install Visual Studio from the [official website](https://visualstudio.microsoft.com/de/vs/community/). Make sure you **select the "Desktop development with C++" component** during the setup. |
| 21 | + |
| 22 | +### 2. Clang & Ninja |
15 | 23 |
|
16 |
| -In this tutorial, ~~we will be using Clang as our compiler~~ (EDIT: For now, there are some issues with Clang on Windows, so we'll just use the Visual Studio compiler for now). Clang relies on the Microsoft STL, which we can get most easily by installing [Visual Studio](https://visualstudio.microsoft.com/de/vs/community/) and selecting the C++ desktop development component during installation |
| 24 | +1. **Install Chocolatey** (Windows package manager) from an **elevated** (administrator) PowerShell session: |
17 | 25 |
|
18 |
| -### Clang & Ninja |
| 26 | +```powershell |
| 27 | +Set-ExecutionPolicy Bypass -Scope Process -Force; ` |
| 28 | +[System.Net.ServicePointManager]::SecurityProtocol = ` |
| 29 | +[System.Net.ServicePointManager]::SecurityProtocol -bor 3072; ` |
| 30 | +iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1')) |
| 31 | +``` |
19 | 32 |
|
20 |
| -To install Clang and Ninja, you need to install Chocolatey. To do so, enter this command line into the PowerShell as an administrator: |
| 33 | +:::tip |
| 34 | +If PowerShell requests script execution permissions, enable them with: |
21 | 35 |
|
22 |
| -```ps |
23 |
| -Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1')) |
| 36 | +```powershell |
| 37 | +Set-ExecutionPolicy AllSigned |
24 | 38 | ```
|
25 | 39 |
|
26 |
| -PowerShell might ask you to enable the running of scripts, which can be enabled by running `Set-ExecutionPolicy AllSigned` |
| 40 | +::: |
27 | 41 |
|
28 |
| -You can then go ahead and install clang & ninja: |
| 42 | +2. Install LLVM (Clang) and Ninja |
29 | 43 |
|
30 |
| -```batch |
| 44 | +```powershell |
31 | 45 | choco install llvm
|
32 | 46 | choco install ninja
|
33 | 47 | ```
|
34 | 48 |
|
35 |
| -### Misc tools |
| 49 | +### 3. Misc Tools |
| 50 | + |
| 51 | +Install the following: |
| 52 | + |
| 53 | +- [Git](https://git-scm.com/downloads/win) |
| 54 | +- [Cmake](https://cmake.org/download/) |
| 55 | + |
| 56 | +Download each installer from their official site and follow the wizard to complete installation. |
36 | 57 |
|
37 |
| -You also need to install [Git](https://git-scm.com/download/win) and [CMake](https://cmake.org/download/). To do so, simply download and run the installers from their websites. |
| 58 | +### 4. Vulkan SDK |
38 | 59 |
|
39 |
| -### Vulkan SDK |
| 60 | +Download the [Vulkan SDK for Windows](https://vulkan.lunarg.com/sdk/home#windows). During installation, **uncheck "Debuggable Shader API Libraries"** to avoid conflicts with glslang. |
40 | 61 |
|
41 |
| -The last step is downloading the [Vulkan SDK](https://vulkan.lunarg.com/sdk/home#windows). During installation, keep "Debuggable Shader API Libraries" unchecked since they might clash with glslang later. |
| 62 | +--- |
42 | 63 |
|
43 | 64 | ## Linux
|
44 | 65 |
|
45 |
| -### Tools |
| 66 | +### 1. Install Basic Tools |
| 67 | + |
| 68 | +For **Debian** based systems: |
46 | 69 |
|
47 |
| -```apt |
48 |
| -sudo apt-get update |
49 |
| -sudo apt-get install ninja-build clang cmake git |
| 70 | +```bash |
| 71 | +sudo apt update |
| 72 | +sudo apt install ninja-build clang cmake git |
50 | 73 | ```
|
51 |
| -```pacman |
52 |
| -pacman -Syu |
53 |
| -pacman -S ninja-build clang cmake git |
| 74 | + |
| 75 | +For **Arch** based systems: |
| 76 | + |
| 77 | +```bash |
| 78 | +sudo pacman -Syu |
| 79 | +sudo pacman -S ninja-build clang cmake git |
54 | 80 | ```
|
55 | 81 |
|
56 |
| -### Vulkan SDK |
| 82 | +### 2. Vulkan SDK |
57 | 83 |
|
58 |
| -For the Vulkan SDK, we advise you follow the instructions on [lunarg.com](https://vulkan.lunarg.com/doc/view/latest/linux/getting_started_ubuntu.html), as they'll go over how to add the necessary sources and such for your package manager, but here are the commands for Ubuntu 22.04 (Jammy): |
| 84 | +Follow the [LunarG Vulkan SDK Installation Guide](https://vulkan.lunarg.com/doc/view/latest/linux/getting_started_ubuntu.html) for detailed steps on your distribution. Below are commands specifically for **Ubuntu 22.04 (Jammy)**: |
59 | 85 |
|
60 |
| -```ubuntu |
| 86 | +```bash |
61 | 87 | wget -qO- https://packages.lunarg.com/lunarg-signing-key-pub.asc | sudo tee /etc/apt/trusted.gpg.d/lunarg.asc
|
62 | 88 | sudo wget -qO /etc/apt/sources.list.d/lunarg-vulkan-jammy.list http://packages.lunarg.com/vulkan/lunarg-vulkan-jammy.list
|
63 | 89 | sudo apt update
|
64 | 90 | sudo apt install vulkan-sdk
|
65 | 91 | ```
|
66 |
| -```other |
67 |
| -https://vulkan.lunarg.com/sdk/home#linux |
68 |
| -``` |
| 92 | + |
| 93 | +If you’re using another distribution, see [LunarG’s official instructions](https://vulkan.lunarg.com/sdk/home#linux). |
69 | 94 |
|
70 | 95 | ## Installing VSCode (Windows & Linux)
|
71 | 96 |
|
72 |
| -This tutorial will use [Visual Studio Code](https://code.visualstudio.com/download) as our code editor. You can also use other IDEs such as [CLion](https://www.jetbrains.com/clion/), but it may be harder to follow the tutorial. We therefore recommend using VSCode with the following extensions: |
| 97 | +We’ll use [Visual Studio Code](https://code.visualstudio.com/download) as our code editor for the tutorial. Other IDEs (e.g., [CLion](https://www.jetbrains.com/clion/)) can also work, but the instructions may differ. For a smoother experience, use VSCode with the following extensions: |
73 | 98 |
|
74 | 99 | 1. C/C++ Extension Pack (`ms-vscode.cpptools-extension-pack`)
|
75 | 100 | 2. GLSL Lint (`dtoplak.vscode-glsllint`)
|
| 101 | + |
| 102 | +You’re now ready to set up your Daxa development environment. Next, we’ll walk through configuring VSCode and creating your first Daxa project. |
0 commit comments