gamepkg/README.md
2025-04-06 02:15:43 +02:00

52 lines
2 KiB
Markdown

# GamePKG
**Save PG Games as Arch Linux Packages.**
GamePKG allows you to package any game, including ROMs, as an Arch Linux package (`.pkg.tar.zst`). This enables easy installation, removal, and system-wide management of games with `pacman`.
## Features
- **System Integration**: Automatically sets up a desktop menu entry with game icons.
- **Extras Included**: Icons, banners, and additional metadata.
- **Wine Support**: Handles necessary Wine dependencies and launch scripts for Windows games.
- **Effortless Management**: Install and remove games just like any other package.
## Installation & Removal
With GamePKG, games can be distributed via [`pacco`](https://git.hydrar.de/jmarya/pacco), making installations seamless:
```sh
pacman -S games/elden.ring # Install a game
pacman -R games/elden.ring # Remove a game
```
You can also download the packages yourself and install with:
```sh
pacman -U ./pkg.file.tar.gz.zst
```
Since the package files can become very big for games and pacman might not handle it always, you could add the following the `pacman.conf`
```
XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u
```
## Package Format
Each game package should contain:
- **Game Icons** → `/usr/share/icons/`
- **Menu Entry** → `/usr/share/applications/`
- **Game Files** → `/games`
- **README** → Game-specific information
The menu entry should allow launching the game with a single click, requiring no additional setup. The package should declare any necessary dependencies.
Game Icons and Metadata can be sourced from SteamGridDB.
### Naming Convention
Game names should be formatted by replacing spaces with dots (e.g., `Game Title` -> `game.title`).
## Building a Game Package
There are [example templates](https://git.hydrar.de/hydra/gamepkg_base). You can bootstrap a package build template via [g](https://git.hydrar.de/jmarya/g):
```shell
g bootstrap https://git.hydrar.de/hydra/gamepkg_base my_game
```
The command will ask you a few questions regarding the games name, description and platform and then generate a build template as a starting point.