GD mod template using the xmake build system, along with an automated copy DLL and run command that allows for quick testing of modifications.
xmake is a lightweight, cross-platform build utility based on Lua that uses xmake.lua
to maintain project builds with a simple and readable syntax. It is very lightweight and has no dependencies due to the integration of the Lua runtime.
Compared to CMake, I find xmake much simpler to use when it comes to getting started, compiling, and running projects. As a result, I created this template to practice and learn.
To ensure a smooth experience, xmake attempts to detect Visual Studio Community with C++, making it highly recommended to have it installed.
To get started with this template, download and install xmake using the installer from Releases. Verify the installation by opening a console and running xmake --version
.
Once xmake is installed, clone this repository and change to the directory using the following commands:
git clone https://github.com/iAndyHD3/xmake-gd-mod-template gdmod
cd gdmod
Then, compile the mod using xmake by simply running xmake
. For the first compile, use xmake -y
to auto-accept y/n install packages.
To automate the process of copying the DLL and running the mod, modify cfg.txt
and set your own paths for the following variables:
cppath
: the directory where the DLL will be copied togdpath
: the directory where the Geometry Dash executable is locatedgdexec
: the file name of the Geometry Dash executable (usuallyGeometryDash.exe
)
Next, import the settings with
xmake f --import=cfg.txt
You can view the current values using xmake f --menu
and entering Project Configuration
.
Then you can call the run command on xmake >=2.7.8 like so
xmake run
If you have an older version, the target name must be specified
xmake run gdmod
To compile and run at the same time use
xmake && xmake run
To build using clang, use
xmake f --toolchain=clang --import=cfg.txt
check out the xmake.lua
of the main project matdash, cocos headers and gd.h
xmake has its own package called xrepo which integrates very well with xmake.lua
- geode docs modding tutorials cover tradditional modding aswell
- cocos-headers api docs
- gd-docs endpoints info and how to make requests to gd servers
- GD Programming discord server
- GD Modding (community) discord server