├── Patch └── AffinityPatcherSettings │ ├── obj │ ├── Release │ │ └── net8.0 │ │ │ ├── AffinityPatcher.csproj.CopyComplete │ │ │ ├── AffinityPatcher.AssemblyInfoInputs.cache │ │ │ ├── AffinityPatcher.genruntimeconfig.cache │ │ │ ├── AffinityPatcher.csproj.CoreCompileInputs.cache │ │ │ ├── apphost │ │ │ ├── AffinityPatcher.dll │ │ │ ├── AffinityPatcher.pdb │ │ │ ├── ref │ │ │ └── AffinityPatcher.dll │ │ │ ├── refint │ │ │ └── AffinityPatcher.dll │ │ │ ├── AffinityPatcher.assets.cache │ │ │ ├── AffinityPatcher.sourcelink.json │ │ │ ├── AffinityPatcher.csproj.AssemblyReference.cache │ │ │ ├── .NETCoreApp,Version=v8.0.AssemblyAttributes.cs │ │ │ ├── AffinityPatcher.GlobalUsings.g.cs │ │ │ ├── AffinityPatcher.GeneratedMSBuildEditorConfig.editorconfig │ │ │ ├── AffinityPatcher.AssemblyInfo.cs │ │ │ └── AffinityPatcher.csproj.FileListAbsolute.txt │ ├── AffinityPatcher.csproj.nuget.g.targets │ ├── project.nuget.cache │ ├── AffinityPatcher.csproj.nuget.g.props │ ├── AffinityPatcher.csproj.nuget.dgspec.json │ └── project.assets.json │ ├── bin │ └── Release │ │ ├── Mono.Cecil.dll │ │ ├── AffinityPatcher │ │ ├── AffinityPatcher.dll │ │ ├── AffinityPatcher.pdb │ │ ├── Mono.Cecil.Mdb.dll │ │ ├── Mono.Cecil.Pdb.dll │ │ ├── Mono.Cecil.Rocks.dll │ │ ├── AffinityPatcher.runtimeconfig.json │ │ └── AffinityPatcher.deps.json │ ├── AffinityPatcher.csproj │ └── AffinityPatcher.cs ├── AffinityOnLinux.png ├── aol-screenshot.png ├── icons ├── Affinity.png ├── Affinity-Canva.ico ├── Affinity-Canva.png ├── AffinityPhoto.png ├── AffinityDesigner.png ├── Affinity-Canva.svg └── AffinityPublisher.svg ├── AffinityScripts ├── icons │ ├── play-dark.svg │ ├── play-light.svg │ ├── lightning-dark.svg │ ├── lightning-light.svg │ ├── zoom-original-dark.svg │ ├── zoom-original-light.svg │ ├── pen-dark.svg │ ├── pen-light.svg │ ├── loop-dark.svg │ ├── loop-light.svg │ ├── zoom-out-dark.svg │ ├── zoom-out-light.svg │ ├── download-dark.svg │ ├── download-light.svg │ ├── zoom-in-dark.svg │ ├── zoom-in-light.svg │ ├── exit-dark.svg │ ├── exit-light.svg │ ├── book-dark.svg │ ├── book-light.svg │ ├── scale-dark.svg │ ├── scale-light.svg │ ├── display-dark.svg │ ├── target-dark.svg │ ├── wine-dark.svg │ ├── wine-light.svg │ ├── display-light.svg │ ├── target-light.svg │ ├── trash-dark.svg │ ├── trash-light.svg │ ├── dependencies-dark.svg │ ├── dependencies-light.svg │ ├── list-dark.svg │ ├── list-light.svg │ ├── files-dark.svg │ ├── files-light.svg │ ├── folderopen-dark.svg │ ├── folderopen-light.svg │ ├── camera-dark.svg │ ├── camera-light.svg │ ├── windows-dark.svg │ ├── windows-light.svg │ ├── chrome-dark.svg │ ├── rocket-dark.svg │ ├── chrome-light.svg │ ├── rocket-light.svg │ ├── wand-dark.svg │ ├── wand-light.svg │ ├── cog-dark.svg │ ├── cog-light.svg │ ├── gear-dark.svg │ ├── gear-light.svg │ ├── wrench-dark.svg │ ├── wrench-light.svg │ ├── affinity-unified-dark.svg │ └── affinity-unified-light.svg ├── AffinityUpdater.sh ├── AffinityPhoto.sh └── Affinityv3.sh ├── .gitignore ├── wget-log ├── docs ├── WINE-VERSIONS.md ├── CONTRIBUTING.md ├── LEGACY-SCRIPTS.md ├── SYSTEM-REQUIREMENTS.md ├── HARDWARE-ACCELERATION.md ├── OpenCL-Guide.md ├── INSTALLATION.md ├── Known-issues.md └── CHANGELOG.md ├── .github └── FUNDING.yml ├── wine-dark-theme.reg ├── Guide ├── Settings.md ├── Guide.md └── GUI-Installer-Guide.md └── README.md /Patch/AffinityPatcherSettings/obj/Release/net8.0/AffinityPatcher.csproj.CopyComplete: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /AffinityOnLinux.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ryzendew/AffinityOnLinux/HEAD/AffinityOnLinux.png -------------------------------------------------------------------------------- /aol-screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ryzendew/AffinityOnLinux/HEAD/aol-screenshot.png -------------------------------------------------------------------------------- /icons/Affinity.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ryzendew/AffinityOnLinux/HEAD/icons/Affinity.png -------------------------------------------------------------------------------- /icons/Affinity-Canva.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ryzendew/AffinityOnLinux/HEAD/icons/Affinity-Canva.ico -------------------------------------------------------------------------------- /icons/Affinity-Canva.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ryzendew/AffinityOnLinux/HEAD/icons/Affinity-Canva.png -------------------------------------------------------------------------------- /icons/AffinityPhoto.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ryzendew/AffinityOnLinux/HEAD/icons/AffinityPhoto.png -------------------------------------------------------------------------------- /icons/AffinityDesigner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ryzendew/AffinityOnLinux/HEAD/icons/AffinityDesigner.png -------------------------------------------------------------------------------- /Patch/AffinityPatcherSettings/obj/Release/net8.0/AffinityPatcher.AssemblyInfoInputs.cache: -------------------------------------------------------------------------------- 1 | a2f61aa0ead25d20774c153e7d92e1ae531cb815cb76c4e18ccfa2a257ac3b96 2 | -------------------------------------------------------------------------------- /Patch/AffinityPatcherSettings/obj/Release/net8.0/AffinityPatcher.genruntimeconfig.cache: -------------------------------------------------------------------------------- 1 | e9d277e82646ef558d8eac2a2603c7559daf7ada562bb18fb95587ccb660bec8 2 | -------------------------------------------------------------------------------- /Patch/AffinityPatcherSettings/obj/Release/net8.0/AffinityPatcher.csproj.CoreCompileInputs.cache: -------------------------------------------------------------------------------- 1 | 0cd0713d8333831d8cd5a46cc87195beff468e356a7c8489dc9fd308f491af6b 2 | -------------------------------------------------------------------------------- /Patch/AffinityPatcherSettings/bin/Release/Mono.Cecil.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ryzendew/AffinityOnLinux/HEAD/Patch/AffinityPatcherSettings/bin/Release/Mono.Cecil.dll -------------------------------------------------------------------------------- /Patch/AffinityPatcherSettings/obj/Release/net8.0/apphost: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ryzendew/AffinityOnLinux/HEAD/Patch/AffinityPatcherSettings/obj/Release/net8.0/apphost -------------------------------------------------------------------------------- /Patch/AffinityPatcherSettings/bin/Release/AffinityPatcher: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ryzendew/AffinityOnLinux/HEAD/Patch/AffinityPatcherSettings/bin/Release/AffinityPatcher -------------------------------------------------------------------------------- /Patch/AffinityPatcherSettings/bin/Release/AffinityPatcher.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ryzendew/AffinityOnLinux/HEAD/Patch/AffinityPatcherSettings/bin/Release/AffinityPatcher.dll -------------------------------------------------------------------------------- /Patch/AffinityPatcherSettings/bin/Release/AffinityPatcher.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ryzendew/AffinityOnLinux/HEAD/Patch/AffinityPatcherSettings/bin/Release/AffinityPatcher.pdb -------------------------------------------------------------------------------- /Patch/AffinityPatcherSettings/bin/Release/Mono.Cecil.Mdb.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ryzendew/AffinityOnLinux/HEAD/Patch/AffinityPatcherSettings/bin/Release/Mono.Cecil.Mdb.dll -------------------------------------------------------------------------------- /Patch/AffinityPatcherSettings/bin/Release/Mono.Cecil.Pdb.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ryzendew/AffinityOnLinux/HEAD/Patch/AffinityPatcherSettings/bin/Release/Mono.Cecil.Pdb.dll -------------------------------------------------------------------------------- /Patch/AffinityPatcherSettings/bin/Release/Mono.Cecil.Rocks.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ryzendew/AffinityOnLinux/HEAD/Patch/AffinityPatcherSettings/bin/Release/Mono.Cecil.Rocks.dll -------------------------------------------------------------------------------- /Patch/AffinityPatcherSettings/obj/Release/net8.0/AffinityPatcher.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ryzendew/AffinityOnLinux/HEAD/Patch/AffinityPatcherSettings/obj/Release/net8.0/AffinityPatcher.dll -------------------------------------------------------------------------------- /Patch/AffinityPatcherSettings/obj/Release/net8.0/AffinityPatcher.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ryzendew/AffinityOnLinux/HEAD/Patch/AffinityPatcherSettings/obj/Release/net8.0/AffinityPatcher.pdb -------------------------------------------------------------------------------- /Patch/AffinityPatcherSettings/obj/Release/net8.0/ref/AffinityPatcher.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ryzendew/AffinityOnLinux/HEAD/Patch/AffinityPatcherSettings/obj/Release/net8.0/ref/AffinityPatcher.dll -------------------------------------------------------------------------------- /Patch/AffinityPatcherSettings/obj/Release/net8.0/refint/AffinityPatcher.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ryzendew/AffinityOnLinux/HEAD/Patch/AffinityPatcherSettings/obj/Release/net8.0/refint/AffinityPatcher.dll -------------------------------------------------------------------------------- /Patch/AffinityPatcherSettings/obj/Release/net8.0/AffinityPatcher.assets.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ryzendew/AffinityOnLinux/HEAD/Patch/AffinityPatcherSettings/obj/Release/net8.0/AffinityPatcher.assets.cache -------------------------------------------------------------------------------- /Patch/AffinityPatcherSettings/obj/AffinityPatcher.csproj.nuget.g.targets: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /Patch/AffinityPatcherSettings/obj/Release/net8.0/AffinityPatcher.sourcelink.json: -------------------------------------------------------------------------------- 1 | {"documents":{"/home/matt/Documents/GitHub/AffinityOnLinux/*":"https://raw.githubusercontent.com/ryzendew/AffinityOnLinux/11de23d1fbde0f43fc6ffaf6cb57b0b5a92169b6/*"}} -------------------------------------------------------------------------------- /Patch/AffinityPatcherSettings/obj/Release/net8.0/AffinityPatcher.csproj.AssemblyReference.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ryzendew/AffinityOnLinux/HEAD/Patch/AffinityPatcherSettings/obj/Release/net8.0/AffinityPatcher.csproj.AssemblyReference.cache -------------------------------------------------------------------------------- /Patch/AffinityPatcherSettings/obj/Release/net8.0/.NETCoreApp,Version=v8.0.AssemblyAttributes.cs: -------------------------------------------------------------------------------- 1 | // 2 | using System; 3 | using System.Reflection; 4 | [assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETCoreApp,Version=v8.0", FrameworkDisplayName = ".NET 8.0")] 5 | -------------------------------------------------------------------------------- /AffinityScripts/icons/play-dark.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /AffinityScripts/icons/play-light.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /AffinityScripts/icons/lightning-dark.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /AffinityScripts/icons/lightning-light.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /Patch/AffinityPatcherSettings/obj/Release/net8.0/AffinityPatcher.GlobalUsings.g.cs: -------------------------------------------------------------------------------- 1 | // 2 | global using global::System; 3 | global using global::System.Collections.Generic; 4 | global using global::System.IO; 5 | global using global::System.Linq; 6 | global using global::System.Net.Http; 7 | global using global::System.Threading; 8 | global using global::System.Threading.Tasks; 9 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | AffinityScripts/__pycache__/AffinityLinuxInstaller.cpython-313.pyc 2 | __pycache__/ 3 | build/ 4 | AffinityScripts/icons/Affinity-Canva.svg 5 | AffinityScripts/icons/AffinityDesigner.svg 6 | AffinityScripts/icons/AffinityPhoto.svg 7 | AffinityScripts/icons/AffinityPublisher.svg 8 | AffinityScripts/icons/Designer.svg 9 | AffinityScripts/icons/Photo.svg 10 | AffinityScripts/icons/Publisher.svg 11 | -------------------------------------------------------------------------------- /AffinityScripts/icons/zoom-original-dark.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /AffinityScripts/icons/zoom-original-light.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /AffinityScripts/icons/pen-dark.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /AffinityScripts/icons/pen-light.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /AffinityScripts/icons/loop-dark.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /AffinityScripts/icons/loop-light.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /AffinityScripts/icons/zoom-out-dark.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /AffinityScripts/icons/zoom-out-light.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /AffinityScripts/icons/download-dark.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /AffinityScripts/icons/download-light.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /AffinityScripts/icons/zoom-in-dark.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /AffinityScripts/icons/zoom-in-light.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /Patch/AffinityPatcherSettings/bin/Release/AffinityPatcher.runtimeconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "runtimeOptions": { 3 | "tfm": "net8.0", 4 | "framework": { 5 | "name": "Microsoft.NETCore.App", 6 | "version": "8.0.0" 7 | }, 8 | "configProperties": { 9 | "System.Reflection.Metadata.MetadataUpdater.IsSupported": false, 10 | "System.Runtime.Serialization.EnableUnsafeBinaryFormatterSerialization": false 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /Patch/AffinityPatcherSettings/obj/project.nuget.cache: -------------------------------------------------------------------------------- 1 | { 2 | "version": 2, 3 | "dgSpecHash": "fxMqbUZn3mJRXyRZ5P7C2odPYWxt/uQu88uu/dO6mNJri5co4WQMlXkMdO0vKAJ3NqAnUopNtmVBUe+5dKwE+w==", 4 | "success": true, 5 | "projectFilePath": "/home/matt/Documents/GitHub/AffinityOnLinux/Patch/AffinityPatcher.csproj", 6 | "expectedPackageFiles": [ 7 | "/home/matt/.nuget/packages/mono.cecil/0.11.5/mono.cecil.0.11.5.nupkg.sha512" 8 | ], 9 | "logs": [] 10 | } -------------------------------------------------------------------------------- /AffinityScripts/icons/exit-dark.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /AffinityScripts/icons/exit-light.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /AffinityScripts/icons/book-dark.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /AffinityScripts/icons/book-light.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /AffinityScripts/icons/scale-dark.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /AffinityScripts/icons/scale-light.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /AffinityScripts/icons/display-dark.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /AffinityScripts/icons/target-dark.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /AffinityScripts/icons/wine-dark.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /AffinityScripts/icons/wine-light.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /AffinityScripts/icons/display-light.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /AffinityScripts/icons/target-light.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /AffinityScripts/icons/trash-dark.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /AffinityScripts/icons/trash-light.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /AffinityScripts/icons/dependencies-dark.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /AffinityScripts/icons/dependencies-light.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /AffinityScripts/icons/list-dark.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /AffinityScripts/icons/list-light.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /AffinityScripts/icons/files-dark.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /AffinityScripts/icons/files-light.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /AffinityScripts/icons/folderopen-dark.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /AffinityScripts/icons/folderopen-light.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /AffinityScripts/icons/camera-dark.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /AffinityScripts/icons/camera-light.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /AffinityScripts/icons/windows-dark.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /AffinityScripts/icons/windows-light.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /AffinityScripts/icons/chrome-dark.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /AffinityScripts/icons/rocket-dark.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /AffinityScripts/icons/chrome-light.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /AffinityScripts/icons/rocket-light.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /AffinityScripts/icons/wand-dark.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /AffinityScripts/icons/wand-light.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /wget-log: -------------------------------------------------------------------------------- 1 | --2025-11-08 10:58:14-- https://dl.winehq.org/wine-builds/ubuntu/dists/jammy/winehq-jammy.sources 2 | Resolving dl.winehq.org (dl.winehq.org)... 146.75.22.217, 2a04:4e42:75::729 3 | Connecting to dl.winehq.org (dl.winehq.org)|146.75.22.217|:443... connected. 4 | HTTP request sent, awaiting response... 200 OK 5 | Length: 163 [binary/octet-stream] 6 | Saving to: ‘/etc/apt/sources.list.d/winehq-jammy.sources’ 7 | 8 | 0K 100% 130K=0.001s 9 | 10 | 2025-11-08 10:58:15 (130 KB/s) - ‘/etc/apt/sources.list.d/winehq-jammy.sources’ saved [163/163] 11 | 12 | -------------------------------------------------------------------------------- /Patch/AffinityPatcherSettings/AffinityPatcher.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Exe 5 | net8.0 6 | enable 7 | enable 8 | AffinityPatcher 9 | AffinityPatcher 10 | false 11 | false 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /Patch/AffinityPatcherSettings/obj/Release/net8.0/AffinityPatcher.GeneratedMSBuildEditorConfig.editorconfig: -------------------------------------------------------------------------------- 1 | is_global = true 2 | build_property.TargetFramework = net8.0 3 | build_property.TargetPlatformMinVersion = 4 | build_property.UsingMicrosoftNETSdkWeb = 5 | build_property.ProjectTypeGuids = 6 | build_property.InvariantGlobalization = 7 | build_property.PlatformNeutralAssembly = 8 | build_property.EnforceExtendedAnalyzerRules = 9 | build_property._SupportedPlatformList = Linux,macOS,Windows 10 | build_property.RootNamespace = AffinityPatcher 11 | build_property.ProjectDir = /home/matt/Documents/GitHub/AffinityOnLinux/Patch/ 12 | build_property.EnableComHosting = 13 | build_property.EnableGeneratedComInterfaceComImportInterop = 14 | -------------------------------------------------------------------------------- /docs/WINE-VERSIONS.md: -------------------------------------------------------------------------------- 1 | # Wine Versions 2 | 3 | The installer supports multiple Wine versions, all patched for Affinity compatibility: 4 | 5 | | Version | Best For | Description | 6 | |---------|----------|-------------| 7 | | **10.10** (Recommended) | Most users | Latest version with best compatibility and performance | 8 | | **9.14** (Legacy) | Fallback | Legacy version if newer versions have issues | 9 | 10 | ## Features 11 | 12 | **All versions include:** 13 | - OpenCL support patches 14 | - AMD GPU compatibility fixes 15 | - Affinity-specific optimizations 16 | 17 | The installer automatically detects your CPU and recommends the best version. You can switch between versions anytime using the GUI installer. 18 | 19 | ## Important Notes 20 | 21 | ### Wine 10.17 Warning 22 | 23 | Wine 10.17 has major bugs and issues. This installer does not use it. 24 | 25 | -------------------------------------------------------------------------------- /AffinityScripts/icons/cog-dark.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /AffinityScripts/icons/cog-light.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /AffinityScripts/icons/gear-dark.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /AffinityScripts/icons/gear-light.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /AffinityScripts/icons/wrench-dark.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /AffinityScripts/icons/wrench-light.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] 4 | patreon: # Replace with a single Patreon username 5 | open_collective: # Replace with a single Open Collective username 6 | ko_fi: tlv 7 | tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel 8 | community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry 9 | liberapay: # Replace with a single Liberapay username 10 | issuehunt: # Replace with a single IssueHunt username 11 | lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry 12 | polar: # Replace with a single Polar username 13 | buy_me_a_coffee: # Replace with a single Buy Me a Coffee username 14 | thanks_dev: # Replace with a single thanks.dev username 15 | custom: https://paypal.me/gamedev1909 16 | -------------------------------------------------------------------------------- /docs/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | Contributions are welcome! Pull requests help improve the project for everyone. 4 | 5 | ## Guidelines 6 | 7 | Please ensure your changes are: 8 | - Tested on at least one supported distribution 9 | - Documented appropriately 10 | - Following the existing code style and conventions 11 | 12 | ## Getting Started 13 | 14 | 1. Fork the repository 15 | 2. Create a feature branch 16 | 3. Make your changes 17 | 4. Test thoroughly 18 | 5. Submit a pull request with a clear description of your changes 19 | 20 | ## Reporting Issues 21 | 22 | When reporting issues, please include: 23 | - Your Linux distribution and version 24 | - Wine version (if applicable) 25 | - GPU model and driver version 26 | - Steps to reproduce the issue 27 | - Relevant error messages or logs 28 | 29 | ## Support 30 | 31 | For questions or help, join our [Discord Community](https://discord.gg/DW2X8MHQuh) or open an issue on GitHub. 32 | 33 | -------------------------------------------------------------------------------- /Patch/AffinityPatcherSettings/obj/Release/net8.0/AffinityPatcher.AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // 5 | // Changes to this file may cause incorrect behavior and will be lost if 6 | // the code is regenerated. 7 | // 8 | //------------------------------------------------------------------------------ 9 | 10 | using System; 11 | using System.Reflection; 12 | 13 | [assembly: System.Reflection.AssemblyCompanyAttribute("AffinityPatcher")] 14 | [assembly: System.Reflection.AssemblyConfigurationAttribute("Release")] 15 | [assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")] 16 | [assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+11de23d1fbde0f43fc6ffaf6cb57b0b5a92169b6")] 17 | [assembly: System.Reflection.AssemblyProductAttribute("AffinityPatcher")] 18 | [assembly: System.Reflection.AssemblyTitleAttribute("AffinityPatcher")] 19 | [assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] 20 | 21 | // Generated by the MSBuild WriteCodeFragment class. 22 | 23 | -------------------------------------------------------------------------------- /Patch/AffinityPatcherSettings/obj/AffinityPatcher.csproj.nuget.g.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | True 5 | NuGet 6 | $(MSBuildThisFileDirectory)project.assets.json 7 | /home/matt/.nuget/packages/ 8 | /home/matt/.nuget/packages/ 9 | PackageReference 10 | 6.8.1 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /wine-dark-theme.reg: -------------------------------------------------------------------------------- 1 | Windows Registry Editor Version 5.00 2 | #Sources: https://gist.github.com/Zeinok/ceaf6ff204792dde0ae31e0199d89398 , https://bgstack15.ddns.net/blog/posts/2024/08/21/set-wine-theme-from-cli/ 3 | 4 | [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\ThemeManager] 1723684031 5 | #time=1daeeaf754f0868 6 | "ColorName"=- 7 | "DllName"=- 8 | "LoadedBefore"=- 9 | "SizeName"=- 10 | "ThemeActive"="0" 11 | 12 | [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Themes\Personalize] 1723684031 13 | #time=1daeeaf754f020a 14 | "AppsUseLightTheme"=dword:00000000 15 | "SystemUsesLightTheme"=dword:00000000 16 | 17 | [HKEY_CURRENT_USER\Control Panel\Colors] 18 | "ActiveBorder"="49 54 58" 19 | "ActiveTitle"="49 54 58" 20 | "AppWorkSpace"="60 64 72" 21 | "Background"="49 54 58" 22 | "ButtonAlternativeFace"="200 0 0" 23 | "ButtonDkShadow"="154 154 154" 24 | "ButtonFace"="49 54 58" 25 | "ButtonHilight"="119 126 140" 26 | "ButtonLight"="60 64 72" 27 | "ButtonShadow"="60 64 72" 28 | "ButtonText"="219 220 222" 29 | "GradientActiveTitle"="49 54 58" 30 | "GradientInactiveTitle"="49 54 58" 31 | "GrayText"="155 155 155" 32 | "Hilight"="119 126 140" 33 | "HilightText"="255 255 255" 34 | "InactiveBorder"="49 54 58" 35 | "InactiveTitle"="49 54 58" 36 | "InactiveTitleText"="219 220 222" 37 | "InfoText"="159 167 180" 38 | "InfoWindow"="49 54 58" 39 | "Menu"="49 54 58" 40 | "MenuBar"="49 54 58" 41 | "MenuHilight"="119 126 140" 42 | "MenuText"="219 220 222" 43 | "Scrollbar"="73 78 88" 44 | "TitleText"="219 220 222" 45 | "Window"="35 38 41" 46 | "WindowFrame"="49 54 58" 47 | "WindowText"="219 220 222" 48 | -------------------------------------------------------------------------------- /docs/LEGACY-SCRIPTS.md: -------------------------------------------------------------------------------- 1 | # Legacy Scripts 2 | 3 | Command-line installers for users who prefer terminal-based installation. 4 | 5 | ## All-in-One Installer 6 | 7 | Install any Affinity application with automatic dependency management: 8 | 9 | ```bash 10 | bash -c "$(curl -s https://raw.githubusercontent.com/ryzendew/AffinityOnLinux/refs/heads/main/AffinityScripts/AffinityLinuxInstaller.sh)" 11 | ``` 12 | 13 | ## Individual Application Installers 14 | 15 | ### Affinity Photo 16 | 17 | ```bash 18 | bash -c "$(curl -s https://raw.githubusercontent.com/ryzendew/AffinityOnLinux/refs/heads/main/AffinityScripts/AffinityPhoto.sh)" 19 | ``` 20 | 21 | ### Affinity Designer 22 | 23 | ```bash 24 | bash -c "$(curl -s https://raw.githubusercontent.com/ryzendew/AffinityOnLinux/refs/heads/main/AffinityScripts/AffinityDesigner.sh)" 25 | ``` 26 | 27 | ### Affinity Publisher 28 | 29 | ```bash 30 | bash -c "$(curl -s https://raw.githubusercontent.com/ryzendew/AffinityOnLinux/refs/heads/main/AffinityScripts/AffinityPublisher.sh)" 31 | ``` 32 | 33 | ### Affinity v3 (Unified) 34 | 35 | ```bash 36 | bash -c "$(curl -s https://raw.githubusercontent.com/ryzendew/AffinityOnLinux/refs/heads/main/AffinityScripts/Affinityv3.sh)" 37 | ``` 38 | 39 | ## Affinity Updater 40 | 41 | Update existing installations without full reinstallation: 42 | 43 | ```bash 44 | bash -c "$(curl -s https://raw.githubusercontent.com/ryzendew/AffinityOnLinux/refs/heads/main/AffinityScripts/AffinityUpdater.sh)" 45 | ``` 46 | 47 | ## Note 48 | 49 | For most users, the [Python GUI Installer](INSTALLATION.md#2-python-gui-installer-recommended-for-full-features) is recommended as it provides a better user experience and more features. 50 | 51 | -------------------------------------------------------------------------------- /Patch/AffinityPatcherSettings/bin/Release/AffinityPatcher.deps.json: -------------------------------------------------------------------------------- 1 | { 2 | "runtimeTarget": { 3 | "name": ".NETCoreApp,Version=v8.0", 4 | "signature": "" 5 | }, 6 | "compilationOptions": {}, 7 | "targets": { 8 | ".NETCoreApp,Version=v8.0": { 9 | "AffinityPatcher/1.0.0": { 10 | "dependencies": { 11 | "Mono.Cecil": "0.11.5" 12 | }, 13 | "runtime": { 14 | "AffinityPatcher.dll": {} 15 | } 16 | }, 17 | "Mono.Cecil/0.11.5": { 18 | "runtime": { 19 | "lib/netstandard2.0/Mono.Cecil.Mdb.dll": { 20 | "assemblyVersion": "0.11.5.0", 21 | "fileVersion": "0.11.5.0" 22 | }, 23 | "lib/netstandard2.0/Mono.Cecil.Pdb.dll": { 24 | "assemblyVersion": "0.11.5.0", 25 | "fileVersion": "0.11.5.0" 26 | }, 27 | "lib/netstandard2.0/Mono.Cecil.Rocks.dll": { 28 | "assemblyVersion": "0.11.5.0", 29 | "fileVersion": "0.11.5.0" 30 | }, 31 | "lib/netstandard2.0/Mono.Cecil.dll": { 32 | "assemblyVersion": "0.11.5.0", 33 | "fileVersion": "0.11.5.0" 34 | } 35 | } 36 | } 37 | } 38 | }, 39 | "libraries": { 40 | "AffinityPatcher/1.0.0": { 41 | "type": "project", 42 | "serviceable": false, 43 | "sha512": "" 44 | }, 45 | "Mono.Cecil/0.11.5": { 46 | "type": "package", 47 | "serviceable": true, 48 | "sha512": "sha512-fxfX+0JGTZ8YQeu1MYjbBiK2CYTSzDyEeIixt+yqKKTn7FW8rv7JMY70qevup4ZJfD7Kk/VG/jDzQQTpfch87g==", 49 | "path": "mono.cecil/0.11.5", 50 | "hashPath": "mono.cecil.0.11.5.nupkg.sha512" 51 | } 52 | } 53 | } -------------------------------------------------------------------------------- /icons/Affinity-Canva.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /docs/SYSTEM-REQUIREMENTS.md: -------------------------------------------------------------------------------- 1 | # System Requirements 2 | 3 | ## Supported Distributions 4 | 5 | ### Officially Supported 6 | 7 | - Arch Linux 8 | - CachyOS 9 | - EndeavourOS 10 | - Fedora 11 | - Nobara 12 | - openSUSE (Tumbleweed/Leap) 13 | - PikaOS 4 ⚠️ **Note:** Python GUI installer does not work. Use [AppImage](INSTALLATION.md#1-appimage-recommended-for-beginners) instead. 14 | - XeroLinux 15 | 16 | ### Unsupported Distributions (No Support Provided) 17 | 18 | The following distributions are **not officially supported** and **no support will be provided** for issues: 19 | 20 | - **Bazzite** - Immutable filesystem and specialized gaming distribution. Use [AppImage](INSTALLATION.md#1-appimage-recommended-for-beginners) instead. 21 | - **Linux Mint** - Outdated dependencies. Use [AppImage](INSTALLATION.md#1-appimage-recommended-for-beginners) instead. 22 | - **Zorin OS** - Outdated dependencies. Use [AppImage](INSTALLATION.md#1-appimage-recommended-for-beginners) instead. 23 | - **Manjaro** - Known stability issues. Use [AppImage](INSTALLATION.md#1-appimage-recommended-for-beginners) instead. 24 | - **Ubuntu** - Outdated package management. Use [AppImage](INSTALLATION.md#1-appimage-recommended-for-beginners) instead. 25 | - **Pop!_OS** - Outdated package management. Use [AppImage](INSTALLATION.md#1-appimage-recommended-for-beginners) instead. 26 | - **Debian** - Outdated dependencies. Use [AppImage](INSTALLATION.md#1-appimage-recommended-for-beginners) instead. 27 | 28 | **Important:** While the installer may function on unsupported distributions if dependencies are manually installed, we cannot provide support. The [AppImage](INSTALLATION.md#1-appimage-recommended-for-beginners) is strongly recommended for these distributions. 29 | 30 | ## Required Dependencies 31 | 32 | These are automatically installed by the GUI installer. For legacy scripts, install manually: 33 | 34 | - Wine 35 | - winetricks 36 | - wget, 37 | - curl 38 | - p7zip or 7z 39 | - tar, 40 | - jq 41 | - xz 42 | 43 | -------------------------------------------------------------------------------- /Guide/Settings.md: -------------------------------------------------------------------------------- 1 | # Settings 2 | 3 | Affinity apps sometimes tend not to save settings properly. There are two methods of fixing this. Given a `wineprefix` of `drive_c/users/$USERNAME/AppData/Roaming/Affinity/`: 4 | 5 | 1. Clone this repository and copy the files from [./Auxiliary/](../Auxiliary/Settings) to their respective paths inside the `wineprefix`. 6 | 2. Locate the settings folders on a windows machine and paste them into the 7 | corresponding locations in the `wineprefix`. 8 | 9 | ## Method 1 10 | 11 | This method is tested and working for the recommended [Lutris/EW](../Guides/Lutris/Guide.md) install. 12 | 13 | Clone the repository and move into the source directory: 14 | ```sh 15 | git clone git@github.com:seapear/AffinityOnLinux.git 16 | cd AffinityOnLinux/Auxiliary/Settings/ 17 | ``` 18 | 19 | Execute the following code for each app, each time replacing `$APP` with the name of the 20 | target Affinity application and `$USERNAME` with the name of the user. 21 | 22 | ```sh 23 | mv $APP/2.0/Settings drive_c/users/$USERNAME/AppData/Roaming/Affinity/ 24 | ``` 25 | 26 | ## Method 2 27 | 28 | Copy the respective settings folders from `C:\\\users\$USERNAME\AppData\Roaming\Affinity\$APP\$VERSION\Settings\` on windows into the corresponding directory inside the `wineprefix`. 29 | 30 | For example: 31 | 32 | ```sh 33 | C:\\\users\$USERNAME\AppData\Roaming\Affinity\Designer\2.0\Settings\ -> drive_c/users/$USERNAME/AppData/Roaming/Affinity/Designer/2.0/ 34 | 35 | C:\\\users\$USERNAME\AppData\Roaming\Affinity\Photo\2.0\Settings\ -> drive_c/users/$USERNAME/AppData/Roaming/Affinity/Photo/2.0/ 36 | 37 | C:\\\users\$USERNAME\AppData\Roaming\Affinity\Publisher\2.0\Settings\ -> drive_c/users/$USERNAME/AppData/Roaming/Affinity/Designer/2.0/ 38 | ``` 39 | 40 | ## Editing The Settings Files 41 | 42 | The settings files use the `.xml` format and can be modified using a text editor. 43 | 44 | ## Appimage Settings 45 | 46 | Changing UI scaling add this cmd to the end of the Appimage 47 | ``` 48 | --dpi 49 | ``` 50 | To use winecfg add this to the end of the Appimage 51 | ``` 52 | --winecfg 53 | ``` 54 | -------------------------------------------------------------------------------- /docs/HARDWARE-ACCELERATION.md: -------------------------------------------------------------------------------- 1 | # Hardware Acceleration 2 | 3 | Affinity applications benefit significantly from hardware acceleration. The installer sets up everything automatically, but here's what you need to know about the different options. 4 | 5 | ## vkd3d-proton and DXVK (Recommended) 6 | 7 | **vkd3d-proton** and **DXVK** are the recommended methods for hardware acceleration. They're more reliable than OpenCL on most systems and work well across different GPU vendors. 8 | 9 | - **vkd3d-proton**: Handles Direct3D 12 calls, automatically configured by the installer 10 | - **DXVK**: Translates Direct3D 11 to Vulkan, provides excellent performance 11 | 12 | Both are set up automatically during installation, so you don't need to do anything extra. This is what most users should use, especially if you have an AMD or Intel GPU. 13 | 14 | ## OpenCL Support 15 | 16 | OpenCL is available with all Wine versions, but your experience will depend on your GPU. 17 | 18 | ### GPU Compatibility 19 | 20 | **NVIDIA GPUs:** OpenCL generally works well. If you run into issues, they're usually fixable. 21 | 22 | **AMD GPUs:** OpenCL can be problematic. Since I don't have access to AMD hardware for testing, I can't debug OpenCL-specific issues on these GPUs. Your best bet is to stick with vkd3d-proton or DXVK, which are more reliable on AMD hardware. 23 | 24 | **Intel GPUs:** Similar situation to AMD—OpenCL may not work reliably. Again, vkd3d-proton or DXVK are the safer choice here. 25 | 26 | If you want to try OpenCL anyway, check out the [OpenCL Guide](OpenCL-Guide.md) for setup instructions. Just keep in mind that if things don't work, switching to vkd3d-proton/DXVK is usually the solution. 27 | 28 | ## What Gets Installed 29 | 30 | The installer automatically: 31 | - Configures vkd3d-proton for Direct3D 12 support 32 | - Sets up DXVK for Direct3D 11 support 33 | - Copies the necessary DLLs to each Affinity application directory 34 | - Configures Wine to use Vulkan rendering 35 | 36 | You can verify hardware acceleration is working by checking **Edit → Preferences → Performance** in any Affinity application. 37 | -------------------------------------------------------------------------------- /icons/AffinityPublisher.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /Patch/AffinityPatcherSettings/obj/Release/net8.0/AffinityPatcher.csproj.FileListAbsolute.txt: -------------------------------------------------------------------------------- 1 | /home/matt/Documents/GitHub/AffinityOnLinux/Patch/bin/Release/AffinityPatcher 2 | /home/matt/Documents/GitHub/AffinityOnLinux/Patch/bin/Release/AffinityPatcher.deps.json 3 | /home/matt/Documents/GitHub/AffinityOnLinux/Patch/bin/Release/AffinityPatcher.runtimeconfig.json 4 | /home/matt/Documents/GitHub/AffinityOnLinux/Patch/bin/Release/AffinityPatcher.dll 5 | /home/matt/Documents/GitHub/AffinityOnLinux/Patch/bin/Release/AffinityPatcher.pdb 6 | /home/matt/Documents/GitHub/AffinityOnLinux/Patch/bin/Release/Mono.Cecil.Mdb.dll 7 | /home/matt/Documents/GitHub/AffinityOnLinux/Patch/bin/Release/Mono.Cecil.Pdb.dll 8 | /home/matt/Documents/GitHub/AffinityOnLinux/Patch/bin/Release/Mono.Cecil.Rocks.dll 9 | /home/matt/Documents/GitHub/AffinityOnLinux/Patch/bin/Release/Mono.Cecil.dll 10 | /home/matt/Documents/GitHub/AffinityOnLinux/Patch/obj/Release/net8.0/AffinityPatcher.csproj.AssemblyReference.cache 11 | /home/matt/Documents/GitHub/AffinityOnLinux/Patch/obj/Release/net8.0/AffinityPatcher.GeneratedMSBuildEditorConfig.editorconfig 12 | /home/matt/Documents/GitHub/AffinityOnLinux/Patch/obj/Release/net8.0/AffinityPatcher.AssemblyInfoInputs.cache 13 | /home/matt/Documents/GitHub/AffinityOnLinux/Patch/obj/Release/net8.0/AffinityPatcher.AssemblyInfo.cs 14 | /home/matt/Documents/GitHub/AffinityOnLinux/Patch/obj/Release/net8.0/AffinityPatcher.csproj.CoreCompileInputs.cache 15 | /home/matt/Documents/GitHub/AffinityOnLinux/Patch/obj/Release/net8.0/AffinityPatcher.sourcelink.json 16 | /home/matt/Documents/GitHub/AffinityOnLinux/Patch/obj/Release/net8.0/AffinityPatcher.csproj.CopyComplete 17 | /home/matt/Documents/GitHub/AffinityOnLinux/Patch/obj/Release/net8.0/AffinityPatcher.dll 18 | /home/matt/Documents/GitHub/AffinityOnLinux/Patch/obj/Release/net8.0/refint/AffinityPatcher.dll 19 | /home/matt/Documents/GitHub/AffinityOnLinux/Patch/obj/Release/net8.0/AffinityPatcher.pdb 20 | /home/matt/Documents/GitHub/AffinityOnLinux/Patch/obj/Release/net8.0/AffinityPatcher.genruntimeconfig.cache 21 | /home/matt/Documents/GitHub/AffinityOnLinux/Patch/obj/Release/net8.0/ref/AffinityPatcher.dll 22 | -------------------------------------------------------------------------------- /Patch/AffinityPatcherSettings/obj/AffinityPatcher.csproj.nuget.dgspec.json: -------------------------------------------------------------------------------- 1 | { 2 | "format": 1, 3 | "restore": { 4 | "/home/matt/Documents/GitHub/AffinityOnLinux/Patch/AffinityPatcher.csproj": {} 5 | }, 6 | "projects": { 7 | "/home/matt/Documents/GitHub/AffinityOnLinux/Patch/AffinityPatcher.csproj": { 8 | "version": "1.0.0", 9 | "restore": { 10 | "projectUniqueName": "/home/matt/Documents/GitHub/AffinityOnLinux/Patch/AffinityPatcher.csproj", 11 | "projectName": "AffinityPatcher", 12 | "projectPath": "/home/matt/Documents/GitHub/AffinityOnLinux/Patch/AffinityPatcher.csproj", 13 | "packagesPath": "/home/matt/.nuget/packages/", 14 | "outputPath": "/home/matt/Documents/GitHub/AffinityOnLinux/Patch/obj/", 15 | "projectStyle": "PackageReference", 16 | "configFilePaths": [ 17 | "/home/matt/.nuget/NuGet/NuGet.Config" 18 | ], 19 | "originalTargetFrameworks": [ 20 | "net8.0" 21 | ], 22 | "sources": { 23 | "https://api.nuget.org/v3/index.json": {} 24 | }, 25 | "frameworks": { 26 | "net8.0": { 27 | "targetAlias": "net8.0", 28 | "projectReferences": {} 29 | } 30 | }, 31 | "warningProperties": { 32 | "warnAsError": [ 33 | "NU1605" 34 | ] 35 | } 36 | }, 37 | "frameworks": { 38 | "net8.0": { 39 | "targetAlias": "net8.0", 40 | "dependencies": { 41 | "Mono.Cecil": { 42 | "target": "Package", 43 | "version": "[0.11.5, )" 44 | } 45 | }, 46 | "imports": [ 47 | "net461", 48 | "net462", 49 | "net47", 50 | "net471", 51 | "net472", 52 | "net48", 53 | "net481" 54 | ], 55 | "assetTargetFallback": true, 56 | "warn": true, 57 | "frameworkReferences": { 58 | "Microsoft.NETCore.App": { 59 | "privateAssets": "all" 60 | } 61 | }, 62 | "runtimeIdentifierGraphPath": "/usr/lib64/dotnet/sdk/8.0.121/PortableRuntimeIdentifierGraph.json" 63 | } 64 | } 65 | } 66 | } 67 | } -------------------------------------------------------------------------------- /AffinityScripts/icons/affinity-unified-dark.svg: -------------------------------------------------------------------------------- 1 | 2 | 34 | 37 | 44 | 47 | 48 | 49 | 52 | 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /AffinityScripts/icons/affinity-unified-light.svg: -------------------------------------------------------------------------------- 1 | 2 | 34 | 37 | 44 | 47 | 48 | 49 | 52 | 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /Guide/Guide.md: -------------------------------------------------------------------------------- 1 | ## How to Install Affinity Wine 2 | 3 | Head to the github and Download the newest release [Here](https://github.com/Twig6943/ElementalWarrior-wine-binaries/releases) 4 | 5 | ## Installing Heroic Game Launcher flathub 6 | 7 | ``` 8 | flatpak install flathub com.heroicgameslauncher.hgl 9 | ``` 10 | ## Fedora 11 | 12 | ``` 13 | sudo dnf in lutris 14 | ``` 15 | ## Arch Linux 16 | 17 | ``` 18 | sudo pacman -S lutris 19 | ``` 20 | ## Ubuntu/Debian 21 | 22 | ``` 23 | sudo apt install lutris 24 | ``` 25 | ## Installing Affinity Linux's Prebuilt Wine 26 | 27 | Extract the Elemental Warrior's Pre-built wine binaries to Heroic/Lutris wine directory 28 | 29 | ``` 30 | /home/USER/.config/heroic/tools/wine 31 | ``` 32 | 33 | ## Flatpak's Wine location 34 | 35 | ``` 36 | /home/USER/.var/app/com.heroicgameslauncher.hgl/config/heroic/tools/wine 37 | ``` 38 | ## Settings Up Heroic/Lutris For Affinity 39 | 40 | Open up Heroic/lutris and then click on 41 | 42 | ``` 43 | add game 44 | ``` 45 | 46 | Or for Lutris the 47 | 48 | ``` 49 | + Button 50 | ``` 51 | and at the bottom 52 | 53 | ``` 54 | Add Locally Install Game 55 | ``` 56 | 57 | Name it According to the Affinity app you are using 58 | 59 | ``` 60 | Affinity Photo 61 | ``` 62 | 63 | ``` 64 | Affinity Designer 65 | ``` 66 | ``` 67 | Affinity Publisher 68 | ``` 69 | ## Setting the Wine Version 70 | 71 | Set the wine version to ElementalWarriorWine 72 | 73 | ## Selecting the Programs .exe According to what you Want to Install 74 | 75 | Select the setup .exe you've downloaded from affinity's website as the executable 76 | 77 | Click 78 | ``` 79 | Finish 80 | ``` 81 | ## Initialize the prefix 82 | 83 | In order to initialize the prefix run the setup file from heroic. (It'll probably crash wait for it to crash if it somehow opens up close it yourself) 84 | 85 | ## Setting Up Affinity Wine Settings and Winetricks 86 | 87 | * Right click on affinity on heroic and open up its settings 88 | 89 | * Scroll down until you see winetricks & then click on it 90 | 91 | * Search & install these dependencies; 92 | ``` 93 | dotnet48 94 | ``` 95 | ``` 96 | corefonts 97 | ``` 98 | (Wait while its installing the dependencies. Its %90 not stuck but rather taking its time!!!) 99 | 100 | Click on 101 | ``` 102 | OPEN WINETRICKS GUI 103 | ``` 104 | Select 105 | ``` 106 | Select the default wineprefix 107 | ``` 108 | Select 109 | ``` 110 | Change settings 111 | ``` 112 | Toggle 113 | ``` 114 | win11 115 | ``` 116 | Toggle 117 | 118 | ``` 119 | renderer=vulkan 120 | ``` 121 | and click OK 122 | 123 | Keep pressing "Cancel" till the winetricks window closes 124 | 125 | Close heroic games launcher's settings window 126 | 127 | ## Placing WinMetadata 128 | 129 | Unzip [WinMetadata.zip](https://archive.org/download/win-metadata/WinMetadata.zip) 130 | 131 | to $HOME/.Affinitywine/drive_c/windows/system32 132 | 133 | ## Running Affinity Setup and Installing Photo/Designer/Publisher 134 | 135 | Press launch and the setup should work 136 | 137 | Once its done installing right click to affinity on heroic and go to the details tab 138 | 139 | Click on the 3 dots (located on the right top corner) 140 | 141 | Edit 142 | 143 | ``` 144 | App/Game 145 | ``` 146 | 147 | Next Change the executable to 148 | 149 | ``` 150 | drive_c/Program Files/Affinity/Photo 2/Photo.exe 151 | ``` 152 | ``` 153 | drive_c/Program Files/Affinity/Designer 2/Designer.exe 154 | ``` 155 | 156 | ``` 157 | drive_c/Program Files/Affinity/Publisher 2/Publisher.exe 158 | ``` 159 | 160 | Click finish & launch it. 161 | 162 | ## Trouble Shooting 163 | 164 | (Change the settings in the wine tab if it doesn't work or if you have gpu glitches (it should work fine tho) ) 165 | 166 | # Optional wine dark theme 🍷 167 | 1.Download this file https://raw.githubusercontent.com/Twig6943/AffinityOnLinux/main/wine-dark-theme.reg 168 | 169 | 2.Right click to your affinity app and go to settings 170 | 171 | 3.Click to winetricks 172 | 173 | 4.Click to OPEN WINETRICKS GUI 174 | 175 | 5.Select default prefix 176 | 177 | 6.Run regedit 178 | 179 | 7.Registry>Import registry file 180 | 181 | 8.Pick the file you've downloaded earlier (wine-dark-theme.reg) 182 | 183 | 9.You should now have dark theme working 184 | 185 | ### Special Thanks 186 | 187 | [Ardishco](https://github.com/raidenovich) 188 | 189 | ``` 190 | Deviaze 191 | 192 | Kemal 193 | 194 | Jacazimbo <3 195 | 196 | Kharoon 197 | 198 | Jediclank134 199 | ``` 200 | -------------------------------------------------------------------------------- /Patch/AffinityPatcherSettings/obj/project.assets.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": 3, 3 | "targets": { 4 | "net8.0": { 5 | "Mono.Cecil/0.11.5": { 6 | "type": "package", 7 | "compile": { 8 | "lib/netstandard2.0/Mono.Cecil.Mdb.dll": { 9 | "related": ".pdb" 10 | }, 11 | "lib/netstandard2.0/Mono.Cecil.Pdb.dll": { 12 | "related": ".pdb" 13 | }, 14 | "lib/netstandard2.0/Mono.Cecil.Rocks.dll": { 15 | "related": ".pdb" 16 | }, 17 | "lib/netstandard2.0/Mono.Cecil.dll": { 18 | "related": ".Mdb.pdb;.pdb;.Pdb.pdb;.Rocks.pdb" 19 | } 20 | }, 21 | "runtime": { 22 | "lib/netstandard2.0/Mono.Cecil.Mdb.dll": { 23 | "related": ".pdb" 24 | }, 25 | "lib/netstandard2.0/Mono.Cecil.Pdb.dll": { 26 | "related": ".pdb" 27 | }, 28 | "lib/netstandard2.0/Mono.Cecil.Rocks.dll": { 29 | "related": ".pdb" 30 | }, 31 | "lib/netstandard2.0/Mono.Cecil.dll": { 32 | "related": ".Mdb.pdb;.pdb;.Pdb.pdb;.Rocks.pdb" 33 | } 34 | } 35 | } 36 | } 37 | }, 38 | "libraries": { 39 | "Mono.Cecil/0.11.5": { 40 | "sha512": "fxfX+0JGTZ8YQeu1MYjbBiK2CYTSzDyEeIixt+yqKKTn7FW8rv7JMY70qevup4ZJfD7Kk/VG/jDzQQTpfch87g==", 41 | "type": "package", 42 | "path": "mono.cecil/0.11.5", 43 | "files": [ 44 | ".nupkg.metadata", 45 | ".signature.p7s", 46 | "lib/net40/Mono.Cecil.Mdb.dll", 47 | "lib/net40/Mono.Cecil.Mdb.pdb", 48 | "lib/net40/Mono.Cecil.Pdb.dll", 49 | "lib/net40/Mono.Cecil.Pdb.pdb", 50 | "lib/net40/Mono.Cecil.Rocks.dll", 51 | "lib/net40/Mono.Cecil.Rocks.pdb", 52 | "lib/net40/Mono.Cecil.dll", 53 | "lib/net40/Mono.Cecil.pdb", 54 | "lib/netstandard2.0/Mono.Cecil.Mdb.dll", 55 | "lib/netstandard2.0/Mono.Cecil.Mdb.pdb", 56 | "lib/netstandard2.0/Mono.Cecil.Pdb.dll", 57 | "lib/netstandard2.0/Mono.Cecil.Pdb.pdb", 58 | "lib/netstandard2.0/Mono.Cecil.Rocks.dll", 59 | "lib/netstandard2.0/Mono.Cecil.Rocks.pdb", 60 | "lib/netstandard2.0/Mono.Cecil.dll", 61 | "lib/netstandard2.0/Mono.Cecil.pdb", 62 | "mono.cecil.0.11.5.nupkg.sha512", 63 | "mono.cecil.nuspec" 64 | ] 65 | } 66 | }, 67 | "projectFileDependencyGroups": { 68 | "net8.0": [ 69 | "Mono.Cecil >= 0.11.5" 70 | ] 71 | }, 72 | "packageFolders": { 73 | "/home/matt/.nuget/packages/": {} 74 | }, 75 | "project": { 76 | "version": "1.0.0", 77 | "restore": { 78 | "projectUniqueName": "/home/matt/Documents/GitHub/AffinityOnLinux/Patch/AffinityPatcher.csproj", 79 | "projectName": "AffinityPatcher", 80 | "projectPath": "/home/matt/Documents/GitHub/AffinityOnLinux/Patch/AffinityPatcher.csproj", 81 | "packagesPath": "/home/matt/.nuget/packages/", 82 | "outputPath": "/home/matt/Documents/GitHub/AffinityOnLinux/Patch/obj/", 83 | "projectStyle": "PackageReference", 84 | "configFilePaths": [ 85 | "/home/matt/.nuget/NuGet/NuGet.Config" 86 | ], 87 | "originalTargetFrameworks": [ 88 | "net8.0" 89 | ], 90 | "sources": { 91 | "https://api.nuget.org/v3/index.json": {} 92 | }, 93 | "frameworks": { 94 | "net8.0": { 95 | "targetAlias": "net8.0", 96 | "projectReferences": {} 97 | } 98 | }, 99 | "warningProperties": { 100 | "warnAsError": [ 101 | "NU1605" 102 | ] 103 | } 104 | }, 105 | "frameworks": { 106 | "net8.0": { 107 | "targetAlias": "net8.0", 108 | "dependencies": { 109 | "Mono.Cecil": { 110 | "target": "Package", 111 | "version": "[0.11.5, )" 112 | } 113 | }, 114 | "imports": [ 115 | "net461", 116 | "net462", 117 | "net47", 118 | "net471", 119 | "net472", 120 | "net48", 121 | "net481" 122 | ], 123 | "assetTargetFallback": true, 124 | "warn": true, 125 | "frameworkReferences": { 126 | "Microsoft.NETCore.App": { 127 | "privateAssets": "all" 128 | } 129 | }, 130 | "runtimeIdentifierGraphPath": "/usr/lib64/dotnet/sdk/8.0.121/PortableRuntimeIdentifierGraph.json" 131 | } 132 | } 133 | } 134 | } -------------------------------------------------------------------------------- /docs/OpenCL-Guide.md: -------------------------------------------------------------------------------- 1 | # OpenCL Hardware Acceleration Guide 2 | 3 | This guide explains how to set up OpenCL hardware acceleration for Affinity applications on Linux. OpenCL enables GPU-accelerated processing for improved performance in Affinity Photo, Designer, and Publisher. 4 | 5 | ## Prerequisites 6 | 7 | - AffinityOnLinux installer has been run and Affinity applications are installed 8 | - Your GPU drivers are properly installed 9 | - You have administrator (sudo) access 10 | 11 | ## GPU Compatibility 12 | 13 | **NVIDIA GPUs:** ✅ OpenCL works well with proper driver installation. No known issues. 14 | 15 | **AMD GPUs:** ⚠️ OpenCL may have compatibility issues. If you experience problems, consider using vkd3d-proton or DXVK instead (see [Hardware Acceleration](HARDWARE-ACCELERATION.md)). 16 | 17 | **Intel GPUs:** ⚠️ OpenCL may have compatibility issues. If you experience problems, consider using vkd3d-proton or DXVK instead (see [Hardware Acceleration](HARDWARE-ACCELERATION.md)). 18 | 19 | ## Installation 20 | 21 | ### Step 1: Install OpenCL Drivers 22 | 23 | Install the appropriate OpenCL drivers for your GPU and distribution: 24 | 25 | #### Arch Linux (NVIDIA) 26 | 27 | ```bash 28 | sudo pacman -S opencl-nvidia 29 | ``` 30 | 31 | #### Arch Linux (AMD) 32 | 33 | ```bash 34 | sudo pacman -S opencl-amd apr apr-util 35 | yay -S libxcrypt-compat 36 | ``` 37 | 38 | #### Fedora/Nobara (AMD) 39 | 40 | ```bash 41 | sudo dnf install rocm-opencl apr apr-util zlib libxcrypt-compat libcurl libcurl-devel mesa-libGLU -y 42 | ``` 43 | 44 | ### Step 2: Verify OpenCL Installation 45 | 46 | After installing the drivers, verify that OpenCL is detected: 47 | 48 | ```bash 49 | # Check if OpenCL devices are available 50 | clinfo 51 | ``` 52 | 53 | If `clinfo` is not installed, you can install it: 54 | 55 | **Arch Linux:** 56 | ```bash 57 | sudo pacman -S clinfo 58 | ``` 59 | 60 | **Fedora/Nobara:** 61 | ```bash 62 | sudo dnf install clinfo 63 | ``` 64 | 65 | ### Step 3: Configure Affinity Applications 66 | 67 | The AffinityOnLinux installer automatically configures vkd3d-proton for OpenCL support. The necessary DLLs (`d3d12.dll` and `d3d12core.dll`) are automatically copied to each Affinity application directory during installation. 68 | 69 | ## Verification 70 | 71 | To verify that OpenCL is working in Affinity applications: 72 | 73 | 1. Launch any Affinity application (Photo, Designer, or Publisher) 74 | 2. Go to **Edit → Preferences → Performance** 75 | 3. Check the **Hardware Acceleration** section 76 | 4. You should see your GPU listed and OpenCL enabled 77 | 78 | ## Troubleshooting 79 | 80 | ### OpenCL Not Detected 81 | 82 | If OpenCL is not detected in Affinity applications: 83 | 84 | 1. Verify OpenCL drivers are installed correctly using `clinfo` 85 | 2. Ensure your GPU drivers are up to date 86 | 3. Try restarting your system after installing OpenCL drivers 87 | 4. Check that vkd3d-proton DLLs are present in the Affinity application directory: 88 | ```bash 89 | ls ~/.AffinityLinux/drive_c/Program\ Files/Affinity/*/d3d12*.dll 90 | ``` 91 | 92 | ### Performance Issues 93 | 94 | If you experience performance issues with OpenCL: 95 | 96 | - Consider using vkd3d-proton or DXVK instead (automatically configured by the installer) 97 | - Check GPU temperature and ensure adequate cooling 98 | - Verify that your GPU is not being throttled 99 | 100 | ### AMD/Intel GPU Issues 101 | 102 | If you have an AMD or Intel GPU and experience OpenCL issues: 103 | 104 | - We cannot provide support for AMD/Intel GPU OpenCL issues as we do not have access to these GPUs for testing 105 | - Use vkd3d-proton or DXVK instead, which are automatically configured by the installer 106 | - See [Hardware Acceleration](HARDWARE-ACCELERATION.md) for more information 107 | 108 | ## Alternative: Using Lutris 109 | 110 | If you prefer to use Lutris for managing Affinity applications: 111 | 112 | 1. Install vkd3d-proton through [ProtonPlus](https://github.com/Vysp3r/ProtonPlus) 113 | 2. Configure Lutris: 114 | - Open the application's configuration settings 115 | - Navigate to **Runner Options** 116 | - Select vkd3d-proton as the vkd3d version 117 | - Disable DXVK 118 | 3. Launch Affinity applications through Lutris 119 | 120 | ## Additional Resources 121 | 122 | - [Hardware Acceleration Guide](HARDWARE-ACCELERATION.md) - Overview of acceleration options 123 | - [Known Issues](Known-issues.md) - Common problems and solutions 124 | - [GitHub Issues](https://github.com/ryzendew/AffinityOnLinux/issues) - Report problems or ask questions 125 | -------------------------------------------------------------------------------- /docs/INSTALLATION.md: -------------------------------------------------------------------------------- 1 | # Installation Guide 2 | 3 | This guide covers all installation methods for AffinityOnLinux. 4 | 5 | ## Quick Start 6 | 7 | **New to Linux or want the easiest option?** Use the AppImage: 8 | 9 | 1. Download the AppImage from [GitHub Releases](https://github.com/ryzendew/AffinityOnLinux/releases/tag/Affinity-wine-10.10-Appimage) 10 | 2. Make it executable: `chmod +x Affinity-3-x86_64.AppImage` 11 | 3. Run it: `./Affinity-3-x86_64.AppImage` 12 | 13 | **Want full features and latest updates?** Use the Python GUI Installer: 14 | 15 | ```bash 16 | curl -sSL https://raw.githubusercontent.com/ryzendew/AffinityOnLinux/refs/heads/main/AffinityScripts/AffinityLinuxInstaller.py | python3 17 | ``` 18 | 19 | ## Installation Methods 20 | 21 | ### 1. AppImage (Recommended for Beginners) 22 | 23 | The AppImage is a portable, self-contained installer that works on most Linux distributions without requiring system-wide dependencies. 24 | 25 | **Best for:** 26 | - Users on unsupported distributions (Bazzite, Linux Mint, Zorin OS, Manjaro, Ubuntu, Pop!_OS) 27 | - Users who prefer not to install Python/PyQt6 system-wide 28 | - Quick testing or portable installations 29 | - Older CPUs (use AppImage v2 for best compatibility) 30 | 31 | **Features:** 32 | - ✅ No installation required - just download and run 33 | - ✅ Self-contained - includes all dependencies 34 | - ✅ DXVK support for excellent graphics performance 35 | - ✅ Full GUI installer functionality 36 | 37 | **Limitations:** 38 | - Does not include OpenCL/vkd3d support (use Python GUI installer for this) 39 | - Uses DXVK by default (which is recommended for most users) 40 | 41 | **CPU Compatibility:** AppImage v2 works on any CPU. Other versions may have issues on older CPUs. 42 | 43 | ### 2. Python GUI Installer (Recommended for Full Features) 44 | 45 | A modern graphical installer with comprehensive features and automatic dependency management. 46 | 47 | **Best for:** 48 | - Users on supported distributions 49 | - Users who need OpenCL/vkd3d support 50 | - Permanent installations 51 | - Users who want the latest features 52 | 53 | **Features:** 54 | - One-click full setup with automatic dependency installation 55 | - Multiple Wine versions to choose from 56 | - Wine version switching without reinstalling applications 57 | - Automatic WebView2 Runtime installation for Affinity v3 58 | - DPI scaling configuration 59 | - Comprehensive troubleshooting tools 60 | - Real-time status monitoring 61 | 62 | **Installation:** 63 | 64 | ```bash 65 | # Run directly from GitHub (recommended) 66 | curl -sSL https://raw.githubusercontent.com/ryzendew/AffinityOnLinux/refs/heads/main/AffinityScripts/AffinityLinuxInstaller.py | python3 67 | 68 | # Or download and run locally 69 | curl -sSL https://raw.githubusercontent.com/ryzendew/AffinityOnLinux/refs/heads/main/AffinityScripts/AffinityLinuxInstaller.py -o install.py && python3 install.py 70 | ``` 71 | 72 | **Dependencies:** The installer will attempt to install PyQt6 automatically if missing. For manual installation, see the [Python GUI Dependencies](#python-gui-dependencies) section below. 73 | 74 | **Usage:** 75 | 1. Run the installer 76 | 2. Click **"One-Click Full Setup"** for automatic configuration 77 | 3. Choose your Wine version (10.10 recommended for most systems) 78 | 4. Use **"Update Affinity Applications"** to install or update Affinity apps 79 | 5. Check the status log to see what's installed 80 | 81 | 📖 **Detailed Guide:** See the [GUI Installer Guide](../Guide/GUI-Installer-Guide.md) for step-by-step instructions. 82 | 83 | ### 3. Legacy Shell Scripts 84 | 85 | Command-line installers for users who prefer terminal-based installation. 86 | 87 | **Available Scripts:** 88 | - **All-in-One Installer** - Install any Affinity application 89 | - **Individual Installers** - Affinity Photo, Designer, Publisher, or v3 (Unified) 90 | - **Affinity Updater** - Update existing installations 91 | 92 | See the [Legacy Scripts Guide](LEGACY-SCRIPTS.md) for details. 93 | 94 | ## Python GUI Dependencies 95 | 96 | If the installer cannot automatically install PyQt6, install it manually: 97 | 98 | **Arch/CachyOS/EndeavourOS/XeroLinux:** 99 | ```bash 100 | sudo pacman -S python-pyqt6 101 | ``` 102 | 103 | **Fedora/Nobara:** 104 | ```bash 105 | sudo dnf install python3-pyqt6 106 | ``` 107 | 108 | **openSUSE (Tumbleweed/Leap):** 109 | ```bash 110 | sudo zypper install python313-PyQt6 111 | ``` 112 | 113 | **PikaOS:** Does not work with GUI installer. Use [AppImage](#1-appimage-recommended-for-beginners) instead. 114 | 115 | **Ubuntu 25.10:** If you encounter GUI issues, also install: 116 | ```bash 117 | sudo apt install python3-pyqt6.qtsvg 118 | ``` 119 | 120 | ## Supported Applications 121 | 122 | The installer supports all Affinity applications: 123 | 124 | - **Affinity Photo** - Professional photo editing 125 | - **Affinity Designer** - Vector graphic design 126 | - **Affinity Publisher** - Desktop publishing 127 | - **Affinity v3 (Unified)** - All-in-one application combining Photo, Designer, and Publisher 128 | 129 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # AffinityOnLinux 2 | 3 | > **⚠️ IMPORTANT: Before Opening Issues** 4 | > 5 | > **DO NOT open GitHub issues until you have:** 6 | > - Read this README completely 7 | > - Read all documentation pages (Installation Guide, Known Issues, System Requirements, etc.) 8 | > - Searched existing issues for similar problems 9 | > - Checked the [Known Issues](docs/Known-issues.md) page 10 | > 11 | > **Issues opened without reading the documentation will be closed immediately.** 12 | > 13 | > Please take the time to read through all the documentation - it contains answers to most common questions and problems. 14 | 15 | --- 16 | 17 | A comprehensive solution for running [Affinity software](https://www.affinity.studio/) on GNU/Linux systems using Wine with hardware acceleration support. 18 | 19 | Affinity Linux Installer 20 | 21 | ## What is This? 22 | 23 | AffinityOnLinux provides an easy way to install and run Affinity Photo, Designer, Publisher, and the unified Affinity v3 application on Linux. The installer automatically sets up Wine (a compatibility layer for running Windows applications) with all necessary configurations, dependencies, and optimizations. 24 | 25 | ## Quick Start 26 | 27 | **New to Linux or want the easiest option?** Use the AppImage: 28 | 29 | 1. Download the AppImage from [GitHub Releases](https://github.com/ryzendew/AffinityOnLinux/releases/tag/Affinity-wine-10.10-Appimage) 30 | 2. Make it executable: `chmod +x Affinity-3-x86_64.AppImage` 31 | 3. Run it: `./Affinity-3-x86_64.AppImage` 32 | 33 | **Want full features and latest updates?** Use the Python GUI Installer: 34 | 35 | ```bash 36 | curl -sSL https://raw.githubusercontent.com/ryzendew/AffinityOnLinux/refs/heads/main/AffinityScripts/AffinityLinuxInstaller.py | python3 37 | ``` 38 | 39 |
40 | Python GUI Dependencies 41 | 42 | The installer will attempt to install PyQt6 automatically if missing. If automatic installation fails, install it manually: 43 | 44 | **Arch/CachyOS/EndeavourOS/XeroLinux:** 45 | ```bash 46 | sudo pacman -S python-pyqt6 47 | ``` 48 | 49 | **Fedora/Nobara:** 50 | ```bash 51 | sudo dnf install python3-pyqt6 52 | ``` 53 | 54 | **openSUSE (Tumbleweed/Leap):** 55 | ```bash 56 | sudo zypper install python313-PyQt6 57 | ``` 58 | 59 | **PikaOS:** Does not work with GUI installer. Use AppImage instead. 60 | 61 | **Ubuntu 25.10:** If you encounter GUI issues, also install: 62 | ```bash 63 | sudo apt install python3-pyqt6.qtsvg 64 | ``` 65 | 66 |
67 | 68 | ## Documentation 69 | 70 | ### Getting Started 71 | - **[Installation Guide](docs/INSTALLATION.md)** - Complete installation instructions for all methods 72 | - **[System Requirements](docs/SYSTEM-REQUIREMENTS.md)** - Supported distributions and dependencies 73 | - **[GUI Installer Guide](Guide/GUI-Installer-Guide.md)** - Step-by-step GUI installer instructions 74 | 75 | ### Technical Details 76 | - **[Wine Versions](docs/WINE-VERSIONS.md)** - Available Wine versions and recommendations 77 | - **[Hardware Acceleration](docs/HARDWARE-ACCELERATION.md)** - GPU acceleration options (vkd3d-proton, DXVK, OpenCL) 78 | - **[OpenCL Guide](docs/OpenCL-Guide.md)** - Detailed OpenCL configuration 79 | - **[Legacy Scripts](docs/LEGACY-SCRIPTS.md)** - Command-line installation scripts 80 | 81 | ### Additional Resources 82 | - **[Known Issues](docs/Known-issues.md)** - Common problems and solutions 83 | - **[Settings Guide](Guide/Settings.md)** - Configuration options 84 | 85 | ## Getting Help 86 | 87 | - **Discord Community:** [Join our Discord server](https://discord.gg/DW2X8MHQuh) for support and discussions 88 | - **GitHub Issues:** Report bugs and request features on GitHub 89 | - **Documentation:** Check the guides and documentation linked above 90 | 91 | ## Important Notes 92 | 93 | ### Support Limitations 94 | 95 | - **AMD/Intel GPU Issues:** I cannot fix OpenCL or Wine GPU bugs for AMD/Intel GPUs as I do not have access to these GPUs for testing. Use vkd3d-proton or DXVK instead (see [Hardware Acceleration](docs/HARDWARE-ACCELERATION.md)). 96 | - **Unsupported Distributions:** No support provided for Bazzite, Linux Mint, Zorin OS, Manjaro, Ubuntu, or Pop!_OS. Use AppImage at your own risk (see [System Requirements](docs/SYSTEM-REQUIREMENTS.md)). 97 | - **PikaOS:** GUI installer does not work. Use AppImage instead. 98 | 99 | ### Wine 10.17 Warning 100 | 101 | Wine 10.17 has major bugs and issues. This installer does not use it. 102 | 103 | ## Contributing 104 | 105 | Contributions are welcome! See [docs/CONTRIBUTING.md](docs/CONTRIBUTING.md) for guidelines. 106 | 107 | ## License 108 | 109 | This project provides installation scripts and configurations for running Affinity software on Linux. Affinity software is a commercial product by Serif (Europe) Ltd. Please ensure you have a valid license before installing. 110 | 111 | --- 112 | 113 | **Disclaimer:** This project is not affiliated with, endorsed by, or associated with Serif (Europe) Ltd. All trademarks and registered trademarks are the property of their respective owners. 114 | -------------------------------------------------------------------------------- /docs/Known-issues.md: -------------------------------------------------------------------------------- 1 | # Known Issues ⚠️ 2 | 3 | This document lists known issues and their workarounds. For the latest updates, check the [GitHub Issues](https://github.com/ryzendew/AffinityOnLinux/issues) page. 4 | 5 | ## Application Crashes 6 | 7 | ### Crash After Affinity Window Appears 8 | **Issue:** Some users report that the application crashes immediately after the Affinity window is displayed. 9 | 10 | **Status:** Open ([#89](https://github.com/ryzendew/AffinityOnLinux/issues/89)) 11 | 12 | **Workaround:** 13 | - Try a different Wine version (9.14 recommended for older systems) 14 | - Check GPU drivers are up to date 15 | - Use vkd3d-proton or DXVK instead of OpenCL (see [Hardware Acceleration](HARDWARE-ACCELERATION.md)) 16 | 17 | ## Installation Issues 18 | 19 | ### GLIBC Version Error 20 | **Issue:** `wine: could not load ntdll.so: /lib/x86_64-linux-gnu/libc.so.6: version 'GLIBC_2.38' not found` 21 | 22 | **Workaround:** 23 | - Use the AppImage installer instead 24 | - Update your system's GLIBC (may require system upgrade) 25 | - Use a distribution with newer dependencies 26 | 27 | ### Wine mscoree.dll Error 28 | **Issue:** `wine: could not load mscoree.dll` 29 | 30 | **Workaround:** 31 | - Reinstall Wine using the GUI installer 32 | - Try a different Wine version 33 | - Use the guide method instead of scripts 34 | 35 | ### Sudo Authentication Failing on Fingerprint-Enabled Systems 36 | **Issue:** Sudo authentication fails when fingerprint authentication is enabled on the system. 37 | 38 | **Status:** Open ([#68](https://github.com/ryzendew/AffinityOnLinux/issues/68)) 39 | 40 | **Workaround:** 41 | - Temporarily disable fingerprint authentication during installation 42 | - Use `sudo -i` to get a root shell before running the installer 43 | - Configure sudo to use password authentication for the installer 44 | 45 | ## Distribution-Specific Issues 46 | 47 | ### Unsupported Distributions 48 | **Issue:** Bazzite, Linux Mint, Zorin OS, Manjaro, Ubuntu, Pop!_OS, and Debian are not officially supported. 49 | 50 | **Workaround:** Use the [AppImage installer](../INSTALLATION.md#1-appimage-recommended-for-beginners) instead. See [System Requirements](SYSTEM-REQUIREMENTS.md) for details. 51 | 52 | ### PikaOS GUI Installer Not Working 53 | **Issue:** The Python GUI installer does not work on PikaOS. 54 | 55 | **Workaround:** Use the [AppImage installer](../INSTALLATION.md#1-appimage-recommended-for-beginners) instead. 56 | 57 | ### Read-Only Filesystem Support (SteamOS, Silverblue, etc.) 58 | **Issue:** The installer may not work correctly on read-only filesystems like SteamOS or Silverblue. 59 | 60 | **Status:** Open ([#10](https://github.com/ryzendew/AffinityOnLinux/issues/10)) 61 | 62 | **Workaround:** 63 | - Use the AppImage installer 64 | - Install to a writable location (user home directory) 65 | - Use overlay filesystems if available 66 | 67 | ## Hardware Acceleration Issues 68 | 69 | ### AMD/Intel GPU OpenCL Issues 70 | **Issue:** OpenCL may not work correctly on AMD and Intel GPUs. 71 | 72 | **Workaround:** Use vkd3d-proton or DXVK instead of OpenCL. See [Hardware Acceleration](HARDWARE-ACCELERATION.md) for details. 73 | 74 | **Note:** We cannot fix AMD/Intel GPU OpenCL issues as we do not have access to these GPUs for testing. 75 | 76 | ## Application Features 77 | 78 | ### Microsoft Edge WebView2 Runtime Not Working 79 | **Issue:** The Microsoft Edge WebView2 Runtime is broken and does not work properly in Wine. This affects features in Affinity v3 that rely on WebView2, such as the Help system and some web-based dialogs. 80 | 81 | **Status:** Known limitation - cannot be fixed 82 | 83 | **Impact:** 84 | - Help system in Affinity v3 may not work 85 | - Some web-based dialogs may fail to load 86 | - Canva sign-in dialog may not function properly 87 | 88 | **Workaround:** 89 | - Use the application's built-in help files if available 90 | - Access documentation online instead of using in-app help 91 | - This is a Wine limitation and cannot be resolved until Wine improves WebView2 support 92 | 93 | **Note:** Do not open issues about WebView2 - this is a known limitation that cannot be fixed. 94 | 95 | ## Wine Version Issues 96 | 97 | ### Wine 10.17 Bugs 98 | **Issue:** Wine 10.17 has major bugs and issues. 99 | 100 | **Workaround:** The installer does not use Wine 10.17. Use Wine 10.10 (recommended) or 9.14 (legacy fallback). See [Wine Versions](WINE-VERSIONS.md) for details. 101 | 102 | ## Feature Requests 103 | 104 | ### Affinity Pen Path Fix 105 | **Status:** Open ([#53](https://github.com/ryzendew/AffinityOnLinux/issues/53)) 106 | 107 | Request to add Affinity pen path fix to the Wine runner. 108 | 109 | ### Alternate Wine Builds 110 | **Status:** Open ([#41](https://github.com/ryzendew/AffinityOnLinux/issues/41)) 111 | 112 | Discussion about using alternative Wine builds for improved compatibility. 113 | 114 | ## Getting Help 115 | 116 | If you encounter an issue not listed here: 117 | 118 | 1. Check the [GitHub Issues](https://github.com/ryzendew/AffinityOnLinux/issues) page to see if it's already reported 119 | 2. Search existing issues for similar problems 120 | 3. Join the [Discord Community](https://discord.gg/DW2X8MHQuh) for support 121 | 4. Create a new issue with detailed information about your system and the problem 122 | -------------------------------------------------------------------------------- /Patch/AffinityPatcherSettings/AffinityPatcher.cs: -------------------------------------------------------------------------------- 1 | using Mono.Cecil; 2 | using Mono.Cecil.Cil; 3 | 4 | internal class Program 5 | { 6 | private const int StartInstructionOffset = 0; // IL Offset of the first instruction to remove (start of the 'if' condition) 7 | private const int EndInstructionOffset = 63; // IL Offset of the last instruction to remove (end of the 'base.OnMainWindowLoaded' call) 8 | private const string AssemblyFileName = "Serif.Affinity.dll"; 9 | private const string TargetClass = "Serif.Affinity.Application"; 10 | private const string TargetMethod = "OnMainWindowLoaded"; 11 | 12 | public static void Main(string[] args) 13 | { 14 | if (args.Length != 1) 15 | { 16 | Console.WriteLine("Error: Please provide the full path to the Affinity DLL to patch."); 17 | Console.WriteLine($"Usage: dotnet AffinityPatcher.dll \"/path/to/{AssemblyFileName}\""); 18 | return; 19 | } 20 | 21 | string assemblyPath = args[0]; 22 | string backupPath = assemblyPath + ".bak"; 23 | 24 | if (!File.Exists(assemblyPath)) 25 | { 26 | Console.WriteLine($"Error: Assembly not found at {assemblyPath}"); 27 | return; 28 | } 29 | 30 | var fileInfo = new FileInfo(assemblyPath); 31 | if (fileInfo.Length == 0) 32 | { 33 | Console.WriteLine("Assembly file is empty. Attempting to restore from backup..."); 34 | if (File.Exists(backupPath)) 35 | { 36 | File.Copy(backupPath, assemblyPath, overwrite: true); 37 | Console.WriteLine("Restored from backup."); 38 | } 39 | else 40 | { 41 | Console.WriteLine("No backup available. Cannot proceed."); 42 | return; 43 | } 44 | } 45 | 46 | try 47 | { 48 | if (!File.Exists(backupPath)) 49 | { 50 | File.Copy(assemblyPath, backupPath); 51 | Console.WriteLine($"Created backup at: {backupPath}"); 52 | } 53 | } 54 | catch (Exception ex) 55 | { 56 | Console.WriteLine($"Error creating backup: {ex.Message}"); 57 | return; 58 | } 59 | 60 | AssemblyDefinition? assembly = null; 61 | try 62 | { 63 | var readerParameters = new ReaderParameters { ReadSymbols = false }; 64 | 65 | assembly = AssemblyDefinition.ReadAssembly(assemblyPath, readerParameters); 66 | 67 | var appType = assembly.MainModule.Types.FirstOrDefault(t => t.FullName.Contains(TargetClass)); 68 | var targetMethod = appType?.Methods.FirstOrDefault(m => m.Name == TargetMethod); 69 | 70 | if (targetMethod == null) 71 | { 72 | Console.WriteLine($"Error: Could not find method {TargetClass}.{TargetMethod}"); 73 | return; 74 | } 75 | 76 | ApplyNopPatch(targetMethod); 77 | 78 | string tempPath = assemblyPath + ".tmp"; 79 | try 80 | { 81 | assembly.Write(tempPath); 82 | File.Move(tempPath, assemblyPath, overwrite: true); 83 | Console.WriteLine($"\nSUCCESS: Patch applied to {TargetMethod} in {AssemblyFileName}."); 84 | Console.WriteLine("Affinity should now register window events on startup."); 85 | } 86 | catch (Exception writeEx) 87 | { 88 | Console.WriteLine($"Error writing assembly: {writeEx.Message}"); 89 | if (File.Exists(tempPath)) 90 | { 91 | File.Delete(tempPath); 92 | } 93 | throw; 94 | } 95 | } 96 | catch (Exception ex) 97 | { 98 | Console.WriteLine($"\nCRITICAL ERROR during patching: {ex.Message}"); 99 | Console.WriteLine("The original DLL was restored from backup (if created). Please correct the CIL offsets."); 100 | } 101 | finally 102 | { 103 | assembly?.Dispose(); 104 | } 105 | } 106 | 107 | private static void ApplyNopPatch(MethodDefinition method) 108 | { 109 | var instructions = method.Body.Instructions; 110 | 111 | var startInstruction = instructions.FirstOrDefault(i => i.Offset == StartInstructionOffset); 112 | var endInstruction = instructions.FirstOrDefault(i => i.Offset == EndInstructionOffset); 113 | 114 | if (startInstruction == null || endInstruction == null) 115 | { 116 | Console.WriteLine($"\nERROR: Could not find CIL instructions for offsets 0x{StartInstructionOffset:X4} or 0x{EndInstructionOffset:X4}."); 117 | Console.WriteLine("Please verify the CIL offsets in dnSpy and update the constants."); 118 | throw new InvalidOperationException("Invalid CIL offsets detected."); 119 | } 120 | 121 | int startIndex = instructions.IndexOf(startInstruction); 122 | int endIndex = instructions.IndexOf(endInstruction); 123 | 124 | if (endIndex < startIndex) 125 | { 126 | Console.WriteLine("\nERROR: End offset is before the start offset. Check your constants."); 127 | throw new InvalidOperationException("Invalid CIL instruction index range."); 128 | } 129 | 130 | for (int i = startIndex; i <= endIndex; i++) 131 | { 132 | Instruction currentInstruction = instructions[i]; 133 | 134 | currentInstruction.OpCode = OpCodes.Nop; 135 | currentInstruction.Operand = null; 136 | } 137 | } 138 | } -------------------------------------------------------------------------------- /docs/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | ## [2025-12-04] - Documentation Restructure and Updates 4 | 5 | ### Added 6 | 7 | #### Merged Pull Requests 8 | - **[#91](https://github.com/ryzendew/AffinityOnLinux/pull/91)** - Implement GPU detection and selection in installer for multi-GPU users 9 | - Added GPU detection functionality to help users with multiple GPUs select the correct one 10 | - Enhanced `AffinityLinuxInstaller.sh` with 212+ lines of GPU selection logic 11 | - Improves compatibility for laptops and systems with integrated + dedicated GPUs 12 | 13 | #### New Documentation Structure 14 | - **Created comprehensive documentation files** in new `docs/` folder 15 | - `INSTALLATION.md` - Complete installation guide for all methods 16 | - `SYSTEM-REQUIREMENTS.md` - Supported distributions and dependencies 17 | - `WINE-VERSIONS.md` - Wine version information and recommendations 18 | - `HARDWARE-ACCELERATION.md` - GPU acceleration options guide 19 | - `LEGACY-SCRIPTS.md` - Command-line installation scripts documentation 20 | - `CONTRIBUTING.md` - Contributing guidelines for the project 21 | 22 | #### Enhanced Documentation 23 | - **OpenCL Guide improvements** 24 | - Added Fedora/Nobara installation instructions for AMD GPUs 25 | - Added Arch Linux installation instructions for AMD GPUs 26 | - Complete rewrite with professional structure, verification steps, and troubleshooting 27 | - **Python GUI Dependencies section** in README 28 | - Added collapsible details section with installation commands for all supported distributions 29 | 30 | ### Changed 31 | 32 | #### Documentation Organization 33 | - **Major README restructure** 34 | - Separated detailed content into dedicated documentation files 35 | - Cleaner, more navigable structure with organized documentation links 36 | - Maintained quick start guide in README for easy access 37 | - **Wine version updates** 38 | - Updated supported Wine versions to 9.14 and 10.10 only 39 | - Removed references to 10.4, 10.4 v2, and 10.11 40 | - Updated all documentation to reflect current Wine version support 41 | - **Hardware Acceleration guide rewrite** 42 | - More natural, professional tone 43 | - Better organization and flow 44 | - Clearer explanations of vkd3d-proton, DXVK, and OpenCL options 45 | - **Known Issues comprehensive update** 46 | - Added all current GitHub issues (#89, #68, #53, #10, #41) 47 | - Organized by category (Application Crashes, Installation Issues, Distribution-Specific, etc.) 48 | - Added workarounds and links to GitHub issues 49 | - Better structure with clear sections 50 | 51 | ### Removed 52 | 53 | #### Deprecated Documentation 54 | - **Removed WARP.md** - Developer documentation file no longer needed 55 | - **Removed OtherSoftware-on-Linux.md** - Content no longer relevant 56 | - Removed references to deprecated files from README 57 | 58 | ### Fixed 59 | 60 | #### Merged Pull Requests 61 | - **[#90](https://github.com/ryzendew/AffinityOnLinux/pull/90)** - Fixed missing `fi` statement in shell script 62 | - Corrected syntax error in `AffinityLinuxInstaller.sh` that could cause script failures 63 | - Ensures proper script execution flow 64 | 65 | #### Documentation Accuracy 66 | - **Updated all cross-references** after file reorganization 67 | - Fixed relative paths in documentation files after moving to `docs/` folder 68 | - Updated Wine version references throughout all documentation files 69 | 70 | ### Technical Details 71 | 72 | #### Files Modified 73 | - `README.md` - Complete restructure with organized documentation links 74 | - `docs/INSTALLATION.md` - New comprehensive installation guide 75 | - `docs/SYSTEM-REQUIREMENTS.md` - New system requirements documentation 76 | - `docs/WINE-VERSIONS.md` - Updated Wine version information 77 | - `docs/HARDWARE-ACCELERATION.md` - Complete rewrite for better clarity 78 | - `docs/OpenCL-Guide.md` - Professional rewrite with new installation instructions 79 | - `docs/Known-issues.md` - Comprehensive update with current GitHub issues 80 | - `docs/LEGACY-SCRIPTS.md` - New documentation file 81 | - `docs/CONTRIBUTING.md` - New contributing guidelines 82 | 83 | #### Files Removed 84 | - `docs/WARP.md` - Deprecated developer documentation 85 | - `docs/OtherSoftware-on-Linux.md` - No longer relevant 86 | 87 | #### Statistics 88 | - **New documentation files**: 6 89 | - **Files removed**: 2 90 | - **Files restructured**: 8 91 | - **Documentation lines added**: ~500+ 92 | - **Documentation lines rewritten**: ~300+ 93 | 94 | --- 95 | 96 | ### Summary 97 | 98 | This update focused on improving documentation organization and accuracy: 99 | 100 | 1. **Better structure** - Separated long README into focused documentation files 101 | 2. **Cleaner organization** - All documentation now in dedicated `docs/` folder 102 | 3. **Updated information** - Wine versions, known issues, and installation instructions all current 103 | 4. **Professional presentation** - Rewritten guides with better clarity and natural tone 104 | 5. **Easier navigation** - Clear documentation links and organized sections 105 | 106 | All documentation now reflects current project state and provides better user guidance. 107 | 108 | --- 109 | 110 | ## [2025-11-06] - Development Session 111 | 112 | ### Added 113 | 114 | #### Enhanced Logging System 115 | - **Comprehensive logging implementation** in `AffinityLinuxInstaller.py` 116 | - Added extensive logging throughout the installer script 117 | - Improved error tracking and debugging capabilities 118 | - Enhanced user feedback during installation processes 119 | - 290+ lines of logging code added 120 | 121 | #### AMD GPU Support Enhancement 122 | - **New launch option for Affinity v3 without OpenCL** 123 | - Added dedicated button/option for AMD users experiencing OpenCL compatibility issues 124 | - Created `AffinityWine10.17.sh` script (1,631 lines) 125 | - Provides alternative launch method for better AMD GPU compatibility 126 | 127 | #### Funding and Sponsorship 128 | - **Added funding support options** 129 | - Implemented Ko-fi integration 130 | - Added custom sponsorship link support 131 | - Created `.github/FUNDING.yml` configuration file 132 | 133 | ### Fixed 134 | 135 | #### Font Rendering Issues 136 | - **Resolved font display problems** across all Affinity application launchers 137 | - Fixed font issues in `AffinityDesigner.sh` 138 | - Fixed font issues in `AffinityPhoto.sh` 139 | - Fixed font issues in `AffinityPublisher.sh` 140 | - Fixed font issues in `Affinityv3.sh` 141 | - Fixed font issues in `AffinityLinuxInstaller.py` 142 | - Fixed font issues in `AffinityLinuxInstaller.sh` 143 | - Improved font handling and rendering consistency 144 | 145 | ### Changed 146 | 147 | #### Documentation Updates 148 | - **README.md improvements** 149 | - Updated project image/reference 150 | - Enhanced documentation content and clarity 151 | - Multiple iterative improvements to documentation structure 152 | - 122+ lines of documentation updates 153 | 154 | #### Installer Enhancements 155 | - **Major installer script improvements** 156 | - Significant code refactoring and feature additions 157 | - Enhanced user experience and error handling 158 | - Improved installation workflow 159 | - 626+ lines of code changes in `AffinityLinuxInstaller.py` 160 | 161 | ### Technical Details 162 | 163 | #### Files Modified 164 | - `AffinityScripts/AffinityLinuxInstaller.py` - Major updates with logging and features 165 | - `AffinityScripts/AffinityWine10.17.sh` - New file for AMD OpenCL workaround 166 | - `AffinityScripts/AffinityDesigner.sh` - Font fixes 167 | - `AffinityScripts/AffinityPhoto.sh` - Font fixes 168 | - `AffinityScripts/AffinityPublisher.sh` - Font fixes 169 | - `AffinityScripts/Affinityv3.sh` - Font fixes 170 | - `AffinityScripts/AffinityLinuxInstaller.sh` - Font fixes 171 | - `README.md` - Documentation updates 172 | - `.github/FUNDING.yml` - New funding configuration 173 | 174 | #### Statistics 175 | - **Total commits**: 11 176 | - **Lines added**: ~2,000+ 177 | - **Lines modified**: ~100+ 178 | - **New files**: 2 179 | - **Files modified**: 7 180 | 181 | --- 182 | 183 | ### Summary 184 | 185 | This development session focused on improving the overall user experience and stability of the Affinity on Linux project. Key achievements include: 186 | 187 | 1. **Enhanced debugging capabilities** through comprehensive logging 188 | 2. **Better AMD GPU support** with dedicated OpenCL workaround 189 | 3. **Improved font rendering** across all application launchers 190 | 4. **Expanded funding options** for project sustainability 191 | 5. **Documentation improvements** for better user guidance 192 | 193 | All changes maintain backward compatibility while adding new features and fixing critical issues. 194 | 195 | 196 | -------------------------------------------------------------------------------- /AffinityScripts/AffinityUpdater.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Colors for output 4 | RED='\033[0;31m' 5 | GREEN='\033[0;32m' 6 | YELLOW='\033[1;33m' 7 | CYAN='\033[0;36m' 8 | BOLD='\033[1m' 9 | NC='\033[0m' # No Color 10 | 11 | ################################################################################ 12 | # Distribution Detection 13 | ################################################################################ 14 | 15 | # Function to detect Linux distribution 16 | detect_distro() { 17 | if [ -f /etc/os-release ]; then 18 | . /etc/os-release 19 | DISTRO=$ID 20 | VERSION=$VERSION_ID 21 | # Normalize "pika" to "pikaos" if detected 22 | if [ "$DISTRO" = "pika" ]; then 23 | DISTRO="pikaos" 24 | fi 25 | else 26 | echo -e "${RED}Error: Could not detect Linux distribution${NC}" 27 | exit 1 28 | fi 29 | } 30 | 31 | # Detect distribution 32 | detect_distro 33 | 34 | ################################################################################ 35 | # Distribution Warnings 36 | ################################################################################ 37 | 38 | # Check for unsupported distributions 39 | case $DISTRO in 40 | "ubuntu"|"linuxmint"|"zorin"|"bazzite") 41 | echo "" 42 | echo -e "${RED}${BOLD}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━${NC}" 43 | echo -e "${RED}${BOLD} ⚠️ WARNING: UNSUPPORTED DISTRIBUTION ⚠️${NC}" 44 | echo -e "${RED}${BOLD}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━${NC}" 45 | echo "" 46 | echo -e "${RED}${BOLD}YOU ARE ON YOUR OWN!${NC}" 47 | echo "" 48 | echo -e "${YELLOW}${BOLD}The distribution you are using ($DISTRO) is OUT OF DATE and the script${NC}" 49 | echo -e "${YELLOW}${BOLD}will NOT be built around it.${NC}" 50 | echo "" 51 | echo -e "${CYAN}${BOLD}For a modern, stable Linux experience with proper support, please consider${NC}" 52 | echo -e "${CYAN}${BOLD}switching to one of these recommended distributions:${NC}" 53 | echo "" 54 | echo -e "${GREEN} • PikaOS 4${NC}" 55 | echo -e "${GREEN} • CachyOS${NC}" 56 | echo -e "${GREEN} • Nobara${NC}" 57 | echo "" 58 | echo -e "${RED}${BOLD}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━${NC}" 59 | echo "" 60 | echo -e "${YELLOW}Continuing anyway (no support will be provided)...${NC}" 61 | echo "" 62 | sleep 2 63 | ;; 64 | "pikaos") 65 | echo "" 66 | echo -e "${YELLOW}${BOLD}⚠️ PikaOS Special Notice${NC}" 67 | echo "" 68 | echo -e "${CYAN}PikaOS's built-in Wine has compatibility issues with Affinity applications.${NC}" 69 | echo -e "${CYAN}If you haven't already, please replace it with WineHQ staging from Debian.${NC}" 70 | echo "" 71 | echo -e "${BOLD}If needed, run these commands to set up WineHQ staging:${NC}" 72 | echo "" 73 | echo -e "${GREEN}sudo mkdir -pm755 /etc/apt/keyrings${NC}" 74 | echo -e "${GREEN}wget -O - https://dl.winehq.org/wine-builds/winehq.key | sudo gpg --dearmor -o /etc/apt/keyrings/winehq-archive.key -${NC}" 75 | echo -e "${GREEN}sudo dpkg --add-architecture i386${NC}" 76 | echo -e "${GREEN}sudo wget -NP /etc/apt/sources.list.d/ https://dl.winehq.org/wine-builds/debian/dists/forky/winehq-forky.sources${NC}" 77 | echo -e "${GREEN}sudo apt update${NC}" 78 | echo -e "${GREEN}sudo apt install --install-recommends winehq-staging${NC}" 79 | echo "" 80 | sleep 2 81 | ;; 82 | esac 83 | 84 | # Function to normalize and validate file path 85 | normalize_path() { 86 | local path="$1" 87 | 88 | # Remove quotes and trim whitespace 89 | path=$(echo "$path" | tr -d '"' | xargs) 90 | 91 | # Handle file:// URLs (common when dragging from file managers) 92 | if [[ "$path" == file://* ]]; then 93 | path=$(echo "$path" | sed 's|^file://||') 94 | # URL decode the path 95 | path=$(printf '%b' "${path//%/\\x}") 96 | fi 97 | 98 | # Convert to absolute path if relative 99 | if [[ ! "$path" = /* ]]; then 100 | path="$(pwd)/$path" 101 | fi 102 | 103 | # Normalize path (remove . and .. components) 104 | path=$(realpath -q "$path" 2>/dev/null || echo "$path") 105 | 106 | echo "$path" 107 | } 108 | 109 | # Function to update Affinity app 110 | update_affinity() { 111 | local app_name=$1 112 | local directory="$HOME/.AffinityLinux" 113 | 114 | # Check if directory exists 115 | if [ ! -d "$directory" ]; then 116 | echo -e "${RED}Error: Affinity installation directory not found at $directory${NC}" 117 | echo -e "${YELLOW}Please run the installer script first (AffinityPhoto.sh, AffinityDesigner.sh, or AffinityPublisher.sh)${NC}" 118 | return 1 119 | fi 120 | 121 | # Check if Wine binary exists 122 | if [ ! -f "$directory/ElementalWarriorWine/bin/wine" ]; then 123 | echo -e "${RED}Error: Wine binary not found in $directory/ElementalWarriorWine/bin/wine${NC}" 124 | echo -e "${YELLOW}Please run the installer script first${NC}" 125 | return 1 126 | fi 127 | 128 | echo -e "${YELLOW}Please drag and drop the Affinity $app_name .exe installer into this terminal and press Enter:${NC}" 129 | read installer_path 130 | 131 | # Normalize the path 132 | installer_path=$(normalize_path "$installer_path") 133 | 134 | # Check if file exists and is readable 135 | if [ ! -f "$installer_path" ] || [ ! -r "$installer_path" ]; then 136 | echo -e "${RED}Invalid file path or file is not readable: $installer_path${NC}" 137 | return 1 138 | fi 139 | 140 | # Get the filename from the path and sanitize it (replace spaces) 141 | local filename=$(basename "$installer_path") 142 | # Replace spaces with dashes to avoid issues 143 | filename=$(echo "$filename" | tr ' ' '-') 144 | 145 | # Kill any running Wine processes before updating 146 | echo -e "${YELLOW}Stopping any running Wine processes...${NC}" 147 | wineserver -k 2>/dev/null || true 148 | 149 | # Copy installer to Affinity directory 150 | echo -e "${YELLOW}Copying installer...${NC}" 151 | cp "$installer_path" "$directory/$filename" 152 | 153 | # Run installer 154 | echo -e "${YELLOW}Running installer...${NC}" 155 | echo -e "${YELLOW}Click No if you get any errors. Press any key to continue.${NC}" 156 | read -n 1 157 | 158 | # Ensure Windows version is set to 11 159 | WINEPREFIX="$directory" "$directory/ElementalWarriorWine/bin/winecfg" -v win11 >/dev/null 2>&1 || true 160 | 161 | # Run installer with debug messages suppressed 162 | WINEPREFIX="$directory" WINEDEBUG=-all "$directory/ElementalWarriorWine/bin/wine" "$directory/$filename" 163 | 164 | # Clean up installer files 165 | echo -e "${YELLOW}Cleaning up installer files...${NC}" 166 | rm -f "$directory/$filename" 167 | rm -f "$directory"/affinity*.exe 168 | 169 | echo -e "${GREEN}Affinity $app_name update completed!${NC}" 170 | 171 | # Offer to update desktop entry 172 | echo -e "${YELLOW}Would you like to update the desktop entry? (y/n):${NC}" 173 | read -n 1 -r desktop_update 174 | echo 175 | if [[ $desktop_update =~ ^[Yy]$ ]]; then 176 | update_all_in_one 177 | fi 178 | } 179 | 180 | 181 | 182 | # Function to install Affinity (runs the installer script) 183 | install_affinity() { 184 | local script_dir="$(cd "$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")" && pwd)" 185 | local installer_script="$script_dir/AffinityLinuxInstaller.sh" 186 | 187 | if [ ! -f "$installer_script" ]; then 188 | echo -e "${RED}Error: Installer script not found at $installer_script${NC}" 189 | echo -e "${YELLOW}Please ensure AffinityLinuxInstaller.sh is in the same directory as this script${NC}" 190 | return 1 191 | fi 192 | 193 | # Make sure the installer script is executable 194 | chmod +x "$installer_script" 195 | 196 | echo -e "${YELLOW}Launching Affinity Installer...${NC}" 197 | echo -e "${YELLOW}Note: The installer will set up Wine and allow you to install or update Affinity applications${NC}" 198 | echo 199 | 200 | # Run the installer script 201 | bash "$installer_script" 202 | } 203 | 204 | # Main menu 205 | show_menu() { 206 | echo -e "${GREEN}Affinity Updater${NC}" 207 | echo "1. Update Affinity Photo" 208 | echo "2. Update Affinity Designer" 209 | echo "3. Update Affinity Publisher" 210 | echo "4. Update Affinity" 211 | echo "5. Exit" 212 | echo -n "Please select an option (1-5): " 213 | } 214 | 215 | # Main script 216 | while true; do 217 | show_menu 218 | read -r choice 219 | 220 | case $choice in 221 | 1) 222 | update_affinity "Photo" 223 | ;; 224 | 2) 225 | update_affinity "Designer" 226 | ;; 227 | 3) 228 | update_affinity "Publisher" 229 | ;; 230 | 4) 231 | install_affinity 232 | ;; 233 | 5) 234 | echo -e "${GREEN}Thank you for using the Affinity Updater!${NC}" 235 | exit 0 236 | ;; 237 | *) 238 | echo -e "${RED}Invalid option${NC}" 239 | ;; 240 | esac 241 | 242 | echo 243 | read -n 1 -s -r -p "Press any key to continue..." 244 | clear 245 | done -------------------------------------------------------------------------------- /Guide/GUI-Installer-Guide.md: -------------------------------------------------------------------------------- 1 | # Affinity Linux Installer - GUI Guide 2 | 3 | This guide explains how to use the Python GUI installer for Affinity software on Linux. The installer provides a user-friendly graphical interface to set up and install Affinity applications. 4 | 5 | ## Table of Contents 6 | 7 | 1. [Overview](#overview) 8 | 2. [Getting Started](#getting-started) 9 | 3. [Button Reference](#button-reference) 10 | 4. [Step-by-Step Workflows](#step-by-step-workflows) 11 | 5. [Understanding the Log Output](#understanding-the-log-output) 12 | 6. [Troubleshooting](#troubleshooting) 13 | 14 | --- 15 | 16 | ## Overview 17 | 18 | The GUI installer is a graphical application that helps you: 19 | - Set up Wine (a compatibility layer to run Windows software) 20 | - Install system dependencies automatically 21 | - Download and install Affinity applications 22 | - Configure hardware acceleration (OpenCL) 23 | - Manage and update your Affinity installations 24 | 25 | **The installer window has:** 26 | - **Button sections** on the left side (organized by function) 27 | - **Log output** on the right side (shows what's happening) 28 | - **Status information** at the bottom 29 | 30 | --- 31 | 32 | ## Getting Started 33 | 34 | ### Starting the Installer 35 | 36 | 1. Open a terminal 37 | 2. Navigate to the installer directory: 38 | ```bash 39 | cd ~/.config/AffinityOnLinux/AffinityScripts 40 | ``` 41 | 3. Run the Python installer: 42 | ```bash 43 | python3 AffinityLinuxInstaller.py 44 | ``` 45 | 46 | The GUI window will open. You'll see several button sections on the left and a log area on the right. 47 | 48 | --- 49 | 50 | ## Button Reference 51 | 52 | ### Quick Start Section 53 | 54 | #### **One-Click Full Setup** 55 | The easiest way to get started! This button does everything automatically: 56 | 1. Detects your Linux distribution 57 | 2. Checks and installs all required system packages 58 | 3. Downloads and sets up Wine 59 | 4. Installs Windows components (.NET, fonts, etc.) 60 | 5. Configures everything for Affinity 61 | 6. Asks if you want to install an Affinity app 62 | 63 | **When to use:** If this is your first time installing, or you want a fresh setup. 64 | 65 | **Time required:** 10-30 minutes (depends on internet speed) 66 | 67 | --- 68 | 69 | ### System Setup Section 70 | 71 | These buttons handle the setup process step-by-step. Use them if you prefer manual control or need to fix something. 72 | 73 | #### **Setup Wine Environment** 74 | Downloads and configures the custom Wine build needed to run Affinity software. 75 | 76 | **What it does:** 77 | - Downloads Wine binaries 78 | - Sets up the Wine environment in `~/.AffinityLinux` 79 | - Downloads and installs Windows metadata files 80 | - Sets up OpenCL support (vkd3d-proton) 81 | - Configures Wine for Windows 11 compatibility 82 | 83 | **When to use:** When you need Wine set up but don't want to do the full setup. 84 | 85 | **Time required:** 5-10 minutes 86 | 87 | #### **Install System Dependencies** 88 | Installs required Linux packages on your system (wine, winetricks, wget, curl, etc.). 89 | 90 | **What it does:** 91 | - Checks which packages are missing 92 | - Installs them using your distribution's package manager 93 | - Shows progress in the log 94 | 95 | **When to use:** If you get dependency errors or want to install packages manually. 96 | 97 | **Time required:** 1-5 minutes (may ask for your password) 98 | 99 | #### **Install Winetricks Dependencies** 100 | Installs Windows components needed by Affinity (like .NET Framework, fonts, Visual C++). 101 | 102 | **What it does:** 103 | - Installs .NET Framework 3.5 and 4.8 104 | - Installs Windows core fonts 105 | - Installs Visual C++ Redistributables 106 | - Installs MSXML libraries 107 | - Configures Vulkan renderer 108 | 109 | **When to use:** If Affinity complains about missing Windows components. 110 | 111 | **Time required:** 10-20 minutes 112 | 113 | #### **Reinstall WinMetadata** 114 | Re-downloads and installs Windows metadata files (may get corrupted during Affinity installation). 115 | 116 | **What it does:** 117 | - Removes old metadata files 118 | - Downloads fresh Windows metadata from archive.org 119 | - Extracts them to the Wine environment 120 | 121 | **When to use:** If you get errors about missing Windows components or metadata corruption. 122 | 123 | **Time required:** 2-5 minutes 124 | 125 | #### **Download Affinity Installer** 126 | Downloads the Affinity installer file to your computer. 127 | 128 | **What it does:** 129 | - Opens a file save dialog 130 | - Downloads `Affinity x64.exe` from Affinity Studio 131 | - Saves it where you choose (defaults to Downloads folder) 132 | - Shows download progress 133 | 134 | **When to use:** When you want to download the installer separately, or prepare it for later. 135 | 136 | **Time required:** 2-10 minutes (depends on internet speed) 137 | 138 | **Note:** You can use this downloaded file with "Install from File Manager" later. 139 | 140 | #### **Install from File Manager** 141 | Install any Windows program (.exe file) using the custom Wine setup. 142 | 143 | **What it does:** 144 | - Opens a file dialog to select an .exe file 145 | - Asks for the application name 146 | - Runs the installer through Wine 147 | - Creates a desktop entry for the app 148 | 149 | **When to use:** When you have an installer file already downloaded, or want to install non-Affinity software. 150 | 151 | --- 152 | 153 | ### Update Affinity Applications Section 154 | 155 | These buttons let you update existing Affinity installations. 156 | 157 | #### **Affinity (Unified)**, **Affinity Photo**, **Affinity Designer**, **Affinity Publisher** 158 | Updates the corresponding Affinity application to a newer version. 159 | 160 | **What it does:** 161 | - Asks you to select the new installer .exe file 162 | - Runs the installer (updates existing installation) 163 | - Reinstalls WinMetadata (to prevent corruption) 164 | - For Affinity v3 (Unified), reinstalls settings files 165 | 166 | **When to use:** When a new version of Affinity is released and you want to update. 167 | 168 | **Time required:** 5-15 minutes 169 | 170 | **Note:** These buttons only work if the application is already installed. If a button is disabled (grayed out), that app isn't installed yet. 171 | 172 | --- 173 | 174 | ### Troubleshooting Section 175 | 176 | These tools help fix common issues. 177 | 178 | #### **Open Wine Configuration** 179 | Opens the Wine configuration tool (winecfg) using your custom Wine setup. 180 | 181 | **What it does:** 182 | - Launches the Wine configuration GUI 183 | - Lets you adjust Wine settings, Windows version, graphics, etc. 184 | 185 | **When to use:** If you need to change Wine settings manually, troubleshoot graphics issues, or configure libraries. 186 | 187 | #### **Set Windows 11 + Renderer** 188 | Sets the Windows version to Windows 11 and configures the graphics renderer. 189 | 190 | **What it does:** 191 | - Sets Wine to Windows 11 mode 192 | - Lets you choose between Vulkan (recommended) or OpenGL renderer 193 | - Applies the configuration 194 | 195 | **When to use:** If OpenCL/hardware acceleration isn't working, or you're having graphics issues. 196 | 197 | **Renderer options:** 198 | - **Vulkan (Recommended)**: Better performance, enables OpenCL support 199 | - **OpenGL (Alternative)**: Fallback option if Vulkan doesn't work 200 | 201 | #### **Fix Settings** 202 | Installs Affinity v3 settings files to enable settings saving. 203 | 204 | **What it does:** 205 | - Downloads settings files from the repository 206 | - Copies them to the correct location in the Wine environment 207 | - Only works for Affinity v3 (Unified application) 208 | 209 | **When to use:** If Affinity v3 doesn't save your preferences/settings. 210 | 211 | **Note:** This only works for Affinity v3 (Unified). It won't help with Photo/Designer/Publisher v2. 212 | 213 | --- 214 | 215 | ### Other Section 216 | 217 | #### **Special Thanks** 218 | Shows credits for contributors to the project. 219 | 220 | #### **Exit** 221 | Closes the installer window. 222 | 223 | --- 224 | 225 | ## Step-by-Step Workflows 226 | 227 | ### Workflow 1: First-Time Installation (Easiest) 228 | 229 | **Goal:** Install Affinity for the first time with minimal steps. 230 | 231 | **Steps:** 232 | 1. Start the installer (see [Getting Started](#getting-started)) 233 | 2. Click **"One-Click Full Setup"** 234 | 3. Wait for the setup to complete (watch the log for progress) 235 | 4. When prompted, choose **"Yes"** to install an Affinity application 236 | 5. Select which app you want (e.g., "Affinity (Unified)") 237 | 6. Choose **"Download from Affinity Studio (automatic)"** and click OK 238 | 7. Wait for the download and installation 239 | 8. Done! Your app should appear in your application menu 240 | 241 | **Total time:** 15-40 minutes 242 | 243 | --- 244 | 245 | ### Workflow 2: Manual Step-by-Step Installation 246 | 247 | **Goal:** Install Affinity manually with full control over each step. 248 | 249 | **Steps:** 250 | 1. Start the installer 251 | 2. Click **"Install System Dependencies"** → Wait for completion 252 | 3. Click **"Setup Wine Environment"** → Wait for completion 253 | 4. Click **"Install Winetricks Dependencies"** → Wait for completion 254 | 5. Download the installer: 255 | - Option A: Click **"Download Affinity Installer"** → Choose save location → Wait 256 | - Option B: Download manually from https://downloads.affinity.studio/Affinity%20x64.exe 257 | 6. Click **"Install from File Manager"** → Select the downloaded .exe file → Enter app name 258 | 7. Follow the installer wizard that opens 259 | 8. Done! 260 | 261 | **Total time:** 20-45 minutes 262 | 263 | --- 264 | 265 | ### Workflow 3: Installing Affinity v3 (Unified) 266 | 267 | **Goal:** Install the new unified Affinity application. 268 | 269 | **Steps:** 270 | 1. Complete setup (use "One-Click Full Setup" or manual steps) 271 | 2. Click **"One-Click Full Setup"** and when prompted, select **"Affinity (Unified)"** 272 | - OR use **"Install from File Manager"** if you have the installer 273 | 3. Choose download or provide your own installer 274 | 4. After installation completes, click **"Fix Settings"** to enable settings saving 275 | 5. Done! Launch Affinity from your application menu 276 | 277 | **Note:** The unified app requires the settings fix to save preferences properly. 278 | 279 | --- 280 | 281 | ### Workflow 4: Updating an Existing Installation 282 | 283 | **Goal:** Update Affinity Photo/Designer/Publisher to a new version. 284 | 285 | **Steps:** 286 | 1. Download the new installer: 287 | - Click **"Download Affinity Installer"** → Save it 288 | - OR download manually from your Affinity account 289 | 2. Click the appropriate update button (e.g., **"Affinity Photo"**) 290 | 3. Select the new installer .exe file you downloaded 291 | 4. Wait for the update to complete 292 | 5. Done! Your app is updated 293 | 294 | **Note:** The update process preserves your existing settings and files. 295 | 296 | --- 297 | 298 | ### Workflow 5: Fixing Settings Issues (Affinity v3) 299 | 300 | **Goal:** Make Affinity v3 save your settings properly. 301 | 302 | **Steps:** 303 | 1. Make sure Affinity v3 is installed 304 | 2. Click **"Fix Settings"** 305 | 3. Wait for the settings files to install 306 | 4. Launch Affinity v3 and check if settings save 307 | 308 | **Note:** You may need to restart Affinity for changes to take effect. 309 | 310 | --- 311 | 312 | ### Workflow 6: Fixing OpenCL/Hardware Acceleration 313 | 314 | **Goal:** Enable GPU acceleration if it's not working. 315 | 316 | **Steps:** 317 | 1. Click **"Set Windows 11 + Renderer"** 318 | 2. Select **"Vulkan (Recommended - OpenCL support)"** 319 | 3. Click OK and wait for configuration 320 | 4. Restart Affinity and check: 321 | - Affinity → Preferences → Performance → Hardware Acceleration 322 | 323 | **Note:** If Vulkan doesn't work, try OpenGL as an alternative. 324 | 325 | --- 326 | 327 | ## Understanding the Log Output 328 | 329 | The log area on the right side of the window shows what's happening. Here's what different message types mean: 330 | 331 | ### Message Types 332 | 333 | - **[INFO]** - General information about what's happening 334 | - **[SUCCESS]** or **✓** - Something completed successfully 335 | - **[WARNING]** or **⚠** - Something went wrong but it's not critical 336 | - **[ERROR]** or **✗** - Something failed 337 | 338 | ### What to Look For 339 | 340 | **Good signs:** 341 | - Messages ending with "✓ ... installed" or "completed" 342 | - Progress percentages increasing 343 | - "Download completed" messages 344 | - "Installation completed" messages 345 | 346 | **Warning signs:** 347 | - Many "[WARNING]" messages (might be okay, but pay attention) 348 | - "Failed to..." messages 349 | - Errors that stop the process 350 | 351 | **Action required:** 352 | - If you see errors that stop installation, check the error message 353 | - Try running the failed step again 354 | - Check the [Troubleshooting](#troubleshooting) section 355 | 356 | ### Log Sections 357 | 358 | The log is divided by separator lines (━━━━━━━━━━━━━━━━). Each section represents a different operation (e.g., "Wine Binary Setup", "Affinity Photo Installation"). 359 | 360 | --- 361 | 362 | ## Troubleshooting 363 | 364 | ### Problem: "Wine is not set up yet" 365 | 366 | **Solution:** Click **"Setup Wine Environment"** first and wait for it to complete. 367 | 368 | --- 369 | 370 | ### Problem: "Missing dependencies" errors 371 | 372 | **Solution:** Click **"Install System Dependencies"**. If it fails, you may need to install packages manually using your package manager. 373 | 374 | --- 375 | 376 | ### Problem: Download fails or is slow 377 | 378 | **Solutions:** 379 | - Check your internet connection 380 | - Try clicking the download button again 381 | - Use **"Download Affinity Installer"** to download separately, then use **"Install from File Manager"** 382 | - Download manually from https://downloads.affinity.studio/Affinity%20x64.exe 383 | 384 | --- 385 | 386 | ### Problem: Installation wizard doesn't open 387 | 388 | **Solutions:** 389 | - Wait a few seconds (it may take time to start) 390 | - Check the log for errors 391 | - Make sure Wine is fully set up 392 | - Try running the installer again 393 | 394 | --- 395 | 396 | ### Problem: OpenCL/Hardware Acceleration not working 397 | 398 | **Solutions:** 399 | 1. Click **"Set Windows 11 + Renderer"** → Choose Vulkan 400 | 2. Make sure you have Vulkan drivers installed on your system 401 | 3. Check Affinity Preferences → Performance → Hardware Acceleration 402 | 4. If still not working, try OpenGL renderer 403 | 404 | --- 405 | 406 | ### Problem: Affinity v3 doesn't save settings 407 | 408 | **Solution:** Click **"Fix Settings"** to install the settings files. 409 | 410 | --- 411 | 412 | ### Problem: Update buttons are grayed out 413 | 414 | **Solution:** Those apps aren't installed yet. Install them first using **"One-Click Full Setup"** or **"Install from File Manager"**. 415 | 416 | --- 417 | 418 | ### Problem: "Permission denied" errors 419 | 420 | **Solutions:** 421 | - Some operations require your password (sudo) - enter it when prompted 422 | - Make sure you have write permissions in `~/.AffinityLinux` 423 | 424 | --- 425 | 426 | ### Problem: Installation hangs or freezes 427 | 428 | **Solutions:** 429 | - Wait 5-10 minutes (some operations take a long time) 430 | - Check the log - it should show progress 431 | - If truly frozen, close and restart the installer 432 | - Try the manual step-by-step workflow instead 433 | 434 | --- 435 | 436 | ### Problem: Application doesn't appear in menu after installation 437 | 438 | **Solutions:** 439 | - Refresh your application menu (log out and back in, or restart) 440 | - Check `~/.local/share/applications/` for desktop files 441 | - Try launching from terminal to see error messages 442 | 443 | --- 444 | 445 | ## Tips for Success 446 | 447 | 1. **Read the log:** The log tells you what's happening. Pay attention to it. 448 | 2. **Be patient:** Some operations take 10-20 minutes. Don't close the installer. 449 | 3. **Complete one step at a time:** Don't click multiple buttons simultaneously. 450 | 4. **Use "One-Click Full Setup" first:** It's the easiest way for beginners. 451 | 5. **Keep installer open:** Don't close the installer window until everything is done. 452 | 6. **Check requirements:** Make sure you're on a supported Linux distribution. 453 | 454 | --- 455 | 456 | ## Getting Help 457 | 458 | If you're still having issues: 459 | 1. Read the log output carefully - it often contains helpful error messages 460 | 2. Check that you're on a supported distribution 461 | 3. Make sure all dependencies are installed 462 | 4. Try the troubleshooting steps above 463 | 5. Check the main README.md for additional information 464 | 465 | --- 466 | 467 | ## Quick Reference Card 468 | 469 | | Button | When to Use | Time | 470 | |--------|-------------|------| 471 | | **One-Click Full Setup** | First time installation | 15-40 min | 472 | | **Setup Wine Environment** | Wine not set up | 5-10 min | 473 | | **Install System Dependencies** | Missing packages | 1-5 min | 474 | | **Install Winetricks Dependencies** | Missing Windows components | 10-20 min | 475 | | **Download Affinity Installer** | Want installer file | 2-10 min | 476 | | **Install from File Manager** | Have installer file | 5-15 min | 477 | | **Update [App Name]** | Update existing app | 5-15 min | 478 | | **Set Windows 11 + Renderer** | OpenCL not working | 1 min | 479 | | **Fix Settings** | Affinity v3 won't save settings | 2-5 min | 480 | 481 | --- 482 | 483 | **Last Updated:** This guide covers the GUI installer as of the latest version. 484 | 485 | -------------------------------------------------------------------------------- /AffinityScripts/AffinityPhoto.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ################################################################################ 4 | # Affinity Photo Installation Script for Linux 5 | # This script automates the installation of Affinity Photo on Linux 6 | # using Wine with OpenCL support enabled. 7 | ################################################################################ 8 | 9 | # Color codes for terminal output (if supported) 10 | if [ -t 1 ]; then 11 | RED='\033[0;31m' 12 | GREEN='\033[0;32m' 13 | YELLOW='\033[1;33m' 14 | BLUE='\033[0;34m' 15 | CYAN='\033[0;36m' 16 | BOLD='\033[1m' 17 | NC='\033[0m' # No Color 18 | else 19 | RED='' 20 | GREEN='' 21 | YELLOW='' 22 | BLUE='' 23 | CYAN='' 24 | BOLD='' 25 | NC='' 26 | fi 27 | 28 | # Helper functions for formatted output 29 | print_header() { 30 | echo "" 31 | echo -e "${CYAN}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━${NC}" 32 | echo -e "${BOLD}${CYAN}$1${NC}" 33 | echo -e "${CYAN}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━${NC}" 34 | echo "" 35 | } 36 | 37 | print_step() { 38 | echo -e "${BLUE}[STEP]${NC} $1" 39 | } 40 | 41 | print_info() { 42 | echo -e "${CYAN}[INFO]${NC} $1" 43 | } 44 | 45 | print_success() { 46 | echo -e "${GREEN}[✓]${NC} $1" 47 | } 48 | 49 | print_warning() { 50 | echo -e "${YELLOW}[WARNING]${NC} $1" 51 | } 52 | 53 | print_error() { 54 | echo -e "${RED}[ERROR]${NC} $1" 55 | } 56 | 57 | print_progress() { 58 | echo -e "${GREEN} →${NC} $1" 59 | } 60 | 61 | ################################################################################ 62 | # Distribution Detection 63 | ################################################################################ 64 | 65 | # Function to detect Linux distribution 66 | detect_distro() { 67 | if [ -f /etc/os-release ]; then 68 | . /etc/os-release 69 | DISTRO=$ID 70 | VERSION=$VERSION_ID 71 | # Normalize "pika" to "pikaos" if detected 72 | if [ "$DISTRO" = "pika" ]; then 73 | DISTRO="pikaos" 74 | fi 75 | else 76 | print_error "Could not detect Linux distribution" 77 | exit 1 78 | fi 79 | } 80 | 81 | # Detect distribution 82 | detect_distro 83 | 84 | ################################################################################ 85 | # Distribution Warnings 86 | ################################################################################ 87 | 88 | # Check for unsupported distributions 89 | case $DISTRO in 90 | "ubuntu"|"linuxmint"|"zorin"|"bazzite") 91 | print_header "" 92 | echo "" 93 | echo -e "${RED}${BOLD}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━${NC}" 94 | echo -e "${RED}${BOLD} ⚠️ WARNING: UNSUPPORTED DISTRIBUTION ⚠️${NC}" 95 | echo -e "${RED}${BOLD}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━${NC}" 96 | echo "" 97 | echo -e "${RED}${BOLD}YOU ARE ON YOUR OWN!${NC}" 98 | echo "" 99 | echo -e "${YELLOW}${BOLD}The distribution you are using ($DISTRO) is OUT OF DATE and the script${NC}" 100 | echo -e "${YELLOW}${BOLD}will NOT be built around it.${NC}" 101 | echo "" 102 | echo -e "${CYAN}${BOLD}For a modern, stable Linux experience with proper support, please consider${NC}" 103 | echo -e "${CYAN}${BOLD}switching to one of these recommended distributions:${NC}" 104 | echo "" 105 | echo -e "${GREEN} • PikaOS 4${NC}" 106 | echo -e "${GREEN} • CachyOS${NC}" 107 | echo -e "${GREEN} • Nobara${NC}" 108 | echo "" 109 | echo -e "${RED}${BOLD}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━${NC}" 110 | echo "" 111 | ;; 112 | "pikaos") 113 | print_header "PikaOS Special Notice" 114 | echo "" 115 | echo -e "${YELLOW}${BOLD}⚠️ IMPORTANT: PikaOS Wine Configuration Required${NC}" 116 | echo "" 117 | echo -e "${CYAN}PikaOS's built-in Wine has compatibility issues with Affinity applications.${NC}" 118 | echo -e "${CYAN}You must replace it with WineHQ staging from Debian before continuing.${NC}" 119 | echo "" 120 | echo -e "${BOLD}Please run these commands manually to set up WineHQ staging:${NC}" 121 | echo "" 122 | echo -e "${GREEN}sudo mkdir -pm755 /etc/apt/keyrings${NC}" 123 | echo "" 124 | echo -e "${GREEN}wget -O - https://dl.winehq.org/wine-builds/winehq.key | sudo gpg --dearmor -o /etc/apt/keyrings/winehq-archive.key -${NC}" 125 | echo "" 126 | echo -e "${GREEN}sudo dpkg --add-architecture i386${NC}" 127 | echo "" 128 | echo -e "${GREEN}sudo wget -NP /etc/apt/sources.list.d/ https://dl.winehq.org/wine-builds/debian/dists/forky/winehq-forky.sources${NC}" 129 | echo "" 130 | echo -e "${GREEN}sudo apt update${NC}" 131 | echo "" 132 | echo -e "${GREEN}sudo apt install --install-recommends winehq-staging${NC}" 133 | echo "" 134 | echo -e "${YELLOW}Press any key to continue after completing the WineHQ staging installation...${NC}" 135 | read -n 1 -s 136 | echo "" 137 | echo "" 138 | ;; 139 | esac 140 | 141 | ################################################################################ 142 | # SECTION 1: Dependency Verification 143 | ################################################################################ 144 | 145 | print_header "Dependency Verification" 146 | print_info "Checking for required system dependencies..." 147 | 148 | missing_deps="" 149 | 150 | check_dependency() { 151 | print_progress "Checking for $1..." 152 | if ! command -v "$1" &> /dev/null; then 153 | missing_deps+="$1 " 154 | print_error "$1 is not installed" 155 | return 1 156 | else 157 | print_success "$1 is installed" 158 | return 0 159 | fi 160 | } 161 | 162 | check_dependency "wine" 163 | check_dependency "winetricks" 164 | check_dependency "wget" 165 | check_dependency "curl" 166 | # Check for either 7z or unzip (both can extract archives) 167 | if ! command -v 7z &> /dev/null && ! command -v unzip &> /dev/null; then 168 | missing_deps+="7z or unzip " 169 | print_error "Neither 7z nor unzip is installed (at least one is required)" 170 | else 171 | if command -v 7z &> /dev/null; then 172 | print_success "7z is installed" 173 | else 174 | print_success "unzip is installed (will be used instead of 7z)" 175 | fi 176 | fi 177 | check_dependency "tar" 178 | 179 | if [ -n "$missing_deps" ]; then 180 | print_error "Missing required dependencies: ${missing_deps}" 181 | echo "" 182 | case $DISTRO in 183 | "ubuntu"|"linuxmint"|"zorin"|"bazzite") 184 | echo -e "${RED}${BOLD}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━${NC}" 185 | echo -e "${RED}${BOLD} ⚠️ WARNING: UNSUPPORTED DISTRIBUTION ⚠️${NC}" 186 | echo -e "${RED}${BOLD}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━${NC}" 187 | echo "" 188 | echo -e "${YELLOW}${BOLD}This script will NOT automatically install dependencies for unsupported distributions.${NC}" 189 | echo -e "${YELLOW}Please install the required dependencies manually:${NC}" 190 | echo -e "${CYAN} wine winetricks wget curl p7zip-full tar${NC}" 191 | echo "" 192 | while true; do 193 | echo -e "${YELLOW}Press Enter to check dependencies again, or 'q' to exit:${NC}" 194 | read -r response 195 | if [ "$response" = "q" ] || [ "$response" = "Q" ]; then 196 | echo -e "${RED}${BOLD}Exiting...${NC}" 197 | exit 1 198 | fi 199 | # Re-check dependencies 200 | missing_deps="" 201 | check_dependency "wine" 202 | check_dependency "winetricks" 203 | check_dependency "wget" 204 | check_dependency "curl" 205 | if ! command -v 7z &> /dev/null && ! command -v unzip &> /dev/null; then 206 | missing_deps+="7z or unzip " 207 | fi 208 | check_dependency "tar" 209 | if [ -z "$missing_deps" ]; then 210 | print_success "All dependencies are now installed!" 211 | break 212 | else 213 | print_error "Still missing: ${missing_deps}" 214 | fi 215 | done 216 | ;; 217 | *) 218 | print_info "Please install the missing dependencies and rerun this script." 219 | print_info "Example for Arch-based systems: sudo pacman -S wine winetricks wget curl p7zip tar" 220 | exit 1 221 | ;; 222 | esac 223 | fi 224 | 225 | print_success "All required dependencies are installed!" 226 | case $DISTRO in 227 | "ubuntu"|"linuxmint"|"zorin"|"bazzite") 228 | echo "" 229 | echo -e "${YELLOW}${BOLD}Continuing despite unsupported distribution. No support will be provided if issues arise.${NC}" 230 | ;; 231 | esac 232 | echo "" 233 | sleep 1 234 | 235 | ################################################################################ 236 | # SECTION 2: Environment Setup 237 | ################################################################################ 238 | 239 | print_header "Environment Setup" 240 | print_info "Preparing installation environment..." 241 | 242 | directory="$HOME/.AffinityLinux" 243 | wine_url="https://github.com/seapear/AffinityOnLinux/releases/download/Legacy/ElementalWarriorWine-x86_64.tar.gz" 244 | filename="ElementalWarriorWine-x86_64.tar.gz" 245 | 246 | print_step "Stopping any running Wine processes..." 247 | wineserver -k 2>/dev/null || true 248 | print_success "Wine processes stopped" 249 | 250 | print_step "Creating installation directory: $directory" 251 | mkdir -p "$directory" 252 | print_success "Installation directory created" 253 | 254 | ################################################################################ 255 | # SECTION 3: Wine Binary Download and Extraction 256 | ################################################################################ 257 | 258 | print_header "Wine Binary Setup" 259 | print_info "Downloading and configuring the custom Wine build (ElementalWarriorWine)..." 260 | 261 | print_step "Downloading Wine binary from GitHub releases..." 262 | if wget -q --show-progress "$wine_url" -O "$directory/$filename"; then 263 | print_success "Wine binary downloaded successfully" 264 | else 265 | print_error "Failed to download Wine binary" 266 | exit 1 267 | fi 268 | 269 | print_step "Extracting Wine binary archive..." 270 | if tar -xzf "$directory/$filename" -C "$directory" 2>/dev/null; then 271 | print_success "Wine binary extracted successfully" 272 | else 273 | print_error "Failed to extract Wine binary archive" 274 | exit 1 275 | fi 276 | 277 | print_step "Locating Wine installation directory..." 278 | wine_dir=$(find "$directory" -name "ElementalWarriorWine*" -type d | head -1) 279 | if [ -n "$wine_dir" ] && [ "$wine_dir" != "$directory/ElementalWarriorWine" ]; then 280 | print_info "Creating symlink for Wine directory..." 281 | ln -sf "$wine_dir" "$directory/ElementalWarriorWine" 282 | print_success "Symlink created: $directory/ElementalWarriorWine" 283 | fi 284 | 285 | print_step "Verifying Wine binary exists..." 286 | if [ ! -f "$directory/ElementalWarriorWine/bin/wine" ]; then 287 | print_error "Wine binary not found at expected location" 288 | print_info "Checking directory structure..." 289 | echo "Contents of $directory:" 290 | ls -la "$directory" || true 291 | if [ -n "$wine_dir" ]; then 292 | echo "Contents of $wine_dir:" 293 | ls -la "$wine_dir" || true 294 | fi 295 | exit 1 296 | fi 297 | print_success "Wine binary verified: $directory/ElementalWarriorWine/bin/wine" 298 | 299 | print_step "Cleaning up downloaded archive..." 300 | rm -f "$directory/$filename" 301 | print_success "Archive file removed" 302 | 303 | ################################################################################ 304 | # SECTION 4: Additional Resources Download 305 | ################################################################################ 306 | 307 | print_header "Downloading Additional Resources" 308 | print_info "Fetching Windows metadata and application icons..." 309 | 310 | print_step "Downloading Windows metadata files..." 311 | if wget -q --show-progress "https://archive.org/download/win-metadata/WinMetadata.zip" -O "$directory/Winmetadata.zip"; then 312 | print_success "Windows metadata downloaded" 313 | else 314 | print_warning "Failed to download Windows metadata (this may cause minor issues)" 315 | fi 316 | 317 | print_step "Downloading Affinity Photo icon..." 318 | mkdir -p "/home/$USER/.local/share/icons" 319 | if wget -q "https://upload.wikimedia.org/wikipedia/commons/f/f5/Affinity_Photo_V2_icon.svg" -O "/home/$USER/.local/share/icons/AffinityPhoto.svg"; then 320 | print_success "Icon downloaded to ~/.local/share/icons/AffinityPhoto.svg" 321 | else 322 | print_warning "Could not download icon file (will continue without it)" 323 | fi 324 | 325 | ################################################################################ 326 | # SECTION 5: Wine Configuration and Dependencies 327 | ################################################################################ 328 | 329 | print_header "Wine Configuration" 330 | print_info "Installing required Windows libraries and configuring Wine..." 331 | 332 | print_step "Installing .NET Framework 3.5..." 333 | WINEPREFIX="$directory" winetricks --unattended dotnet35 >/dev/null 2>&1 || true 334 | print_progress ".NET 3.5 installation attempted" 335 | 336 | print_step "Installing .NET Framework 4.8..." 337 | WINEPREFIX="$directory" winetricks --unattended dotnet48 >/dev/null 2>&1 || true 338 | print_progress ".NET 4.8 installation attempted" 339 | 340 | print_step "Installing Windows core fonts..." 341 | WINEPREFIX="$directory" winetricks --unattended corefonts >/dev/null 2>&1 || true 342 | print_progress "Core fonts installation attempted" 343 | 344 | print_step "Installing Visual C++ Redistributables 2022..." 345 | WINEPREFIX="$directory" winetricks --unattended vcrun2022 >/dev/null 2>&1 || true 346 | print_progress "VC++ 2022 installation attempted" 347 | 348 | print_step "Installing MSXML 3.0..." 349 | WINEPREFIX="$directory" winetricks --unattended msxml3 >/dev/null 2>&1 || true 350 | print_progress "MSXML 3.0 installation attempted" 351 | 352 | print_step "Installing MSXML 6.0..." 353 | WINEPREFIX="$directory" winetricks --unattended msxml6 >/dev/null 2>&1 || true 354 | print_progress "MSXML 6.0 installation attempted" 355 | 356 | print_step "Installing Tahoma font..." 357 | WINEPREFIX="$directory" winetricks --unattended tahoma >/dev/null 2>&1 || true 358 | print_progress "Tahoma font installation attempted" 359 | 360 | print_step "Configuring Wine to use Vulkan renderer..." 361 | WINEPREFIX="$directory" winetricks renderer=vulkan >/dev/null 2>&1 || true 362 | print_success "Wine configured with Vulkan renderer" 363 | 364 | print_info "Note: The above installations may take several minutes. Errors are normal if components are already installed." 365 | 366 | ################################################################################ 367 | # SECTION 6: Windows Metadata Extraction 368 | ################################################################################ 369 | 370 | print_header "Windows Metadata Installation" 371 | print_info "Extracting Windows metadata files to system32 directory..." 372 | 373 | mkdir -p "$directory/drive_c/windows/system32" 374 | 375 | if [ -f "$directory/Winmetadata.zip" ]; then 376 | print_step "Extracting Windows metadata archive..." 377 | 378 | if command -v 7z &> /dev/null; then 379 | if 7z x "$directory/Winmetadata.zip" -o"$directory/drive_c/windows/system32" -y >/dev/null 2>&1; then 380 | print_success "Windows metadata extracted successfully using 7z" 381 | else 382 | print_warning "7z extraction had issues, trying unzip..." 383 | unzip -o "$directory/Winmetadata.zip" -d "$directory/drive_c/windows/system32" >/dev/null 2>&1 || true 384 | print_success "Windows metadata extracted using unzip" 385 | fi 386 | elif command -v unzip &> /dev/null; then 387 | if unzip -o "$directory/Winmetadata.zip" -d "$directory/drive_c/windows/system32" >/dev/null 2>&1; then 388 | print_success "Windows metadata extracted successfully using unzip" 389 | else 390 | print_error "Failed to extract Windows metadata" 391 | fi 392 | else 393 | print_error "Neither 7z nor unzip is available to extract Windows metadata" 394 | print_info "Please install either 7z or unzip and rerun the script" 395 | fi 396 | 397 | print_step "Cleaning up metadata archive..." 398 | rm -f "$directory/Winmetadata.zip" 399 | print_success "Archive removed" 400 | else 401 | print_warning "WinMetadata.zip was not downloaded successfully" 402 | fi 403 | 404 | ################################################################################ 405 | # SECTION 7: vkd3d-proton Installation for OpenCL Support 406 | ################################################################################ 407 | 408 | print_header "OpenCL Support Setup" 409 | print_info "Installing vkd3d-proton for hardware acceleration and OpenCL support..." 410 | print_info "This enables GPU acceleration features in Affinity Photo" 411 | 412 | print_step "Downloading vkd3d-proton v2.14.1 from GitHub..." 413 | vkd3d_url="https://github.com/HansKristian-Work/vkd3d-proton/releases/download/v2.14.1/vkd3d-proton-2.14.1.tar.zst" 414 | if wget -q --show-progress "$vkd3d_url" -O "$directory/vkd3d-proton-2.14.1.tar.zst"; then 415 | print_success "vkd3d-proton downloaded successfully" 416 | else 417 | print_error "Failed to download vkd3d-proton" 418 | print_warning "OpenCL support may not work correctly" 419 | fi 420 | 421 | print_step "Extracting vkd3d-proton archive..." 422 | extracted=false 423 | if command -v unzstd &> /dev/null; then 424 | if unzstd -f "$directory/vkd3d-proton-2.14.1.tar.zst" -o "$directory/vkd3d-proton.tar" 2>/dev/null; then 425 | if tar -xf "$directory/vkd3d-proton.tar" -C "$directory" 2>/dev/null; then 426 | rm "$directory/vkd3d-proton.tar" 427 | extracted=true 428 | print_success "vkd3d-proton extracted using unzstd" 429 | fi 430 | fi 431 | elif command -v zstd &> /dev/null && tar --help 2>&1 | grep -q "use-compress-program"; then 432 | if tar --use-compress-program=zstd -xf "$directory/vkd3d-proton-2.14.1.tar.zst" -C "$directory" 2>/dev/null; then 433 | extracted=true 434 | print_success "vkd3d-proton extracted using zstd with tar" 435 | fi 436 | fi 437 | 438 | if [ "$extracted" = false ]; then 439 | print_error "Cannot extract .tar.zst file. Please install zstd (e.g., sudo pacman -S zstd)" 440 | print_warning "Skipping vkd3d-proton installation. OpenCL will not work!" 441 | rm -f "$directory/vkd3d-proton-2.14.1.tar.zst" 442 | fi 443 | 444 | rm -f "$directory/vkd3d-proton-2.14.1.tar.zst" 445 | 446 | print_step "Installing vkd3d-proton DLLs to Wine library directory..." 447 | vkd3d_dir=$(find "$directory" -type d -name "vkd3d-proton-*" | head -1) 448 | if [ -n "$vkd3d_dir" ]; then 449 | wine_lib_dir="$directory/ElementalWarriorWine/lib/wine/vkd3d-proton/x86_64-windows" 450 | mkdir -p "$wine_lib_dir" 451 | 452 | dll_count=0 453 | if [ -f "$vkd3d_dir/x64/d3d12.dll" ]; then 454 | cp "$vkd3d_dir/x64/d3d12.dll" "$wine_lib_dir/" 2>/dev/null && ((dll_count++)) 455 | elif [ -f "$vkd3d_dir/d3d12.dll" ]; then 456 | cp "$vkd3d_dir/d3d12.dll" "$wine_lib_dir/" 2>/dev/null && ((dll_count++)) 457 | fi 458 | 459 | if [ -f "$vkd3d_dir/x64/d3d12core.dll" ]; then 460 | cp "$vkd3d_dir/x64/d3d12core.dll" "$wine_lib_dir/" 2>/dev/null && ((dll_count++)) 461 | elif [ -f "$vkd3d_dir/d3d12core.dll" ]; then 462 | cp "$vkd3d_dir/d3d12core.dll" "$wine_lib_dir/" 2>/dev/null && ((dll_count++)) 463 | fi 464 | 465 | if [ -f "$vkd3d_dir/x64/dxgi.dll" ]; then 466 | cp "$vkd3d_dir/x64/dxgi.dll" "$wine_lib_dir/" 2>/dev/null && ((dll_count++)) 467 | elif [ -f "$vkd3d_dir/dxgi.dll" ]; then 468 | cp "$vkd3d_dir/dxgi.dll" "$wine_lib_dir/" 2>/dev/null && ((dll_count++)) 469 | fi 470 | 471 | if [ $dll_count -gt 0 ]; then 472 | print_success "Installed $dll_count DLL file(s) to Wine library directory" 473 | else 474 | print_warning "No DLL files were found or copied" 475 | fi 476 | 477 | print_step "Cleaning up extracted vkd3d-proton directory..." 478 | rm -rf "$vkd3d_dir" 479 | print_success "vkd3d-proton setup completed" 480 | else 481 | print_warning "Could not locate vkd3d-proton directory after extraction" 482 | fi 483 | 484 | ################################################################################ 485 | # SECTION 8: Affinity Photo Installation 486 | ################################################################################ 487 | 488 | print_header "Affinity Photo Installation" 489 | print_info "You will now install Affinity Photo using its Windows installer You Already Downloaded Before!" 490 | print_step "Once downloaded, place the .exe file in:" 491 | echo -e " ${CYAN}$directory${NC}" 492 | echo "" 493 | print_info "Press any key when the installer file is ready..." 494 | read -n 1 -s 495 | echo "" 496 | 497 | # Verify .exe exists 498 | if ! ls "$directory"/*.exe 1> /dev/null 2>&1; then 499 | print_error "No .exe file found in $directory" 500 | print_info "Please ensure the Affinity Photo installer is in the correct location and rerun this script" 501 | exit 1 502 | fi 503 | 504 | print_success "Installer file detected" 505 | echo "" 506 | print_warning "If you encounter any errors during installation, click 'No' to continue" 507 | print_info "Press any key to start the installation..." 508 | read -n 1 -s 509 | echo "" 510 | 511 | print_step "Configuring Wine to use Windows 11 compatibility mode..." 512 | WINEPREFIX="$directory" "$directory/ElementalWarriorWine/bin/winecfg" -v win11 >/dev/null 2>&1 || true 513 | print_success "Wine configured for Windows 11" 514 | 515 | print_step "Launching Affinity Photo installer..." 516 | print_info "Follow the installation wizard in the window that opens" 517 | WINEPREFIX="$directory" "$directory/ElementalWarriorWine/bin/wine" "$directory"/*.exe 518 | 519 | print_step "Cleaning up installer file..." 520 | rm -f "$directory"/affinity*.exe 521 | print_success "Installer file removed" 522 | 523 | ################################################################################ 524 | # SECTION 9: Post-Installation Configuration 525 | ################################################################################ 526 | 527 | print_header "Post-Installation Configuration" 528 | print_info "Applying final configuration settings..." 529 | 530 | print_step "Applying Wine dark theme..." 531 | if wget -q "https://raw.githubusercontent.com/seapear/AffinityOnLinux/refs/heads/main/Auxiliary/Other/wine-dark-theme.reg" -O "$directory/wine-dark-theme.reg"; then 532 | WINEPREFIX="$directory" "$directory/ElementalWarriorWine/bin/regedit" "$directory/wine-dark-theme.reg" >/dev/null 2>&1 || true 533 | rm -f "$directory/wine-dark-theme.reg" 534 | print_success "Dark theme applied to Wine" 535 | else 536 | print_warning "Could not download dark theme registry file" 537 | fi 538 | 539 | print_step "Configuring OpenCL support in Affinity Photo..." 540 | affinity_dir="$directory/drive_c/Program Files/Affinity/Photo 2" 541 | wine_lib_dir="$directory/ElementalWarriorWine/lib/wine/vkd3d-proton/x86_64-windows" 542 | 543 | if [ -d "$affinity_dir" ] && [ -d "$wine_lib_dir" ]; then 544 | print_info "Copying vkd3d-proton DLLs to Affinity Photo application directory..." 545 | dll_copied=0 546 | 547 | if [ -f "$wine_lib_dir/d3d12.dll" ]; then 548 | if cp "$wine_lib_dir/d3d12.dll" "$affinity_dir/" 2>/dev/null; then 549 | print_progress "Copied d3d12.dll to Affinity Photo directory" 550 | ((dll_copied++)) 551 | fi 552 | fi 553 | 554 | if [ -f "$wine_lib_dir/d3d12core.dll" ]; then 555 | if cp "$wine_lib_dir/d3d12core.dll" "$affinity_dir/" 2>/dev/null; then 556 | print_progress "Copied d3d12core.dll to Affinity Photo directory" 557 | ((dll_copied++)) 558 | fi 559 | fi 560 | 561 | if [ $dll_copied -gt 0 ]; then 562 | print_success "Copied $dll_copied OpenCL DLL file(s) to Affinity Photo directory" 563 | fi 564 | 565 | print_info "Configuring Wine DLL overrides for OpenCL support..." 566 | reg_file="$directory/dll_overrides.reg" 567 | { 568 | echo "REGEDIT4" 569 | echo "[HKEY_CURRENT_USER\\Software\\Wine\\DllOverrides]" 570 | echo "\"d3d12\"=\"native\"" 571 | echo "\"d3d12core\"=\"native\"" 572 | } > "$reg_file" 573 | 574 | if WINEPREFIX="$directory" "$directory/ElementalWarriorWine/bin/regedit" "$reg_file" >/dev/null 2>&1; then 575 | print_success "DLL overrides configured in Wine registry" 576 | else 577 | print_warning "Could not apply DLL overrides (OpenCL may not work)" 578 | fi 579 | 580 | rm -f "$reg_file" 581 | 582 | if [ $dll_copied -gt 0 ]; then 583 | print_success "OpenCL support fully configured!" 584 | fi 585 | else 586 | if [ ! -d "$affinity_dir" ]; then 587 | print_warning "Affinity Photo installation directory not found. OpenCL configuration skipped." 588 | fi 589 | if [ ! -d "$wine_lib_dir" ]; then 590 | print_warning "vkd3d-proton library directory not found. OpenCL configuration skipped." 591 | fi 592 | fi 593 | 594 | ################################################################################ 595 | # SECTION 10: Desktop Integration 596 | ################################################################################ 597 | 598 | print_header "Desktop Integration" 599 | print_info "Creating desktop entry and application shortcuts..." 600 | 601 | print_step "Removing default Wine desktop entry..." 602 | rm -f "/home/$USER/.local/share/applications/wine/Programs/Affinity Photo 2.desktop" 603 | print_success "Default entry removed" 604 | 605 | print_step "Creating custom desktop entry..." 606 | desktop_file="$HOME/.local/share/applications/AffinityPhoto.desktop" 607 | mkdir -p "$HOME/.local/share/applications" 608 | 609 | # Normalize directory path (remove trailing slash if present) 610 | directory="${directory%/}" 611 | 612 | # Check for AMD GPU for DXVK configuration 613 | dxvk_env="" 614 | if command -v lspci &> /dev/null; then 615 | if lspci | grep -qiE "(amd|radeon|amd/ati).*vga\|3d\|display"; then 616 | dxvk_env='DXVK_ASYNC=0 DXVK_CONFIG="d3d9.deferSurfaceCreation = True; d3d9.shaderModel = 1" ' 617 | fi 618 | fi 619 | 620 | { 621 | echo "[Desktop Entry]" 622 | echo "Name=Affinity Photo" 623 | echo "Comment=A powerful image editing software." 624 | echo "Icon=/home/$USER/.local/share/icons/AffinityPhoto.svg" 625 | echo "Path=$directory" 626 | echo "Exec=env WINEPREFIX=$directory ${dxvk_env}$directory/ElementalWarriorWine/bin/wine \"$directory/drive_c/Program Files/Affinity/Photo 2/Photo.exe\"" 627 | echo "Terminal=false" 628 | echo "NoDisplay=false" 629 | echo "StartupWMClass=photo.exe" 630 | echo "Type=Application" 631 | echo "Categories=Graphics;" 632 | echo "StartupNotify=true" 633 | } > "$desktop_file" 634 | 635 | print_success "Desktop entry created: $desktop_file" 636 | 637 | print_step "Creating desktop shortcut..." 638 | mkdir -p ~/Desktop 639 | cp "$desktop_file" ~/Desktop/AffinityPhoto.desktop 2>/dev/null || true 640 | print_success "Desktop shortcut created" 641 | 642 | ################################################################################ 643 | # SECTION 11: Installation Complete 644 | ################################################################################ 645 | 646 | print_header "Installation Complete" 647 | print_success "Affinity Photo has been successfully installed!" 648 | echo "" 649 | print_info "Installation location: $directory" 650 | print_info "Desktop entry: ~/.local/share/applications/AffinityPhoto.desktop" 651 | echo "" 652 | print_info "You can now launch Affinity Photo from:" 653 | echo -e " ${CYAN}•${NC} Your application menu (search for 'Affinity Photo')" 654 | echo -e " ${CYAN}•${NC} The desktop shortcut" 655 | echo -e " ${CYAN}•${NC} Command line: wine $directory/drive_c/Program\ Files/Affinity/Photo\ 2/Photo.exe" 656 | echo "" 657 | print_info "OpenCL hardware acceleration should be enabled. You can verify this in:" 658 | echo -e " ${CYAN}•${NC} Affinity Photo Preferences → Performance → Hardware Acceleration" 659 | echo "" 660 | print_success "Enjoy using Affinity Photo on Linux!" 661 | -------------------------------------------------------------------------------- /AffinityScripts/Affinityv3.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ################################################################################ 4 | # Affinity v3 Installation Script for Linux 5 | # This script automates the installation of Affinity applications on Linux 6 | # using Wine with OpenCL support enabled. 7 | ################################################################################ 8 | 9 | # Color codes for terminal output (if supported) 10 | if [ -t 1 ]; then 11 | RED='\033[0;31m' 12 | GREEN='\033[0;32m' 13 | YELLOW='\033[1;33m' 14 | BLUE='\033[0;34m' 15 | CYAN='\033[0;36m' 16 | BOLD='\033[1m' 17 | NC='\033[0m' # No Color 18 | else 19 | RED='' 20 | GREEN='' 21 | YELLOW='' 22 | BLUE='' 23 | CYAN='' 24 | BOLD='' 25 | NC='' 26 | fi 27 | 28 | # Helper functions for formatted output 29 | print_header() { 30 | echo "" 31 | echo -e "${CYAN}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━${NC}" 32 | echo -e "${BOLD}${CYAN}$1${NC}" 33 | echo -e "${CYAN}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━${NC}" 34 | echo "" 35 | } 36 | 37 | print_step() { 38 | echo -e "${BLUE}[STEP]${NC} $1" 39 | } 40 | 41 | print_info() { 42 | echo -e "${CYAN}[INFO]${NC} $1" 43 | } 44 | 45 | print_success() { 46 | echo -e "${GREEN}[✓]${NC} $1" 47 | } 48 | 49 | print_warning() { 50 | echo -e "${YELLOW}[WARNING]${NC} $1" 51 | } 52 | 53 | print_error() { 54 | echo -e "${RED}[ERROR]${NC} $1" 55 | } 56 | 57 | print_progress() { 58 | echo -e "${GREEN} →${NC} $1" 59 | } 60 | 61 | ################################################################################ 62 | # Distribution Detection 63 | ################################################################################ 64 | 65 | # Function to detect Linux distribution 66 | detect_distro() { 67 | if [ -f /etc/os-release ]; then 68 | . /etc/os-release 69 | DISTRO=$ID 70 | VERSION=$VERSION_ID 71 | # Normalize "pika" to "pikaos" if detected 72 | if [ "$DISTRO" = "pika" ]; then 73 | DISTRO="pikaos" 74 | fi 75 | else 76 | print_error "Could not detect Linux distribution" 77 | exit 1 78 | fi 79 | } 80 | 81 | # Detect distribution 82 | detect_distro 83 | 84 | ################################################################################ 85 | # Distribution Warnings 86 | ################################################################################ 87 | 88 | # Check for unsupported distributions 89 | case $DISTRO in 90 | "ubuntu"|"linuxmint"|"zorin"|"bazzite") 91 | print_header "" 92 | echo "" 93 | echo -e "${RED}${BOLD}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━${NC}" 94 | echo -e "${RED}${BOLD} ⚠️ WARNING: UNSUPPORTED DISTRIBUTION ⚠️${NC}" 95 | echo -e "${RED}${BOLD}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━${NC}" 96 | echo "" 97 | echo -e "${RED}${BOLD}YOU ARE ON YOUR OWN!${NC}" 98 | echo "" 99 | echo -e "${YELLOW}${BOLD}The distribution you are using ($DISTRO) is OUT OF DATE and the script${NC}" 100 | echo -e "${YELLOW}${BOLD}will NOT be built around it.${NC}" 101 | echo "" 102 | echo -e "${CYAN}${BOLD}For a modern, stable Linux experience with proper support, please consider${NC}" 103 | echo -e "${CYAN}${BOLD}switching to one of these recommended distributions:${NC}" 104 | echo "" 105 | echo -e "${GREEN} • PikaOS 4${NC}" 106 | echo -e "${GREEN} • CachyOS${NC}" 107 | echo -e "${GREEN} • Nobara${NC}" 108 | echo "" 109 | echo -e "${RED}${BOLD}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━${NC}" 110 | echo "" 111 | ;; 112 | "pikaos") 113 | print_header "PikaOS Special Notice" 114 | echo "" 115 | echo -e "${YELLOW}${BOLD}⚠️ IMPORTANT: PikaOS Wine Configuration Required${NC}" 116 | echo "" 117 | echo -e "${CYAN}PikaOS's built-in Wine has compatibility issues with Affinity applications.${NC}" 118 | echo -e "${CYAN}You must replace it with WineHQ staging from Debian before continuing.${NC}" 119 | echo "" 120 | echo -e "${BOLD}Please run these commands manually to set up WineHQ staging:${NC}" 121 | echo "" 122 | echo -e "${GREEN}sudo mkdir -pm755 /etc/apt/keyrings${NC}" 123 | echo "" 124 | echo -e "${GREEN}wget -O - https://dl.winehq.org/wine-builds/winehq.key | sudo gpg --dearmor -o /etc/apt/keyrings/winehq-archive.key -${NC}" 125 | echo "" 126 | echo -e "${GREEN}sudo dpkg --add-architecture i386${NC}" 127 | echo "" 128 | echo -e "${GREEN}sudo wget -NP /etc/apt/sources.list.d/ https://dl.winehq.org/wine-builds/debian/dists/forky/winehq-forky.sources${NC}" 129 | echo "" 130 | echo -e "${GREEN}sudo apt update${NC}" 131 | echo "" 132 | echo -e "${GREEN}sudo apt install --install-recommends winehq-staging${NC}" 133 | echo "" 134 | echo -e "${YELLOW}Press any key to continue after completing the WineHQ staging installation...${NC}" 135 | read -n 1 -s 136 | echo "" 137 | echo "" 138 | ;; 139 | esac 140 | 141 | ################################################################################ 142 | # SECTION 1: Dependency Verification 143 | ################################################################################ 144 | 145 | print_header "Dependency Verification" 146 | print_info "Checking for required system dependencies..." 147 | 148 | missing_deps="" 149 | 150 | check_dependency() { 151 | print_progress "Checking for $1..." 152 | if ! command -v "$1" &> /dev/null; then 153 | missing_deps+="$1 " 154 | print_error "$1 is not installed" 155 | return 1 156 | else 157 | print_success "$1 is installed" 158 | return 0 159 | fi 160 | } 161 | 162 | check_dependency "wine" 163 | check_dependency "winetricks" 164 | check_dependency "wget" 165 | check_dependency "curl" 166 | # Check for either 7z or unzip (both can extract archives) 167 | if ! command -v 7z &> /dev/null && ! command -v unzip &> /dev/null; then 168 | missing_deps+="7z or unzip " 169 | print_error "Neither 7z nor unzip is installed (at least one is required)" 170 | else 171 | if command -v 7z &> /dev/null; then 172 | print_success "7z is installed" 173 | else 174 | print_success "unzip is installed (will be used instead of 7z)" 175 | fi 176 | fi 177 | check_dependency "tar" 178 | 179 | if [ -n "$missing_deps" ]; then 180 | print_error "Missing required dependencies: ${missing_deps}" 181 | echo "" 182 | case $DISTRO in 183 | "ubuntu"|"linuxmint"|"zorin"|"bazzite") 184 | echo -e "${RED}${BOLD}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━${NC}" 185 | echo -e "${RED}${BOLD} ⚠️ WARNING: UNSUPPORTED DISTRIBUTION ⚠️${NC}" 186 | echo -e "${RED}${BOLD}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━${NC}" 187 | echo "" 188 | echo -e "${YELLOW}${BOLD}This script will NOT automatically install dependencies for unsupported distributions.${NC}" 189 | echo -e "${YELLOW}Please install the required dependencies manually:${NC}" 190 | echo -e "${CYAN} wine winetricks wget curl p7zip-full tar${NC}" 191 | echo "" 192 | while true; do 193 | echo -e "${YELLOW}Press Enter to check dependencies again, or 'q' to exit:${NC}" 194 | read -r response 195 | if [ "$response" = "q" ] || [ "$response" = "Q" ]; then 196 | echo -e "${RED}${BOLD}Exiting...${NC}" 197 | exit 1 198 | fi 199 | # Re-check dependencies 200 | missing_deps="" 201 | check_dependency "wine" 202 | check_dependency "winetricks" 203 | check_dependency "wget" 204 | check_dependency "curl" 205 | if ! command -v 7z &> /dev/null && ! command -v unzip &> /dev/null; then 206 | missing_deps+="7z or unzip " 207 | fi 208 | check_dependency "tar" 209 | if [ -z "$missing_deps" ]; then 210 | print_success "All dependencies are now installed!" 211 | break 212 | else 213 | print_error "Still missing: ${missing_deps}" 214 | fi 215 | done 216 | ;; 217 | *) 218 | print_info "Please install the missing dependencies and rerun this script." 219 | print_info "Example for Arch-based systems: sudo pacman -S wine winetricks wget curl p7zip tar" 220 | exit 1 221 | ;; 222 | esac 223 | fi 224 | 225 | print_success "All required dependencies are installed!" 226 | case $DISTRO in 227 | "ubuntu"|"linuxmint"|"zorin"|"bazzite") 228 | echo "" 229 | echo -e "${YELLOW}${BOLD}Continuing despite unsupported distribution. No support will be provided if issues arise.${NC}" 230 | ;; 231 | esac 232 | echo "" 233 | sleep 1 234 | 235 | ################################################################################ 236 | # SECTION 2: Environment Setup 237 | ################################################################################ 238 | 239 | print_header "Environment Setup" 240 | print_info "Preparing installation environment..." 241 | 242 | directory="$HOME/.AffinityLinux" 243 | wine_url="https://github.com/seapear/AffinityOnLinux/releases/download/Legacy/ElementalWarriorWine-x86_64.tar.gz" 244 | filename="ElementalWarriorWine-x86_64.tar.gz" 245 | 246 | print_step "Stopping any running Wine processes..." 247 | wineserver -k 2>/dev/null || true 248 | print_success "Wine processes stopped" 249 | 250 | print_step "Creating installation directory: $directory" 251 | mkdir -p "$directory" 252 | print_success "Installation directory created" 253 | 254 | ################################################################################ 255 | # SECTION 3: Wine Binary Download and Extraction 256 | ################################################################################ 257 | 258 | print_header "Wine Binary Setup" 259 | print_info "Downloading and configuring the custom Wine build (ElementalWarriorWine)..." 260 | 261 | print_step "Downloading Wine binary from GitHub releases..." 262 | if wget -q --show-progress "$wine_url" -O "$directory/$filename"; then 263 | print_success "Wine binary downloaded successfully" 264 | else 265 | print_error "Failed to download Wine binary" 266 | exit 1 267 | fi 268 | 269 | print_step "Extracting Wine binary archive..." 270 | if tar -xzf "$directory/$filename" -C "$directory" 2>/dev/null; then 271 | print_success "Wine binary extracted successfully" 272 | else 273 | print_error "Failed to extract Wine binary archive" 274 | exit 1 275 | fi 276 | 277 | print_step "Locating Wine installation directory..." 278 | wine_dir=$(find "$directory" -name "ElementalWarriorWine*" -type d | head -1) 279 | if [ -n "$wine_dir" ] && [ "$wine_dir" != "$directory/ElementalWarriorWine" ]; then 280 | print_info "Creating symlink for Wine directory..." 281 | ln -sf "$wine_dir" "$directory/ElementalWarriorWine" 282 | print_success "Symlink created: $directory/ElementalWarriorWine" 283 | fi 284 | 285 | print_step "Verifying Wine binary exists..." 286 | if [ ! -f "$directory/ElementalWarriorWine/bin/wine" ]; then 287 | print_error "Wine binary not found at expected location" 288 | print_info "Checking directory structure..." 289 | echo "Contents of $directory:" 290 | ls -la "$directory" || true 291 | if [ -n "$wine_dir" ]; then 292 | echo "Contents of $wine_dir:" 293 | ls -la "$wine_dir" || true 294 | fi 295 | exit 1 296 | fi 297 | print_success "Wine binary verified: $directory/ElementalWarriorWine/bin/wine" 298 | 299 | print_step "Cleaning up downloaded archive..." 300 | rm -f "$directory/$filename" 301 | print_success "Archive file removed" 302 | 303 | ################################################################################ 304 | # SECTION 4: Additional Resources Download 305 | ################################################################################ 306 | 307 | print_header "Downloading Additional Resources" 308 | print_info "Fetching Windows metadata and application icons..." 309 | 310 | print_step "Downloading Windows metadata files..." 311 | if wget -q --show-progress "https://archive.org/download/win-metadata/WinMetadata.zip" -O "$directory/Winmetadata.zip"; then 312 | print_success "Windows metadata downloaded" 313 | else 314 | print_warning "Failed to download Windows metadata (this may cause minor issues)" 315 | fi 316 | 317 | print_step "Downloading official Affinity V3 icon..." 318 | mkdir -p "/home/$USER/.local/share/icons" 319 | if wget -q --show-progress "https://github.com/seapear/AffinityOnLinux/raw/main/Assets/Icons/Affinity-Canva.svg" -O "/home/$USER/.local/share/icons/Affinity.svg"; then 320 | print_success "Official Affinity V3 icon downloaded to ~/.local/share/icons/Affinity.svg" 321 | else 322 | print_warning "Failed to download official icon (will continue without it)" 323 | fi 324 | 325 | ################################################################################ 326 | # SECTION 5: Wine Configuration and Dependencies 327 | ################################################################################ 328 | 329 | print_header "Wine Configuration" 330 | print_info "Installing required Windows libraries and configuring Wine..." 331 | 332 | print_step "Installing .NET Framework 3.5..." 333 | WINEPREFIX="$directory" winetricks --unattended dotnet35 >/dev/null 2>&1 || true 334 | print_progress ".NET 3.5 installation attempted" 335 | 336 | print_step "Installing .NET Framework 4.8..." 337 | WINEPREFIX="$directory" winetricks --unattended dotnet48 >/dev/null 2>&1 || true 338 | print_progress ".NET 4.8 installation attempted" 339 | 340 | print_step "Installing Windows core fonts..." 341 | WINEPREFIX="$directory" winetricks --unattended corefonts >/dev/null 2>&1 || true 342 | print_progress "Core fonts installation attempted" 343 | 344 | print_step "Installing Visual C++ Redistributables 2022..." 345 | WINEPREFIX="$directory" winetricks --unattended vcrun2022 >/dev/null 2>&1 || true 346 | print_progress "VC++ 2022 installation attempted" 347 | 348 | print_step "Installing MSXML 3.0..." 349 | WINEPREFIX="$directory" winetricks --unattended msxml3 >/dev/null 2>&1 || true 350 | print_progress "MSXML 3.0 installation attempted" 351 | 352 | print_step "Installing MSXML 6.0..." 353 | WINEPREFIX="$directory" winetricks --unattended msxml6 >/dev/null 2>&1 || true 354 | print_progress "MSXML 6.0 installation attempted" 355 | 356 | print_step "Installing Tahoma font..." 357 | WINEPREFIX="$directory" winetricks --unattended tahoma >/dev/null 2>&1 || true 358 | print_progress "Tahoma font installation attempted" 359 | 360 | print_step "Configuring Wine to use Vulkan renderer..." 361 | WINEPREFIX="$directory" winetricks renderer=vulkan >/dev/null 2>&1 || true 362 | print_success "Wine configured with Vulkan renderer" 363 | 364 | print_info "Note: The above installations may take several minutes. Errors are normal if components are already installed." 365 | 366 | ################################################################################ 367 | # SECTION 6: Windows Metadata Extraction 368 | ################################################################################ 369 | 370 | print_header "Windows Metadata Installation" 371 | print_info "Extracting Windows metadata files to system32 directory..." 372 | 373 | mkdir -p "$directory/drive_c/windows/system32" 374 | 375 | if [ -f "$directory/Winmetadata.zip" ]; then 376 | print_step "Extracting Windows metadata archive..." 377 | 378 | if command -v 7z &> /dev/null; then 379 | if 7z x "$directory/Winmetadata.zip" -o"$directory/drive_c/windows/system32" -y >/dev/null 2>&1; then 380 | print_success "Windows metadata extracted successfully using 7z" 381 | else 382 | print_warning "7z extraction had issues, trying unzip..." 383 | unzip -o "$directory/Winmetadata.zip" -d "$directory/drive_c/windows/system32" >/dev/null 2>&1 || true 384 | print_success "Windows metadata extracted using unzip" 385 | fi 386 | elif command -v unzip &> /dev/null; then 387 | if unzip -o "$directory/Winmetadata.zip" -d "$directory/drive_c/windows/system32" >/dev/null 2>&1; then 388 | print_success "Windows metadata extracted successfully using unzip" 389 | else 390 | print_error "Failed to extract Windows metadata" 391 | fi 392 | else 393 | print_error "Neither 7z nor unzip is available to extract Windows metadata" 394 | print_info "Please install either 7z or unzip and rerun the script" 395 | fi 396 | 397 | print_step "Cleaning up metadata archive..." 398 | rm -f "$directory/Winmetadata.zip" 399 | print_success "Archive removed" 400 | else 401 | print_warning "WinMetadata.zip was not downloaded successfully" 402 | fi 403 | 404 | ################################################################################ 405 | # SECTION 7: vkd3d-proton Installation for OpenCL Support 406 | ################################################################################ 407 | 408 | print_header "OpenCL Support Setup" 409 | print_info "Installing vkd3d-proton for hardware acceleration and OpenCL support..." 410 | print_info "This enables GPU acceleration features in Affinity applications" 411 | 412 | print_step "Downloading vkd3d-proton v2.14.1 from GitHub..." 413 | vkd3d_url="https://github.com/HansKristian-Work/vkd3d-proton/releases/download/v2.14.1/vkd3d-proton-2.14.1.tar.zst" 414 | if wget -q --show-progress "$vkd3d_url" -O "$directory/vkd3d-proton-2.14.1.tar.zst"; then 415 | print_success "vkd3d-proton downloaded successfully" 416 | else 417 | print_error "Failed to download vkd3d-proton" 418 | print_warning "OpenCL support may not work correctly" 419 | fi 420 | 421 | print_step "Extracting vkd3d-proton archive..." 422 | extracted=false 423 | if command -v unzstd &> /dev/null; then 424 | if unzstd -f "$directory/vkd3d-proton-2.14.1.tar.zst" -o "$directory/vkd3d-proton.tar" 2>/dev/null; then 425 | if tar -xf "$directory/vkd3d-proton.tar" -C "$directory" 2>/dev/null; then 426 | rm "$directory/vkd3d-proton.tar" 427 | extracted=true 428 | print_success "vkd3d-proton extracted using unzstd" 429 | fi 430 | fi 431 | elif command -v zstd &> /dev/null && tar --help 2>&1 | grep -q "use-compress-program"; then 432 | if tar --use-compress-program=zstd -xf "$directory/vkd3d-proton-2.14.1.tar.zst" -C "$directory" 2>/dev/null; then 433 | extracted=true 434 | print_success "vkd3d-proton extracted using zstd with tar" 435 | fi 436 | fi 437 | 438 | if [ "$extracted" = false ]; then 439 | print_error "Cannot extract .tar.zst file. Please install zstd (e.g., sudo pacman -S zstd)" 440 | print_warning "Skipping vkd3d-proton installation. OpenCL will not work!" 441 | rm -f "$directory/vkd3d-proton-2.14.1.tar.zst" 442 | fi 443 | 444 | rm -f "$directory/vkd3d-proton-2.14.1.tar.zst" 445 | 446 | print_step "Installing vkd3d-proton DLLs to Wine library directory..." 447 | vkd3d_dir=$(find "$directory" -type d -name "vkd3d-proton-*" | head -1) 448 | if [ -n "$vkd3d_dir" ]; then 449 | wine_lib_dir="$directory/ElementalWarriorWine/lib/wine/vkd3d-proton/x86_64-windows" 450 | mkdir -p "$wine_lib_dir" 451 | 452 | dll_count=0 453 | if [ -f "$vkd3d_dir/x64/d3d12.dll" ]; then 454 | cp "$vkd3d_dir/x64/d3d12.dll" "$wine_lib_dir/" 2>/dev/null && ((dll_count++)) 455 | elif [ -f "$vkd3d_dir/d3d12.dll" ]; then 456 | cp "$vkd3d_dir/d3d12.dll" "$wine_lib_dir/" 2>/dev/null && ((dll_count++)) 457 | fi 458 | 459 | if [ -f "$vkd3d_dir/x64/d3d12core.dll" ]; then 460 | cp "$vkd3d_dir/x64/d3d12core.dll" "$wine_lib_dir/" 2>/dev/null && ((dll_count++)) 461 | elif [ -f "$vkd3d_dir/d3d12core.dll" ]; then 462 | cp "$vkd3d_dir/d3d12core.dll" "$wine_lib_dir/" 2>/dev/null && ((dll_count++)) 463 | fi 464 | 465 | if [ -f "$vkd3d_dir/x64/dxgi.dll" ]; then 466 | cp "$vkd3d_dir/x64/dxgi.dll" "$wine_lib_dir/" 2>/dev/null && ((dll_count++)) 467 | elif [ -f "$vkd3d_dir/dxgi.dll" ]; then 468 | cp "$vkd3d_dir/dxgi.dll" "$wine_lib_dir/" 2>/dev/null && ((dll_count++)) 469 | fi 470 | 471 | if [ $dll_count -gt 0 ]; then 472 | print_success "Installed $dll_count DLL file(s) to Wine library directory" 473 | else 474 | print_warning "No DLL files were found or copied" 475 | fi 476 | 477 | print_step "Cleaning up extracted vkd3d-proton directory..." 478 | rm -rf "$vkd3d_dir" 479 | print_success "vkd3d-proton setup completed" 480 | else 481 | print_warning "Could not locate vkd3d-proton directory after extraction" 482 | fi 483 | 484 | ################################################################################ 485 | # SECTION 8: Affinity Application Installation 486 | ################################################################################ 487 | 488 | print_header "Affinity Application Installation" 489 | print_info "You will now install the Affinity application using its Windows installer" 490 | 491 | echo "" 492 | print_step "Please download the Affinity installer (.exe) from:" 493 | echo -e " ${CYAN}https://www.affinity.studio/get-affinity${NC}" 494 | echo "" 495 | print_step "Once downloaded, place the .exe file in:" 496 | echo -e " ${CYAN}$directory${NC}" 497 | echo "" 498 | print_info "Press any key when the installer file is ready..." 499 | read -n 1 -s 500 | echo "" 501 | 502 | # Verify .exe exists 503 | if ! ls "$directory"/*.exe 1> /dev/null 2>&1; then 504 | print_error "No .exe file found in $directory" 505 | print_info "Please ensure the Affinity installer is in the correct location and rerun this script" 506 | exit 1 507 | fi 508 | 509 | print_success "Installer file detected" 510 | echo "" 511 | print_warning "If you encounter any errors during installation, click 'No' to continue" 512 | print_info "Press any key to start the installation..." 513 | read -n 1 -s 514 | echo "" 515 | 516 | print_step "Configuring Wine to use Windows 11 compatibility mode..." 517 | WINEPREFIX="$directory" "$directory/ElementalWarriorWine/bin/winecfg" -v win11 >/dev/null 2>&1 || true 518 | print_success "Wine configured for Windows 11" 519 | 520 | print_step "Launching Affinity installer..." 521 | print_info "Follow the installation wizard in the window that opens" 522 | WINEPREFIX="$directory" "$directory/ElementalWarriorWine/bin/wine" "$directory"/*.exe 523 | 524 | print_step "Cleaning up installer file..." 525 | rm -f "$directory"/affinity*.exe 526 | print_success "Installer file removed" 527 | 528 | ################################################################################ 529 | # SECTION 9: Post-Installation Configuration 530 | ################################################################################ 531 | 532 | print_header "Post-Installation Configuration" 533 | print_info "Applying final configuration settings..." 534 | 535 | print_step "Applying Wine dark theme..." 536 | if wget -q "https://raw.githubusercontent.com/seapear/AffinityOnLinux/refs/heads/main/Auxiliary/Other/wine-dark-theme.reg" -O "$directory/wine-dark-theme.reg"; then 537 | WINEPREFIX="$directory" "$directory/ElementalWarriorWine/bin/regedit" "$directory/wine-dark-theme.reg" >/dev/null 2>&1 || true 538 | rm -f "$directory/wine-dark-theme.reg" 539 | print_success "Dark theme applied to Wine" 540 | else 541 | print_warning "Could not download dark theme registry file" 542 | fi 543 | 544 | print_step "Configuring OpenCL support in Affinity application..." 545 | affinity_dir="$directory/drive_c/Program Files/Affinity/Affinity" 546 | wine_lib_dir="$directory/ElementalWarriorWine/lib/wine/vkd3d-proton/x86_64-windows" 547 | 548 | if [ -d "$affinity_dir" ] && [ -d "$wine_lib_dir" ]; then 549 | print_info "Copying vkd3d-proton DLLs to Affinity application directory..." 550 | dll_copied=0 551 | 552 | if [ -f "$wine_lib_dir/d3d12.dll" ]; then 553 | if cp "$wine_lib_dir/d3d12.dll" "$affinity_dir/" 2>/dev/null; then 554 | print_progress "Copied d3d12.dll to Affinity directory" 555 | ((dll_copied++)) 556 | fi 557 | fi 558 | 559 | if [ -f "$wine_lib_dir/d3d12core.dll" ]; then 560 | if cp "$wine_lib_dir/d3d12core.dll" "$affinity_dir/" 2>/dev/null; then 561 | print_progress "Copied d3d12core.dll to Affinity directory" 562 | ((dll_copied++)) 563 | fi 564 | fi 565 | 566 | if [ $dll_copied -gt 0 ]; then 567 | print_success "Copied $dll_copied OpenCL DLL file(s) to Affinity directory" 568 | fi 569 | 570 | print_info "Configuring Wine DLL overrides for OpenCL support..." 571 | reg_file="$directory/dll_overrides.reg" 572 | { 573 | echo "REGEDIT4" 574 | echo "[HKEY_CURRENT_USER\\Software\\Wine\\DllOverrides]" 575 | echo "\"d3d12\"=\"native\"" 576 | echo "\"d3d12core\"=\"native\"" 577 | } > "$reg_file" 578 | 579 | if WINEPREFIX="$directory" "$directory/ElementalWarriorWine/bin/regedit" "$reg_file" >/dev/null 2>&1; then 580 | print_success "DLL overrides configured in Wine registry" 581 | else 582 | print_warning "Could not apply DLL overrides (OpenCL may not work)" 583 | fi 584 | 585 | rm -f "$reg_file" 586 | 587 | if [ $dll_copied -gt 0 ]; then 588 | print_success "OpenCL support fully configured!" 589 | fi 590 | else 591 | if [ ! -d "$affinity_dir" ]; then 592 | print_warning "Affinity installation directory not found. OpenCL configuration skipped." 593 | fi 594 | if [ ! -d "$wine_lib_dir" ]; then 595 | print_warning "vkd3d-proton library directory not found. OpenCL configuration skipped." 596 | fi 597 | fi 598 | 599 | ################################################################################ 600 | # SECTION 10: Desktop Integration 601 | ################################################################################ 602 | 603 | print_header "Desktop Integration" 604 | print_info "Creating desktop entry and application shortcuts..." 605 | 606 | print_step "Removing default Wine desktop entry..." 607 | rm -f "/home/$USER/.local/share/applications/wine/Programs/Affinity.desktop" 608 | print_success "Default entry removed" 609 | 610 | print_step "Creating custom desktop entry..." 611 | desktop_file="$HOME/.local/share/applications/Affinity.desktop" 612 | mkdir -p "$HOME/.local/share/applications" 613 | 614 | # Normalize directory path (remove trailing slash if present) 615 | directory="${directory%/}" 616 | 617 | # Check for AMD GPU for DXVK configuration 618 | dxvk_env="" 619 | if command -v lspci &> /dev/null; then 620 | if lspci | grep -qiE "(amd|radeon|amd/ati).*vga\|3d\|display"; then 621 | dxvk_env='DXVK_ASYNC=0 DXVK_CONFIG="d3d9.deferSurfaceCreation = True; d3d9.shaderModel = 1" ' 622 | fi 623 | fi 624 | 625 | { 626 | echo "[Desktop Entry]" 627 | echo "Name=Affinity Affinity" 628 | echo "Comment=A powerful image editing software." 629 | echo "Icon=/home/$USER/.local/share/icons/Affinity.svg" 630 | echo "Path=$directory" 631 | echo "Exec=env WINEPREFIX=$directory ${dxvk_env}$directory/ElementalWarriorWine/bin/wine \"$directory/drive_c/Program Files/Affinity/Affinity/Affinity.exe\"" 632 | echo "Terminal=false" 633 | echo "NoDisplay=false" 634 | echo "StartupWMClass=affinity.exe" 635 | echo "Type=Application" 636 | echo "Categories=Graphics;" 637 | echo "StartupNotify=true" 638 | } > "$desktop_file" 639 | 640 | print_success "Desktop entry created: $desktop_file" 641 | 642 | print_step "Creating desktop shortcut..." 643 | mkdir -p ~/Desktop 644 | cp "$desktop_file" ~/Desktop/Affinity.desktop 2>/dev/null || true 645 | print_success "Desktop shortcut created" 646 | 647 | ################################################################################ 648 | # SECTION 11: Installation Complete 649 | ################################################################################ 650 | 651 | print_header "Installation Complete" 652 | print_success "Affinity has been successfully installed!" 653 | echo "" 654 | print_info "Installation location: $directory" 655 | print_info "Desktop entry: ~/.local/share/applications/Affinity.desktop" 656 | echo "" 657 | print_info "You can now launch Affinity from:" 658 | echo -e " ${CYAN}•${NC} Your application menu (search for 'Affinity')" 659 | echo -e " ${CYAN}•${NC} The desktop shortcut" 660 | echo -e " ${CYAN}•${NC} Command line: wine $directory/drive_c/Program\ Files/Affinity/Affinity/Affinity.exe" 661 | echo "" 662 | print_info "OpenCL hardware acceleration should be enabled. You can verify this in:" 663 | echo -e " ${CYAN}•${NC} Affinity Preferences → Performance → Hardware Acceleration" 664 | echo "" 665 | print_success "Enjoy using Affinity on Linux!" 666 | --------------------------------------------------------------------------------