# Install the Nuldrums Portal launcher

Nuldrums Portal is the desktop launcher for Nuldrums games: it handles sign-in, purchases, game installs and updates. It updates itself after the first install, so always use the `-latest` URLs below.

Before installing: tell the user what you are about to download and run, and get their go-ahead. Installers that need `sudo` must be run by, or with the approval of, the user.

## 1. Detect the platform

| Platform | Supported | Go to |
|---|---|---|
| Windows (x86_64) | yes | [Windows](#windows) |
| Linux (x86_64) | yes | [Linux](#linux) |
| Android | yes (sideloaded APK) | [Android](#android) |
| macOS | not yet; a build is planned | stop and tell the user |
| iOS / iPadOS | no | stop and tell the user |

There is no ARM Linux or ARM Windows build.

## Windows

NSIS installer, per-user by default.

```powershell
$f = "$env:TEMP\NuldrumsPortal-latest.exe"
Invoke-WebRequest -Uri "https://releases.nuldrums.world/launcher/NuldrumsPortal-latest.exe" -OutFile $f
Start-Process -FilePath $f -Wait      # interactive installer
# Start-Process -FilePath $f -ArgumentList "/S" -Wait   # silent install, only if the user asked for it
```

Afterwards "Nuldrums Portal" is in the Start menu.

## Linux

Pick the package by distribution. Check `/etc/os-release`:

```sh
. /etc/os-release; echo "ID=$ID ID_LIKE=$ID_LIKE"
```

### Debian, Ubuntu, Mint, Pop!_OS, elementary (`ID` or `ID_LIKE` contains `debian` or `ubuntu`)

```sh
curl -fL -o /tmp/NuldrumsPortal.deb "https://releases.nuldrums.world/launcher/NuldrumsPortal-linux-latest.deb"
sudo apt install /tmp/NuldrumsPortal.deb
```

### Fedora, RHEL, Rocky, Alma, Nobara (`ID_LIKE` contains `fedora` or `rhel`)

```sh
curl -fL -o /tmp/NuldrumsPortal.rpm "https://releases.nuldrums.world/launcher/NuldrumsPortal-linux-latest.rpm"
sudo dnf install /tmp/NuldrumsPortal.rpm
```

### openSUSE (`ID_LIKE` contains `suse`)

```sh
curl -fL -o /tmp/NuldrumsPortal.rpm "https://releases.nuldrums.world/launcher/NuldrumsPortal-linux-latest.rpm"
sudo zypper install --allow-unsigned-rpm /tmp/NuldrumsPortal.rpm
```

### Arch, Manjaro, EndeavourOS, anything else: AppImage

```sh
mkdir -p ~/Applications
curl -fL -o ~/Applications/NuldrumsPortal.AppImage "https://releases.nuldrums.world/launcher/NuldrumsPortal-linux-latest.AppImage"
chmod +x ~/Applications/NuldrumsPortal.AppImage
~/Applications/NuldrumsPortal.AppImage
```

If the AppImage fails with a FUSE error, install FUSE 2 (`sudo pacman -S fuse2` on Arch, `libfuse2` / `libfuse2t64` on Debian-likes) or run it with `--appimage-extract-and-run`.

## Android

The APK is sideloaded (not on Google Play). The user has to allow "Install unknown apps" for whichever app opens the file.

- On the phone: open https://releases.nuldrums.world/launcher/NuldrumsPortal-android-latest.apk in the browser and tap the downloaded file.
- From a computer with the phone connected over USB debugging:

```sh
curl -fL -o /tmp/NuldrumsPortal.apk "https://releases.nuldrums.world/launcher/NuldrumsPortal-android-latest.apk"
adb install -r /tmp/NuldrumsPortal.apk
```

## After installing

Open Nuldrums Portal and have the user sign in with their Nuldrums account (or create one at https://nuldrums.world). Owned games are installed from inside the launcher. Sign-in and purchases are the user's to do; don't enter credentials for them.

## Links

- Human download page: https://nuldrums.world/games
- Site index for agents: https://nuldrums.world/llms.txt
