Jump to content

Recommended Posts

Posted

Hi,
There's *finally* a way to run Affinity Photo and Designer on Linux and it's pretty easy actually.
Steps:

1. Install Bottles (from https://usebottles.com/ or your appstore)
2. From Settings/Runners, install 'Caffe 7.10'
3. Down
load the custom recipe file (from Kontik from the Bottles Telegram chat)
4. Create a new bottle, click 'Custom' and choose the recipe (AffinityCustomBottleRecipe.yml)
5. Click the 'Run executable' button and choose your downloaded .exe (Download from your Affinity Account)
6. Install it like the Windows version
7. Click the three dots next in the 'Photo' card of the 'Programs' list choose 'Change Launch options' and add the following to 'Command arguments': --no-hw-ui argument

There are still glitches and crashes but it's still someting :)
P.S.: Let me know if you'd like a video tutorial

AffinityCustomBottleRecipe.yml
 

Screenshot_20220810_173447.png

  • 2 weeks later...
Posted (edited)

No success from my side, I just have everything black but can overlay them (like the document that we can see)

I'm running with a RTX 3090 in X11, could it be the problem?

Spoiler

20220819-194640.thumb.jpg.ca99b0d164a0ae35c463631d506ebbdf.jpg

EDIT: It works actually a bit more than only my screenshot, if I manage to create a new document I have this:

 

Edited by Cuissedemouche
Posted

Finally! Thank you for the update. Affinity Designer was the only program that I still dual booted Windows for.

I also got it working - running a GTX 1060 and X11 - however I can't save any files - it says "Failed to save document: <Untitled> - Save failed because access to the file was lost.", no matter what directory I choose or what name I give the file.

Any ideas on what to do?

Posted (edited)

I'm assuming that when you create the bottle, in the "Custom" menu, you need to select "Caffe 7.10" as the launcher as well?

I managed to install Affinity Designer using the Flathub version of Bottles (v. 2022.8.14), but Affinity Designer itself wouldn't launch. It might have been a Flatpak issue, I wasn't really sure - there was no error message given. I ran the installer file again and it gave the option to repair or uninstall the app, so it looks like it was installed correctly.

I then uninstalled the Flathub version of Bottles and installed the Fedora Linux RPM version of Bottles (v. 2022.5.28). I tried to install Affinity Designer. It wouldn't even open the Affinity Designer installer file. Again, no error message given.

I'm running Fedora 36. Do you have any advice? Which version of Bottles did you get it working on, and did you have any problems with Flatpak's sandboxing?

Thanks

Edited by azuredusk10
Adding more details about my experiene
  • 4 weeks later...
Posted

Hello, many thanks for this !

I have installed the bottle in Bottle Flatpak version (local config = Mint 21).

Launching ok.

Use of tools ok (but I have not tried everything).

But when saving the file, path found, then refused as lost, as described in the other Linux thread.

I agree to be a tester during all the dev process if needed.

Cath

Posted
On 9/19/2022 at 5:19 PM, cr77 said:

Hello, many thanks for this !

I have installed the bottle in Bottle Flatpak version (local config = Mint 21).

Launching ok.

Use of tools ok (but I have not tried everything).

But when saving the file, path found, then refused as lost, as described in the other Linux thread.

I agree to be a tester during all the dev process if needed.

Cath

Hey!
I also have the same problem, but I don't know where to report it. It probably has something to do with the underlying Windows API.
If you know where to report it, gladly do so! Maybe as a bug on WineHQ?

Best of luck!

Posted
On 9/19/2022 at 5:19 PM, cr77 said:

Hello, many thanks for this !

I have installed the bottle in Bottle Flatpak version (local config = Mint 21).

Launching ok.

Use of tools ok (but I have not tried everything).

But when saving the file, path found, then refused as lost, as described in the other Linux thread.

I agree to be a tester during all the dev process if needed.

Cath

Does Bootles have acess to that folder? (you can check/allow it in Flatseal)

Posted (edited)
11 minutes ago, aronkvh said:

Does Bootles have acess to that folder? (you can check/allow it in Flatseal)

Not the person you were asking but I tried to save to multiple folders - all of which Bottles can access - with no success. A file is actually created, but it is 0 bytes large and Affinity Designer shows an alert "Failed to save document: <Untitled>". Did you get it to work?

Edited by dledr0f88
spelling
  • 2 weeks later...
Posted

This might be useful I managed to get it running a bit (unstable) through manually configuring wine and then again using Lutris. But judging by how other bottle installs have gone this might be it. Just been using GIMP recently 

  • 2 weeks later...
Posted (edited)

The save functionality uses the function `MoveFileTransactedA` in kernel32. Which is not implemented in wine (bottles, proton are all projects built on top of wine). https://gitlab.winehq.org/wine/wine/-/blob/master/dlls/kernel32/path.c#L144

I went through and debugged and submitted some patches to wine to address Affinity Photo working under wine. I was able to get it working with Vulkan on linux after making a few patches.

The last remaining change that I could see to get affinity photo running was to convert MoveFileTransacted (and related file operations) implemented to the point to work when called.

I have a pull request (https://gitlab.winehq.org/wine/wine/-/merge_requests/145) that was able to get the save functionality working. But wine must support more than just this one piece of software, and newly implemented code must not affect other software.

I suspect that is why this PR didn't get any attention. And as such, saving probably isn't going to be working for a while.

In regards to your flickering, if you expect performance of Affinity Photo to be as good as on windows or mac out of the box... don't. It would take a good amount of effort from someone with a lot of knowledge of the windows and linux api's, who is also good at performance improvement and debugging. Developers with interest and free time and expertise are rare.

Edited by ElementalWarrior
phrasing
Posted
On 9/22/2022 at 1:24 PM, aronkvh said:

 

 

If someone can find a fix to this flickering please let me know.

I get a better experience using wine's built in vulkan rendering instead of vulkan through dxvk.

Effectively set all the d3d dll's to builtin through winecfg, and add the registry key for Direct3D/Renderer under wine to vulkan.[1]

 

1. See https://wiki.winehq.org/Useful_Registry_Keys and search for renderer.

image.png

Posted
On 10/20/2022 at 6:20 PM, ElementalWarrior said:

The save functionality uses the function `MoveFileTransactedA` in kernel32. Which is not implemented in wine (bottles, proton are all projects built on top of wine). https://gitlab.winehq.org/wine/wine/-/blob/master/dlls/kernel32/path.c#L144

I went through and debugged and submitted some patches to wine to address Affinity Photo working under wine. I was able to get it working with Vulkan on linux after making a few patches.

The last remaining change that I could see to get affinity photo running was to convert MoveFileTransacted (and related file operations) implemented to the point to work when called.

I have a pull request (https://gitlab.winehq.org/wine/wine/-/merge_requests/145) that was able to get the save functionality working. But wine must support more than just this one piece of software, and newly implemented code must not affect other software.

I suspect that is why this PR didn't get any attention. And as such, saving probably isn't going to be working for a while.

In regards to your flickering, if you expect performance of Affinity Photo to be as good as on windows or mac out of the box... don't. It would take a good amount of effort from someone with a lot of knowledge of the windows and linux api's, who is also good at performance improvement and debugging. Developers with interest and free time and expertise are rare.

Thank you for your work! That's awesome and I hope the PR gets approved soon. I wasn't able to compile WINE on my machine yet, but I will try again with your branch if saving actually works.

Posted
On 10/21/2022 at 10:00 AM, dledr0f88 said:

Thank you for your work! That's awesome and I hope the PR gets approved soon. I wasn't able to compile WINE on my machine yet, but I will try again with your branch if saving actually works.

When I was working on it, I just used the arch PKGBUILD. I would skip the install step and just run the compiled binary from the output directory.

https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=wine-staging-git

Posted

Hello - new to both Affinity and the forums here. I'm another Linux dude that has been using it on desktop/laptop since 2001 and before that, since 1999 on servers. I can't stand Windows.

Presently, I'm running Mint. I have tried the recipe above with both Affinity Photo and Design and get a lot of weird things going on. Design freezes on me randomly.

Photo is something else - So, I can create new files and export them (I've tried PSD, PDF, and JPG). I can then open them later as well.

But trying to open jpgs in the same directory that were created/saved/exported in GIMP causes Photo to crash. Same with all the JPG's created by darktable. Very weird. My fan speed starts whirring like crazy, and then Photo just dies.

I can also not open Nikon RAW NEF files. Same behavior. Photo shows the message "Loading 1 Document," hangs for about 10-15 seconds, then dies.

Oddly, I can open stock images that I downloaded from Dreamstime and that are jpg. I have also been able to open jpgs created with an older point and shoot camera (can't remember the brand) that are jpg.

But it seems to have big issues with with jpgs created with GIMP, darktable, and Nikon.

Posted

I have tried the version 2 release. I could not get it to run. It is released as a msix package.

You can often extract things like exe's, msi, msix as you would zip packages. If you run `unzip -l affinity-photo-2.0.0.msix` it will list the application binaries and assets.

After trying to run the Photo.exe it can't seem to find its own dll's. Even though they're in the same folder. I'm not sure why that is tbh. From `WINEDEBUG=+module wine Photo.exe` I see it saying its looking in the proper directory.

Posted
1 hour ago, ElementalWarrior said:

I have tried the version 2 release. I could not get it to run. It is released as a msix package.

You can often extract things like exe's, msi, msix as you would zip packages. If you run `unzip -l affinity-photo-2.0.0.msix` it will list the application binaries and assets.

After trying to run the Photo.exe it can't seem to find its own dll's. Even though they're in the same folder. I'm not sure why that is tbh. From `WINEDEBUG=+module wine Photo.exe` I see it saying its looking in the proper directory.

Keep us updated about your progress on getting it to run. :D

Posted
13 hours ago, ElementalWarrior said:

I have tried the version 2 release. I could not get it to run. It is released as a msix package.

You can often extract things like exe's, msi, msix as you would zip packages. If you run `unzip -l affinity-photo-2.0.0.msix` it will list the application binaries and assets.

After trying to run the Photo.exe it can't seem to find its own dll's. Even though they're in the same folder. I'm not sure why that is tbh. From `WINEDEBUG=+module wine Photo.exe` I see it saying its looking in the proper directory.

I tried the same thing and ran into the same issue.
I tried adding the dlls manually to the system32 folder and adding an override via winecfg but that also didn't help.

Posted

Logs were unclear. But it looks like just ext-ms-win-dxcore-l1-1-0.dll is missing. I'm not sure what I have to install to get that dll.

If I symlink it to libdxcore.dll in the process directory, I do get the new splash screen.

ln -s ./libdxcore.dll ext-ms-win-dxcore-l1-1-0.dll

Posted
On 11/11/2022 at 12:36 PM, ParanoidNemo said:

I'm really interested in this. Will try tonight to see if I came up with something to help.

Thanks for your testing

Where you able to come up with something?

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.