Thank you, @polyvishap and @gertkeno! I now have working, encrypted builds running on Windows, Linux (Ubuntu 26.04), and Steam Deck. It was easier than I thought it would be. For posterity, the steps I followed on my Ubuntu 26.04 dev machine:
Install Distrobox
Install Distrobox to your Linux dev machine:
sudo apt install distrobox
Set Up Steam Runtime V4
Build the export templates using Steam OS Runtime version 4:
distrobox create -i registry.gitlab.steamos.cloud/steamrt/steamrt4/sdk steamrt4
Enter the container using the command:
distrobox enter steamrt4
Build From Godot Sources
Before building you must download appropriate sources. For example, building for 4.6.2 stable, download Godot_v4.6.2-stable.zip. Expand the zip, open a terminal from within the source tree and enter the container (see above).
Once open, build the Linux export template:
SCRIPT_AES256_ENCRYPTION_KEY="<AES 256-bit key text>" scons platform=linux module_mono_enabled=yes target=template_release
Then the Windows template. Several steps are required to prepare for a Windows build:
Clone mimalloc source into thirdparty/mimalloc
Install mingw for Linux:
sudo apt install scons mingw-w64 llvm libpcre2-dev zlib1g-dev libfontconfig1-dev
Configure to use posix threads:
sudo update-alternatives --config x86_64-w64-mingw32-g++
Then build the Windows templates:
SCRIPT_AES256_ENCRYPTION_KEY="<AES 256-bit key text>" scons -j$(nproc) platform=windows module_mono_enabled=yes target=template_release use_llvm=yes lto=full production=yes