fix a bunch of issues

This commit is contained in:
Alexander Daichendt 2026-06-06 18:22:16 +02:00
parent 91f88dc9ef
commit 2c3df28c48
66 changed files with 1546 additions and 542 deletions

115
README.md
View file

@ -1,7 +1,114 @@
# Tauri + Leptos
# Razer Linux Desktop
This template should help get you started developing with Tauri and Leptos.
A Tauri + Leptos desktop app for configuring supported Razer devices on Linux.
## Recommended IDE Setup
## CachyOS / Arch Setup
[VS Code](https://code.visualstudio.com/) + [Tauri](https://marketplace.visualstudio.com/items?itemName=tauri-apps.tauri-vscode) + [rust-analyzer](https://marketplace.visualstudio.com/items?itemName=rust-lang.rust-analyzer).
Install the Tauri Linux build dependencies:
```sh
sudo pacman -S --needed \
webkit2gtk-4.1 \
base-devel \
curl \
wget \
file \
openssl \
appmenu-gtk-module \
libappindicator-gtk3 \
librsvg \
xdotool
```
Make sure the Rust Tauri CLI and Trunk are available:
```sh
cargo install tauri-cli --locked
cargo install trunk --locked
```
## Build
From this directory:
```sh
NO_STRIP=true cargo tauri build
```
`NO_STRIP=true` avoids a known AppImage bundling failure on rolling Linux
distributions where linuxdeploy's bundled `strip` can fail on newer ELF
sections.
The AppImage is written under:
```text
target/release/bundle/appimage/
```
## Install Desktop Launcher
This installs the built AppImage into a stable per-user path and creates a
desktop launcher. The launcher continues to work after updates because the
AppImage is always copied to the same filename.
```sh
appimage="$(find target/release/bundle/appimage -maxdepth 1 -name 'razer-linux-desktop_*_amd64.AppImage' -print -quit)"
mkdir -p "$HOME/.local/opt/razer-linux-desktop"
mkdir -p "$HOME/.local/share/applications"
mkdir -p "$HOME/.local/share/icons/hicolor/128x128/apps"
install -m 0755 "$appimage" \
"$HOME/.local/opt/razer-linux-desktop/razer-linux-desktop.AppImage"
install -m 0644 src-tauri/icons/128x128.png \
"$HOME/.local/share/icons/hicolor/128x128/apps/one.daichendt.razer-linux-desktop.png"
cat > "$HOME/.local/share/applications/one.daichendt.razer-linux-desktop.desktop" <<EOF
[Desktop Entry]
Type=Application
Name=Razer Linux Desktop
Comment=Configure Razer devices on Linux
Exec=$HOME/.local/opt/razer-linux-desktop/razer-linux-desktop.AppImage
Icon=one.daichendt.razer-linux-desktop
Terminal=false
Categories=Settings;HardwareSettings;
StartupNotify=true
EOF
update-desktop-database "$HOME/.local/share/applications" 2>/dev/null || true
gtk-update-icon-cache "$HOME/.local/share/icons/hicolor" 2>/dev/null || true
kbuildsycoca6 2>/dev/null || true
```
After this, the app should appear in the desktop environment launcher as
`Razer Linux Desktop`.
## Update Installed App
Pull the latest source, rebuild, and replace the stable AppImage:
```sh
git pull --ff-only
NO_STRIP=true cargo tauri build
appimage="$(find target/release/bundle/appimage -maxdepth 1 -name 'razer-linux-desktop_*_amd64.AppImage' -print -quit)"
install -m 0755 "$appimage" \
"$HOME/.local/opt/razer-linux-desktop/razer-linux-desktop.AppImage"
```
The desktop launcher does not need to be recreated unless the launcher metadata
or icon changes.
## Uninstall
```sh
rm -f "$HOME/.local/share/applications/one.daichendt.razer-linux-desktop.desktop"
rm -f "$HOME/.local/share/icons/hicolor/128x128/apps/one.daichendt.razer-linux-desktop.png"
rm -rf "$HOME/.local/opt/razer-linux-desktop"
update-desktop-database "$HOME/.local/share/applications" 2>/dev/null || true
gtk-update-icon-cache "$HOME/.local/share/icons/hicolor" 2>/dev/null || true
kbuildsycoca6 2>/dev/null || true
```