update

This commit is contained in:
JMARyA 2025-04-06 02:15:43 +02:00
parent aebd47503e
commit a886273e64
Signed by: jmarya
GPG key ID: 901B2ADDF27C2263
11 changed files with 6 additions and 169 deletions

View file

@ -43,7 +43,10 @@ Game Icons and Metadata can be sourced from SteamGridDB.
Game names should be formatted by replacing spaces with dots (e.g., `Game Title` -> `game.title`). Game names should be formatted by replacing spaces with dots (e.g., `Game Title` -> `game.title`).
## Building a Game Package ## Building a Game Package
See the `examples/` directory for a minimal build template to package games. 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):
- [Windows Games](./examples/wine/) ```shell
- [PlayStation 3](./examples/ps3/) 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.

View file

@ -1,60 +0,0 @@
#!/usr/bin/python
import sys
import os
def main():
if len(sys.argv) < 3:
print("Usage: script.py <output_path> <game_title>")
sys.exit(1)
out_path = sys.argv[1]
game_title = sys.argv[2]
game_desc = input("Enter game description: ")
safe_game_title = game_title.replace(" ", ".").lower()
print("Creating pkg structure")
root = os.path.join(out_path, "root")
os.makedirs(root, exist_ok=True)
os.makedirs(
os.path.join(root, "games", "rom", "ps3", safe_game_title)
,
exist_ok=True
)
os.makedirs(
os.path.join(root, "usr", "share", "icons", safe_game_title)
,
exist_ok=True
)
os.makedirs(
os.path.join(root, "usr", "share", "applications")
,
exist_ok=True
)
open(
os.path.join(root, "usr", "share", "applications", f"{game_title}.desktop"),
"w"
).write(
open("./examples/ps3/root/usr/share/applications/Game Title.desktop").read()
.replace("<GAME_TITLE>", game_title)
.replace("<GAME_DESC>", game_desc)
.replace("game.title", safe_game_title)
)
open(
os.path.join(out_path, "PKGBUILD"),
"w"
).write(
open("./examples/ps3/PKGBUILD").read()
.replace("<GAME_DESC>", game_desc)
.replace("game.title", safe_game_title)
)
if __name__ == "__main__":
main()

View file

@ -1,60 +0,0 @@
#!/usr/bin/python
import sys
import os
def main():
if len(sys.argv) < 3:
print("Usage: script.py <output_path> <game_title>")
sys.exit(1)
out_path = sys.argv[1]
game_title = sys.argv[2]
game_desc = input("Enter game description: ")
safe_game_title = game_title.replace(" ", ".").lower()
print("Creating pkg structure")
root = os.path.join(out_path, "root")
os.makedirs(root, exist_ok=True)
os.makedirs(
os.path.join(root, "games", safe_game_title)
,
exist_ok=True
)
os.makedirs(
os.path.join(root, "usr", "share", "icons", safe_game_title)
,
exist_ok=True
)
os.makedirs(
os.path.join(root, "usr", "share", "applications")
,
exist_ok=True
)
open(
os.path.join(root, "usr", "share", "applications", f"{game_title}.desktop"),
"w"
).write(
open("./examples/wine/root/usr/share/applications/Game Title.desktop").read()
.replace("<GAME_TITLE>", game_title)
.replace("<GAME_DESC>", game_desc)
.replace("game.title", safe_game_title)
)
open(
os.path.join(out_path, "PKGBUILD"),
"w"
).write(
open("./examples/wine/PKGBUILD").read()
.replace("<GAME_DESC>", game_desc)
.replace("game.title", safe_game_title)
)
if __name__ == "__main__":
main()

View file

@ -1,12 +0,0 @@
pkgname=game.title
pkgver=1.0
pkgrel=1
pkgdesc="<GAME_DESC>"
arch=('x86_64')
depends=('rpcs3')
source=()
sha256sums=()
package() {
rsync -vzr ../root/ "$pkgdir/"
}

View file

@ -1 +0,0 @@
GAME CONTENT

View file

@ -1,9 +0,0 @@
[Desktop Entry]
Name=<GAME_TITLE>
Comment=<GAME_DESC>
Exec=rpcs3 --no-gui --fullscreen "/games/rom/ps3/game.title/PS3_GAME"
Icon=/usr/share/icons/game.title/icon1.ico
StartupNotify=true
Terminal=false
Type=Application
Categories=Game;

View file

@ -1 +0,0 @@
GAME CONTENT

View file

@ -1,12 +0,0 @@
pkgname=game.title
pkgver=1.0
pkgrel=1
pkgdesc="<GAME_DESC>"
arch=('x86_64')
depends=('wine' 'umu-launcher')
source=()
sha256sums=()
package() {
rsync -vzr ../root/ "$pkgdir/"
}

View file

@ -1 +0,0 @@
GAME CONTENT

View file

@ -1,9 +0,0 @@
[Desktop Entry]
Name=<GAME_TITLE>
Comment=<GAME_DESC>
Exec=env WINEPREFIX="$HOME/Games/umu/game.title" STEAM_COMPAT_LIBRARY_PATHS="/games" bash -c "cd /games/game.title && umu-run /games/game.title/_Redist/vc_redist.x64.exe /Install /Quiet && umu-run /games/game.title/_Redist/vc_redist.x86.exe /Install /Quiet && umu-run /games/game.title/game.exe"
Icon=/usr/share/icons/game.title/icon1.ico
StartupNotify=true
Terminal=false
Type=Application
Categories=Game;

View file

@ -1 +0,0 @@
GAME CONTENT