Jump to content
Meteo

An attempt to run Affinity Designer on Linux via Wine

Recommended Posts

Hi, I've made an attempt to run Affinity Designer on Linux via Wine. I managed to run the program myself, but it is not possible to create or edit a document. The problem is probably with Direct3D support in Wine or in my GPU (maybe drivers).

I will describe how to install and run the Designer via Wine. Maybe someone can successfully create or edit a document (eg with a different GPU). The operating system used is Ubuntu 18.04.

What we need?

  • Windows (yes, I know) - it can be a virtual machine. It will be used to extract the installation of the program because the standard installer does not work under the Wine.

  • Wine with some patches - we must add MoveFileTransactedA/W stubs to kernel32. The building of Wine is required.

  • Winetricks.

  • 64-bit mscms.dll library.

  • Affinity Designer installer and license.

  • Offline installer of .NET Framework 4.0 and .NET Framework 4.7.2.

Step 1 – build Wine

We must build and install 64-bit and 32-bit Wine with patch. Building of Wine on Ubuntu is very well described on the WineHQ wiki: Building Biarch Wine On Ubuntu. Don't forget to apply the patch from attachment (fix.patch). During the building process I installed additional libraries like libvulkan-dev and libvkd3d.

Step 2 – create MSI installer of Designer

This step must be done on Windows. Open the command line (cmd.exe) and go to the directory where the Affinity Designer installer is located. Run the affinity-designer.exe /extract command (the file name may be different). Complete the required data and create an MSI installer. Transfer the created MSI file to your system with Wine.

Step 3 – install Winetricks

The Winetricks installation is described on the project page: Winetricks. I prefer a manual installation of latest Winetricks instead install outdated version from repo.

Step 4 – create Wine prefix and install .Net framework

Installation of .Net Framework with Winetricks doesn't work for me, that's why I do it manually.

Initialize new Wine prefix:

WINEPREFIX=~/Designer wineboot –init

Change the system to Windows XP (for correct installation of .Net Framework 4.0) and remove the mono if installed:

WINEPREFIX=~/Designer winetricks winxp
WINEPREFIX=~/Designer winetricks remove_mono

Download and install .NET Framework 4.0:

wget 'http://download.microsoft.com/download/9/5/A/95A9616B-7A37-4AF6-BC36-D6EA96C8DAAE/dotNetFx40_Full_x86_x64.exe'
WINEPREFIX=~/Designer wine ./dotNetFx40_Full_x86_x64.exe /q

Change the system to Windows 7 and switch mscoree to native (this is very important):

WINEPREFIX=~/Designer winetricks win7
WINEPREFIX=~/Designer winecfg

Download and install .NET Framework 4.7.2:

wget 'http://download.microsoft.com/download/D/D/3/DD35CC25-6E9C-484B-A746-C5BE0C923290/NDP47-KB3186497-x86-x64-AllOS-ENU.exe'
WINEPREFIX=~/Designer wine ./NDP47-KB3186497-x86-x64-AllOS-ENU.exe /q

 

Step 5 - run Affinity Designer

Switch system to Windows 8.1 or 10. Designer will not start in Windows 7 mode due to Aero errors.

WINEPREFIX=~/Designer winetricks win81

Install Affinity Designer (in my case MSI installer is Affinity.msi)

WINEPREFIX=~/Designer wine msiexec /passive /i ./Affinity.msi

Copy the missing mscms.dll library to Affinity Designer instalation directory. In my case it is ~/Designer/drive_c/Program Files/Affinity/Affinity Designer/. I have found the missing library on dlldownloader.com: mscms.dll.

Start Affinity Designer:

WINEPREFIX=~/Designer wine "C:\Program Files\Affinity\Affinity Designer\Designer.exe"

The program should start and you will see the welcome screen.

I can open preferences and change options, but creating a new document causes a crash. In Performance tab my GPU is displayed as Intel(R) HD Graphivs 4000 (I have Intel® UHD Graphics 620).

Crash report:

Attempting to create Direct3D device with adapter Intel(R) HD Graphics 4000
c:\buildagent10\work\live\persona\windows\libraries\serif.directx\dxrenderer.cpp(676): error 0x80004001 (Unknown error 0x80004001)

