diff --git a/README.md b/README.md index c5cc3c3..eeda3eb 100644 --- a/README.md +++ b/README.md @@ -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`). ## 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/) -- [PlayStation 3](./examples/ps3/) +```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. diff --git a/create_ps3.py b/create_ps3.py deleted file mode 100644 index 3e74393..0000000 --- a/create_ps3.py +++ /dev/null @@ -1,60 +0,0 @@ -#!/usr/bin/python -import sys -import os - -def main(): - if len(sys.argv) < 3: - print("Usage: script.py ") - 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) - .replace("", 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) - .replace("game.title", safe_game_title) - ) - - - - -if __name__ == "__main__": - main() diff --git a/create_wine.py b/create_wine.py deleted file mode 100644 index 9cb925f..0000000 --- a/create_wine.py +++ /dev/null @@ -1,60 +0,0 @@ -#!/usr/bin/python -import sys -import os - -def main(): - if len(sys.argv) < 3: - print("Usage: script.py ") - 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) - .replace("", 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) - .replace("game.title", safe_game_title) - ) - - - - -if __name__ == "__main__": - main() diff --git a/examples/ps3/PKGBUILD b/examples/ps3/PKGBUILD deleted file mode 100644 index ee2164f..0000000 --- a/examples/ps3/PKGBUILD +++ /dev/null @@ -1,12 +0,0 @@ -pkgname=game.title -pkgver=1.0 -pkgrel=1 -pkgdesc="" -arch=('x86_64') -depends=('rpcs3') -source=() -sha256sums=() - -package() { - rsync -vzr ../root/ "$pkgdir/" -} diff --git a/examples/ps3/root/games/rom/ps3/game.title/CONTENT b/examples/ps3/root/games/rom/ps3/game.title/CONTENT deleted file mode 100644 index 6ecbd78..0000000 --- a/examples/ps3/root/games/rom/ps3/game.title/CONTENT +++ /dev/null @@ -1 +0,0 @@ -GAME CONTENT \ No newline at end of file diff --git a/examples/ps3/root/usr/share/applications/Game Title.desktop b/examples/ps3/root/usr/share/applications/Game Title.desktop deleted file mode 100644 index 19b41aa..0000000 --- a/examples/ps3/root/usr/share/applications/Game Title.desktop +++ /dev/null @@ -1,9 +0,0 @@ -[Desktop Entry] -Name= -Comment= -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; diff --git a/examples/ps3/root/usr/share/icons/game.title/CONTENT b/examples/ps3/root/usr/share/icons/game.title/CONTENT deleted file mode 100644 index 6ecbd78..0000000 --- a/examples/ps3/root/usr/share/icons/game.title/CONTENT +++ /dev/null @@ -1 +0,0 @@ -GAME CONTENT \ No newline at end of file diff --git a/examples/wine/PKGBUILD b/examples/wine/PKGBUILD deleted file mode 100644 index 90bc582..0000000 --- a/examples/wine/PKGBUILD +++ /dev/null @@ -1,12 +0,0 @@ -pkgname=game.title -pkgver=1.0 -pkgrel=1 -pkgdesc="" -arch=('x86_64') -depends=('wine' 'umu-launcher') -source=() -sha256sums=() - -package() { - rsync -vzr ../root/ "$pkgdir/" -} diff --git a/examples/wine/root/games/game.title/CONTENT b/examples/wine/root/games/game.title/CONTENT deleted file mode 100644 index 6ecbd78..0000000 --- a/examples/wine/root/games/game.title/CONTENT +++ /dev/null @@ -1 +0,0 @@ -GAME CONTENT \ No newline at end of file diff --git a/examples/wine/root/usr/share/applications/Game Title.desktop b/examples/wine/root/usr/share/applications/Game Title.desktop deleted file mode 100644 index bf16d5e..0000000 --- a/examples/wine/root/usr/share/applications/Game Title.desktop +++ /dev/null @@ -1,9 +0,0 @@ -[Desktop Entry] -Name= -Comment= -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; diff --git a/examples/wine/root/usr/share/icons/game.title/CONTENT b/examples/wine/root/usr/share/icons/game.title/CONTENT deleted file mode 100644 index 6ecbd78..0000000 --- a/examples/wine/root/usr/share/icons/game.title/CONTENT +++ /dev/null @@ -1 +0,0 @@ -GAME CONTENT \ No newline at end of file