Install from CLI #315
-
|
I love this project, and I've been considering how I could install it both on MacOS and Linux (Ubuntu), through CLI. I could get the release files and install them, but would there be an easier way around this, like say installing with cargo (I believe GUI apps can't be installed with Cargo because of Tauri, but I'm a Rust noob), or something like that? Thanks and great job on this app! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
|
Thanks for the kind words 🙏 Why CLI install today, using the GitHub Releases artifacts. macOS (universal — works on Apple Silicon and Intel): URL=$(curl -sL 'https://api.github.com/repos/Xoshbin/asyar-launcher/releases?per_page=1' \
| grep -oE '"https://[^"]+universal\.dmg"' \
| tr -d '"' \
| head -n1)
curl -L "$URL" -o /tmp/asyar.dmg
MOUNT=$(hdiutil attach -nobrowse /tmp/asyar.dmg | tail -1 \
| awk '{for(i=3;i<=NF;i++) printf "%s%s", $i, (i<NF?OFS:ORS)}')
cp -R "$MOUNT/asyar.app" /Applications/
hdiutil detach "$MOUNT"Linux (Ubuntu, Debian, Fedora, Arch — AppImage is distro-agnostic): sudo apt install -y curl libfuse2 # apt-based distros
URL=$(curl -sL 'https://api.github.com/repos/Xoshbin/asyar-launcher/releases?per_page=1' \
| grep -oE '"https://[^"]+amd64\.AppImage"' \
| tr -d '"' \
| head -n1)
mkdir -p ~/Applications
curl -L "$URL" -o ~/Applications/asyar.AppImage
chmod +x ~/Applications/asyar.AppImage
~/Applications/asyar.AppImageWindows (PowerShell — auto-detects x64 vs arm64): $arch = if ([System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture -eq 'Arm64') { 'arm64' } else { 'x64' }
$pattern = "${arch}_en-US\.msi`$"
$url = (Invoke-RestMethod 'https://api.github.com/repos/Xoshbin/asyar-launcher/releases?per_page=1').assets `
| Where-Object { $_.name -match $pattern -and $_.name -notmatch '\.sig$' } `
| Select-Object -First 1 -ExpandProperty browser_download_url
Invoke-WebRequest $url -OutFile "$env:TEMP\asyar.msi"
Start-Process msiexec.exe -ArgumentList "/i", "`"$env:TEMP\asyar.msi`"" -WaitIn the future we may add what you're really asking for: |
Beta Was this translation helpful? Give feedback.
-
|
Circling back on this — CLI install is live now for macOS and Linux:
It detects your OS/arch, grabs the right build, and installs it. Also added a Homebrew tap for macOS: |
Beta Was this translation helpful? Give feedback.
Thanks for the kind words 🙏
Why
cargo installwon't work: Tauri ships GUI apps as bundled applications (.dmg,.AppImage,.msi) — not single Rust binaries. They include a compiled web frontend, OS entitlements, and code-signing.cargo installonly knows how to drop a standalone binary into~/.cargo/bin, so it has no way to install a Tauri app properly.CLI install today, using the GitHub Releases artifacts.
macOS (universal — works on Apple Silicon and Intel):