Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,10 @@ yarn-error.log*
# typescript
*.tsbuildinfo
next-env.d.ts

# makepkg build artifacts
packaging/arch/src/
packaging/arch/pkg/
packaging/arch/lokiasam-*/
packaging/arch/*.pkg.tar.*
packaging/arch/*.tar.gz
39 changes: 28 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,29 +52,29 @@ sudo dnf install ./LokiASAM_*_x86_64.rpm

### Arch Linux / CachyOS / Manjaro

AppImage and pre-built binaries do not work reliably on rolling-release distros due to bundled library conflicts. Build from source instead:
AppImage and pre-built binaries do not work reliably on rolling-release distros due to bundled library conflicts. Build from source instead using the universal install script:

```bash
# Install build dependencies
sudo pacman -S --needed rust nodejs pnpm

git clone https://github.com/LokiRothbrook/LokiASAM.git
cd LokiASAM/packaging/arch
makepkg -si
cd LokiASAM
./install.sh
```

`makepkg -si` builds the app using your system's native libraries and installs it via pacman — icons, the `.desktop` entry, and shell integration all work correctly out of the box.
The script builds the app and installs it via pacman — icons, the `.desktop` entry, and shell integration all work correctly out of the box.

To uninstall:

```bash
sudo pacman -R lokiasam
./uninstall.sh
```

To update, pull the latest source and rebuild:
To update, pull the latest source and run the script again:

```bash
cd LokiASAM
git pull
cd packaging/arch
makepkg -si
cd LokiASAM && git pull && ./install.sh
```

### Generic Linux (AppImage)
Expand Down Expand Up @@ -104,7 +104,24 @@ Run the `LokiASAM_*_x64-setup.exe` installer.
- Linux: `webkit2gtk-4.1`, `libappindicator-gtk3`, `librsvg`, `patchelf`
- Windows: WebView2 (ships with Windows 11; installer available for Windows 10)

**Steps**
**Universal install script (Linux)**

`install.sh` detects your distro and builds + installs the native package automatically:

| Distro family | Build output | Installer |
|---|---|---|
| Arch / CachyOS / Manjaro | binary | `makepkg` → `pacman` |
| Debian / Ubuntu / Mint | `.deb` | `dpkg` + `apt` |
| Fedora / openSUSE / RHEL | `.rpm` | `dnf` / `zypper` / `rpm` |

```bash
git clone https://github.com/LokiRothbrook/LokiASAM.git
cd LokiASAM
./install.sh # build and install
./uninstall.sh # remove
```

**Manual steps (dev / Windows)**

```bash
git clone https://github.com/LokiRothbrook/LokiASAM.git
Expand Down
96 changes: 96 additions & 0 deletions install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
#!/usr/bin/env bash
set -euo pipefail

cd "$(dirname "$0")"

# ---------------------------------------------------------------------------
# Distro detection
# ---------------------------------------------------------------------------
detect_family() {
if [[ ! -f /etc/os-release ]]; then
echo "unknown"
return
fi
local id id_like
id=$(grep -E '^ID=' /etc/os-release | cut -d= -f2 | tr -d '"')
id_like=$(grep -E '^ID_LIKE=' /etc/os-release | cut -d= -f2 | tr -d '"' || true)

if [[ "$id" == "arch" || "$id_like" == *"arch"* ]]; then
echo "arch"
elif [[ "$id" == "debian" || "$id_like" == *"debian"* ]]; then
echo "deb"
elif [[ "$id" == "fedora" || "$id" == "rhel" || "$id" == "centos" || \
"$id" == opensuse* || "$id_like" == *"fedora"* || \
"$id_like" == *"rhel"* || "$id_like" == *"suse"* ]]; then
echo "rpm"
else
echo "unknown"
fi
}

FAMILY=$(detect_family)

if [[ "$FAMILY" == "unknown" ]]; then
echo "ERROR: Could not detect a supported Linux distribution."
echo "Supported: Arch/CachyOS/Manjaro, Debian/Ubuntu/Mint, Fedora/openSUSE/RHEL"
exit 1
fi

echo "==> Detected package family: $FAMILY"

# ---------------------------------------------------------------------------
# Install JS dependencies (all distros)
# ---------------------------------------------------------------------------
echo "==> Installing JS dependencies..."
pnpm install --frozen-lockfile

# ---------------------------------------------------------------------------
# Build and install
# ---------------------------------------------------------------------------
case "$FAMILY" in
arch)
echo "==> Building LokiASAM (no bundle)..."
pnpm tauri build --no-bundle

echo "==> Installing via pacman..."
cd packaging/arch
makepkg -si
;;

deb)
echo "==> Building LokiASAM .deb package..."
pnpm tauri build --bundles deb

DEB=$(find src-tauri/target/release/bundle/deb -name "*.deb" | head -1)
if [[ -z "$DEB" ]]; then
echo "ERROR: .deb package not found after build."
exit 1
fi

echo "==> Installing $DEB..."
sudo dpkg -i "$DEB"
sudo apt-get install -f -y
;;

rpm)
echo "==> Building LokiASAM .rpm package..."
pnpm tauri build --bundles rpm

RPM=$(find src-tauri/target/release/bundle/rpm -name "*.rpm" | head -1)
if [[ -z "$RPM" ]]; then
echo "ERROR: .rpm package not found after build."
exit 1
fi

echo "==> Installing $RPM..."
if command -v dnf &>/dev/null; then
sudo dnf install -y "$RPM"
elif command -v zypper &>/dev/null; then
sudo zypper install -y "$RPM"
else
sudo rpm -i "$RPM"
fi
;;
esac

echo "==> LokiASAM installed successfully."
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "lokiasam",
"version": "0.13.0",
"version": "0.13.1",
"private": true,
"scripts": {
"dev": "next dev",
Expand Down
30 changes: 13 additions & 17 deletions packaging/arch/PKGBUILD
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Maintainer: Arron Ohnemus <lokiaj2017@gmail.com>
pkgname=lokiasam
pkgver=0.13.0
pkgver=0.13.1
pkgrel=1
pkgdesc="Loki ARK Survival Ascended Server Manager — a desktop app for managing dedicated ASA servers"
arch=("x86_64")
Expand All @@ -13,32 +13,28 @@ depends=(
"librsvg"
"xdg-utils"
)
makedepends=(
"rust"
"cargo"
"nodejs"
"pnpm"
"git"
)
makedepends=()
install=lokiasam.install
source=("$pkgname-$pkgver::git+$url.git#tag=v$pkgver")
sha256sums=("SKIP")

source=()
sha256sums=()

_repodir="$(realpath "$startdir/../..")"

build() {
cd "$srcdir/$pkgname-$pkgver"
pnpm install --frozen-lockfile
pnpm tauri build --bundles none
# The binary is built by install.sh before makepkg runs.
# Nothing to do here.
:
}

package() {
cd "$srcdir/$pkgname-$pkgver"

# Binary
install -Dm755 "src-tauri/target/release/lokiasam" "$pkgdir/usr/bin/lokiasam"
install -Dm755 "$_repodir/src-tauri/target/release/lokiasam" \
"$pkgdir/usr/bin/lokiasam"

# Icons
for size in 32x32 128x128 256x256 512x512; do
local src="src-tauri/icons/${size}.png"
local src="$_repodir/src-tauri/icons/${size}.png"
if [[ -f "$src" ]]; then
install -Dm644 "$src" \
"$pkgdir/usr/share/icons/hicolor/${size}/apps/xyz.lokisoft.lokiasam.png"
Expand Down
2 changes: 1 addition & 1 deletion src-tauri/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "lokiasam"
version = "0.13.0"
version = "0.13.1"
description = "Loki Ark Survival Ascended Server Manager"
authors = ["Loki"]
license = "GPL-3.0-or-later"
Expand Down
2 changes: 1 addition & 1 deletion src-tauri/tauri.conf.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "https://schema.tauri.app/config/2",
"productName": "LokiASAM",
"version": "0.13.0",
"version": "0.13.1",
"identifier": "xyz.lokisoft.lokiasam",
"build": {
"frontendDist": "../out",
Expand Down
54 changes: 54 additions & 0 deletions uninstall.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
#!/usr/bin/env bash
set -euo pipefail

# ---------------------------------------------------------------------------
# Distro detection
# ---------------------------------------------------------------------------
detect_family() {
if [[ ! -f /etc/os-release ]]; then
echo "unknown"
return
fi
local id id_like
id=$(grep -E '^ID=' /etc/os-release | cut -d= -f2 | tr -d '"')
id_like=$(grep -E '^ID_LIKE=' /etc/os-release | cut -d= -f2 | tr -d '"' || true)

if [[ "$id" == "arch" || "$id_like" == *"arch"* ]]; then
echo "arch"
elif [[ "$id" == "debian" || "$id_like" == *"debian"* ]]; then
echo "deb"
elif [[ "$id" == "fedora" || "$id" == "rhel" || "$id" == "centos" || \
"$id" == opensuse* || "$id_like" == *"fedora"* || \
"$id_like" == *"rhel"* || "$id_like" == *"suse"* ]]; then
echo "rpm"
else
echo "unknown"
fi
}

FAMILY=$(detect_family)

case "$FAMILY" in
arch)
sudo pacman -R lokiasam
;;
deb)
sudo apt remove -y lokiasam 2>/dev/null || sudo dpkg -r lokiasam
;;
rpm)
if command -v dnf &>/dev/null; then
sudo dnf remove -y lokiasam
elif command -v zypper &>/dev/null; then
sudo zypper remove -y lokiasam
else
sudo rpm -e lokiasam
fi
;;
*)
echo "ERROR: Could not detect a supported Linux distribution."
echo "Remove manually: the binary is at /usr/bin/lokiasam"
exit 1
;;
esac

echo "==> LokiASAM uninstalled."
Loading