# Setting up the dev environment on a new machine (Fedora)

All repos live under a single directory, e.g. `~/work/mobile-dev/`.
The scripts expect this layout:

```
mobile-dev/
  forge/       ← this repo
  crustace/
  ltk/
  settings/
  dev-session.sh
  install-native.sh
```

## 1 — Clone all repos

```sh
mkdir -p ~/work/mobile-dev && cd ~/work/mobile-dev

# SSH repos (need your key loaded for devel.liberux.net)
git clone liberux@devel.liberux.net:/export/git/forge
git clone liberux@devel.liberux.net:/export/git/crustace
git clone liberux@devel.liberux.net:/export/git/settings

# HTTPS repo
git clone https://git.eydos.io/Liberux/ltk.git

# Copy the helper scripts from forge/tools/ into mobile-dev/
cp forge/tools/dev-session.sh forge/tools/install-native.sh .
chmod +x dev-session.sh install-native.sh
```

## 2 — Install Rust

```sh
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source ~/.cargo/env
```

Minimum required version: **1.85.0** (forge's `rust-version` field).
`rustup update stable` to get the latest.

## 3 — Install system dependencies

```sh
sudo dnf install -y \
    gcc gcc-c++ clang \
    make pkg-config \
    libseat libseat-devel \
    libdrm libdrm-devel \
    mesa-libEGL-devel mesa-libGL-devel mesa-libgbm-devel \
    wayland-devel \
    fontconfig \
    dbus-devel \
    systemd-devel
```

## 4 — Dev session (nested, inside GNOME)

Builds everything in debug mode, disables GNOME's Alt+Tab, launches forge
inside a winit window with a few test apps:

```sh
cd ~/work/mobile-dev
./dev-session.sh
```

Ctrl+C stops everything and restores keybindings.

## 5 — Native install (boots as a GDM session)

Builds release binaries, installs them system-wide, and registers Crustace
in the GDM session dropdown:

```sh
cd ~/work/mobile-dev
./install-native.sh
```

After the script finishes, log out of GNOME, pick **Crustace** from the
GDM gear menu, and log in.

Recovery if the session hangs: `Ctrl+Alt+F3` → `pkill -9 forge crustace`
→ `Ctrl+Alt+F2`.  GNOME remains available in the dropdown at all times.

## 6 — Git identity (if not set globally)

```sh
git config --global user.email "y4m4bush1@protonmail.com"
git config --global user.name  "yamabush1"
```