In the last step I tried to start the Designer using Vulkan-based D3D10/D3D11 implementation. After this (and install mesa-vulkan-drivers) in Performance tab my GPU is displayed correctly, but the program still crash while creating a new document.

WINEPREFIX=~/Designer winetricks dxvk

Crash report:

Attempting to create Direct3D device with adapter Intel(R) UHD Graphics 620 (Kabylake GT2)
c:\buildagent10\work\live\persona\windows\libraries\serif.directx\dxrenderer.cpp(676): error 0x80004001 (Unknown error 0x80004001)

I know that Serif developers don't provide support for running Affinity programs via Wine. The post is for information purposes only.

LjPbJKeR9uGgeyKv.thumb.png.75e2f1d44deebf98775d14374f9acf43.png

FZUs7HdD4bPhwVVH.thumb.png.7b7b66f7a61efe2d9dba21b6e311b53d.png

fix.patch

Share this post


Link to post
Share on other sites

Oh wow! That's quite some progress, unfortunately wasn't techy enough to be able to recreate it, but hopefully at some point we will be able to get it all working and in a simpler way :) Thank you for an amazing contribution.

Share this post


Link to post
Share on other sites

 

 


Affinity Store: Affinity Suite (ADe, APh, APu) 1.7.3.481.
Windows 10 Pro, Version 1903, Build 18362.418.
Dell Latitude E5570, i5-6440HQ 2.60 GHz, 8 GB, Intel HD Graphics 530, 1920 x 1080.
Dell OptiPlex 7060, i5-8500 3.00 GHz, 16 GB, Intel UHD Graphics 630, Dell P2417H 1920 x 1080.

Share this post


Link to post
Share on other sites

Affinity primarily uses CPU not GPU for its editing processes


iMac 27" Late 2015 Fully Loaded, iMac 27" Mid 2011 both running High Sierra 10.13.6 - Affinity Designer/Photo & Publisher - Illustrator CC, Inkscape, Blender, Sketchup, Pepakura Designer, MTC, Pixelmator & Pixelmator Pro + more... XP-Pen Artist-22E, - iPad Pro 12.9 B|  

Affinity Help - Affinity Desktop Tutorials - FeedbackInstagram & Flickr

Share this post


Link to post
Share on other sites
On 11/4/2018 at 5:32 PM, j0e.org said:

We have everything on Linux. Only a proper graphic solution is missing.

Please give us Affinity Designer for Linux.

What about Krita ? Krita is kicking !

Share this post


Link to post
Share on other sites
4 minutes ago, NNois said:

What about Krita ? Krita is kicking !

Krita, Inkscape, Gimp why do you need Affinity anyway, I'm surprised an open source clone hasn't popped up yet. 


iMac 27" Late 2015 Fully Loaded, iMac 27" Mid 2011 both running High Sierra 10.13.6 - Affinity Designer/Photo & Publisher - Illustrator CC, Inkscape, Blender, Sketchup, Pepakura Designer, MTC, Pixelmator & Pixelmator Pro + more... XP-Pen Artist-22E, - iPad Pro 12.9 B|  

Affinity Help - Affinity Desktop Tutorials - FeedbackInstagram & Flickr

Share this post


Link to post
Share on other sites

Valve's Proton project has apparently done a lot in the way of interfacing with DirectX calls. Would anyone with more knowledge be able to check it out and see how it goes?

Affinity Designer is really one of the missing workflows I have since moving to Linux Inkscape is just painful to work with and Gravit is a subscription-based Electron app...

Share this post


Link to post
Share on other sites

Wine 4.0 was just released with Vulkan support & Direct3D 12 support, could this make it easier to make Affinity work on Linux, what do you guys think?

Share this post


Link to post
Share on other sites
5 hours ago, valevll said:

Wine 4.0 was just released with Vulkan support & Direct3D 12 support, could this make it easier to make Affinity work on Linux, what do you guys think?

The only way to know is for you, or someone, to try it.


-- Walt

Windows 10 Home, version 1903 (18362.356), 16GB memory, Intel Core i7-6700K @ 4.00Gz, GeForce GTX 970
Affinity Photo 1.7.3.481 and 1.8.0.486 Beta   / Affinity Designer 1.7.3.481 and 1.8.0.486 Beta  / Affinity Publisher 1.7.3.481 and 1.7.3.475 Beta

