Attention: Here be dragons

This is the latest (unstable) version of this documentation, which may document features not available in or compatible with released stable versions of GDWiiInput.

Building the GDExtension

If you are interested in contributing to this project, following are the steps to compile GDWiiInput locally.

Requirements: Godot 4.4+, Python, SCons, CMake.

  1. Clone the repository:

git clone --recursive https://github.com/20akshay00/godot-wii-input
  1. Build godot-cpp bindings:

cd godot-wii-input/godot-cpp
scons platform=<platform>
cd ..
  1. Build the extension:

scons platform=<platform>

After this, the demo project should be runnable from the Godot editor.

Compiling Wiiuse

This project uses Wiiuse as a static library from the /libs directory so compiling it again is not necessary.

Linux dependencies:

sudo apt install libbluetooth-dev libbluetooth3 bluez

Build Wiiuse:

cmake -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=Release -DCMAKE_POSITION_INDEPENDENT_CODE=ON ..
make

Windows build (example using PowerShell):

& "C:\Program Files\CMake\bin\cmake.exe" -S .. -B build -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_FLAGS_RELEASE="/MT" -DCMAKE_CXX_FLAGS_RELEASE="/MT"
& "C:\Program Files\CMake\bin\cmake.exe" --build build --config Release

Building documentation

Navigate to the demo project folder inside the repository and run the following to generate the XML documentation for all the exposed classes and methods.

# Replace "godot" with the full path to a Godot editor binary
# if Godot is not installed in your `PATH`.
godot --doctool ../ --gdextension-docs

Add the documentation to the files generated in /doc_classes and generate the RST files for the online documentation like so.

curl -sSL https://raw.githubusercontent.com/godotengine/godot/master/doc/tools/make_rst.py | python3 - -o "docs/classes" -l "en" doc_classes