Jump to content
You must now use your email address to sign in [click for more info] ×

Affinity Suite V2 on Linux [ Wine ]


Wanesty

Recommended Posts

I made a Git page of this guide since i can't update the first post anymore, it also contain more information, has an issue management system for bug-reports and you can contribute to it !

https://codeberg.org/Wanesty/affinity-wine-docs

I will still be active on this topic but Codeberg's UI can make it easier to work together.

up to date guide for the Affinity Suite on Linux :  codeberg.org/affinity-wine-docs

Link to comment
Share on other sites

On 5/10/2023 at 4:42 AM, Wanesty said:

from my tests i can guess that : the UI use DX9 (Windows Presentation Foundation) and the viewport use either OpenCL or DX11/12
(and probably fallback to OpenGL or a earlier DirectX version if it doesn't detect the right drivers)

Correct. Entire UI works in dxvk but if I want to create new canvas I get this error:

info:  Memory type mask for sparse resources: 0x80
info:  DXVK: Read 16 valid state cache entries
info:  DXVK: Graphics pipeline libraries supported
info:  DXVK: Using 4 compiler threads
00e0:fixme:system:QueryDisplayConfig (00000002 0000000000518CAC 0000000001759120 0000000000518D10 00000000017E46F0 0000000000000000): semi-stub
00e0:fixme:system:QueryDisplayConfig (00000002 0000000000518CAC 0000000001759120 0000000000518D10 00000000017E46F0 0000000000000000): semi-stub
00e0:fixme:system:QueryDisplayConfig (00000004 000000000051C2F8 00007FE2AF6C5D60 000000000051C2F4 00007FE2A97B6180 000000000051C380): semi-stub
00e0:fixme:system:QueryDisplayConfig only returning active paths
00e0:fixme:system:QueryDisplayConfig setting toplogyid to DISPLAYCONFIG_TOPOLOGY_INTERNAL
00e0:fixme:system:NtUserDisplayConfigGetDeviceInfo Unimplemented packet type 11.
00e0:fixme:vulkan:X11DRV_vkCreateWin32SurfaceKHR Application requires child window rendering, which is not implemented yet!
err:   D3D11SwapChain: Failed to recreate surface: VK_ERROR_INCOMPATIBLE_DRIVER
err:   DXGI: CreateSwapChainForHwnd: Failed to create swap chain, hr -2147467259
00e0:err:seh:KiUserCallbackDispatcher ignoring exception
0154:fixme:wincodecs:BitmapScaler_Initialize unsupported mode 3
011c:fixme:ole:thread_context_callback_ContextCallback 0000000001BDB538, 00000000025E2B80, 000000001C44F820, {d7174f82-36b8-4aa8-800a-e963ab2dfab9}, 2, 0000000000000000
011c:fixme:ole:thread_context_callback_ContextCallback 0000000001BDB538, 00000000025E2B80, 000000001C44F710, {d7174f82-36b8-4aa8-800a-e963ab2dfab9}, 2, 0000000000000000

So i guess canvas is implemented as child window in D3D11. Could you please confirm this is yet unimplemented functionality (X11DRV_vkCreateWin32SurfaceKHR) and not just bug in my "incompatible driver"?

As I'm getting more and more under the hood, I'm craving more and more to ask Serif to explain how Affinity architecture actually looks like. What do you think? i.E. I know all program (launch) parameters for entire suite, but haven't seen (or I'm simply unable to find) any explanation for what they mean or do. I know there are debug symbols (.pdb) but I have no access to them. Is this OK?

Link to comment
Share on other sites

5 hours ago, Grunt said:

Correct. Entire UI works in dxvk but if I want to create new canvas I get this error:

