diff --git a/assets/win_compilers.png b/assets/win_compilers.png index 87dd9cee..ff959211 100644 Binary files a/assets/win_compilers.png and b/assets/win_compilers.png differ diff --git a/assets/win_usecmake.png b/assets/win_usecmake.png deleted file mode 100644 index 8edcd08e..00000000 Binary files a/assets/win_usecmake.png and /dev/null differ diff --git a/getting-started/cpp-stuff.md b/getting-started/cpp-stuff.md index b1d9a319..6a10af5e 100644 --- a/getting-started/cpp-stuff.md +++ b/getting-started/cpp-stuff.md @@ -13,31 +13,31 @@ To be able to use the Geode SDK, you **will** need at least the following: ## Compiler To use the Geode SDK, and in turn make Geometry Dash mods, you will need either: - * [Clang](#windows-clang) (recommended) or [Visual Studio 2022+](#windows-visual-studio) on Windows + * [Clang](#windows) on Windows * [Clang](#macos) on MacOS * [A secret third thing](#linux) on Linux -### Windows (Clang) +### Windows First, install [LLVM](https://github.com/llvm/llvm-project) and [Ninja](https://github.com/ninja-build/ninja). The easiest way is using Scoop: ``` scoop install llvm ninja ``` -LLVM itself does not come with Windows SDK and CRT libraries, so you will need a minimal Visual Studio install for these, which is described in the next section. +LLVM itself does not come with Windows SDK and CRT libraries, so you will need a minimal Visual Studio install for these. -### Windows (Visual Studio) +Unless you want to install Visual Studio (the editor) itself, we recommend installing just the build tools. Open the VS [download page](https://visualstudio.microsoft.com/downloads/), scroll to the bottom, and under "Tools for Visual Studio" download **Build Tools for Visual Studio**. Please note that Visual Studio **2022** or higher is required. If you have an older version already installed, you should upgrade to the latest available. -Unless you want to install Visual Studio (the editor) itself, we recommend installing just the build tools. Open the VS [download page](https://visualstudio.microsoft.com/downloads/), scroll to the bottom, and under "Tools for Visual Studio" download **Build Tools for Visual Studio**. - After launching the installer, select **Desktop development with C++** and optionally deselect all features except for **MSVC Build Tools** and **Windows SDK**, like on the screenshot below. Click Install and wait for it to finish. ![Image showing VS installer](/assets/vs_installer.png) Once Visual Studio is installed, you should now have a working C++ compiler that is suited for GD mod development. +Note that although it is possible to use MSVC from Visual Studio on its own to compile Geode mods, we **do not** recommend using it, since you may not be able to compile a mod using it (MSVC likes to run into segfaults while compiling certain libraries), and it is also slower overall. + ### MacOS Install [brew](https://brew.sh/) if you don't already have it, and then run: diff --git a/getting-started/geode-cli.md b/getting-started/geode-cli.md index b38ae8b9..174bf848 100644 --- a/getting-started/geode-cli.md +++ b/getting-started/geode-cli.md @@ -5,7 +5,7 @@ order: 3 # Geode CLI -Geode has its own CLI tool to aid in many tasks involved in making mods, such as packing assets, generating fonts, managing installed SDK versions, etc.. While it is technically possible to use Geode without the CLI, there is little reason not to install it as **it's required for nearly everything in practice**. +Geode has its own CLI tool to aid in many tasks involved in making mods, such as packing assets, generating fonts, managing installed SDK versions, etc. While it is technically possible to use Geode without the CLI, there is little reason not to install it as **it's required for nearly everything in practice**. # Installation diff --git a/getting-started/ide-setup.md b/getting-started/ide-setup.md index e78fc97a..474dea9e 100644 --- a/getting-started/ide-setup.md +++ b/getting-started/ide-setup.md @@ -22,10 +22,9 @@ You can use one of the following IDEs for developing Geode mods. Using an IDE is Install the following VSCode extensions: * [`CMake Tools`](https://marketplace.visualstudio.com/items?itemName=ms-vscode.cmake-tools) * [`Geode`](https://marketplace.visualstudio.com/items?itemName=GeodeSDK.geode) - Not required, but will provide some nice features. - -As well as one of: * [`clangd`](https://marketplace.visualstudio.com/items?itemName=llvm-vs-code-extensions.vscode-clangd) - **if using Clang as compiler** - * [`C/C++`](https://marketplace.visualstudio.com/items?itemName=ms-vscode.cpptools) - **if using MSVC / Visual Studio as compiler** + + There are a few steps you should follow to get proper intellisense and code completion (you should only need to do these once per project, ideally): @@ -33,15 +32,13 @@ There are a few steps you should follow to get proper intellisense and code comp ![Image showing a bunch of compilers CMake detected in VS Code](/assets/win_compilers.png) -Depending on which compiler you want to use, pick either: - * **Clang** (not `Clang-cl`) - recommended - * **Visual Studio 20xx Release - amd64** (not `amd64_x86` or any other ones) +You should pick **Clang** from the list (not `Clang-cl` or `Visual Studio`). -2. Now to select the build variant, press F1 and run `CMake: Select Variant`. We recommend **RelWithDebInfo** for easier debugging, as **Debug** may sometimes cause obscure crashes. +2. Now to select the build variant, press F1 and run `CMake: Select Variant`. We recommend **RelWithDebInfo** for easier debugging, as **Debug** may sometimes cause obscure crashes, and Debug builds cannot be distributed outside of your system. ![Image showing available build types on Windows: Debug, Release, MinSizeRel, and RelWithDebInfo](/assets/win_relwithdebinfo.png) -3. If using **Clang** with the **clangd** extension, press F1 and run `CMake: Edit User-Local CMake Kits`. This will open a file, in there find the chosen kit (one with Clang in the name) and add these keys to it: +3. Press F1 and run `CMake: Edit User-Local CMake Kits`. This will open a file, in there find the chosen kit (one with Clang in the name) and add these keys to it: ```json "cmakeSettings": { "CMAKE_EXPORT_COMPILE_COMMANDS": "ON" @@ -58,10 +55,6 @@ Additionally, we recommend disabling clangd auto header insertion, as it doesn't ], ``` -4. If instead of Clang you chose the **C/C++ extension**, you need to register CMake as the **Configuration Provider** for the C++ extension by pressing F1 and running `C/C++: Edit Configurations (UI)`. Scroll down to **Advanced** options, and set the Configuration Provider as `ms-vscode.cmake-tools`. - -![Image showing the "C/C++: Edit Configurations (UI)" command being run in VS Code](/assets/win_usecmake.png) - Now, build your mod by pressing F1 and running `CMake: Build`. **You must build your mod first so that errors such as `#include not found` go away.** If the mod was built successfully, the exit code at the end should be 0. If any errors still persist after building the mod, try restarting VS Code. ## VSCode on Mac @@ -173,7 +166,7 @@ After that, in the Open Project Wizard, you need to make sure that: 2. Toolchain is set to *Visual Studio* or *Clang/LLVM* 3. Generator is set to *Visual Studio 17 2022* or *Ninja* (if you have it installed) -In the end it should look like this: +In the end it should look like this: ![Image showing the CLion Open Project Wizard set up for Geode](/assets/clion_openprojectwizardsetup.png) @@ -217,5 +210,5 @@ Now, in the toolchain settings on the right side of the **Name** field, click th After that, you can follow the same steps as on Windows to build your mod. -For some specific mods/libraries (most people won't need this), you might also want to add the clang-cl toolchain. Everything is the same as with clang, except you have to use the `clang-cl-msvc.cmake` toolchain file instead. (Copy the environment file and change the `CMAKE_TOOLCHAIN_FILE` variable to point to the `clang-cl-msvc.cmake` file.) +For some specific mods/libraries (most people won't need this), you might also want to add the clang-cl toolchain. Everything is the same as with clang, except you have to use the `clang-cl-msvc.cmake` toolchain file instead. (Copy the environment file and change the `CMAKE_TOOLCHAIN_FILE` variable to point to the `clang-cl-msvc.cmake` file.) Also make sure you're using `clang-cl` as the compiler in the toolchain settings. diff --git a/getting-started/what-next.md b/getting-started/what-next.md index 931893e0..6f0991cd 100644 --- a/getting-started/what-next.md +++ b/getting-started/what-next.md @@ -5,7 +5,7 @@ order: 7 # What next? -You should now be set on your journey to develope GD mods! If you are completely new to GD modding, a good place to start is [the Handbook](/handbook/chap0), which covers all of the basics of creating a Hello World. +You should now be set on your journey to develop GD mods! If you are completely new to GD modding, a good place to start is [the Handbook](/handbook/chap0), which covers all of the basics of creating a Hello World. ## Geode Features