removed result and added readme
This commit is contained in:
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
result
|
||||||
|
result-*
|
||||||
141
README.md
Normal file
141
README.md
Normal file
@@ -0,0 +1,141 @@
|
|||||||
|
# OpenGOAL Launcher for NixOS
|
||||||
|
|
||||||
|
A Nix package for running [OpenGOAL](https://opengoal.dev) on NixOS — enabling native PC ports of the Jak and Daxter series through the official OpenGOAL Launcher.
|
||||||
|
|
||||||
|
> **AI Disclosure:** This project was developed with heavy assistance from Claude (Anthropic). It works on my machine with all three games launching and playable, but your mileage may vary. Bug reports and PRs welcome.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Read More about OpenGOAL?
|
||||||
|
You can read more about OpenGOAL and the OpenGOAL launcher program with the resources below:
|
||||||
|
- [OpenGOAL](https://opengoal.dev)
|
||||||
|
- [OpenGOAL Launcher](https://github.com/open-goal/launcher)
|
||||||
|
- [OpenGOAL Github](https://github.com/open-goal)
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Requirements
|
||||||
|
|
||||||
|
- NixOS
|
||||||
|
- `nixpkgs.config.allowUnfree = true` (required for `steam-run`)
|
||||||
|
- A PS2 ISO of a supported game
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Installation
|
||||||
|
|
||||||
|
### Option A: Ad-hoc (no system changes)
|
||||||
|
|
||||||
|
```bash
|
||||||
|
git clone <your-gitea-repo-url>
|
||||||
|
cd opengoal-nix
|
||||||
|
nix-build
|
||||||
|
result/bin/opengoal-launcher
|
||||||
|
```
|
||||||
|
|
||||||
|
### Option B: System-wide via `configuration.nix`
|
||||||
|
|
||||||
|
Add to `/etc/nixos/configuration.nix`:
|
||||||
|
|
||||||
|
```nix
|
||||||
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
|
||||||
|
environment.systemPackages = [
|
||||||
|
(pkgs.callPackage /path/to/opengoal-nix/package.nix {})
|
||||||
|
];
|
||||||
|
```
|
||||||
|
|
||||||
|
Then rebuild:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
sudo nixos-rebuild switch
|
||||||
|
opengoal-launcher
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## First Time Setup
|
||||||
|
|
||||||
|
1. Launch the launcher and set your install directory
|
||||||
|
2. Select a game and let the launcher download the game version binaries
|
||||||
|
3. **Run the patch script** to make the downloaded binaries NixOS-compatible:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
opengoal-patch-bins /path/to/opengoal/versions/official/vX.Y.Z
|
||||||
|
```
|
||||||
|
|
||||||
|
For example:
|
||||||
|
```bash
|
||||||
|
opengoal-patch-bins ~/.local/share/opengoal/versions/official/v0.3.1
|
||||||
|
```
|
||||||
|
|
||||||
|
4. Point the launcher at your PS2 ISO and let it extract, decompile, and compile the game
|
||||||
|
5. Click Play
|
||||||
|
|
||||||
|
> **Note:** You must re-run `opengoal-patch-bins` each time the launcher downloads a new game version.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Updating the Launcher
|
||||||
|
|
||||||
|
When a new launcher version is released on [GitHub](https://github.com/open-goal/launcher/releases):
|
||||||
|
|
||||||
|
1. Get the new hash:
|
||||||
|
```bash
|
||||||
|
nix-shell -p nix --run '
|
||||||
|
nix-prefetch-url \
|
||||||
|
https://github.com/open-goal/launcher/releases/download/vX.Y.Z/OpenGOAL-Launcher_X.Y.Z_amd64.AppImage \
|
||||||
|
--type sha256
|
||||||
|
'
|
||||||
|
```
|
||||||
|
|
||||||
|
2. Convert to SRI format:
|
||||||
|
```bash
|
||||||
|
nix-shell -p nix --run '
|
||||||
|
nix hash convert --hash-algo sha256 --to sri <hash-from-above>
|
||||||
|
'
|
||||||
|
```
|
||||||
|
|
||||||
|
3. Update `version` and `hash` in `package.nix` and rebuild:
|
||||||
|
```bash
|
||||||
|
nix-build
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Troubleshooting
|
||||||
|
|
||||||
|
**Game crashes with code 134 after clicking Play**
|
||||||
|
Run `opengoal-patch-bins` on the version directory — the game binaries need to be patched for NixOS after each download.
|
||||||
|
|
||||||
|
**`opengoal-patch-bins` says "already patched" but game still crashes**
|
||||||
|
Restore the originals and repatch:
|
||||||
|
```bash
|
||||||
|
cd /path/to/opengoal/versions/official/vX.Y.Z
|
||||||
|
for bin in gk extractor goalc; do
|
||||||
|
[ -f "$bin.real" ] && mv "$bin.real" "$bin"
|
||||||
|
done
|
||||||
|
opengoal-patch-bins /path/to/opengoal/versions/official/vX.Y.Z
|
||||||
|
```
|
||||||
|
|
||||||
|
**GPU test failed / OpenGL error**
|
||||||
|
Your GPU and drivers support OpenGL — this is a false positive on NixOS. Use the "Bypass error" option in the launcher.
|
||||||
|
|
||||||
|
**Wrong ISO error during extraction**
|
||||||
|
Make sure you are using a PS2 ISO of the original game, not a PSP version. Supported game IDs are SCUS-97124 (Jak 1 NTSC-U), SCES-50456 (PAL), and SCPS-15021 (NTSC-J).
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## How It Works
|
||||||
|
|
||||||
|
The OpenGOAL Launcher is distributed as a DwarFS AppImage (not the more common SquashFS). This package:
|
||||||
|
|
||||||
|
1. Fetches the AppImage and extracts it using `dwarfsextract`
|
||||||
|
2. Installs the self-contained [sharun](https://github.com/VHSgunzo/sharun) launcher bundle
|
||||||
|
3. Provides `opengoal-patch-bins` — a helper that patches downloaded game binaries (`gk`, `extractor`, `goalc`) with the correct NixOS dynamic linker and wraps them in `steam-run` for a full FHS environment
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Contributing
|
||||||
|
|
||||||
|
PRs and issues welcome. The eventual goal is to upstream this to nixpkgs.
|
||||||
Reference in New Issue
Block a user