info:  Memory type mask for sparse resources: 0x80
info:  DXVK: Read 16 valid state cache entries
info:  DXVK: Graphics pipeline libraries supported
info:  DXVK: Using 4 compiler threads
00e0:fixme:system:QueryDisplayConfig (00000002 0000000000518CAC 0000000001759120 0000000000518D10 00000000017E46F0 0000000000000000): semi-stub
00e0:fixme:system:QueryDisplayConfig (00000002 0000000000518CAC 0000000001759120 0000000000518D10 00000000017E46F0 0000000000000000): semi-stub
00e0:fixme:system:QueryDisplayConfig (00000004 000000000051C2F8 00007FE2AF6C5D60 000000000051C2F4 00007FE2A97B6180 000000000051C380): semi-stub
00e0:fixme:system:QueryDisplayConfig only returning active paths
00e0:fixme:system:QueryDisplayConfig setting toplogyid to DISPLAYCONFIG_TOPOLOGY_INTERNAL
00e0:fixme:system:NtUserDisplayConfigGetDeviceInfo Unimplemented packet type 11.
00e0:fixme:vulkan:X11DRV_vkCreateWin32SurfaceKHR Application requires child window rendering, which is not implemented yet!
err:   D3D11SwapChain: Failed to recreate surface: VK_ERROR_INCOMPATIBLE_DRIVER
err:   DXGI: CreateSwapChainForHwnd: Failed to create swap chain, hr -2147467259
00e0:err:seh:KiUserCallbackDispatcher ignoring exception
0154:fixme:wincodecs:BitmapScaler_Initialize unsupported mode 3
011c:fixme:ole:thread_context_callback_ContextCallback 0000000001BDB538, 00000000025E2B80, 000000001C44F820, {d7174f82-36b8-4aa8-800a-e963ab2dfab9}, 2, 0000000000000000
011c:fixme:ole:thread_context_callback_ContextCallback 0000000001BDB538, 00000000025E2B80, 000000001C44F710, {d7174f82-36b8-4aa8-800a-e963ab2dfab9}, 2, 0000000000000000

So i guess canvas is implemented as child window in D3D11. Could you please confirm this is yet unimplemented functionality (X11DRV_vkCreateWin32SurfaceKHR) and not just bug in my "incompatible driver"?

As I'm getting more and more under the hood, I'm craving more and more to ask Serif to explain how Affinity architecture actually looks like. What do you think? i.E. I know all program (launch) parameters for entire suite, but haven't seen (or I'm simply unable to find) any explanation for what they mean or do. I know there are debug symbols (.pdb) but I have no access to them. Is this OK?

Child window handling is implemented for open gl but not Vulkan. There is a branch by a wine developer that implements Vulkan child calls. But it isn't merged into the main codebase. I'm not sure what the relation there is with dxvk as well. I've personally find that applications run more feature complete without dxvk.

Pdb contain a lot of debug information, such as parameter names and function names, companies don't release this as they don't want people being able to read their code.

Let's cut the noise about criticizing serif for their Linux support.

Link to comment
Share on other sites

30 minutes ago, ElementalWarrior said:

Child window handling is implemented for open gl but not Vulkan. There is a branch by a wine developer that implements Vulkan child calls. But it isn't merged into the main codebase.

I see. Patch acquired, already merging different patches. But main branch moved a bit already. Have to do rejects manually.

35 minutes ago, ElementalWarrior said:

Pdb contain a lot of debug information, such as parameter names and function names, companies don't release this as they don't want people being able to read their code.

Yes, but I'm not to used to pray or wish something when application is crashing. I'm used to debugger.

37 minutes ago, ElementalWarrior said:

Let's cut the noise about criticizing serif for their Linux support.

OK. 😉

Link to comment
Share on other sites

On 5/14/2023 at 8:58 AM, Grunt said:

I see. Patch acquired, already merging different patches. But main branch moved a bit already. Have to do rejects manually.

Yes, but I'm not to used to pray or wish something when application is crashing. I'm used to debugger.

OK. 😉

It's probably easier to use his branch then it is a patchset. This is more likely to be updated:

https://github.com/rbernon/wine/tree/wip/vulkan-child/v1

Although he rebases these branches. So the timestamps are not accurate.

Link to comment
Share on other sites

On 5/8/2023 at 5:10 AM, Grunt said:

So as requested, here is slightly modified wine-git PKGBUILD.

Disclaimer: Please don't push it into AUR or any other repo. AUR is full of orphaned one-use packages without any maintainer. There is no need for just one more. Thank you. You need to share modifications, share it here. You need support, ask here or anywhere on this forum.

TLDR: uninstall any Wine you may have installed, extract it to somewhere with enough space (my current build: 40683 entries, size 5,2GB):

  • ~/build/packages default on Arch
  • /var/tmp/pamac when using pamac on Manjaro

cd there; makepkg -i, wait hours and try winecfg after installation

Rest is same. I haven't even bothered with rum on winetricks, simply installed dontet48, WinRT files, Affinity from MSI and it works just fine.

makepkg: Run just this for creating package to be manually installed afterwards

makepkg -e: When rebuilding or if you need to make modification in source code (like version number;-))

One bug I know about is version number. Result will be probably something like wine-git-7.9-5442-gdb8b984c1f8.pkg.tar.zst. No worries, it is latest Wine 8.7 with patches for Affinity:

