Releases: noahc3/AffinityPluginLoader
v0.3.0: Picking Palettes, Precisely
Better late than never!
Note
New documentation website
New documentation site is live at https://apl.ncuroe.dev, including user guides for APL and WineFix and developer documentation for building APL plugins.
Warning
Important breaking changes
- Affinity plugins are now loaded from
apl/plugins/. You can delete your oldplugins/directory in the root of your Affinity install path. - APL plugin loading has changed significantly. Plugins built against previous APL versions are not compatible and must be updated to support v0.3.0.
WineFix
Color picker black zoom preview fixed on Wayland/XWayland
- The color picker zoom preview now correctly displays the area around the cursor.
- Note: This does not fix the problem where the color picker cannot leave the bounds of the canvas. A solution for this using the XDG PickColor API is planned for a future version.
Color sampling mode option
- Implements override option for changing the color picker sampling behavior (not technically a "fix", as this behavior also exists on Windows). You can select which mode to use in Preferences:
- Native (default): Uses Affinity's built-in color sampling pipeline. Colors are sampled in the document's native color space (sRGB, CMYK, wide-gamut, etc.). The highlighted pixel in the zoom preview may differ slightly from the actual sampled color value due to differences in how the zoom preview and the native picker scales the canvas
- Exact: Picks the literal pixel color shown in the zoom preview center. Samples from a screen capture in sRGB. The picked color always matches what you see in the zoom, but does not use the document's native color space.
- If you usually work in sRGB documents, you may prefer the Exact mode. However, you should use Native if you often work with CMYK or wide-gamut color spaces.
Force synchronous font enumeration to greatly reduce startup crash frequency
- The most common cause of crashes with error code 0xC0000005 (-1073741819) happens during font enumeration in libkernel.dll
- Affinity supports a CLI argument
--disable-parallel-font-enumerationto force font enumeration to be synchronous. This patch in WineFix simply applies it by default. - May increase startup times, but most users will not notice a difference. If you do notice a significant difference, this patch can be disabled in preferences.
New Preferences page
- Exposes configurable options for WineFix using new APL Settings API
Affinity Plugin Loader
APL data now consolidated under apl/
Consolidate most APL data under apl/ directory for easier cleanup if you want to remove APL.
- Plugins directory is now at
<affinity-install-path>/apl/plugins/ - Logs directory is now at
<affinity-install-path>/apl/logs/ - New config directory is now at
<affinity-install-path>/apl/config/
New Preferences page
- Exposes configurable options for APL using new APL Settings API
- Plugin list now supports light mode
New Settings API for plugins
- Allows plugins to define configuration options using fluent builder pattern, a preferences page is generated from this config definition automatically
- Supports bool toggles, dropdown single-selects, text inputs and numeric inputs for configuration values
- Options can have display names, descriptions (with very very basic markdown: bold, italic, single-level numeric and bullet lists), restart required, info bubbles.
- Organization with section headers, inline text, muted text, or custom inline XAML
- Controls match Affinity built-in UI controls, with fallback to default WPF-style controls (automatically applied on failure, with manual override available)
- Full dynamic support for light-mode and dark-mode
- Plugins can provide custom XAML to embed in the preferences page instead if they prefer to manage their own UI
- Settings are serialized to .TOML files in apl/config/.toml
- Settings can be temporarily overriden using env values in the format
APL__<PLUGIN-ID>__<OPTION-KEY>=value- This shadows the active value in TOML/GUI temporarily, primarily intended for rapid debugging/testing.
- The value stored in the Preferences dialog/TOML file is not lost and will resume taking effect the next time Affinity is launched without the environment variable.
For more information, see the Settings API (docs).
New deterministic injection pipeline with sequenced plugin initialization stages
- AffinityHook previously used a hardcoded 500ms delay to inject and call APL. APL then initialized async to Affinity's startup lifecycle. This meant it was effectively random whether APL patches would apply correctly, when they would apply, what assemblies were available at patch time,
- APL now polls the CLR state and intercepts assembly load calls to initialize plugins
- Plugins may now initialize across multiple stages, with each stage having progressively more of Affinity loaded
For more information, see the Plugin Lifecycle (docs).
Intelligent patch system with auto-retry
- Plugins can now pass patches as actions for APL to manage.
- When plugins use this system, APL will attempt to apply patches first during stage 1.
- If a patch fails to apply due to assemblies not having been loaded yet, APL will record this patch and reapply it after each assembly load until the patch applies successfully.
For more information, see Automatic Patch Deferral (docs).
Tooling
New Linux build scripts utilizing Docker
- New docker-build.sh script to build APL and WineFix on Linux using Docker. This significantly streamlines the build process on Linux.
- Old apl-devcontainer repo is now deprecated
Full Changelog: v0.2.0...v0.3.0
If you like my work, please consider supporting me on GitHub Sponsors or Ko-Fi to drive future development. Thank you!
Thank you to my supporters: @micahlt
LGPL v2.1 Notice
This project contains source code from the Wine project, and is available in the source tarball attached below. For details on the usage of this code and modifications made, see WineFix#license-exclusion
v0.2.0: The curves, they work!
WineFix
Features
- Fixed vector path preview lines being rendered incorrectly by implementing cubic bezier subdivison algorithm in d2d1.dll
- This solution is experimental! Please report bugs and performance issues!
- Improvements are planned for future releases, particularly allowing the user to configure the quality vs performance tradeoff and a hardware accelerated OpenCL implementation.
- This solution is included with WineFix but can also be included directly into Wine runners; PRs will be up for the common Affinity Wine runners soon
- If the fix doesn't work for you, ensure d2d1.dll is placed next to Affinity.exe and ensure you do not have a library override configured for d2d1 in winecfg (or set the override to Native)
![]() |
![]() |
|---|---|
| Before: Without WineFix / d2d1 patch | After: With WineFix / d2d1 patch |
Affinity Plugin Loader
Features
- Add plugin descriptions to plugins list in preferences menu (thanks @micahlt!)
- Overhauled debug logging
- Harmony logging is now disabled by default and no longer used by plugins (no more log files on your desktop)
- Logging API has been implemented into APL (
AffinityPluginLoader.Core.Logger) - Logging outputs to terminal by default
- Enable logging to file by setting
APL_LOGGING=<log-level>environment variable to the log level you want to capture, one ofDEBUG,ERROR,WARN,INFO. - When enabled, file logs go to
<Affinity install>/plugins/logsand automatically rotate on each launch (up to 5 log archives).
- AffinityHook.exe will now attach to the child Affinity.exe process by default including passing through logging to the original terminal window. Revert to the original behavior by setting
APL_DETACH=truein environment.
Other
- Replaced solution/csproj files to use modern SDK style including modernizing NuGet package management, allowing building APL and WineFix on Linux (no Wine required)
- Developers looking to compile on Linux can use apl-devcontainer to build in Docker (or look at the Dockerfile to see whats required to build on Linux)
Full Changelog: v0.1.0.1...v0.2.0
If you like my work, please consider supporting me on GitHub Sponsors or Ko-Fi to drive future development. Thank you!
Thank you to my supporters: @micahlt
LGPL v2.1 Notice
This project contains source code from the Wine project, and is available in the source tarball attached below. For details on the usage of this code and modifications made, see WineFix#license-exclusion
v0.1.0.1: First release!
First Release!
Tested working on Windows 11, Arch (Endeavour OS) and Ubuntu 24.04 LTS.
Which files do I download?
- affinitypluginloader-v0.1.0.1-x64.zip - Contains the plugin loader, hook launcher and bootstrap DLL, for Windows and Linux.
- apl-winefix-v0.1.0.1-x64.zip - Contains the WineFix plugin for Linux
- affinitypluginloader-plus-winefix.tar.xz - Combines the above two artifacts into a single
.tar.xzarchive. If you download this you do not need the other two files. We include this archive to simplify installation of APL and WineFix for scripted installers (no unzip dependency and filename is consistent between releases so scripts can always grab the latest release).



