Building the GDExtension Library (24.1) - alessandrofama/wwise-godot-integration GitHub Wiki

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 4.7.0 using pip:
pip install SCons==4.7.0
  1. NumPy Installation
  • Install NumPy 2.0.1
pip install numpy==2.0.1

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:

Editor library (only applies to Windows, macOS and Linux platforms):

scons platform=windows target=editor wwise_sdk=$env:WWISESDK use_static_cpp=yes wwise_config=profile

Debug library:

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

Release library:

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

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.
  • wwise_config: Specify the Wwise Build configuration, such as debug, profile or release

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.

Other notes:

  • If you installed SDK for Visual Studio other than VS2022, you'll need to edit the addons/Wwise/native/SConstruct file and change any instance of x64_vc170 to (e.g. for VS2019) x64_vc160

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=12.0 wwise_sdk=/Applications/Audiokinetic/Wwise\ 2022.1.4.8202/SDK