gamelib/README.md

124 lines
2.7 KiB
Markdown
Raw Permalink Normal View History

2024-01-11 20:55:42 +03:00
gamelib
=======
`gamelib` is a shell script for gaming on [FreeBSD](https://www.freebsd.org).
## Supported emulators:
- amd64
- dolphin
- dosbox
- gzdoom
- pcsxr
- renpy
- wine
- wine32 (lib32 required)
- i386 **\[UNTESTED\]**
- dolphin
- dosbox
- gzdoom
- pcsxr
- renpy
- wine
## Pre-requirements:
- Running X11.
- `pkg` (any version with `fetch` subcommand but **not** 1.13.1, it's broken!)
installed;
- Binary repo(s) with supported emulators/engines enabled;
- No need to install any packages (except `pkg` itself), they'll never be used;
- **\[OPTIONAL\]** amd64 with lib32 support (used by `i386-wine`);
## Setup games:
### The structure of the directory with games:
- `$GAMELIB_GAMES_DIR`
- `gamename/` (without spaces)
- `gamelib.conf` (see below)
- `game/` (place here game files)
- `prefix/` (do **not** create it manually!)
### The structure of `gamelib.conf`:
| Function | Description |
| :---: | --- |
| `prerun()` | Function that triggered any time before game run |
| `prerun_first()` | Function that triggered after prefix was created |
These functions available for all supported emulators/engines, even if
`gamelib.conf` does not required.
#### dolphin
| Variable | Description |
| :---: | --- |
| `dolphin_file=` | GameCube/Wii disk image file (relative from the `game/`, see above) |
#### dosbox
| Variable | Description |
| :---: | --- |
| `dosbox_file=` | MS-DOS executable (relative from the `game/`, see above) |
#### gzdoom
| Variable | Description |
| :---: | --- |
| `gzdoom_file=` | WAD file (relative from the `game/`, see above) |
#### pcsxr
| Variable | Description |
| :---: | --- |
| `pcsxr_file=` | Sony PlayStation (PSX) image file (relative from the `game/`, see above) |
| `pcsxr_plugins_dir=` | Absolute path to the directory with plugins, they will be symlinked to the prefix |
| `pcsxr_bios_dir=` | Absolute path to the directory with bios, they will be symlinked to the prefix |
#### renpy
No `gamelib.conf` required.
#### wine (any arch)
| Variable | Description |
| :---: | --- |
| `wine_file=` | Microsoft Windows executable (PE32/PE32+) (relative from the `game/`, see above) |
| `wine_args=` | Additional arguments for the executable |
| `wine_dlls=` | Space-separated dlls that will be installed by winetricks |
| `wine_settings=` | Space-separated settings that will be configured by winetricks |
## Pre-run:
```
export GAMELIB_GAMES_DIR="${HOME}/games"
```
Optional, you can set `GAMELIB_DEBUG` to enable stdout/stderr (in any case,
everything will be logged to `$GAMELIB_GAMES_DIR/.gamelib/gamelib.log`):
```
export GAMELIB_DEBUG=1
```
Then run gamelib:
```
/path/to/gamelib/gamelib help
```
## License:
This project is licensed under the terms of [2-Clause BSD](./LICENSE).