├── AffinityOnLinux.png ├── AffinityScripts ├── AffinityDesigner.sh ├── AffinityLinuxInstaller.sh ├── AffinityPhoto.sh └── AffinityPublisher.sh ├── Guide └── Guide.md ├── Known-issues.md ├── OpenCL-Guide.md ├── OtherSoftware-on-Linux.md ├── README.md └── wine-dark-theme.reg /AffinityOnLinux.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ryzendew/AffinityOnLinux/63a3de7ca4f369d19c91cb59c07351e6b31133a8/AffinityOnLinux.png -------------------------------------------------------------------------------- /AffinityScripts/AffinityDesigner.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Check for required dependencies 4 | missing_deps="" 5 | 6 | check_dependency() { 7 | if ! command -v "$1" &> /dev/null; then 8 | missing_deps+="$1 " 9 | fi 10 | } 11 | 12 | check_dependency "wine" 13 | check_dependency "winetricks" 14 | check_dependency "wget" 15 | check_dependency "curl" 16 | check_dependency "7z" 17 | check_dependency "tar" 18 | 19 | if [ -n "$missing_deps" ]; then 20 | echo "The following dependencies are missing: $missing_deps" 21 | echo "Please install them and rerun the script." 22 | exit 1 23 | fi 24 | 25 | echo "All dependencies are installed!" 26 | sleep 2 27 | 28 | directory="$HOME/.AffinityLinux" 29 | wine_url="https://github.com/Twig6943/ElementalWarrior-Wine-binaries/releases/download/1.1.1/ElementalWarriorWine-x86_64.tar.gz" 30 | filename="ElementalWarriorWine-x86_64.tar.gz" 31 | 32 | #Kill wine 33 | wineserver -k 34 | # Create install directory 35 | mkdir -p "$directory" 36 | 37 | # Download the specific Wine version 38 | wget -q "$wine_url" -O "$directory/$filename" 39 | 40 | # Download files 41 | wget https://upload.wikimedia.org/wikipedia/commons/3/3c/Affinity_Designer_2-logo.svg -O "/home/$USER/.local/share/icons/AffinityDesigner.svg" 42 | wget https://archive.org/download/win-metadata/WinMetadata.zip -O "$directory/Winmetadata.zip" 43 | 44 | # Extract wine binary 45 | tar -xzf "$directory/$filename" -C "$directory" 46 | 47 | # Find the actual Wine directory and create a symlink if needed 48 | wine_dir=$(find "$directory" -name "ElementalWarriorWine*" -type d | head -1) 49 | if [ -n "$wine_dir" ] && [ "$wine_dir" != "$directory/ElementalWarriorWine" ]; then 50 | echo "Creating Wine directory symlink..." 51 | ln -sf "$wine_dir" "$directory/ElementalWarriorWine" 52 | fi 53 | 54 | # Verify Wine binary exists 55 | if [ ! -f "$directory/ElementalWarriorWine/bin/wine" ]; then 56 | echo "Wine binary not found. Checking directory structure..." 57 | echo "Contents of $directory:" 58 | ls -la "$directory" 59 | if [ -n "$wine_dir" ]; then 60 | echo "Contents of $wine_dir:" 61 | ls -la "$wine_dir" 62 | fi 63 | exit 1 64 | fi 65 | 66 | # Erase the ElementalWarriorWine.tar.gz 67 | rm "$directory/$filename" 68 | 69 | # WINETRICKS stuff 70 | WINEPREFIX="$directory" winetricks --unattended dotnet35 dotnet48 corefonts vcrun2022 allfonts 71 | WINEPREFIX="$directory" winetricks renderer=vulkan 72 | 73 | # Extract & delete WinMetadata.zip 74 | 7z x "$directory/Winmetadata.zip" -o"$directory/drive_c/windows/system32" 75 | rm "$directory/Winmetadata.zip" 76 | # Start the setup 77 | echo "Download the Affinity Designer .exe from https://store.serif.com/account/licences/" 78 | echo "Once downloaded place the .exe in $directory and press any key when ready." 79 | read -n 1 80 | 81 | echo "Click No if you get any errors. Press any key to continue." 82 | read -n 1 83 | 84 | #Set windows version to 11 85 | WINEPREFIX="$directory" "$directory/ElementalWarriorWine/bin/winecfg" -v win11 >/dev/null 2>&1 || true 86 | WINEPREFIX="$directory" "$directory/ElementalWarriorWine/bin/wine" "$directory"/*.exe 87 | rm "$directory"/affinity*.exe 88 | 89 | #Wine dark theme 90 | wget https://raw.githubusercontent.com/Twig6943/AffinityOnLinux/main/wine-dark-theme.reg -O "$directory/wine-dark-theme.reg" 91 | WINEPREFIX="$directory" "$directory/ElementalWarriorWine/bin/regedit" "$directory/wine-dark-theme.reg" 92 | rm "$directory/wine-dark-theme.reg" 93 | 94 | #Remove Desktop entry created by wine 95 | rm "/home/$USER/.local/share/applications/wine/Programs/Affinity Designer 2.desktop" 96 | 97 | # Create Desktop Entry 98 | echo "[Desktop Entry]" >> ~/.local/share/applications/AffinityDesigner.desktop 99 | echo "Name=Affinity Designer" >> ~/.local/share/applications/AffinityDesigner.desktop 100 | echo "Comment=Affinity Designer is a graphic designing and UX solution that helps businesses create concept art, logos, icons, UI designs, print projects and mock-ups, among other illustrations." >> ~/.local/share/applications/AffinityDesigner.desktop 101 | echo "Icon=/home/$USER/.local/share/icons/AffinityDesigner.svg" >> ~/.local/share/applications/AffinityDesigner.desktop 102 | echo "Path=$directory" >> ~/.local/share/applications/AffinityDesigner.desktop 103 | echo "Exec=env WINEPREFIX=$directory $directory/ElementalWarriorWine/bin/wine \"$directory/drive_c/Program Files/Affinity/Designer 2/Designer.exe\"" >> ~/.local/share/applications/AffinityDesigner.desktop 104 | echo "Terminal=false" >> ~/.local/share/applications/AffinityDesigner.desktop 105 | echo "NoDisplay=false" >> ~/.local/share/applications/AffinityDesigner.desktop 106 | echo "StartupWMClass=designer.exe" >> ~/.local/share/applications/AffinityDesigner.desktop 107 | echo "Type=Application" >> ~/.local/share/applications/AffinityDesigner.desktop 108 | echo "Categories=Graphics;" >> ~/.local/share/applications/AffinityDesigner.desktop 109 | echo "StartupNotify=true" >> ~/.local/share/applications/AffinityDesigner.desktop 110 | 111 | cp ~/.local/share/applications/AffinityDesigner.desktop ~/Desktop/AffinityDesigner.desktop 112 | 113 | # Special Thanks section 114 | echo "******************************" 115 | echo " Special Thanks" 116 | echo "******************************" 117 | echo "Ardishco (github.com/raidenovich)" 118 | echo "Deviaze" 119 | echo "Kemal" 120 | echo "Jacazimbo <3" 121 | echo "Kharoon" 122 | echo "Jediclank134" 123 | read -n 1 124 | -------------------------------------------------------------------------------- /AffinityScripts/AffinityLinuxInstaller.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Check if script is executable, if not make it executable 4 | if [ ! -x "$0" ]; then 5 | echo "Making script executable..." 6 | chmod +x "$0" 7 | fi 8 | 9 | # Ensure script is being run with bash 10 | if [ -z "$BASH_VERSION" ]; then 11 | echo "This script must be run with bash" 12 | exit 1 13 | fi 14 | 15 | # ========================================== 16 | # Constants and Configuration 17 | # ========================================== 18 | 19 | # Colors for output 20 | RED='\033[0;31m' 21 | GREEN='\033[0;32m' 22 | YELLOW='\033[1;33m' 23 | NC='\033[0m' # No Color 24 | 25 | # ========================================== 26 | # Utility Functions 27 | # ========================================== 28 | 29 | # Function to download files with progress bar 30 | download_file() { 31 | local url=$1 32 | local output=$2 33 | local description=$3 34 | 35 | echo -e "${YELLOW}Downloading $description...${NC}" 36 | 37 | # Try curl first with progress bar 38 | if command -v curl &> /dev/null; then 39 | curl -# -L "$url" -o "$output" 40 | if [ $? -eq 0 ]; then 41 | return 0 42 | fi 43 | fi 44 | 45 | # Fallback to wget if curl fails or isn't available 46 | if command -v wget &> /dev/null; then 47 | wget --progress=bar:force:noscroll "$url" -O "$output" 48 | if [ $? -eq 0 ]; then 49 | return 0 50 | fi 51 | fi 52 | 53 | echo -e "${RED}Failed to download $description${NC}" 54 | return 1 55 | } 56 | 57 | # ========================================== 58 | # System Detection and Setup Functions 59 | # ========================================== 60 | 61 | # Function to detect Linux distribution 62 | detect_distro() { 63 | if [ -f /etc/os-release ]; then 64 | . /etc/os-release 65 | DISTRO=$ID 66 | VERSION=$VERSION_ID 67 | else 68 | echo -e "${RED}Could not detect Linux distribution${NC}" 69 | exit 1 70 | fi 71 | } 72 | 73 | # Function to check dependencies 74 | check_dependencies() { 75 | local missing_deps="" 76 | 77 | for dep in wine winetricks wget curl 7z tar jq; do 78 | if ! command -v "$dep" &> /dev/null; then 79 | missing_deps+="$dep " 80 | fi 81 | done 82 | 83 | if [ -n "$missing_deps" ]; then 84 | echo -e "${YELLOW}Missing dependencies: $missing_deps${NC}" 85 | install_dependencies 86 | else 87 | echo -e "${GREEN}All dependencies are installed!${NC}" 88 | fi 89 | } 90 | 91 | # Function to install dependencies based on distribution 92 | install_dependencies() { 93 | echo -e "${YELLOW}Installing dependencies for $DISTRO...${NC}" 94 | 95 | case $DISTRO in 96 | "ubuntu"|"linuxmint"|"pop") 97 | sudo apt update 98 | sudo apt install -y wine winetricks wget curl p7zip-full tar jq 99 | ;; 100 | "arch"|"cachyos") 101 | sudo pacman -S --needed wine winetricks wget curl p7zip tar jq 102 | ;; 103 | "fedora"|"nobara") 104 | sudo dnf install -y wine winetricks wget curl p7zip p7zip-plugins tar jq 105 | ;; 106 | "opensuse-tumbleweed"|"opensuse-leap") 107 | sudo zypper install -y wine winetricks wget curl p7zip tar jq 108 | ;; 109 | *) 110 | echo -e "${RED}Unsupported distribution: $DISTRO${NC}" 111 | echo "Please install the following packages manually:" 112 | echo "wine winetricks wget curl p7zip tar jq" 113 | exit 1 114 | ;; 115 | esac 116 | } 117 | 118 | # ========================================== 119 | # Wine Setup Functions 120 | # ========================================== 121 | 122 | # Function to verify Windows version 123 | verify_windows_version() { 124 | local directory="$HOME/.AffinityLinux" 125 | # Try to set Windows version to 11, but ignore errors 126 | WINEPREFIX="$directory" "$directory/ElementalWarriorWine/bin/winecfg" -v win11 >/dev/null 2>&1 || true 127 | echo -e "${GREEN}Attempted to set Windows version to 11 (errors ignored)${NC}" 128 | return 0 129 | } 130 | 131 | # Function to download and setup Wine 132 | setup_wine() { 133 | local directory="$HOME/.AffinityLinux" 134 | local wine_url="https://github.com/Twig6943/ElementalWarrior-Wine-binaries/releases/download/1.1.1/ElementalWarriorWine-x86_64.tar.gz" 135 | local filename="ElementalWarriorWine-x86_64.tar.gz" 136 | 137 | # Kill any running wine processes 138 | wineserver -k 139 | 140 | # Create install directory 141 | mkdir -p "$directory" 142 | 143 | # Download the specific Wine version 144 | download_file "$wine_url" "$directory/$filename" "Wine binaries" 145 | 146 | # Extract wine binary 147 | echo -e "${YELLOW}Extracting Wine binaries...${NC}" 148 | tar -xzf "$directory/$filename" -C "$directory" 149 | rm "$directory/$filename" 150 | 151 | # Find the actual Wine directory and create a symlink if needed 152 | wine_dir=$(find "$directory" -name "ElementalWarriorWine*" -type d | head -1) 153 | if [ -n "$wine_dir" ] && [ "$wine_dir" != "$directory/ElementalWarriorWine" ]; then 154 | echo -e "${YELLOW}Creating Wine directory symlink...${NC}" 155 | ln -sf "$wine_dir" "$directory/ElementalWarriorWine" 156 | fi 157 | 158 | # Verify Wine binary exists 159 | if [ ! -f "$directory/ElementalWarriorWine/bin/wine" ]; then 160 | echo -e "${RED}Wine binary not found. Checking directory structure...${NC}" 161 | echo "Contents of $directory:" 162 | ls -la "$directory" 163 | if [ -n "$wine_dir" ]; then 164 | echo "Contents of $wine_dir:" 165 | ls -la "$wine_dir" 166 | fi 167 | exit 1 168 | fi 169 | 170 | # Create icons directory if it doesn't exist 171 | mkdir -p "$HOME/.local/share/icons" 172 | 173 | # Download and setup additional files 174 | download_file "https://upload.wikimedia.org/wikipedia/commons/f/f5/Affinity_Photo_V2_icon.svg" "$HOME/.local/share/icons/AffinityPhoto.svg" "Affinity Photo icon" 175 | download_file "https://upload.wikimedia.org/wikipedia/commons/8/8a/Affinity_Designer_V2_icon.svg" "$HOME/.local/share/icons/AffinityDesigner.svg" "Affinity Designer icon" 176 | download_file "https://upload.wikimedia.org/wikipedia/commons/9/9c/Affinity_Publisher_V2_icon.svg" "$HOME/.local/share/icons/AffinityPublisher.svg" "Affinity Publisher icon" 177 | 178 | # Download WinMetadata 179 | download_file "https://archive.org/download/win-metadata/WinMetadata.zip" "$directory/Winmetadata.zip" "Windows metadata" 180 | 181 | # Extract WinMetadata 182 | echo -e "${YELLOW}Extracting Windows metadata...${NC}" 183 | 7z x "$directory/Winmetadata.zip" -o"$directory/drive_c/windows/system32" 184 | rm "$directory/Winmetadata.zip" 185 | 186 | # Setup Wine 187 | echo -e "${YELLOW}Setting up Wine environment...${NC}" 188 | WINEPREFIX="$directory" winetricks --unattended dotnet35 dotnet48 corefonts vcrun2022 allfonts 189 | WINEPREFIX="$directory" winetricks renderer=vulkan 190 | 191 | # Set and verify Windows version to 11 192 | verify_windows_version 193 | 194 | # Apply dark theme 195 | download_file "https://raw.githubusercontent.com/Twig6943/AffinityOnLinux/main/wine-dark-theme.reg" "$directory/wine-dark-theme.reg" "dark theme" 196 | WINEPREFIX="$directory" "$directory/ElementalWarriorWine/bin/regedit" "$directory/wine-dark-theme.reg" 197 | rm "$directory/wine-dark-theme.reg" 198 | 199 | echo -e "${GREEN}Wine setup completed successfully!${NC}" 200 | } 201 | 202 | # ========================================== 203 | # Affinity Installation Functions 204 | # ========================================== 205 | 206 | # Function to create desktop entry 207 | create_desktop_entry() { 208 | local app_name=$1 209 | local app_path=$2 210 | local icon_path=$3 211 | local desktop_file="$HOME/.local/share/applications/Affinity$app_name.desktop" 212 | 213 | echo "[Desktop Entry]" > "$desktop_file" 214 | echo "Name=Affinity $app_name" >> "$desktop_file" 215 | echo "Comment=A powerful $app_name software." >> "$desktop_file" 216 | echo "Icon=$icon_path" >> "$desktop_file" 217 | echo "Path=$HOME/.AffinityLinux" >> "$desktop_file" 218 | echo "Exec=env WINEPREFIX=$HOME/.AffinityLinux $HOME/.AffinityLinux/ElementalWarriorWine/bin/wine \"$app_path\"" >> "$desktop_file" 219 | echo "Terminal=false" >> "$desktop_file" 220 | echo "NoDisplay=false" >> "$desktop_file" 221 | echo "StartupWMClass=${app_name,,}.exe" >> "$desktop_file" 222 | echo "Type=Application" >> "$desktop_file" 223 | echo "Categories=Graphics;" >> "$desktop_file" 224 | echo "StartupNotify=true" >> "$desktop_file" 225 | } 226 | 227 | # Function to normalize and validate file path 228 | normalize_path() { 229 | local path="$1" 230 | 231 | # Remove quotes and trim whitespace 232 | path=$(echo "$path" | tr -d '"' | xargs) 233 | 234 | # Handle file:// URLs (common when dragging from file managers) 235 | if [[ "$path" == file://* ]]; then 236 | path=$(echo "$path" | sed 's|^file://||') 237 | # URL decode the path 238 | path=$(printf '%b' "${path//%/\\x}") 239 | fi 240 | 241 | # Convert to absolute path if relative 242 | if [[ ! "$path" = /* ]]; then 243 | path="$(pwd)/$path" 244 | fi 245 | 246 | # Normalize path (remove . and .. components) 247 | path=$(realpath -q "$path" 2>/dev/null || echo "$path") 248 | 249 | echo "$path" 250 | } 251 | 252 | # Function to install Affinity app 253 | install_affinity() { 254 | local app_name=$1 255 | local directory="$HOME/.AffinityLinux" 256 | 257 | # Verify Windows version before installation 258 | verify_windows_version 259 | 260 | echo -e "${YELLOW}Please download the Affinity $app_name .exe from https://store.serif.com/account/licences/${NC}" 261 | echo -e "${YELLOW}Once downloaded, drag and drop the installer into this terminal and press Enter:${NC}" 262 | read installer_path 263 | 264 | # Normalize the path 265 | installer_path=$(normalize_path "$installer_path") 266 | 267 | # Check if file exists and is readable 268 | if [ ! -f "$installer_path" ] || [ ! -r "$installer_path" ]; then 269 | echo -e "${RED}Invalid file path or file is not readable: $installer_path${NC}" 270 | return 1 271 | fi 272 | 273 | # Get the filename from the path 274 | local filename=$(basename "$installer_path") 275 | 276 | # Copy installer to Affinity directory 277 | echo -e "${YELLOW}Copying installer...${NC}" 278 | cp "$installer_path" "$directory/$filename" 279 | 280 | # Run installer 281 | echo -e "${YELLOW}Running installer...${NC}" 282 | echo -e "${YELLOW}Click No if you get any errors. Press any key to continue.${NC}" 283 | read -n 1 284 | 285 | # Run installer with debug messages suppressed 286 | WINEPREFIX="$directory" WINEDEBUG=-all "$directory/ElementalWarriorWine/bin/wine" "$directory/$filename" 287 | 288 | # Clean up installer 289 | rm "$directory/$filename" 290 | 291 | # Remove Wine's default desktop entry 292 | rm -f "/home/$USER/.local/share/applications/wine/Programs/Affinity $app_name 2.desktop" 293 | 294 | # Create desktop entry 295 | case $app_name in 296 | "Photo") 297 | create_desktop_entry "Photo" "$directory/drive_c/Program Files/Affinity/Photo 2/Photo.exe" "$HOME/.local/share/icons/AffinityPhoto.svg" 298 | ;; 299 | "Designer") 300 | create_desktop_entry "Designer" "$directory/drive_c/Program Files/Affinity/Designer 2/Designer.exe" "$HOME/.local/share/icons/AffinityDesigner.svg" 301 | ;; 302 | "Publisher") 303 | create_desktop_entry "Publisher" "$directory/drive_c/Program Files/Affinity/Publisher 2/Publisher.exe" "$HOME/.local/share/icons/AffinityPublisher.svg" 304 | ;; 305 | esac 306 | 307 | echo -e "${GREEN}Affinity $app_name installation completed!${NC}" 308 | } 309 | 310 | # ========================================== 311 | # User Interface Functions 312 | # ========================================== 313 | 314 | # Main menu 315 | show_menu() { 316 | echo -e "${GREEN}Affinity Installation Script${NC}" 317 | echo "1. Install Affinity Photo" 318 | echo "2. Install Affinity Designer" 319 | echo "3. Install Affinity Publisher" 320 | echo "4. Show Special Thanks" 321 | echo "5. Exit" 322 | echo -n "Please select an option (1-5): " 323 | } 324 | 325 | # ========================================== 326 | # Main Script 327 | # ========================================== 328 | 329 | main() { 330 | # Detect distribution 331 | detect_distro 332 | echo -e "${GREEN}Detected distribution: $DISTRO $VERSION${NC}" 333 | 334 | # Check and install dependencies 335 | check_dependencies 336 | 337 | # Setup Wine (only once) 338 | setup_wine 339 | 340 | while true; do 341 | show_menu 342 | read -r choice 343 | 344 | case $choice in 345 | 1) 346 | install_affinity "Photo" 347 | ;; 348 | 2) 349 | install_affinity "Designer" 350 | ;; 351 | 3) 352 | install_affinity "Publisher" 353 | ;; 354 | 4) 355 | show_special_thanks 356 | ;; 357 | 5) 358 | echo -e "${GREEN}Thank you for using the Affinity Installation Script!${NC}" 359 | exit 0 360 | ;; 361 | *) 362 | echo -e "${RED}Invalid option${NC}" 363 | ;; 364 | esac 365 | 366 | echo 367 | read -n 1 -s -r -p "Press any key to continue..." 368 | clear 369 | done 370 | } 371 | 372 | # Run main function 373 | main -------------------------------------------------------------------------------- /AffinityScripts/AffinityPhoto.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Check for required dependencies 4 | missing_deps="" 5 | 6 | check_dependency() { 7 | if ! command -v "$1" &> /dev/null; then 8 | missing_deps+="$1 " 9 | fi 10 | } 11 | 12 | check_dependency "wine" 13 | check_dependency "winetricks" 14 | check_dependency "wget" 15 | check_dependency "curl" 16 | check_dependency "7z" 17 | check_dependency "tar" 18 | 19 | if [ -n "$missing_deps" ]; then 20 | echo "The following dependencies are missing: $missing_deps" 21 | echo "Please install them and rerun the script." 22 | exit 1 23 | fi 24 | 25 | echo "All dependencies are installed!" 26 | sleep 2 27 | 28 | directory="$HOME/.AffinityLinux" 29 | wine_url="https://github.com/Twig6943/ElementalWarrior-Wine-binaries/releases/download/1.1.1/ElementalWarriorWine-x86_64.tar.gz" 30 | filename="ElementalWarriorWine-x86_64.tar.gz" 31 | 32 | #Kill wine 33 | wineserver -k 34 | # Create install directory 35 | mkdir -p "$directory" 36 | 37 | # Download the specific Wine version 38 | wget -q "$wine_url" -O "$directory/$filename" 39 | 40 | # Download files 41 | wget https://upload.wikimedia.org/wikipedia/commons/f/f5/Affinity_Photo_V2_icon.svg -O "/home/$USER/.local/share/icons/AffinityPhoto.svg" 42 | wget https://archive.org/download/win-metadata/WinMetadata.zip -O "$directory/Winmetadata.zip" 43 | 44 | # Extract wine binary 45 | tar -xzf "$directory/$filename" -C "$directory" 46 | 47 | # Find the actual Wine directory and create a symlink if needed 48 | wine_dir=$(find "$directory" -name "ElementalWarriorWine*" -type d | head -1) 49 | if [ -n "$wine_dir" ] && [ "$wine_dir" != "$directory/ElementalWarriorWine" ]; then 50 | echo "Creating Wine directory symlink..." 51 | ln -sf "$wine_dir" "$directory/ElementalWarriorWine" 52 | fi 53 | 54 | # Verify Wine binary exists 55 | if [ ! -f "$directory/ElementalWarriorWine/bin/wine" ]; then 56 | echo "Wine binary not found. Checking directory structure..." 57 | echo "Contents of $directory:" 58 | ls -la "$directory" 59 | if [ -n "$wine_dir" ]; then 60 | echo "Contents of $wine_dir:" 61 | ls -la "$wine_dir" 62 | fi 63 | exit 1 64 | fi 65 | 66 | # Erase the ElementalWarriorWine.tar.gz 67 | rm "$directory/$filename" 68 | 69 | # WINETRICKS stuff 70 | WINEPREFIX="$directory" winetricks --unattended dotnet35 dotnet48 corefonts vcrun2022 allfonts 71 | WINEPREFIX="$directory" winetricks renderer=vulkan 72 | 73 | # Extract & delete WinMetadata.zip 74 | 7z x "$directory/Winmetadata.zip" -o"$directory/drive_c/windows/system32" 75 | rm "$directory/Winmetadata.zip" 76 | # Start the setup 77 | echo "Download the Affinity Photo .exe from https://store.serif.com/account/licences/" 78 | echo "Once downloaded place the .exe in $directory and press any key when ready." 79 | 80 | read -n 1 81 | 82 | echo "Click No if you get any errors. Press any key to continue." 83 | read -n 1 84 | 85 | #Set windows version to 11 86 | WINEPREFIX="$directory" "$directory/ElementalWarriorWine/bin/winecfg" -v win11 >/dev/null 2>&1 || true 87 | WINEPREFIX="$directory" "$directory/ElementalWarriorWine/bin/wine" "$directory"/*.exe 88 | rm "$directory"/affinity*.exe 89 | 90 | #Wine dark theme 91 | wget https://raw.githubusercontent.com/Twig6943/AffinityOnLinux/main/wine-dark-theme.reg -O "$directory/wine-dark-theme.reg" 92 | WINEPREFIX="$directory" "$directory/ElementalWarriorWine/bin/regedit" "$directory/wine-dark-theme.reg" 93 | rm "$directory/wine-dark-theme.reg" 94 | 95 | #Remove Desktop entry created by wine 96 | rm "/home/$USER/.local/share/applications/wine/Programs/Affinity Photo 2.desktop" 97 | 98 | # Create Desktop Entry 99 | echo "[Desktop Entry]" >> ~/.local/share/applications/AffinityPhoto.desktop 100 | echo "Name=Affinity Photo" >> ~/.local/share/applications/AffinityPhoto.desktop 101 | echo "Comment=A powerful image editing software." >> ~/.local/share/applications/AffinityPhoto.desktop 102 | echo "Icon=/home/$USER/.local/share/icons/AffinityPhoto.svg" >> ~/.local/share/applications/AffinityPhoto.desktop 103 | echo "Path=$directory" >> ~/.local/share/applications/AffinityPhoto.desktop 104 | echo "Exec=env WINEPREFIX=$directory $directory/ElementalWarriorWine/bin/wine \"$directory/drive_c/Program Files/Affinity/Photo 2/Photo.exe\"" >> ~/.local/share/applications/AffinityPhoto.desktop 105 | echo "Terminal=false" >> ~/.local/share/applications/AffinityPhoto.desktop 106 | echo "NoDisplay=false" >> ~/.local/share/applications/AffinityPhoto.desktop 107 | echo "StartupWMClass=photo.exe" >> ~/.local/share/applications/AffinityPhoto.desktop 108 | echo "Type=Application" >> ~/.local/share/applications/AffinityPhoto.desktop 109 | echo "Categories=Graphics;" >> ~/.local/share/applications/AffinityPhoto.desktop 110 | echo "StartupNotify=true" >> ~/.local/share/applications/AffinityPhoto.desktop 111 | 112 | cp ~/.local/share/applications/AffinityPhoto.desktop ~/Desktop/AffinityPhoto.desktop 113 | 114 | 115 | # Special Thanks section 116 | echo "******************************" 117 | echo " Special Thanks" 118 | echo "******************************" 119 | echo "Ardishco (github.com/raidenovich)" 120 | echo "Deviaze" 121 | echo "Kemal" 122 | echo "Jacazimbo <3" 123 | echo "Kharoon" 124 | echo "Jediclank134" 125 | read -n 1 126 | -------------------------------------------------------------------------------- /AffinityScripts/AffinityPublisher.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Check for required dependencies 4 | missing_deps="" 5 | 6 | check_dependency() { 7 | if ! command -v "$1" &> /dev/null; then 8 | missing_deps+="$1 " 9 | fi 10 | } 11 | 12 | check_dependency "wine" 13 | check_dependency "winetricks" 14 | check_dependency "wget" 15 | check_dependency "curl" 16 | check_dependency "7z" 17 | check_dependency "tar" 18 | 19 | if [ -n "$missing_deps" ]; then 20 | echo "The following dependencies are missing: $missing_deps" 21 | echo "Please install them and rerun the script." 22 | exit 1 23 | fi 24 | 25 | echo "All dependencies are installed!" 26 | sleep 2 27 | 28 | directory="$HOME/.AffinityLinux" 29 | wine_url="https://github.com/Twig6943/ElementalWarrior-Wine-binaries/releases/download/1.1.1/ElementalWarriorWine-x86_64.tar.gz" 30 | filename="ElementalWarriorWine-x86_64.tar.gz" 31 | 32 | #Kill wine 33 | wineserver -k 34 | # Create install directory 35 | mkdir -p "$directory" 36 | 37 | # Download the specific Wine version 38 | wget -q "$wine_url" -O "$directory/$filename" 39 | 40 | # Download files 41 | wget https://upload.wikimedia.org/wikipedia/commons/9/9c/Affinity_Publisher_V2_icon.svg -O "/home/$USER/.local/share/icons/AffinityPublisher.svg" 42 | wget https://archive.org/download/win-metadata/WinMetadata.zip -O "$directory/Winmetadata.zip" 43 | 44 | # Extract wine binary 45 | tar -xzf "$directory/$filename" -C "$directory" 46 | 47 | # Find the actual Wine directory and create a symlink if needed 48 | wine_dir=$(find "$directory" -name "ElementalWarriorWine*" -type d | head -1) 49 | if [ -n "$wine_dir" ] && [ "$wine_dir" != "$directory/ElementalWarriorWine" ]; then 50 | echo "Creating Wine directory symlink..." 51 | ln -sf "$wine_dir" "$directory/ElementalWarriorWine" 52 | fi 53 | 54 | # Verify Wine binary exists 55 | if [ ! -f "$directory/ElementalWarriorWine/bin/wine" ]; then 56 | echo "Wine binary not found. Checking directory structure..." 57 | echo "Contents of $directory:" 58 | ls -la "$directory" 59 | if [ -n "$wine_dir" ]; then 60 | echo "Contents of $wine_dir:" 61 | ls -la "$wine_dir" 62 | fi 63 | exit 1 64 | fi 65 | 66 | # Erase the ElementalWarriorWine.tar.gz 67 | rm "$directory/$filename" 68 | 69 | # Extract & delete WinMetadata.zip 70 | 7z x "$directory/Winmetadata.zip" -o"$directory/drive_c/windows/system32" 71 | rm "$directory/Winmetadata.zip" 72 | # Start the setup 73 | echo "Download the Affinity Publisher .exe from https://store.serif.com/account/licences/" 74 | echo "Once downloaded place the .exe in $directory and press any key when ready." 75 | read -n 1 76 | 77 | echo "Click No if you get any errors. Press any key to continue." 78 | read -n 1 79 | 80 | #Set windows version to 11 81 | WINEPREFIX="$directory" "$directory/ElementalWarriorWine/bin/winecfg" -v win11 >/dev/null 2>&1 || true 82 | WINEPREFIX="$directory" "$directory/ElementalWarriorWine/bin/wine" "$directory"/*.exe 83 | rm "$directory"/affinity*.exe 84 | 85 | #Wine dark theme 86 | wget https://raw.githubusercontent.com/Twig6943/AffinityOnLinux/main/wine-dark-theme.reg -O "$directory/wine-dark-theme.reg" 87 | WINEPREFIX="$directory" "$directory/ElementalWarriorWine/bin/regedit" "$directory/wine-dark-theme.reg" 88 | rm "$directory/wine-dark-theme.reg" 89 | 90 | #Remove Desktop entry created by wine 91 | rm "/home/$USER/.local/share/applications/wine/Programs/Affinity Publisher 2.desktop" 92 | 93 | # Create Desktop Entry 94 | echo "[Desktop Entry]" >> ~/.local/share/applications/AffinityPublisher.desktop 95 | echo "Name=Affinity Publisher" >> ~/.local/share/applications/AffinityPublisher.desktop 96 | echo "Comment=Affinity Publisher is a desktop publishing application developed by Serif for iPadOS, macOS and Microsoft Windows." >> ~/.local/share/applications/AffinityPublisher.desktop 97 | echo "Icon=/home/$USER/.local/share/icons/AffinityPublisher.svg" >> ~/.local/share/applications/AffinityPublisher.desktop 98 | echo "Path=$directory" >> ~/.local/share/applications/AffinityPublisher.desktop 99 | echo "Exec=env WINEPREFIX=$directory $directory/ElementalWarriorWine/bin/wine \"$directory/drive_c/Program Files/Affinity/Publisher 2/Publisher.exe\"" >> ~/.local/share/applications/AffinityPublisher.desktop 100 | echo "Terminal=false" >> ~/.local/share/applications/AffinityPublisher.desktop 101 | echo "NoDisplay=false" >> ~/.local/share/applications/AffinityPublisher.desktop 102 | echo "StartupWMClass=publisher.exe" >> ~/.local/share/applications/AffinityPublisher.desktop 103 | echo "Type=Application" >> ~/.local/share/applications/AffinityPublisher.desktop 104 | echo "Categories=Graphics;" >> ~/.local/share/applications/AffinityPublisher.desktop 105 | echo "StartupNotify=true" >> ~/.local/share/applications/AffinityPublisher.desktop 106 | 107 | cp ~/.local/share/applications/AffinityPublisher.desktop ~/Desktop/AffinityPublisher.desktop 108 | 109 | # Special Thanks section 110 | echo "******************************" 111 | echo " Special Thanks" 112 | echo "******************************" 113 | echo "Ardishco (github.com/raidenovich)" 114 | echo "Deviaze" 115 | echo "Kemal" 116 | echo "Jacazimbo <3" 117 | echo "Kharoon" 118 | echo "Jediclank134" 119 | read -n 1 120 | -------------------------------------------------------------------------------- /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 pacman -S 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 | -------------------------------------------------------------------------------- /Known-issues.md: -------------------------------------------------------------------------------- 1 | # Known issues ⚠️ 2 | Some users get these errors with the script but are able to get it working with the guide method 3 | 4 | 1.wine: could not load ntdll.so: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.38' not found (required by /home/USER/.AffinityLinux/ElementalWarriorWine/bin/../lib/wine/x86_64-unix/ntdll.so) 5 | 6 | 2.wine : could not load mscoree.dll 7 | -------------------------------------------------------------------------------- /OpenCL-Guide.md: -------------------------------------------------------------------------------- 1 | 1. Install opencl Drivers for your gpu 2 | 3 | Ensure the gpu drivers and opencl drivers are installed for your GPU. 4 | 5 | e.g. for Arch & Nvidia: 6 | 7 | sudo pacman -S opencl-nvidia 8 | 9 | 3. Install VKD3D-Proton 10 | 11 | download vkd3d-proton to Lutris from [ProtonPlus](https://github.com/Vysp3r/ProtonPlus) 12 | 13 | 14 | 4. Configure Lutris 15 | 16 | Open Lutris and go to the game or app's configuration settings. 17 | Navigate to Runner Options. 18 | Select vkd3d-proton as the vkd3d version. 19 | Disable DXVK. 20 | 21 | 5. Launch Affinity Apps 22 | 23 | Run the Affinity apps and verify OpenCL is working by checking the preferences for hardware acceleration. 24 | -------------------------------------------------------------------------------- /OtherSoftware-on-Linux.md: -------------------------------------------------------------------------------- 1 | # [Davinci Resolve 🎥](https://www.blackmagicdesign.com/products/davinciresolve) 2 | DaVinci Resolve 17 Logo 3 | 4 | Use [davincibox](https://github.com/zelikos/davincibox) 5 | 6 | # [OpenMoonray 🌙](https://github.com/dreamworksanimation/openmoonray) 7 | 8 | DaVinci Resolve 17 Logo 9 | 10 | Placeholder 11 | 12 | (Using distrobox to compile should work.) 13 | 14 | (They still don't provide binaries as of writing this.) 15 | 16 | # [Autodesk Maya](https://www.autodesk.com/products/maya/overview) 17 | AutoDesk Maya 18 | 19 | Placeholder 20 | 21 | (Using distrobox to install the .rpm package should work.) 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # AffinityOnLinux 🌹 2 | 3 | A repository that helps users get affinity software working on GNU/Linux 🐧 4 | 5 | [Discord](https://discord.gg/DW2X8MHQuh) 6 | 7 | # [Affinity Apps 📢](https://affinity.serif.com) 8 | 9 | 10 | 11 | Affinity_Designer_2-logo 12 | 13 | Affinity_Photo_V2_icon 14 | 15 | # All-in-One Installer (BETA) 🚀 16 | 17 | **Note: This is a beta version. Please report any issues in our [Discord](https://discord.gg/DW2X8MHQuh)** 18 | 19 | Installs any Affinity app with a single command. Features: 20 | - Automatic distribution detection 21 | - Dependency management 22 | - Interactive menu 23 | - Drag-and-drop installer support 24 | 25 | ```bash 26 | bash -c "$(curl -s https://raw.githubusercontent.com/ryzendew/AffinityOnLinux/refs/heads/main/AffinityScripts/AffinityLinuxInstaller.sh)" 27 | ``` 28 | 29 | [Written Guide 📕](https://github.com/ryzendew/AffinityOnLinux/blob/patch-1/Guide/Guide.md) 30 | 31 | This guide helps you Step by step by hand using Heroic Game launcher or Lutris 32 | 33 | # Individual App Installers 34 | 35 | [Affinity Photo 🤖](https://raw.githubusercontent.com/ryzendew/AffinityOnLinux/refs/heads/main/AffinityScripts/AffinityPhoto.sh) 36 | 37 | ```bash 38 | bash -c "$(curl -s https://raw.githubusercontent.com/ryzendew/AffinityOnLinux/refs/heads/main/AffinityScripts/AffinityPhoto.sh)" 39 | ``` 40 | 41 | [Affinity Designer 🤖](https://raw.githubusercontent.com/ryzendew/AffinityOnLinux/refs/heads/main/AffinityScripts/AffinityDesigner.sh) 42 | 43 | ```bash 44 | bash -c "$(curl -s https://raw.githubusercontent.com/ryzendew/AffinityOnLinux/refs/heads/main/AffinityScripts/AffinityDesigner.sh)" 45 | ``` 46 | 47 | [Affinity Publisher 🤖](https://raw.githubusercontent.com/ryzendew/AffinityOnLinux/refs/heads/main/AffinityScripts/AffinityPublisher.sh) 48 | 49 | ```bash 50 | bash -c "$(curl -s https://raw.githubusercontent.com/ryzendew/AffinityOnLinux/refs/heads/main/AffinityScripts/AffinityPublisher.sh)" 51 | ``` 52 | 53 | # [Other software on GNU/Linux 💻](https://github.com/Twig6943/AffinityOnLinux/blob/main/OtherSoftware-on-Linux.md) 54 | # [Known issues ⚠️](https://github.com/Twig6943/AffinityOnLinux/blob/main/Known-issues.md) 55 | -------------------------------------------------------------------------------- /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 | --------------------------------------------------------------------------------