Skip to content

Building

DefKorns edited this page Oct 7, 2026 · 1 revision

Building

With Docker (recommended)

Needs only Docker and git.

git clone --recursive https://github.com/DefKorns/OptionsMenu.git
cd OptionsMenu
./build.sh                    # out/options_menu.hmod
./build.sh FIX_LIBSTDCXX=1    # out/options_menu_compat.hmod

On Windows PowerShell use ./build.ps1 with the same arguments.

build.sh builds the classicmini-cross-toolchain image the first time and runs make inside it. The image needs the console's SDL2 headers and library in toolchain/vendor/; they come from the console's firmware and aren't redistributed, see the toolchain's README.

Make target Result
hmod (default) Compiles what changed and packages the hmod
compile Binaries only
clean Removes objects, binaries, vendored libraries and out/
Variable Effect
FIX_LIBSTDCXX=1 Builds the compat variant, with its own libstdc++.so.6
MOD_VER=<version> Overrides the version, e.g. MOD_VER=test-dev

You can build the two variants one after the other in the same checkout: switching variant relinks everything, and the normal build never packages the compat libstdc++.

Without Docker

The same Makefile works with SDL2, SDL2_ttf, libpng and GNU Make installed. For the console, cross-compile with make CROSS_PREFIX=arm-linux-gnueabihf-; without CROSS_PREFIX it builds for your own machine, which is handy for testing the UI on a desktop.

Versions and releases

Packaging and versioning come from hmod-build, shared by all my hmods:

  • The version is the latest v* git tag, without the v: v2.0.0-alpha5 → 2.0.0-alpha5. It's shown in the menu and in the hmod's readme.
  • The .hmod file name has no version (options_menu.hmod), so hakchi sees every release as the same mod and replaces it.
  • Pushing a v* tag builds both variants on GitHub Actions and publishes a GitHub Release. Tags with a hyphen (-alpha, -beta, -rc) are prereleases.
  • After a release, my Mod Hub picks it up.
git tag -s v2.0.0-alpha5 -m "v2.0.0-alpha5"
git push origin v2.0.0-alpha5

Clone this wiki locally