Skip to content

Instantly share code, notes, and snippets.

@imerr
Last active June 10, 2026 15:43
Show Gist options
  • Select an option

  • Save imerr/b3e7c0cbbd67e616f885a2a94f5c115d to your computer and use it in GitHub Desktop.

Select an option

Save imerr/b3e7c0cbbd67e616f885a2a94f5c115d to your computer and use it in GitHub Desktop.
Affinity on Linux, simple installer
#!/bin/bash
export WINEPREFIX="$HOME/.affinity"
if [ -d "$WINEPREFIX" ]; then
read -p "Are you sure? " -n 1 -r
echo # (optional) move to a new line
if [[ ! $REPLY =~ ^[Yy]$ ]]
then
[[ "$0" = "$BASH_SOURCE" ]] && exit 1 || return 1 # handle exits from shell or function but don't exit interactive shell
fi
fi
rm -rf "$WINEPREFIX"
wineboot --init
winetricks --unattended --force remove_mono vcrun2022 dotnet48 corefonts win11 tahoma dxvk
wine "$HOME/Downloads/Affinity x64.exe"
# https://github.com/seapear/AffinityOnLinux/issues/72
sed -i '/^Exec=env /{/DXVK_ASYNC=/!s|^Exec=env |Exec=env DXVK_ASYNC=0 "DXVK_CONFIG=d3d9.deferSurfaceCreation = True; d3d9.shaderModel = 1" |}' .local/share/applications/wine/Programs/Affinity.desktop
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment