#!/bin/sh

set -ex

apt update
apt install -y \
  bc \
  mesa-vulkan-drivers \
  libvulkan1 \
  weston \
  xwayland \
  libwaffle-1-0

rustup component add rustfmt clippy

GFXR_VERSION=1.0.4
APITACE_VERSION=13.0
RENDERDOC_VERSION=1.42

wget https://github.com/LunarG/gfxreconstruct/releases/download/v1.0.4/gfxreconstruct-v$GFXR_VERSION-ubuntu-gcc.tar.gz -O - | \
  tar -zx
chmod +x gfxreconstruct*/gfxrecon*
mv gfxreconstruct*/gfxrecon* /usr/bin/
rm -rf gfxreconstruct*

# This apitrace doesn't have the snapshot loop png support, need a new release.
#wget https://github.com/apitrace/apitrace/releases/download/13.0/apitrace-$APITACE_VERSION-Linux.tar.bz2 -O - |
#  tar -jx
#mv apitrace*/bin/* /usr/bin/
#rm -rf apitrace*
