Skip to content

Commit

Permalink
android build instructions via geode build
Browse files Browse the repository at this point in the history
  • Loading branch information
matcool committed May 10, 2024
1 parent a3baaea commit d2d9a02
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions getting-started/create-mod.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,17 @@ Geode will also look for these special files within your mod folder:
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).

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

Expand All @@ -43,4 +52,25 @@ cmake -B build

# Build the project
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.

## 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.

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

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

You can then copy the built .geode file from the `build-android64` folder to your phone at this location:
```
/storage/emulated/0/Android/media/com.geode.launcher/game/geode/mods/
```

0 comments on commit d2d9a02

Please sign in to comment.