From 3be1ca20133ca37f8d80bc4bb4b96520a0639f6d Mon Sep 17 00:00:00 2001 From: mat <26722564+matcool@users.noreply.github.com> Date: Wed, 3 Jan 2024 20:52:24 -0300 Subject: [PATCH] get rid of old pages, add some links to whats next --- cpp/index.md | 5 ++ geode/cli-to-path.md | 25 --------- geode/index.md | 3 +- getting-started-new/create-mod.md | 2 +- getting-started-new/index.md | 2 +- getting-started-new/what-next.md | 20 +++++++- getting-started.md | 56 --------------------- installation.md | 84 ------------------------------- 8 files changed, 28 insertions(+), 169 deletions(-) delete mode 100644 geode/cli-to-path.md delete mode 100644 getting-started.md delete mode 100644 installation.md diff --git a/cpp/index.md b/cpp/index.md index e4d4f0a..24cd0e1 100644 --- a/cpp/index.md +++ b/cpp/index.md @@ -1,3 +1,8 @@ +--- +title: C++ Tutorials +order: 999 +--- + # C++ Tutorials This is a collection of tutorials for C++, ranging from basic language features to compiler-specific UB. This is intended as **supplemental** material for GD modders who are new to modding and C++ - **it should not be regarded as a full tutorial**. To learn C++, you should seek more information from sites such as [W3Schools](https://www.w3schools.com/cpp/default.asp) and [learncpp](https://www.learncpp.com/). diff --git a/geode/cli-to-path.md b/geode/cli-to-path.md deleted file mode 100644 index e541949..0000000 --- a/geode/cli-to-path.md +++ /dev/null @@ -1,25 +0,0 @@ -# Adding CLI to PATH - -> :warning: Note: this section is for Windows only. - -In order for the CLI to be accessible from anywhere on your computer, it needs to be added to your `PATH` environment variable. If you know what that means, you know how to do it; otherwise, follow these steps: - -1. Select the CLI executable in File Explorer, Shift + Right-Click it and select `Copy as Path` - -2. Search `Edit the system environment variables` on Windows search. Alternatively, you can open up Control Panel and search for it, then select `Edit the system environment variables` or **to skip straight to step 3 select `Edit environment variables for your account`**. - -3. Click `Environment Variables...` - -4. In the top `User variables` section, select the `Path` variable and click `Edit` - -5. Now click `New` and paste the path of the CLI executable you copied at Step 1. **Remove the `\geode.exe` from the end;** the path has to point to the _directory_ with Geode CLI, not the CLI itself. - -6. Click OK to close the environment variable windows. - -## Making sure it works - -1. Open up Windows search and open `cmd` or `powershell` - -2. Type `geode` and hit Enter. If CLI was installed correctly, you should see the CLI help displaying its version and commands. - -If the command didn't work, try restarting the terminal you have open, or restarting your computer. diff --git a/geode/index.md b/geode/index.md index 695d975..0e993d4 100644 --- a/geode/index.md +++ b/geode/index.md @@ -1,5 +1,6 @@ --- -title: Geode +title: Geode? +order: 99 --- These pages are a collection of information about the Geode framework itself. diff --git a/getting-started-new/create-mod.md b/getting-started-new/create-mod.md index 432166d..a0b9c31 100644 --- a/getting-started-new/create-mod.md +++ b/getting-started-new/create-mod.md @@ -1,5 +1,5 @@ --- -title: 3. Creating a new mod +title: 3. Creating and building a new mod order: 5 --- diff --git a/getting-started-new/index.md b/getting-started-new/index.md index 0071f03..5c68474 100644 --- a/getting-started-new/index.md +++ b/getting-started-new/index.md @@ -1,4 +1,4 @@ --- -title: Getting Started (new) +title: Getting Started order: 1 --- \ No newline at end of file diff --git a/getting-started-new/what-next.md b/getting-started-new/what-next.md index 96d54b1..41e1f00 100644 --- a/getting-started-new/what-next.md +++ b/getting-started-new/what-next.md @@ -7,4 +7,22 @@ order: 7 idk! Its difficult to guide you on what to do next, as you can do pretty much anything :-) -TODO: add link to other pages \ No newline at end of file +## Geode Features + +Modding in Geode is for the most part the same as traditional modding, however there are a few things where it differs. Here are a list of Geode-specific concepts you might like to familiarize yourself with: + + * [Hooking with `$modify`](/tutorials/modify.md) and [adding fields](/tutorials/fields.md) + * [Using sprites and other resources](/mods/resources.md) + * [Settings](/mods/settings.md) and [saving data](/mods/savedata.md) + * [String IDs](/tutorials/nodetree.md) and [Layouts](/tutorials/layouts.md) + * [Events](/tutorials/events.md) + * [Using dependencies](/mods/dependencies.md) + * [Publishing mods](/mods/publishing.md) + +See also [our tutorial](/tutorials/migrating.md) for porting traditional mods to Geode. + +The [Tutorials](/tutorials) category in general is a great source for information about working with Geode mods. + +## Working with cocos + +If you haven't written GD mods before, see [the Handbook](/handbook/chap0.md) for a tutorial \ No newline at end of file diff --git a/getting-started.md b/getting-started.md deleted file mode 100644 index 40681de..0000000 --- a/getting-started.md +++ /dev/null @@ -1,56 +0,0 @@ ---- -title: Getting started (old) -icon: play -description: Instructions for creating mods with the Geode SDK & other developer tools -order: 1 ---- - -# Getting started - -Make sure to [install Geode](/installation.md) first. - -## Creating a new mod - -Navigate to some projects folder on your computer and run `geode new` from the terminal. Follow the prompts given to initialize a new directory with template mod code, and then open up the created directory in your favorite code editor. - -The structure of a Geode mod is the following: - - * `mod.json` contains metadata about your mod, such as the name, version, settings, etc. [See detailed info](/mods/configuring.md) - * `about.md` is a free-form description about the mod, like a Github README. [See detailed info](/mods/md-files.md) - * `CMakeLists.txt` is for configuring CMake. The default configuration provided by `geode new` should cover most smaller mods - * `src` is the directory where your mod's source code lives - -In addition to these predefined files, you may also find common additional ones: - - * `changelog.md` lists all of the changes between versions to the mod; [see detailed info](/mods/md-files.md#changelogmd) - * `support.md` is free-form info about how to show support to the developer of the mod; [see detailed info](/mods/md-files.md#supportmd) - * `resources` is a common name for the directory containing any assets like sprites and sounds for the mod - * `include` is a common name for the directory containing header files for [mods with an API](/mods/dependencies.md) - -## Writing code - -> :information_source: If you haven't written GD mods before, see [the Handbook](/handbook/chap0.md) for a tutorial - -Modding in Geode is for the most part the same as traditional modding, however there are a few things where it differs. Here are a list of Geode-specific concepts you might like to familiarize yourself with: - - * [Hooking with `$modify`](/tutorials/modify.md) and [adding fields](/tutorials/fields.md) - * [Using sprites and other resources](/mods/resources.md) - * [Settings](/mods/settings.md) and [saving data](/mods/savedata.md) - * [String IDs](/tutorials/nodetree.md) and [Layouts](/tutorials/layouts.md) - * [Events](/tutorials/events.md) - * [Using dependencies](/mods/dependencies.md) - * [Publishing mods](/mods/publishing.md) - -See also [our tutorial](/tutorials/migrating.md) for porting traditional mods to Geode. - -The [Tutorials](/tutorials) category in general is a great source for information about working with Geode mods. - -## Building mods - -You can build mods using CMake. If you're using VS Code with the [CMake Tools extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode.cmake-tools), simply run `CMake: Configure` from the VS Code command palette (press F1 to launch it) to configure the mod. **On Windows, make sure to select an x86 generator**, for example `Visual Studio Community 2019 Release - amd64_x86`. Note that for Visual Studio generators, the second number is the target architecture, which must be x86, so `x86_amd64` is the _wrong_ one. - -After configuring, if you're **on Windows**, run `CMake: Select Variant` (select either `Release` or `RelWithDebInfo`). This may also be done through the bottom status bar. There should be a button that displays `Debug`. Click on this and change it to the option in the dropdown that displays `Release`. - -Now you can build the mod by running `CMake: Build` or pressing the `Build` button in the bottom status bar. If the building is succesful, the mod should be automatically installed in GD. Open up GD and see if the mod works. - -If you don't want to use VS Code, you can also use CMake from the command line with `cmake -B build -T host=x64 -A win32` and `cmake --build build --config Release` **(on Windows)**. diff --git a/installation.md b/installation.md deleted file mode 100644 index a72aee9..0000000 --- a/installation.md +++ /dev/null @@ -1,84 +0,0 @@ ---- -title: Installation -icon: download -description: Instructions for installing the Geode SDK & other developer tools -order: 0 ---- - -# Installation - -> :warning: This tutorial is for installing the Geode SDK **for developers**. If you are just looking to install the mod loader to use mods, see [our homepage](https://geode-sdk.org/install) - -These are instructions for installing the **Geode SDK** and **CLI**. - -### Prerequisites - -To use Geode, you need at least the following installed on your computer: - - * [CMake](https://cmake.org/download/) (minimum v3.13.4, prefer latest) - * A supported C++ compiler ([MSVC](https://visualstudio.microsoft.com/downloads/) for Windows, [clang](https://releases.llvm.org/) for MacOS. If you use Visual Studio, make sure to select the `Desktop development with C++` kit from the installer) - * [git](https://git-scm.com/downloads) - -## Installing with CLI - -The following steps guide you through installing the Geode CLI and SDK. If you would like to manually build them from source, [see below](#building-from-source). - -Geode CLI is the command-line interface for working with Geode. It handles packaging mods into `.geode` files, creating spritesheets, creating bitmap fonts, etc. The CLI is required for compiling the Geode loader, and is extremely helpful for working with your own mods, as it automatically packages all the resources into a `.geode` file and installs it to GD. - -You can also use the CLI for installing the Geode SDK, which is going to be used in this tutorial. - -1. Download the [latest release of CLI](https://github.com/geode-sdk/cli/releases/latest) - -2. Unzip the downloaded file in some directory on your computer - * On Windows, you also need to [add the executable to your PATH](/geode/cli-to-path.md). - -3. Install the Geode Mod Loader to GD (see [our homepage](https://geode-sdk.org/install)) - -4. Open a terminal and run `geode sdk install` to install the SDK (You can provide an argument to `geode sdk install ` if you want to install somewhere other than the default path). If the command wasn't found, [make sure CLI is in your PATH](/geode/cli-to-path.md), and try restarting your computer. - * The installation should automatically set the `GEODE_SDK` environment variable to point to the SDK on Windows. You might need to restart your terminal or IDE, or even have to restart your computer. If it still doesn't work then you'll have to [set it manually](/geode/sdk-env-var.md), as it is required. - -5. Run `geode config setup` from the command line to set up a profile in CLI - -5. Run `geode sdk install-binaries` to install prebuilt binaries, or [build Geode yourself](#building-from-source) - * You can pick whether you want the `nightly` or `stable` branch of Geode. `nightly` is the latest commit of the `main` branch, and contains all of the latest and greatest features but may also feature crashes and possibly not even compile, whereas `stable` is the latest released version. Use `geode sdk update nightly` or `geode sdk update stable` to switch between the two branches. - -6. All done :) See the [Getting started](/getting-started.md) for information on how to start creating mods with Geode. - -## Recommended developer tools - -The CLI and SDK are strictly the only things needed to develope Geode mods, however here is also a few recommended developer tools to make your modding experience better: - - * [DevTools](https://github.com/geode-sdk/devtools) - In-game developer tools mod that lets you inspect the current scene - * [The Geode VS Code extension](https://marketplace.visualstudio.com/items?itemName=GeodeSDK.geode) - Adds lots of useful little tools such a sprite browser to VS Code - -## Building from Source - -Building Geode from source has the same prerequisites as before, aswell as requiring CLI to be installed. If you'd like to build Geode CLI from source, you also need to install [Rust](https://rustup.rs/). Building the CLI is as simple as running `cargo build`. - -### Quick instructions (for thigh-high programmers) - -1. `git clone --recursive https://github.com/geode-sdk/geode.git` - -2. `cmake -B build -T host=x64 -A win32` - -3. `cmake --build build --config Release` - -### Recommended way (for normal people) - -1. Install [VS Code](https://code.visualstudio.com/) - -2. Install the [C/C++](https://marketplace.visualstudio.com/items?itemName=ms-vscode.cpptools) and [CMake Tools](https://marketplace.visualstudio.com/items?itemName=ms-vscode.cmake-tools) extensions for VS Code - -3. Open up the command line and navigate to any directory where you'd like to build the loader - -4. `git clone https://github.com/geode-sdk/geode` - -5. Open up the directory in VS Code (tip: you can do this from the command line via `code ./geode`) - -6. Press F1 to open the Command Palette and run `CMake: Configure`. On Windows, make sure to select an x86 generator, for example `Visual Studio Community 2019 Release - amd64_x86`. Note that for Visual Studio generators, the second number is the target architecture, which must be x86. - -7. Open up the Command Palette again and run `CMake: Select Variant` (select either `Release` or `RelWithDebInfo`). This may also be done through the bottom status bar. There should be a button that displays `Debug`. Click on this and change it to the option in the dropdown that displays `Release` - -8. Click `Build` on the bottom status bar or run `CMake: Build` - -9. If building was succesful, you can move the files from `bin/nightly` to your Geometry Dash folder (move the contents of resources to `/geode/resources/geode.loader`)