Skip to content

Commit

Permalink
Merge pull request #18 from geode-sdk/new-stuff
Browse files Browse the repository at this point in the history
New stuff
  • Loading branch information
matcool authored Oct 1, 2023
2 parents b1ca35a + 38428d9 commit e86f5b4
Show file tree
Hide file tree
Showing 7 changed files with 194 additions and 1 deletion.
29 changes: 29 additions & 0 deletions getting-started-new/cpp-stuff.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
title: 1.1. Required C++ Tools
order: 3
---

# 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/)
* [git](https://git-scm.com/downloads)

## Compiler
To use the Geode SDK, and in turn make Geometry Dash mods, you will need either:
* [Visual Studio](#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.

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

### MacOS
For macos u install clang somehow sorry

### Linux
Linux is well.. complicated
46 changes: 46 additions & 0 deletions getting-started-new/create-mod.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
---
title: 3. Creating a new mod
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:
```bash
geode new
```
Follow the given prompts and afterwards you should have a new folder containing the code for your mod.

## 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]()

If you plan on releasing your mod, **please** 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)

# Build
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]() page.

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
# Configure CMake (WINDOWS)
cmake -B build -A win32

# Configure CMake (Other platforms)
cmake -B build

# Build the project
cmake --build build --config RelWithDebInfo
```
48 changes: 48 additions & 0 deletions getting-started-new/geode-cli.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
---
title: 1.2. Geode CLI
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.

# Installation

* [Windows](#windows)
* [MacOS](#macos)

## Windows
If you have [scoop](https://scoop.sh/) you can easily install the cli by doing:
```bash
scoop install https://geode-sdk.org/geode-sdk-cli.json
```

---

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`
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`
1. 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.
1. Click OK to close the environment variable windows.

---

After either way of installing it, you should now be able to run `geode --version` in your cmd and see a version number!

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

## MacOS

i dont know either sorry mac ppl

It is recommended that you [set up a profile now](#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.

To setup a new profile, simply run the `geode config setup` command on your terminal.
12 changes: 12 additions & 0 deletions getting-started-new/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
title: Getting Started (new)
order: 1
---

1. Prerequisites
1. C++ stuff
1. Geode CLI
1. Setting up the SDK
1. Creating a new mod
1. IDE setup
1. What next?
11 changes: 11 additions & 0 deletions getting-started-new/prerequisites.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
title: 1. Prerequisites
order: 1
---

# Prerequisites
Before you get started with developing with the Geode SDK, there are a few prerequisites that you should know about!
* Prior C++ knowledge is **HIGHLY** recommended. We do not intend in helping you at C++ from the very basics.
* Installing [Geode](https://geode-sdk.org/install/) itself! you want to test your own mods dont you?

It is recommended that you follow the tutorials on this chapter in order.
47 changes: 47 additions & 0 deletions getting-started-new/sdk.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
---
title: 2. Setting up the SDK
order: 4
---

# Setting up the SDK
To install the SDK we will be using the CLI installed on the previous step.

To download the sdk, you can simply run the command:
```bash
geode sdk install
```
This *should* set the `GEODE_SDK` enviroment variable, which can you test after reopening your terminal:
```bash
# on windows
echo %GEODE_SDK%

# elsewhere
echo $GEODE_SDK
```

If that command prints out the path you installed the SDK to, then it has worked correctly.

To develop mods, you should also download the prebuilt binaries for Geode, which you can do by running this command:
```bash
geode sdk install-binaries
```

## Updating
You will need to manually update your local SDK every once in a while, which you do by running this command:
```bash
geode sdk update
```

do you need to run install-binaries after this? i forgot

---

You can also switch to the **nightly** version, which uses the latest commit.
```bash
geode sdk update nightly
```

Or to go back to stable:
```bash
geode sdk update stable
```
2 changes: 1 addition & 1 deletion getting-started.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: Getting started
title: Getting started (old)
icon: play
description: Instructions for creating mods with the Geode SDK & other developer tools
order: 1
Expand Down

0 comments on commit e86f5b4

Please sign in to comment.