├── README.md
├── WinMetadata.zip
├── af_gtg.png
├── af_on_linux.jpg
├── wine_af_dir.png
└── wine_dpi.png
/README.md:
--------------------------------------------------------------------------------
1 | # Install Affinity apps (Designer / Photo) on Debian Linux
2 |
3 | 
4 |
5 | This is a step-by-step guide to make you install Affinity apps on Linux, covers some issues you might run into when following the [original guide](https://forum.affinity.serif.com/index.php?/topic/182758-affinity-suite-v204-on-linux-wine/). Also this guide do not use "rum" to run wine as the orgin post suggested, but it will work anyway.
6 |
7 | Thanks to James McDonnell's work [ElementalWarrior-wine](https://gitlab.winehq.org/ElementalWarrior/wine), this custom build of wine can run Affinity apps in linux with basic functions (saving, editing) working properly. Which becomes the best option to run Affinity on Linux for now, since other alternatives like [Lutris](https://lutris.net/) still suffers to get the directory linking working, [Bottles](https://usebottles.com/) still glitches, [Winapps](https://github.com/Fmstrat/winapps) is hard to setup if you need hardware acceleration.
8 |
9 | Big shout out to James McDonnell, he's doing god's work.
10 |
11 | # Reference
12 |
13 | [Affinity Suite v2.0.4 on linux [ Wine ]](https://forum.affinity.serif.com/index.php?/topic/182758-affinity-suite-v204-on-linux-wine/)
14 |
15 | ---
16 |
17 | # Installation
18 |
19 | ## Get WinMetadata/ from Windows System
20 |
21 | You will need to get WinMetadata/ files from a windows virtual machine, partition or from a friend
22 |
23 |
29 |
30 | This folder in Windows is located in:
31 |
32 | ```bash
33 | C:/Windows/System32/WinMetadata
34 | ```
35 |
36 | ## Install wine (custom build)
37 |
38 | 1. Install dependencies needed to build wine
39 |
40 |
45 |
46 |
47 | ```bash
48 | # You need git.
49 | sudo apt install git
50 |
51 | # Common graphics library
52 | sudo apt install libvulkan1
53 |
54 | # Common build dependencies
55 | sudo apt install gcc flex bison
56 |
57 | # Wine
58 | sudo apt install wine winetricks
59 |
60 | # Wine build dependencies (x86 specific)
61 | sudo apt install libx11-dev:i386 libfreetype6-dev:i386
62 |
63 | # Wine build dependencies - necessary
64 | sudo apt install gcc-multilib gcc-mingw-w64 libasound2-dev libdbus-1-dev libfontconfig-dev libfreetype-dev libgnutls28-dev libgl-dev libunwind-dev libx11-dev libxcomposite-dev libxcursor-dev libxfixes-dev libxi-dev libxrandr-dev libxrender-dev libxext-dev
65 |
66 | # Wine build dependencies - needed often
67 | sudo apt install libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libosmesa6-dev libsdl2-dev libvulkan-dev
68 |
69 | # (Optional) reboot the system for drivers to work
70 | systemctl reboot
71 |
72 | ```
73 |
74 | 1. Get ElementalWarrior wine fork:
75 |
76 | ```bash
77 | cd ~/Documents
78 | git clone https://gitlab.winehq.org/ElementalWarrior/wine.git ElementalWarrior-wine
79 | ```
80 |
81 |
82 | 1. Create new folders for building wine
83 |
84 | ```bash
85 | cd ~/Documents/ElementalWarrior-wine/
86 |
87 | mkdir wine32-build/ wine64-build/ wine-install/
88 | ```
89 |
90 |
91 | 1. Build wine64, configure with your $USER
92 |
93 | ```bash
94 | cd ~/Documents/ElementalWarrior-wine/wine64-build/
95 |
96 | /home/$USER/Documents/ElementalWarrior-wine/configure --prefix=/home/$USER/Documents/ElementalWarrior-wine/wine-install --enable-win64
97 |
98 | # Run in threads to speed up, up this number if you have a powerful PC
99 | make -j 8
100 | ```
101 |
102 |
103 | 1. Build wine32, configure path with your $USER
104 |
105 | ```bash
106 | cd ~/Documents/ElementalWarrior-wine/wine32-build/
107 |
108 | PKG_CONFIG_PATH=/usr/lib32/pkgconfig /home/$USER/Documents/ElementalWarrior-wine/configure --with-wine64=/home/$USER/Documents/ElementalWarrior-wine/wine64-build --prefix=/home/$USER/Documents/ElementalWarrior-wine/wine-install
109 |
110 | # Run in threads to speed up, up this number if you have a powerful PC
111 | make -j 8
112 | ```
113 |
114 |
115 | 1. Wait for it to finish and install wine-32 build with:
116 |
117 | ```bash
118 | make install
119 | ```
120 |
121 | You now have a folder containing a build of ElementalWarrior's wine fork, the built binary is inside wine-install/ now
122 |
123 | 2. Copy the wine custom build to a folder you desired
124 |
125 | ```bash
126 | mkdir ~/.local/wine
127 |
128 | cp -r ~/Documents/ElementalWarrior-wine/wine-install ~/.local/wine/ElementalWarrior-wine
129 | ```
130 |
131 |
132 | 1. Create new wine prefix and install dotnet4.8, corefonts (may took a while)
133 |
134 | ```bash
135 | mkdir ~/wine
136 |
137 | WINEPREFIX=~/wine/affinity winetricks
138 | ```
139 |
140 | 1. Choose “Select the default wineprefix”
141 | 2. In “Install a Windows DLL or component”, choose and install **dotnet48**
142 | 3. In “Install a font”, choose and install **corefonts**
143 |
144 | Or you can just do it in command line:
145 |
146 | ```bash
147 | WINEPREFIX=~/wine/affinity winetricks dotnet48 corefonts
148 | ```
149 |
150 | 2. Set the wines Windows version to win10:
151 |
152 | ```bash
153 | WINEPREFIX=~/wine/affinity winecfg -v win10
154 | ```
155 |
156 |
157 | 1. Copy the WinMetadata/ folder into the drive_c in this config, where ever $PATH_TO is:
158 |
159 | ```bash
160 | cp -r /$PATH_TO/WinMetadata/ ~/wine/affinity/drive_c/windows/system32/
161 | ```
162 |
163 | As mentioned above, just rip it from any Windows machine (`C:/Windows/System32/WinMetadata`)
164 |
165 |
166 | ## Install Affinity apps
167 |
168 | 1. Execute the Affinity installer with the custom Wine build, with your $PATH_TO_INSTALLER, installer version may also vary (use the latest version of installer if possible):
169 |
170 | ```bash
171 | cd /PATH_TO_INSTALLER/
172 |
173 | # Install Affinity Designer
174 | WINEPREFIX=~/wine/affinity/ ~/.local/wine/ElementalWarrior-wine/bin/wine affinity-designer-1.10.6.exe
175 |
176 | # Install Affinity Photo
177 | WINEPREFIX=~/wine/affinity/ ~/.local/wine/ElementalWarrior-wine/bin/wine affinity-photo-1.10.6.exe
178 | ```
179 |
180 | Install Affinity apps like you will do in Windows.
181 |
182 | 2. You can test if Affinity apps works now:
183 |
184 | ```bash
185 | # Run Affinity Photo
186 | WINEPREFIX=~/wine/affinity ~/.local/wine/ElementalWarrior-wine/bin/wine ~/wine/affinity/drive_c/Program\ Files/Affinity/Photo/Photo.exe
187 |
188 | # Run Affinity Designer
189 | WINEPREFIX=~/wine/affinity ~/.local/wine/ElementalWarrior-wine/bin/wine ~/wine/affinity/drive_c/Program\ Files/Affinity/Designer/Designer.exe
190 | ```
191 |
192 | 3. **(Optional)** Adjust the dpi in winecfg to make eyes easier:
193 |
194 | ```bash
195 | WINEPREFIX=~/wine/affinity winecfg
196 | ```
197 |
198 | Then set the dpi like this(Higher = Larger on screen):
199 |
200 | 
201 |
202 | ## Create .desktop shortcuts
203 |
204 | If Wine failed to auto create .desktop file shortcuts properly (Which mostly **WILL**), use the following guide to create it manually:
205 |
206 | 1. Copy the **icon.png** files into **~/wine/affinity** for convenience:
207 |
208 | ```bash
209 | cd ~/wine/affinity
210 |
211 | # Find and copy AffinityDesigner icon
212 | find drive_c/Program\ Files/Affinity/Designer/ -name 'icon.png' -exec cp {} ./icon_designer.png \;
213 |
214 | # Find and copy AffinityPhoto icon
215 | find drive_c/Program\ Files/Affinity/Photo/ -name 'icon.png' -exec cp {} ./icon_photo.png \;
216 | ```
217 |
218 | Now you should have it like this in **~/wine/affinity**:
219 |
220 | 
221 |
222 | 2. Remove broken .desktop files in **~/.local/share/applications :**
223 |
224 | ```bash
225 | cd ~/.local/share/applications/wine
226 | rm Affinity\ Designer.desktop
227 | rm Affinity\ Photo.desktop
228 |
229 | ## Do this for cleanup, but caution if running other wine apps
230 | # cd ~/.local/share/applications
231 | # rm wine*
232 | ```
233 |
234 | 3. Create a desktop files using this long command **:**
235 |
236 | **Fast method**:
237 |
238 | Copy the following commands as a whole and paste it into the terminal, enter your username when prompted:
239 |
240 | ```bash
241 | # Copy the whole paragraph, enter username when prompted
242 |
243 | ### START ###
244 |
245 | cd ~/.local/share/applications;read -p "Enter username:" "USER";
246 | echo "
247 | [Desktop Entry]
248 | Type=Application
249 | Name=Affinity Designer
250 | Icon=/home/$USER/wine/affinity/icon_designer.png
251 | Exec=sh -c 'WINEPREFIX=/home/$USER/wine/affinity /home/$USER/.local/wine/ElementalWarrior-wine/bin/wine /home/$USER/wine/affinity/drive_c/Program\ Files/Affinity/Designer/Designer.exe'
252 | Terminal=false
253 | " > affinity_designer.desktop;
254 | echo "
255 | [Desktop Entry]
256 | Type=Application
257 | Name=Affinity Photo
258 | Icon=/home/$USER/wine/affinity/icon_photo.png
259 | Exec=sh -c 'WINEPREFIX=/home/$USER/wine/affinity /home/$USER/.local/wine/ElementalWarrior-wine/bin/wine /home/$USER/wine/affinity/drive_c/Program\ Files/Affinity/Photo/Photo.exe'
260 | Terminal=false
261 | " > affinity_photo.desktop;
262 |
263 | ### END ###
264 | ```
265 |
266 | **Manual method**:
267 |
268 | Create these files manually using your favorite editor (nano ,vim…), replace $USER with your username:
269 |
270 | ~/.local/share/applications/affinity_designer.desktop:
271 |
272 | ```bash
273 | #~/.local/share/applications/affinity_designer.desktop
274 |
275 | [Desktop Entry]
276 | Type=Application
277 | Name=Affinity Designer
278 | Icon=/home/$USER/wine/affinity/icon_designer.png
279 | Exec=sh -c 'WINEPREFIX=/home/$USER/wine/affinity /home/$USER/.local/wine/ElementalWarrior-wine/bin/wine /home/$USER/wine/affinity/drive_c/Program\ Files/Affinity/Designer/Designer.exe'
280 | Terminal=false
281 | ```
282 |
283 | ~/.local/share/applications/affinity_photo.desktop:
284 |
285 | ```bash
286 | #~/.local/share/applications/affinity_photo.desktop
287 |
288 | [Desktop Entry]
289 | Type=Application
290 | Name=Affinity Photo
291 | Icon=/home/$USER/wine/affinity/icon_photo.png
292 | Exec=sh -c 'WINEPREFIX=/home/$USER/wine/affinity /home/$USER/.local/wine/ElementalWarrior-wine/bin/wine /home/$USER/wine/affinity/drive_c/Program\ Files/Affinity/Photo/Photo.exe'
293 | Terminal=false
294 | ```
295 |
296 |
297 | 1. Affinity apps should be good to go right now:
298 |
299 | 
300 |
301 | ---
302 |
303 | # TroubleShooting
304 |
305 | ## Switch to Vulkan renderer
306 |
307 | If experienced glitches when running Affinity apps, try switch to Vulkan renderer by doing:
308 |
309 | ```bash
310 | WINEPREFIX=~/wine/affinity winetricks renderer=vulkan
311 | ```
312 |
313 | Switch it back to OpenGL by doing (If it somehows breaks things):
314 |
315 | ```bash
316 | WINEPREFIX=~/wine/affinity winetricks renderer=gl
317 | ```
318 |
319 | ## Can’t even get Debian12 to run on my machine
320 |
321 | If you’re using Nvidia’s graphics card as new as 30 series, chances are Debian12 will straight up glitch out if you boot into the desktop. You need to install Nvidia’s proprietary drivers beforehand:
322 |
323 | 1. Reboot your PC, when screen presenting in grub, navigate to Advanced boot options, and enter **recovery mode** (Choose the option with the (recovery) suffix)
324 | 2. Login as root, check if internet connection is present by $ping google.com
325 | 3. If internet is not connected and you’re sure cable is plugged in, connect to internet manually:
326 |
327 | ```bash
328 | dhclient
329 |
330 | # OR
331 | dhclient eth0
332 | ```
333 |
334 | 4. Edit **/etc/apt/sources.list** with your favorite editor, add contrib non-free non-free-firmware in all repos
335 |
336 | ```bash
337 | # /etc/apt/sources.list
338 |
339 | deb http://deb.debian.org/debian/ bookworm main contrib non-free non-free-firmware
340 | deb-src http://deb.debian.org/debian/ bookworm main contrib non-free non-free-firmware
341 |
342 | deb http://security.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware
343 | deb-src http://security.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware
344 |
345 | deb http://deb.debian.org/debian/ bookworm-updates main contrib non-free non-free-firmware
346 | deb-src http://deb.debian.org/debian/ bookworm-updates main contrib non-free non-free-firmware
347 | ```
348 |
349 | 5. Install nvidia-driver package
350 |
351 | ```bash
352 | # Install driver
353 | apt update
354 | apt install nvidia-driver
355 |
356 | # reboot after completion
357 | systemctl reboot
358 | ```
359 |
360 | Then you’re good to go.
361 |
--------------------------------------------------------------------------------
/WinMetadata.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/daniel080400/AffinityLinuxTut/56e34239b347ad2c49916897ae7daf12ee404d0b/WinMetadata.zip
--------------------------------------------------------------------------------
/af_gtg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/daniel080400/AffinityLinuxTut/56e34239b347ad2c49916897ae7daf12ee404d0b/af_gtg.png
--------------------------------------------------------------------------------
/af_on_linux.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/daniel080400/AffinityLinuxTut/56e34239b347ad2c49916897ae7daf12ee404d0b/af_on_linux.jpg
--------------------------------------------------------------------------------
/wine_af_dir.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/daniel080400/AffinityLinuxTut/56e34239b347ad2c49916897ae7daf12ee404d0b/wine_af_dir.png
--------------------------------------------------------------------------------
/wine_dpi.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/daniel080400/AffinityLinuxTut/56e34239b347ad2c49916897ae7daf12ee404d0b/wine_dpi.png
--------------------------------------------------------------------------------