wine_8_7.png.dec3debc915c02f12b01581f30709207.png

One protip: If running on Nvidia cards and you want to use Vulkan, don't forget to install proprietary drivers and run any Affinity application on right GPU (on multi-GPU setup is Intel GPU by default):

[Desktop Entry]
Name=Affinity Photo 2
Exec=prime-run wine /home/username/.wine/drive_c/Affinity/Photo/Photo.exe
Terminal=true #to observe any errors

No idea how it works on AMD/ATI cards. I have simple Budgie box with nothing more than default installation, browser, terminal and Affinity apps and I can fairly recommend this setup:

ManjaroBox.jpg.7ba44a676e4a3d83fc5302d93f5948f0.jpg

Since Affinity Suite is terrible bloatware (beware of memory leaks - I've encountered few already), might be good idea to work on something light (Budgie, LXQT, XFCE). Crashes and freezes are frequent, but since Serif officially declined any support on platforms other than Windows/Mac is better than nothing. Community is always here to help I guess.

Enjoy,

-Grunt

wine-git.PKGBUILD.tar.gz 2.21 kB · 13 downloads

I tested this in distrobox and it worked like a charm (it did take about an hour lol)

Link to comment
Share on other sites

3 hours ago, the_rhino said:

I tested this in distrobox and it worked like a charm

I'm pleased. It should work like charm in the first place.

Anyway, I could not wait, so I've enrolled into Beta program. What is today version 2.1 (and was yesterday 2.1 GM Build):

AP_2_1_Beta1.png.7c87a9c39d0f964b055043cf378d4664.png

AP_2_1_Beta2.png.697ea313d12e4276b9b9ca77048b136e.png

AP_2_1_Beta3.jpg.be121fd575f1ca38a69d86c9f814d53d.jpg

Right now I'm waiting for Beta 2.2, going to delete everything (and abandon this thread) and test another yet unreleased version. I guess it's better to be step ahead.

Link to comment
Share on other sites

I found out a nice little trick to get the applications working with icon-packs in the dock. This is purely a cosmetic change and it seems to apply to all apps (especially wine applications), but it lets me rest easy at night because now my shell looks nice and slick again 😜

In your .desktop-file you simply need to add

StartupWMClass=photo.exe

or "designer.exe"/"publisher.exe" for the other applications. That way the dock knows to associate any application with that WM-class under that .desktop entry.

To get the class of an application you simply call the following command in a terminal:

xprop WM_CLASS

and then click on the window of the application you wanna know the class of. For wine-applications this should be the name of the exe you're running.

To get a better idea of what I'm talking about, here's an example:

image.thumb.png.f298ee76b86a6b2a9aebee57497f0367.png

On the left side you can see Affinity Photo 2 showing under a custom icon since I added said line to the .desktop while Designer still uses the blurry default icon since that line is not added there yet.

To get the specific icon showing of course you need to add

Icon=[application-name]

to your .desktop and make sure your icon pack has an icon with that name. Since the icon pack I'm using didn't, I decided to make my own and add them as "affinity-photo-2" and so on.

Another added benefit is that even if you're not using some fancy icon pack the application will still show up under the shortcut of the .desktop instead of adding a second icon to the dock like so:

image.png.59e8e613796cb8a7c9e2b838e7d4e212.png

@Wanestymaybe you could add this to the .desktop example in the git-repo?

Edited by BLKFSH
Link to comment
Share on other sites

5 hours ago, Wanesty said:

which part are you struggling with ?

Commonly, at the point of installing exe, I get:

Screenshot.png.fe8efcb5d04905ff1606b454aa67283f.png

Closest I got was building with https://github.com/daegalus/wine-builder and using Bottles.

I can launch Photo2, but shows no canvas and crashes upon zooming.

1343280725_Screenshotfrom2023-05-2609-38-49.png.d96487d1d9433e9eedf895bb272a16f2.png

I can't figure out adding winetricks dotnet48 to the bottle yet.

Screenshot2.png.f111ca5e25de4570ef6225ba9956ba8b.png

I learn as I go, so it's no wonder.

Link to comment
Share on other sites

12 hours ago, Kastas said:

Commonly, at the point of installing exe, I get:

if you installed dotnet48 with bottles, this is an issue on bottles's side, see : https://codeberg.org/Wanesty/affinity-wine-docs/src/branch/main/QnA.md#q-why-rum-why-not-bottles

if you did install it with winetricks, you likely misstyped the WINEPREFIX path.

EDIT: sorry i missread, i had an issue with winetricks and the wine87 branch, maybe try ElementalWarrior's main branch or installing dotnet40&48 by yourself instead (i'm gonna test again and update this post and the guide accordingly)

 

