Add XDG Games desktop shortcut, hicolor icons, and installable asset lookup

This commit is contained in:
Luxferre committed 2026-12-01 09:51:29 +02:00
1 parent 554958db9a
commit d001f214aa
12 files changed
+445 -35

No files matched your search

+4 -3
View File
@@ -13,7 +13,7 @@ A modern, cross-platform **SDL2 + OpenGL 3.3 Core** C++20 source port of Bullfro
- POSIX `make`
- `SDL2` development libraries & headers (`pkg-config` or `sdl2-config`)
- OpenGL 3.3+ drivers / system headers
- Essential game assets in `./data` (default lookup; can also be overridden via `--data-dir` or `HIOCTANE_DATA`, with `./HiOctane` supported as a legacy fallback). Optional `DATA/INTRO.DAT` is excluded by default so the game boots cleanly to the title screen.
- Essential game assets in `./data` (default lookup; also searches relocatable `../share/top-octane/data` and XDG `XDG_DATA_HOME`/`XDG_DATA_DIRS` directories when installed, or can be overridden via `--data-dir` or `HIOCTANE_DATA`, with `./HiOctane` supported as a legacy fallback). Optional `DATA/INTRO.DAT` is excluded by default so the game boots cleanly to the title screen.
## Building & running
@@ -27,7 +27,8 @@ make smoke # runs `./top-octane --smoke-test 30`
Other make targets:
- `make debug`: builds `./top-octane` with `-g -O0` (automatically cleans stale release objects).
- `make install` / `make uninstall`: installs/removes `top-octane` in `$(DESTDIR)$(PREFIX)/bin` (default `PREFIX=/usr/local`).
- `make install` / `make uninstall`: installs/removes `top-octane`, game assets (`$(PREFIX)/share/top-octane/data`), XDG desktop shortcut (`$(PREFIX)/share/applications/top-octane.desktop`, **Games** menu group), and hicolor icons (`scalable`, `48x48`–`256x256`) into `$(DESTDIR)$(PREFIX)` (default `PREFIX=/usr/local`).
- `make install-user` / `make uninstall-user`: installs/removes per-user (rootless) into `~/.local/bin` and `${XDG_DATA_HOME:-~/.local/share}` (adds **Top-Octane** to the desktop **Games** menu for the current user).
- `make clean`: removes built objects, libraries, binaries, and `.buildmode`.
### Windows (MSYS2 / MinGW)
@@ -38,7 +39,7 @@ make test
```
## CLI options
- `--data-dir <path>`: Path to the read-only assets directory (default: `./data`; also reads `HIOCTANE_DATA` env var).
- `--data-dir <path>`: Path to the read-only assets directory (default: `./data` or installed/XDG data dirs; also reads `HIOCTANE_DATA` env var).
- `--track <1..6>`: Jump directly into a race on track 1–6.
- `--track-viewer <1..6>`: Open interactive 3D track inspection camera.
- `--classic`: Launch in 4:3 classic palette visual mode.