From 8195ad98b07fb52bd44388675f8fa9321d87f7a5 Mon Sep 17 00:00:00 2001 From: pyr0ball Date: Mon, 18 May 2026 18:25:11 -0700 Subject: [PATCH] =?UTF-8?q?feat(m1):=20starter=20pattern=20files=20?= =?UTF-8?q?=E2=80=94=20macos-to-arch=20and=20windows-to-debian?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src-tauri/patterns/macos-to-arch.toml | 65 +++++++++++++++++++++++ src-tauri/patterns/windows-to-debian.toml | 56 +++++++++++++++++++ src-tauri/tauri.conf.json | 3 ++ 3 files changed, 124 insertions(+) create mode 100644 src-tauri/patterns/macos-to-arch.toml create mode 100644 src-tauri/patterns/windows-to-debian.toml diff --git a/src-tauri/patterns/macos-to-arch.toml b/src-tauri/patterns/macos-to-arch.toml new file mode 100644 index 0000000..c12184a --- /dev/null +++ b/src-tauri/patterns/macos-to-arch.toml @@ -0,0 +1,65 @@ +[meta] +source_os = "macos" +target_distro_family = "arch" + +[log_paths] +steam = "~/.local/share/Steam/logs/content_log.txt" +proton = "~/.local/share/Steam/logs/proton_log.txt" +retroarch = "~/.config/retroarch/retroarch.log" +lutris = "~/.cache/lutris/logs/lutris.log" + +[[patterns]] +id = "aur-build-failure" +sources = ["journald"] +match_text = "error: failed to build" +severity = "warn" +title = "AUR package build failed" +body = "A package failed to compile from source. This usually means a missing dependency or a broken AUR package." + +[[patterns]] +id = "aur-pgp-key" +sources = ["journald"] +match_text = "unknown public key" +severity = "warn" +title = "Missing PGP key for AUR package" +body = "The package signature can't be verified. Run: gpg --recv-keys " + +[[patterns]] +id = "proton-runtime-missing" +sources = ["applog:proton"] +match_text = "wine: cannot find" +severity = "warn" +title = "Proton runtime issue" +body = "Steam Proton couldn't find a required file. Try: right-click the game -> Properties -> Local Files -> Verify game files." + +[[patterns]] +id = "steam-disk-write" +sources = ["applog:steam"] +match_text = "ERROR: failed to write" +severity = "warn" +title = "Steam disk write error" +body = "Steam can't write to its library folder. Check that you own the directory: ls -la ~/.local/share/Steam" + +[[patterns]] +id = "retroarch-shader-fail" +sources = ["applog:retroarch"] +match_text = "Failed to compile shader" +severity = "info" +title = "RetroArch shader failed to compile" +body = "A graphical shader couldn't load. Try switching to a different shader preset in Settings -> Video -> Shaders." + +[[patterns]] +id = "kernel-driver-firmware" +sources = ["kmsg"] +match_text = "firmware: failed to load" +severity = "warn" +title = "Missing firmware for hardware" +body = "Your system is missing a firmware file for a hardware component. On Arch, try: sudo pacman -S linux-firmware" + +[[patterns]] +id = "missing-codec" +sources = ["journald"] +match_text = "GStreamer: Failed to find plugin" +severity = "info" +title = "Missing media codec" +body = "A media codec isn't installed. On Arch: sudo pacman -S gst-plugins-good gst-plugins-bad gst-libav" diff --git a/src-tauri/patterns/windows-to-debian.toml b/src-tauri/patterns/windows-to-debian.toml new file mode 100644 index 0000000..29ac17d --- /dev/null +++ b/src-tauri/patterns/windows-to-debian.toml @@ -0,0 +1,56 @@ +[meta] +source_os = "windows" +target_distro_family = "debian" + +[log_paths] +steam = "~/.local/share/Steam/logs/content_log.txt" +proton = "~/.local/share/Steam/logs/proton_log.txt" +retroarch = "~/.config/retroarch/retroarch.log" + +[[patterns]] +id = "apt-lock" +sources = ["journald"] +match_text = "Could not get lock /var/lib/dpkg/lock" +severity = "warn" +title = "Package manager is locked" +body = "Another process is using apt. Wait a moment and try again. If it's stuck: sudo rm /var/lib/dpkg/lock-frontend" + +[[patterns]] +id = "apt-unmet-dependency" +sources = ["journald"] +match_text = "Unmet dependencies" +severity = "warn" +title = "Package dependency conflict" +body = "apt can't resolve a dependency. Try: sudo apt --fix-broken install" + +[[patterns]] +id = "proton-runtime-missing" +sources = ["applog:proton"] +match_text = "wine: cannot find" +severity = "warn" +title = "Proton runtime issue" +body = "Steam Proton couldn't find a required file. Right-click the game -> Properties -> Local Files -> Verify game files." + +[[patterns]] +id = "kernel-driver-firmware" +sources = ["kmsg"] +match_text = "firmware: failed to load" +severity = "warn" +title = "Missing firmware for hardware" +body = "Your system is missing a firmware file. On Debian/Ubuntu/Mint: sudo apt install firmware-linux firmware-linux-nonfree" + +[[patterns]] +id = "missing-codec" +sources = ["journald"] +match_text = "GStreamer: Failed to find plugin" +severity = "info" +title = "Missing media codec" +body = "A media codec isn't installed. Try: sudo apt install ubuntu-restricted-extras" + +[[patterns]] +id = "snap-confinement" +sources = ["journald"] +match_text = "snap: cannot use strict" +severity = "info" +title = "Snap package confinement issue" +body = "A Snap package is having permission trouble. Try running it with --devmode, or look for a Flatpak or apt alternative." diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index d97f2a1..b14185d 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -38,6 +38,9 @@ "bundle": { "active": true, "targets": ["deb", "rpm", "appimage"], + "resources": { + "patterns/*": "patterns/" + }, "icon": [ "icons/32x32.png", "icons/128x128.png",