Skip to content

Bitpainter75/affinity-appimage-builder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

affinity-appimage-builder

Build script that creates a fully self-contained AppImage for running Affinity v3 on Linux under Wine.

Note: Affinity v3 is free for everyone — all you need is a free Canva account to download the installer.


How it works

A single script (affinity-appimage-builder.sh) builds a ready-to-run AppImage. The AppImage contains:

  • ElementalWarrior Wine — a Wine build optimised for Affinity
  • A pre-built Wine prefix with .NET 4.8, Visual C++ runtimes, DXVK, vkd3d-proton and dxvk-nvapi
  • Affinity installed and patched at build time

On first launch, the AppImage copies the prefix to ~/.AffinityLinux-Appimage, detects your GPU and sets DPI — then starts Affinity. Nothing is downloaded at runtime.


Quick Start

git clone https://github.com/Bitpainter75/affinity-appimage-builder.git
cd affinity-appimage-builder

Place the Affinity Windows installer in the same directory, then run:

./affinity-appimage-builder.sh \
  --installer Affinity_x64_322.exe \
  --version   322

The script downloads all remaining dependencies automatically (EW Wine, DXVK, vkd3d-proton, dxvk-nvapi). When finished, a ready-to-run AppImage is created next to the installer.

./Affinity_322_wine11_EW.AppImage           # start Affinity
./Affinity_322_wine11_EW.AppImage --dpi     # adjust DPI scaling
./Affinity_322_wine11_EW.AppImage --winecfg # open Wine configuration

Requirements

Included in this repository

File Description
affinity-appimage-builder.sh Build script
AppRun Runtime launcher embedded into the AppImage
affinity-dpi-config DPI configuration script
AffinityNew.png 512×512 icon
AffinityPatcherCombined Patcher binary (see AffinityPatcherCombined)

You must provide

File Description
Affinity_x64_3xx.exe Affinity Windows installer — download from affinity.studio
appimagetool-x86_64.AppImage AppImage builder — download

Auto-downloaded during build

  • ElementalWarrior Wine tarball
  • DXVK
  • vkd3d-proton
  • dxvk-nvapi

System requirements for the built AppImage: Vulkan, libGL, libstdc++ ≥ 12 (available on any modern Linux distribution — no Wine installation needed on the host).


Build options

./affinity-appimage-builder.sh --help
Option Description
--installer <.exe> Affinity Windows installer (required)
--version <string> Version tag for the output filename, e.g. 322 (required)
--wine <.tar.xz> ElementalWarrior Wine tarball (auto-downloaded if absent)
--dll <.dll> Pre-patched Serif.Affinity.dll (skips patcher)
--patcher <binary> Path to AffinityPatcherCombined (auto-detected)
--tools <dir> Directory containing AppRun, icon, appimagetool
--output <dir> Output directory (default: same as installer)
--no-nvapi Do not bundle dxvk-nvapi
--no-patch Skip DLL patching
--keep-work Keep working directory after build

What the build script does

Step What happens
1 Create AppImage directory structure
2 Extract ElementalWarrior Wine into usr/wine/
3 wineboot --init — initialise the Wine prefix
4 winetricks: dotnet35sp1dotnet48vcrun2022 mfc140corefontsmsxml3 msxml6 crypt32 tahoma
5 Download and install vkd3d-proton + dxvk-nvapi
5b Download and install DXVK (D3D11→Vulkan)
5c Set Wine renderer to Vulkan, Windows version to 11
6 Normalise prefix username to bitpainter (AppRun replaces it at runtime)
7 Run Affinity installer (GUI — follow the on-screen steps)
8 Patch Serif.Affinity.dll with AffinityPatcherCombined
9 Remove Windows Installer cache (~650 MB)
10 Copy AppRun, affinity-dpi-config, icon, .desktop, version marker
11 Flush wineserver → verify registry files → run appimagetool

What happens at first run

Step What happens
Prefix copy Pre-built prefix is copied from AppImage to ~/.AffinityLinux-Appimage
Username bitpainter is replaced with the current user in registry and directory
GPU detection lspci detects GPU — activates dxvk-nvapi DLL overrides on NVIDIA
DPI Dialog to set DPI scaling (zenity / kdialog / yad — auto-detected if none available)
Start Affinity launches

Subsequent runs skip the prefix copy and go straight to Affinity. On AppImage update, the prefix is re-synced via rsync and the DPI dialog appears again.


DPI configuration

The DPI dialog appears automatically on first run and after every AppImage update. Trigger it manually at any time:

./Affinity_322_wine11_EW.AppImage --dpi

Supported dialog backends: zenitykdialogyad. If none is installed, DPI is auto-detected from xdpyinfo / xrandr and set silently.


AffinityPatcherCombined

The patcher modifies Serif.Affinity.dll at build time to improve compatibility and usability under Wine:

  • Settings persistence — prevents Affinity from resetting UI state and settings on every launch
  • Parallel font enumeration fix — disables parallel font loading, which causes crashes and slowdowns under Wine
  • Colorful icons — restores the original colorful tool icons (brush, selection, measure, color picker and more) instead of the monochrome variants

Source and build instructions: github.com/Bitpainter75/AffinityPatcherCombined


Disclaimer

These tools modify the Affinity application binary to improve compatibility under Wine. Affinity v3 is free software — no license purchase required, just a free Canva account. The authors take no responsibility for any damage to your installation.

About

Build script that creates a fully self-contained AppImage for running **Affinity v3** on Linux under Wine.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages