Phalcode / gamevault-backend

Backend for the self-hosted gaming platform for drm-free games
https://gamevau.lt
Other
180 stars 15 forks source link

Support single file binary for windows and linux #144

Closed yodatak closed 1 year ago

yodatak commented 1 year ago

Is your feature request related to a problem? Please describe. I got many games in linux that are in .sh file and already compressed with YAD simple installer and zstd. It could be interesting to have so support single file .exe or .sh.

Example of file Slime Rancher 2.sh

#!/usr/bin/env sh
#
# YAD Simple Installer script version 12.01.2021
# by Хрюнделёк & Kron4ek
# The script can support any compression utility
# https://yadi.sk/i/6XsWyS6O-4YKRA
# Thanks to Misko-2083 for YAD idea
# https://github.com/Misko-2083
#
# YAD (Yet Another Dialog) version 7.2
# by Victor Ananjevsky
# https://github.com/v1cont/yad
#
# zstd (Zstandard — Data compression algorithm) version 1.4.8
# by Yann Collet at Facebook
# https://github.com/facebook/zstd
#
# GNU coreutils
# https://gnu.org/software/coreutils
#
################## Unique values for each application ##################

# Application description
app="Slime Rancher 2"
export app
icon="game/prefix/drive_c/game/icon.png"
export icon
ver="0.0.0"
appurl=XXXXXX

# File sizes
appsz=19884344575
export appsz
arcsz=18742889620
export arcsz
picsz=190243
ysisz=18333

####################### Immutable script content #######################

# YSI info
ysi="YAD Simple Installer"
ysiver=12.01.2021

.....

zenity --info --text "This Game is packaged by me." --width="300"
exec 3>&-
exec 4>&-
exit 0
Millio345 commented 1 year ago

Would definitely be great to support single file binaries.

For example, games purchased from GOG are usually single .exe files. Would be great if Gamevault recognised these after renaming them (ideally longer term even without renaming) and allowed downloading them instead of first having to compress them only to then have to extract the single file archive again after downloading.

Alfagun74 commented 1 year ago

Regarding Game Type Autodetection

Single-file .exe and .sh files could technically be setups and portable games.

It's quite rare to have a .exe/.sh single-file portable game, isn't it?

So, I'd probably configure the detection to recognize those files as SETUP games. If it turns out to be a rare single-file portable game, people can still overwrite it using the (W_P) flag.

What's your opinion on this?

Alfagun74 commented 1 year ago

Added .exe single file binary support. To include .sh files, use the GAMES_SUPPORTED_FILE_FORMATS environment variable for now. Native support for .sh files will come with the Linux game type implementation.

Alfagun74 commented 1 year ago

@Yelo420 will implement this client side

Alfagun74 commented 1 year ago

would lead to client side spaghetti code, so i will try to implement an on the fly .tar mechanism to not break the client.

Alfagun74 commented 1 year ago

GameVault Client saves .tar file still as .exe. I cant do anything further here. Documentation is ready in a feature branch.

Yelo420 commented 1 year ago

Done. Will be available in the next update.

yodatak commented 1 year ago

Thanks it work fine with client in bootle in wine and backend in 1.4 with booth windows portable and linux single app

Alfagun74 commented 1 year ago

awesome im happy we could help!

Alfagun74 commented 1 year ago

@yodatak If you liked that we added this feature, we'd greatly appreciate your support through a donation on one of the platforms mentioned below: