Wineprefix setup
Setting up your Wineprefix
Refer to the "Wine User Guide documentation" for more information about using Wine.
A Wineprefix is a directory containing a virtual C: drive, along with .reg configuration files for this specific "prefix".
Note
This guide will use ~/.wineAffinity3 as a wineprefix directory and it needs to be specified with the environment variable WINEPREFIX, like so:
WINEPREFIX="$HOME/.wineAffinity3" <command>
$HOME/ may need to be replaced by your full home directory path /home/USERNAME/ in order to make it absolute. This is a common issue with non-POSIX compliant shells.
-
Create a Wineprefix:
Because you want to avoid conflicts with an already existing one.
WINEPREFIX="$HOME/.wineAffinity3" wineboot --initIt might flash stuff in the terminal, most are simply warning, you can most likely proceed with the rest.
-
Install dependencies with winetricks:
Affinity needs dotnet and a few things that you can install/set with winetricks
WINEPREFIX="$HOME/.wineAffinity3" winetricks --unattended --force remove_mono vcrun2022 dotnet48 corefonts win11 -
Run any Affinity installer
.exewithrum:WINEPREFIX="$HOME/.wineAffinity3" wine [Path to the installer].exeWarning
You absolutely need to download the
.exeinstaller, other ones won't be able to start. -
Get & copy the
.winmdandwintypes.dllfiles:One of reasons we needed to use a fork of wine for so long is because Affinity wansn't able to resolve
.winmdfiles.
Now instead of relying on a fork, ElementalWarrior made it a little tiny dll file, loading when affinity starts and allowing it to resolve those dependencies.Download them with:
curl --output "wintypes.dll" --follow https://github.com/ElementalWarrior/wine-wintypes.dll-for-affinity/raw/refs/heads/master/wintypes_shim.dll.so curl --output "Windows.winmd" --follow https://github.com/microsoft/windows-rs/raw/master/crates/libs/bindgen/default/Windows.winmdCopy the
wintypes.dllto the Affinity install directory:cp "wintypes.dll" "$HOME/.wineAffinity3/drive_c/Program Files/Affinity/Affinity/"Copy the
Windows.winmdto theWinMetadatadir:# You may need to create it cp "Windows.winmd" "$HOME/.wineAffinity3/drive_c/windows/system32/WinMetadata/" -
Launch Affinity:
WINEPREFIX="$HOME/.wineAffinity3" wine "$HOME/.wineAffinity3/drive_c/Program Files/Affinity/Affinity/Affinity.exe" -
Troubleshooting
You can navigate to the next part with the sidemenu.