Skip to content

Commit

Permalink
wording improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
HJfod committed Nov 4, 2024
1 parent 0db215d commit d627a13
Show file tree
Hide file tree
Showing 10 changed files with 147 additions and 157 deletions.
32 changes: 18 additions & 14 deletions getting-started/cpp-stuff.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,26 @@ order: 2
---

# Required C++ Tools

To be able to use the Geode SDK, you **will** need at least the following:
* [A C++ compiler](#compiler)
* [CMake](https://cmake.org/download/) - Version 3.25+ is required, and make sure to add to PATH when installing on windows.
* [git](https://git-scm.com/downloads) - Hey you. yes you. I know a lot of people skip this **but you will need it**. Don't come at us asking for why "could not find git for clone of json-populate"
* [A C++ compiler](#compiler)
* [CMake](https://cmake.org/download/) - Version 3.25+ is required - make sure to add to PATH when installing on Windows.
* [Git](https://git-scm.com/downloads) - Hey you. Yes, you! I know a lot of people skip this step **but you will need it**. Don't come at us asking for why you "could not find git for clone of json-populate".

## Compiler

To use the Geode SDK, and in turn make Geometry Dash mods, you will need either:
* [Visual Studio 2022+](#windows) on Windows
* [clang](#macos) on MacOS
* [A secret third thing](#linux) on Linux
* [Visual Studio 2022+](#windows) on Windows
* [Clang](#macos) on MacOS
* [A secret third thing](#linux) on Linux

### Windows
From the [Visual Studio](https://visualstudio.microsoft.com/downloads/) website, you can download the Visual Studio IDE along with the compiler. If you want **just** the compiler, look for *Build Tools for Visual Studio* further down in the page.

After launching the installer, look for **Desktop development with C++**. You may choose other features, but you **will** need at least ***MSVC*** and ***Windows SDK*** installed.
Download Visual Studio from [its website](https://visualstudio.microsoft.com/downloads/). If you want **just** the compiler and not the code editor, look for *Build Tools for Visual Studio* further down in the page.

Once its installed, you should now have a working C++ compiler installed that is suited for GD mod development.
After launching the installer, select **Desktop development with C++**. You may choose other features, but you **will** need at least ***MSVC*** and ***Windows SDK*** installed.

Once Visual Studio is installed, you should now have a working C++ compiler that is suited for GD mod development.

Please note that Visual Studio **2022** or higher is required. 2019 or lower will not work, as they don't support C++20 properly.

Expand All @@ -32,11 +35,12 @@ brew install llvm
```

### Linux
Linux is a bit more complicated, as obviously there's no linux release of GD (yet). Of course, you can run the Windows version of GD through software like [wine](https://www.winehq.org/) quite well, which is probably what you're already doing.

Because of that, this guide will set you up to [cross-compile](https://en.wikipedia.org/wiki/Cross_compiler) windows Geode mods from linux.
Linux is a bit more complicated, as there's no official Linux release of GD (yet). Of course, you can run the Windows version of GD through software like [wine](https://www.winehq.org/) quite well, which is probably what you're already doing.

Because of that, this guide will set you up to [cross-compile](https://en.wikipedia.org/wiki/Cross_compiler) Windows Geode mods from Linux.

First, besides git and cmake, make sure you have `clang` and `lld` installed.
First, besides Git and Cmake, make sure you have `clang` and `lld` installed.

On Ubuntu:

Expand All @@ -50,12 +54,12 @@ On Arch-based systems:
pacman -S clang lld
```

The next step will install the Windows SDK and a CMake toolchain. For ease of installation, first install [Geode CLI](/getting-started/geode-cli.md) and then come back here. If you want to do it manually, you can follow [this guide](https://gist.github.com/matcool/abb65ee59ded3766717c673014c3a2a7).
The next step will install the Windows SDK and a CMake toolchain. For ease of installation, first install [the Geode CLI](/getting-started/geode-cli.md) and then come back here. If you want to do it manually, you can follow [this guide](https://gist.github.com/matcool/abb65ee59ded3766717c673014c3a2a7).

After installing the CLI, run this command to install all the needed tools:

```bash
geode sdk install-linux
```

Now you can proceed to [setting up the SDK](/getting-started/sdk.md).
Now you can proceed to [setting up Geode CLI](/getting-started/geode-cli.md).
38 changes: 21 additions & 17 deletions getting-started/create-mod.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ order: 5
---

# Creating a new mod

After all that setup, you can now create your first mod!

To do this, open up a terminal where you want to create your project and run:
Expand All @@ -15,34 +16,38 @@ Follow the given prompts and afterwards you should have a new folder containing
## Files

You may notice the project already comes with a few files. Lets go over them:
- `CMakeLists.txt` - This is the main file for your CMake project.
- `about.md` - Here you can write a very long description page for your mod, in markdown. Think of it as a README for your mod! This file is technically optional, but highly recommended.
- `logo.png` - This is the icon for your mod, which shows up in-game. This file is technically optional, but highly recommended.
- `mod.json` - This json file contains all the metadata about your mod, such as name, version, custom resources, settings, etc. [See this page for detailed info](/mods/configuring)
* `CMakeLists.txt` - This is the main file for your CMake project.
* `about.md` - Here you can write a very long description page for your mod, in markdown. Think of it as a README for your mod! This file is technically optional, but highly recommended.
* `logo.png` - This is the icon for your mod, which shows up in-game. This file is technically optional, but highly recommended.
* `mod.json` - This json file contains all the metadata about your mod, such as name, version, custom resources, settings, etc. [See this page for detailed info](/mods/configuring)

If you plan on releasing your mod, **please** edit the about.md and logo.png files!
If you plan on releasing your mod, remember to edit the about.md and logo.png files!

The source code for your mod can be found inside the `src` folder.

## Additional Files

Geode will also look for these special files within your mod folder:
- `changelog.md` - Lists all of the changes between versions to the mod; [see detailed info](/mods/md-files)
- `support.md` - Is free-form info about how to show support to the developer of the mod; [see detailed info](/mods/md-files)
* `changelog.md` - Lists all of the changes between versions to the mod; [see detailed info](/mods/md-files)
* `support.md` - Free-form info about how to show support to the developer of the mod; [see detailed info](/mods/md-files)

# Build
Now, to build your mod you have a few options: \

Now, to build your mod you have a few options:

If youre using an IDE such as Clion, VScode or Visual Studio, head over to the [IDE Setup](/getting-started/ide-setup) page.

If you're building for *android*, check out the [android section](#build-for-android).
If you're building for Android, check out the [Android section](#build-for-android).

Otherwise if you want to build your mods manually from the command line you can do that by simply running these commands in your mod's folder:
```bash
# Configures & builds for the current platform
geode build
```

> Check out `geode build --help` for other options!
If you have an issue running that command for whatever reason ([let us know!](https://github.com/geode-sdk/cli/issues)), you can build your mod the same way using these commands:
If you have an issue running that command for whatever reason ([do let us know!](https://github.com/geode-sdk/cli/issues)), you can build your mod the same way using these commands:
```bash
# Configure CMake
cmake -B build
Expand All @@ -51,19 +56,18 @@ cmake -B build
cmake --build build --config RelWithDebInfo
```

If you [created a profile in CLI](/getting-started/geode-cli), then the mod should be automatically copied over to your mods folder, if not, then the built `your.mod.geode` file should be in your build folder.
If you [created a profile in CLI](/getting-started/geode-cli), then the mod should be automatically installed to GD. If not, then the built `your.mod.geode` package should be in your build folder, from where you can manually install it in-game.

## Build for Android

To build mods for android you must install the [Android NDK](https://developer.android.com/ndk/downloads). \
Extract it somewhere and set the `ANDROID_NDK_ROOT` enviroment variable to its path.
To build mods for Android you must install the [Android NDK](https://developer.android.com/ndk/downloads). Extract it somewhere and set the `ANDROID_NDK_ROOT` enviroment variable to its path.

On **Windows** you must also install [ninja](https://github.com/ninja-build/ninja/releases). You can do this via scoop `scoop install ninja`
On **Windows** you must also install [Ninja](https://github.com/ninja-build/ninja/releases). If you have Scoop, you can do this via `scoop install ninja`.

Now you can build your mod for android by just doing:
Now you can build your mod for Android via:
```bash
geode build -p android64
# or if you're using a 32 bit phone
# Or if you're using a 32 bit phone
geode build -p android32
```

Expand All @@ -74,7 +78,7 @@ You can then copy the built .geode file from the `build-android64` folder to you

## Building Windows mods on Linux

If you have followed the steps earlier and installed all the required tools with `geode sdk install-linux`, building should be as simple as on windows:
If you have followed the steps earlier and installed all the required tools with `geode sdk install-linux`, building should be as simple as on Windows:

```bash
geode build
Expand Down
46 changes: 20 additions & 26 deletions getting-started/geode-cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ order: 3
---

# Geode CLI
The Geode SDK has its own command line utility program to aid in many tasks involved in mod, such as asset packing, font generation, managing the SDK, etc.

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

Expand All @@ -14,37 +15,35 @@ The Geode SDK has its own command line utility program to aid in many tasks invo

## Windows

### scoop
You can use [scoop](https://scoop.sh/) to easily install the cli by doing:
### Scoop

You can use [Scoop](https://scoop.sh/) to easily install the CLI by doing:
```bash
scoop bucket add extras
scoop install geode-sdk-cli
```
In the future you can easily update the cli by doing:
Later on, you can easily update the Geode CLI by doing:
```bash
scoop update geode-sdk-cli
```

If you don't have scoop, you can follow the installation instructions on their page:
[https://scoop.sh](https://scoop.sh)

### winget
We are also on [winget](https://learn.microsoft.com/en-us/windows/package-manager/winget/), so to install the cli you can do:

If you prefer, you can also use [WinGet](https://learn.microsoft.com/en-us/windows/package-manager/winget/):
```bash
winget install GeodeSDK.GeodeCLI
```
In the future you can easily update the cli by doing:
To update the CLI, run:
```bash
winget upgrade GeodeSDK.GeodeCLI
```


---

(Not Recommended :c) Otherwise, you can manually install it by:
1. Download the latest windows release over at [GitHub](https://github.com/geode-sdk/cli/releases/latest)
1. Extract the `geode.exe` into some folder on your computer
1. Select the CLI executable in File Explorer, Shift + Right-Click it and select `Copy as Path`
**(Not Recommended!)** Otherwise, you can manually install the Geode CLI by:
1. Download the latest Windows release over on [GitHub](https://github.com/geode-sdk/cli/releases/latest)
1. Extract `geode.exe` into some folder on your computer
1. Select the executable in File Explorer, Shift + Right-Click it and select `Copy as Path`
1. 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 6 select `Edit environment variables for your account`**.
1. Click `Environment Variables...`
1. In the top `User variables` section, select the `Path` variable and click `Edit`
Expand All @@ -53,32 +52,27 @@ winget upgrade GeodeSDK.GeodeCLI

---

After either way of installing it, you should now be able to run `geode --version` in your cmd and see a version number!
After installing the CLI, you should now be able to run `geode --version` in your command line and see a version number! (If this doesn't work, try restarting your terminal and/or computer.)

It is recommended that you [set up a profile now](#profile-setup).
It is recommended that you [set up a profile afterwards](#profile-setup).

## MacOS

You can easily install the CLI via [brew](https://brew.sh)
You can easily install the CLI via [Brew](https://brew.sh)
```bash
brew install geode-sdk/geode/geode-cli
```

It is recommended that you [set up a profile now](#profile-setup).
It is recommended that you [set up a profile afterwards](#profile-setup).

## Linux

We provide prebuilt linux binaries in the CLI releases page, which you can find here: \
[https://github.com/geode-sdk/cli/releases/latest](https://github.com/geode-sdk/cli/releases/latest)

Since this is different per distro, you must figure out how to add this binary to your path for CMake to find it.

Once you figure that out, it is recommended that you [set up a profile now](#profile-setup).
We provide prebuilt Linux binaries in [the CLI releases page]((https://github.com/geode-sdk/cli/releases/latest)). Since Linux distros differ between each other, you need to figure out yourself how to add this binary to your global path so CMake can find it. As long as `geode --version` works anywhere, everything should be fine.

Once you figure that out, it is recommended that you [set up a profile afterwards](#profile-setup).

# Profile Setup

A profile is just an instance of Geometry Dash. It's a good idea to set up one up for CLI so your mods can be automatically installed post build.
A profile is just an instance of Geometry Dash. The CLI allows keeping multiple separate installations of Geometry Dash at once, though most users will just have a single installation of GD with Geode on it. If you do have GDPSes with Geode on them installed, you can run `geode profile add` to add them to the list of known profiles. You need to have at least one profile set up so your mods can be automatically installed post build.

To setup a new profile, simply run the `geode config setup` command on your terminal.

Loading

0 comments on commit d627a13

Please sign in to comment.