EDIT 2 : yea winetricks is giving me an error with the wine87 branch, i removed this part from the guide on my repo, stick to the "master" branch for now
the error winetricks is giving me btw, (i don't have time to test more stuff rn).image.png.00be3680a1f158a8d99e002ef639d009.png

Edited by Wanesty

up to date guide for the Affinity Suite on Linux :  codeberg.org/affinity-wine-docs

Link to comment
Share on other sites

21 minutes ago, Wanesty said:

what branch did you compile for it to work ?

did you have any issue while installing dotnet through winetricks ? 

Worked both, but I stayed with affinity-photo2-wine87. No problems with dotnet.

Everything seems to work just fine.

All my previous failed attempts I posted earlier were due to my embarrassing mistake not related to this project.
 

Link to comment
Share on other sites

On 5/26/2023 at 7:29 PM, Wanesty said:

winetricks is giving me an error with the wine87 branch

so i'm just a dumbass and forgot to install the wine32 build before installing the wine64 build, in the guide too, it's now updated.
significant oversight, sorry all

also added back the branch checkout lines since the branch wasn't the issue.... 😅

up to date guide for the Affinity Suite on Linux :  codeberg.org/affinity-wine-docs

Link to comment
Share on other sites

Oh well, i‘m new to linux and this seems a bit much for me. Is there any chance that the fixes elemental warrior made in his branch will be merged to the vanilla wine so this process will be easier or will doing it like this be the only way to get affinity v2 on linux for the foreseeable future?

Link to comment
Share on other sites

47 minutes ago, Wollhut said:

Oh well, i‘m new to linux and this seems a bit much for me. Is there any chance that the fixes elemental warrior made in his branch will be merged to the vanilla wine so this process will be easier or will doing it like this be the only way to get affinity v2 on linux for the foreseeable future?

Some of the changes are not really suitable for upstreaming. I've tried to upstream some. But it would be missing at least one that is required.

Link to comment
Share on other sites

8 hours ago, Wollhut said:

Oh well, i‘m new to linux and this seems a bit much for me. Is there any chance that the fixes elemental warrior made in his branch will be merged to the vanilla wine so this process will be easier or will doing it like this be the only way to get affinity v2 on linux for the foreseeable future?

the guide in my signature is pretty much copy pasting stuff in your terminal,
however i encourage you to learn and understand it and what the commands do : this will not only make your experience on linux safer but also save you time in the long run

up to date guide for the Affinity Suite on Linux :  codeberg.org/affinity-wine-docs

Link to comment
Share on other sites

11 hours ago, Wanesty said:

the guide in my signature is pretty much copy pasting stuff in your terminal,
however i encourage you to learn and understand it and what the commands do : this will not only make your experience on linux safer but also save you time in the long run

Oh ok thank you for the answer, i saw that your guide looks really awesome and i will probably be able to follow it but to actually understand what I’m doing there i will need some time which i don’t have too much of at the moment. I will still do this someday and I’m really happy this exists, great work, thank you!

 

19 hours ago, ElementalWarrior said:

Some of the changes are not really suitable for upstreaming. I've tried to upstream some. But it would be missing at least one that is required.

Ok thanks, i guess it’s going to be the less easy way then. I will try this as soon as i find the time. Thank you for making affinity work on Linux this really makes linux a lot better for me. Maybe some day i will only need my windows install for getting the affinity file that is needed for the linux installation.

Link to comment
Share on other sites

On 5/30/2023 at 2:57 PM, Wollhut said:

Maybe some day i will only need my windows install for getting the affinity file that is needed for the linux installation

if more software start using them, winmd files could end up being in the wine mono implementation, this is unlikely for a few more years tho.

also said winmd files doesn't need to be from a fresh install, keeping your current one in a zip archive and always using them, or asking a friend to send you theirs is an option.

On 5/30/2023 at 2:57 PM, Wollhut said:

i don’t have too much of at the moment. I will still do this someday and I’m really happy this exists, great work, thank you!

fair ahah, and ty, most of it is fairly simple navigation, copy and git stuff,
however i didn't precised when you need to sudo, for security reason guides usually never do( ; as on windows, only you are responsible if you run anything with administrator privilege.)

up to date guide for the Affinity Suite on Linux :  codeberg.org/affinity-wine-docs

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use | 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.