Share this post


Link to post
Share on other sites

I've just had a look on Winehq and my guess is that Affinity will not work under wine anytime soon.

I'm basing this on their install instructions which near the beginning say "If your system is 64 bit, enable 32 bit architecture" which I take to mean that wine only supports 32 bit software and since Affinity is 64 it's a non-starter.
And here https://wiki.winehq.org/Wine_Features
it specifically says there is only 32-bit compatibility :-(

Share this post


Link to post
Share on other sites
21 minutes ago, BestestGrandad said:

I've just had a look on Winehq and my guess is that Affinity will not work under wine anytime soon.

I'm basing this on their install instructions which near the beginning say "If your system is 64 bit, enable 32 bit architecture" which I take to mean that wine only supports 32 bit software and since Affinity is 64 it's a non-starter.
And here https://wiki.winehq.org/Wine_Features
it specifically says there is only 32-bit compatibility :-(

totally false ! there's a wine64 and a wine32 ...

Share this post


Link to post
Share on other sites

NNois

Interesting - and indeed I may be wrong BUT (and I'm on Ubuntu) I can only install or run 32 bit apps using wine.

If you can point me at the wine which fully supports 64 bit (and doesn't simply run on 64 bit machines) then I'll build a machine and test it.

I'd also appreciate a link to winehq where supports your claim that wine supports 64bit programs.

Share this post


Link to post
Share on other sites
34 minutes ago, BestestGrandad said:

NNois

Interesting - and indeed I may be wrong BUT (and I'm on Ubuntu) I can only install or run 32 bit apps using wine.

If you can point me at the wine which fully supports 64 bit (and doesn't simply run on 64 bit machines) then I'll build a machine and test it.

I'd also appreciate a link to winehq where supports your claim that wine supports 64bit programs.

https://wiki.winehq.org/FAQ#Is_there_a_64_bit_Wine.3F

Quote

A few things to note:

  • 32 bit Wine runs on both 32-bit and 64-bit Linux/Unix installations. 16-bit and 32-bit Windows applications will run on it.
  • 64-bit Wine runs only on 64 bit installations, and so far has only been extensively tested on Linux. It requires the installation of 32 bit libraries in order to run 32 bit Windows applications. Both 32-bit and 64-bit Windows applications (should) work with it; however, there are still many bugs.

@BestestGrandad


iMac 27" Late 2015 Fully Loaded, iMac 27" Mid 2011 both running High Sierra 10.13.6 - Affinity Designer/Photo & Publisher - Illustrator CC, Inkscape, Blender, Sketchup, Pepakura Designer, MTC, Pixelmator & Pixelmator Pro + more... XP-Pen Artist-22E, - iPad Pro 12.9 B|  

Affinity Help - Affinity Desktop Tutorials - FeedbackInstagram & Flickr

Share this post


Link to post
Share on other sites

I duly stand corrected.

Strange that they don't mention 64bit when they specifically mention 32 but there you go.

Looks like tomorrow will be spent building another machine and see how far I can get :)
If I get it to work I'll let you know.

Share this post


Link to post
Share on other sites
6 hours ago, ꜱᴩʀɪᴛᴇ➀ said:

Well for one, I got it to run on the new Wine 4.0 version but only until the registration window. It closes immediately once you get to the license agreement window.

image.thumb.png.c0bda55f78d7ef32228107c2b7c7ed3a.png

How did you do that? 

I've just installed Wine 4 and didn't even manage to install it at the first place

image.png.c76251fcc116c11de5f62f82fc0b3536.png

Share this post


Link to post
Share on other sites
On 1/3/2019 at 9:18 PM, firstdefence said:

Krita, Inkscape, Gimp why do you need Affinity anyway, I'm surprised an open source clone hasn't popped up yet. 

It seems Affinity is making inroads into Adobe's hold on the "in industry" market - despite being excellent products GIMP and Inkscape still don't have the industry acceptance that Affinity has developed in a remarkably short time. Unfortunately I think Affinity development resources are probably spread to thin to support porting to Linux in the near future.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×

Important Information

These are the Terms of Use you will be asked to agree to if you join the forum. | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.