Kodi Steam Deck development: Difference between revisions
→Build depends (this takes about 45 minutes): Update build time |
→Install missing pkg-config files: Add groovy and jdk-openjdk packages |
||
| Line 44: | Line 44: | ||
<syntaxhighlight lang="bash" enclose="div"> | <syntaxhighlight lang="bash" enclose="div"> | ||
sudo pacman -S --overwrite '*' libx11 libxau libxcb libxdmcp libxrandr mesa | sudo pacman -S --overwrite '*' groovy jdk-openjdk libx11 libxau libxcb libxdmcp libxrandr mesa | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Latest revision as of 14:27, 7 March 2026
Development:
|
Kodi is easily installable on the Steam Deck via Flatpak, but if you're looking to do development on the Steam Deck, this article is for you.
Environment Setup
The first step is to disable the read-only filesystem. If you're reading this, it's assumed that you know what you're doing. If not, seek safety.
The following steps will allow you to compile Kodi on the Steam Deck:
Disable the read-only filesystem
sudo steamos-readonly disable
Initialize the pacman keyring
sudo pacman-key --init
Populate the pacman keyring with the default Arch Linux and Holo keys
sudo pacman-key --populate archlinux holo
Update the system packages
sudo pacman -Syu
Refresh the file database
sudo pacman -Fy
Install missing pkg-config files
sudo pacman -S --overwrite '*' groovy jdk-openjdk libx11 libxau libxcb libxdmcp libxrandr mesa
Get/build the source code
Clone Kodi
git clone https://github.com/xbmc/xbmc.git ~/Documents/kodi
Bootstrap depends
cd ~/Documents/kodi/tools/depends ./bootstrap
Configure depends
./configure --prefix="$HOME/kodi-deps" --with-rendersystem=gl
Build depends (this takes about 45 minutes)
make -j8
Create CMake files
First, set the parameters.
Link with LLD because ld.gold complains about newer DWARF formats.
export CMAKE_EXTRA_ARGUMENTS="-DENABLE_LLD=ON" export PKG_CONFIG_LIBDIR_EXTRA="/usr/lib/pkgconfig:/usr/share/pkgconfig"
Generate the CMake files:
cd ~/Documents/kodi make -C tools/depends/target/cmakebuildsys
Build Kodi (this takes about 18 minutes)
cd build make -j8
Build binary add-ons
make -j8 binary-addons
Installation
Create launcher script
First, create a script directory:
mkdir -p ~/bin
Then, write the script:
cat <<'EOL' > ~/bin/kodi.sh
#!/usr/bin/env bash
set -euo pipefail
# Kodi needs this when running from the build tree
export SSL_CERT_FILE="/home/deck/Documents/kodi/system/certs/cacert.pem"
KODI_BIN="/home/deck/Documents/kodi/build/kodi.bin"
# Gaming Mode: already inside gamescope (Wayland)
if [[ -n "${STEAM_GAMEPADUI:-}" ]]; then
export WAYLAND_DISPLAY="${WAYLAND_DISPLAY:-gamescope-0}"
exec "${KODI_BIN}" -fs
fi
# Desktop Mode (X11)
exec "${KODI_BIN}" -fs
# Alternative desktop Mode: provide a Wayland compositor via nested gamescope
# and force 4K
#exec /usr/bin/gamescope --expose-wayland -f -b -W 3840 -H 2160 -- "${KODI_BIN}" -fs
EOL
Finally, make it executable:
chmod +x ~/bin/kodi.sh
Create desktop entry
Write the desktop file:
cat <<'EOL' > ~/.local/share/applications/kodi.desktop [Desktop Entry] Version=1.0 Name=Kodi GenericName=Media Center Comment=Manage and view your media Type=Application Terminal=false Categories=AudioVideo;Video;Player;TV; Icon=/home/deck/Documents/kodi/tools/Linux/packaging/media/icon256x256.png Exec=/home/deck/bin/kodi.sh EOL
Make it executable:
chmod +x ~/.local/share/applications/kodi.desktop
Update the launcher database:
update-desktop-database ~/.local/share/applications 2>/dev/null || true
Copy the launcher to your desktop:
cp ~/.local/share/applications/kodi.desktop ~/Desktop/
Add to Steam (Gaming Mode)
Switch to Desktop Mode.
Open Steam.
Select "Add a Game" -> "Add a Non-Steam Game..."
Click "Browse..." and select:
/home/deck/bin/kodi.sh
After it is added, open Properties and set:
- Name:
Kodi - Compatibility: ensure "Force the use of a specific Steam Play compatibility tool" is unchecked.