update
This commit is contained in:
parent
e665b6d626
commit
aebd47503e
9 changed files with 158 additions and 3 deletions
12
README.md
12
README.md
|
@ -18,6 +18,17 @@ pacman -S games/elden.ring # Install a game
|
||||||
pacman -R games/elden.ring # Remove 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
|
## Package Format
|
||||||
Each game package should contain:
|
Each game package should contain:
|
||||||
- **Game Icons** → `/usr/share/icons/`
|
- **Game Icons** → `/usr/share/icons/`
|
||||||
|
@ -35,3 +46,4 @@ Game names should be formatted by replacing spaces with dots (e.g., `Game Title`
|
||||||
See the `examples/` directory for a minimal build template to package games.
|
See the `examples/` directory for a minimal build template to package games.
|
||||||
|
|
||||||
- [Windows Games](./examples/wine/)
|
- [Windows Games](./examples/wine/)
|
||||||
|
- [PlayStation 3](./examples/ps3/)
|
||||||
|
|
60
create_ps3.py
Normal file
60
create_ps3.py
Normal file
|
@ -0,0 +1,60 @@
|
||||||
|
#!/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()
|
60
create_wine.py
Normal file
60
create_wine.py
Normal file
|
@ -0,0 +1,60 @@
|
||||||
|
#!/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()
|
12
examples/ps3/PKGBUILD
Normal file
12
examples/ps3/PKGBUILD
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
pkgname=game.title
|
||||||
|
pkgver=1.0
|
||||||
|
pkgrel=1
|
||||||
|
pkgdesc="<GAME_DESC>"
|
||||||
|
arch=('x86_64')
|
||||||
|
depends=('rpcs3')
|
||||||
|
source=()
|
||||||
|
sha256sums=()
|
||||||
|
|
||||||
|
package() {
|
||||||
|
rsync -vzr ../root/ "$pkgdir/"
|
||||||
|
}
|
1
examples/ps3/root/games/rom/ps3/game.title/CONTENT
Normal file
1
examples/ps3/root/games/rom/ps3/game.title/CONTENT
Normal file
|
@ -0,0 +1 @@
|
||||||
|
GAME CONTENT
|
|
@ -0,0 +1,9 @@
|
||||||
|
[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;
|
1
examples/ps3/root/usr/share/icons/game.title/CONTENT
Normal file
1
examples/ps3/root/usr/share/icons/game.title/CONTENT
Normal file
|
@ -0,0 +1 @@
|
||||||
|
GAME CONTENT
|
|
@ -8,5 +8,5 @@ source=()
|
||||||
sha256sums=()
|
sha256sums=()
|
||||||
|
|
||||||
package() {
|
package() {
|
||||||
rsync -vzr ./root/ "$pkgdir/"
|
rsync -vzr ../root/ "$pkgdir/"
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
[Desktop Entry]
|
[Desktop Entry]
|
||||||
Name=<GAME_TITLE>
|
Name=<GAME_TITLE>
|
||||||
Comment=<GAME_DESC>
|
Comment=<GAME_DESC>
|
||||||
Exec=env WINEPREFIX="$HOME/Games/umu/game.title" STEAM_COMPAT_LIBRARY_PATHS="/games" bash -c "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"
|
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/icon.png
|
Icon=/usr/share/icons/game.title/icon1.ico
|
||||||
StartupNotify=true
|
StartupNotify=true
|
||||||
Terminal=false
|
Terminal=false
|
||||||
Type=Application
|
Type=Application
|
||||||
|
|
Loading…
Add table
Reference in a new issue