Skip to content

Building the GDExtension Library

Alessandro Famà edited this page Dec 13, 2023 · 10 revisions

Welcome to the GDExtension building guide. This guide will walk you through the process of downloading and installing the SCons build tool, setting up the repository, and providing general build instructions.

Download and install SCons build tool

MacOS

  • Using Homebrew
  1. Open your terminal.
  2. Install SCons using Homebrew by entering the following command:
brew install scons

Windows

  1. Check for Python Installation
  • Open a command prompt by pressing Win + R, typing cmd, and hitting Enter.
  • Verify if Python is installed by running:
python --version

If Python is not installed, proceed to the next steps.

  1. Installing Python
  • Visit the Python website (python.org) to download the latest version.
  • Run the Python installer.
  • During installation, ensure you select the option to install pip as well.
  1. SCons Installation
  • Once Python and pip are installed, open a command prompt.
  • Install SCons using pip:
pip install SCons

Repository Setup: wwise-godot-integration

  • Clone the repository and update submodules:
git clone https://github.com/alessandrofama/wwise-godot-integration.git --recurse-submodules
  • Choose a specific version (tag example: 2.0.0-Wwise2022.1-Godot4.0.4)
git checkout tags/2.0.0-Wwise2022.1-Godot4.0.4

Proceed with General Build Instructions from this point onward.

General Build instructions

To build the GDExtension library for this project, we use SCons, a flexible and cross-platform software construction tool. Follow the general build instructions below to compile the library.

  1. Open a powershell/terminal and navigate to the addons/Wwise/native directory of the project.
  2. Execute the following command to build the library:

Debug library:

scons platform=windows target=template_debug wwise_sdk=$env:WWISESDK use_static_cpp=yes dev_build=yes

Release library:

scons platform=windows target=template_release wwise_sdk=$env:WWISESDK use_static_cpp=yes

The command requires the following compilation parameters:

  • platform: Specify the target platform, such as windows, macos, linux or ios.
  • target: Choose between template_debug or template_release.
  • wwise_sdk: Provide the path to the directory that contains the SDK folder installed from the Wwise Launcher.
  • use_static_cpp: required on Windows.

Optional parameters include:

  • asserts: Set it to true or false to enable or disable AKASSERT checks in the code. Only works in combination with the template_debug parameter.
  • dev_build: Build a library with debug symbols and no optimizations. The template_debug libraries in the GitHub releases use dev_build by default.

iOS Build Instructions

When building the library for iOS, you can optionally pass the ios_min_version parameter to SCons, specifying a minimum iOS version for the library. Use the following command:

scons platform=ios target=template_debug arch=arm64 ios_min_version=11.0 wwise_sdk=/Applications/Audiokinetic/Wwise\ 2022.1.4.8202/SDK 

Plugins

The integration supports all factory plugins and the following premium plugins:

Plugin Compilation Parameter Supported Platforms
Reflect reflect All
Motion motion Windows
Convolution convolution All
SoundSeed Air soundseed_air All
SoundSeed Grain soundseed_grain All
Impacter impacter All
Mastering Suite mastering_suite All

Add the plugins separated by comma as a compilation parameter to SCons (example):

scons target=template_release platform=windows wwise_sdk="%WWISESDK%" use_static_cpp=yes plugins=convolution,reflect,motion