Commit 470377e6 authored by Vitaly Lipatov's avatar Vitaly Lipatov

epm play: add initial portproton support

parent 5e670812
#!/bin/sh
TAR="$1"
#VERSION="$2"
RETURNTARNAME="$2"
. $(dirname $0)/common.sh
# TODO: get from grep '^###Scripts version ' PortWINE/data_from_portwine/changelog_eng | head -n1
###Scripts version 2172###
VERSION="$(epm tool eget -O- https://api.github.com/repos/Castro-Fidel/PortWINE/commits/HEAD | grep '"message": "Scripts version' | sed -e 's|.*Scripts version ||' -e 's|".*||' )"
[ -n "$VERSION" ] || fatal "Missed archive version"
PKGNAME=portproton-$VERSION.tar
epm assure erc || fatal
erc repack "$TAR" "$PKGNAME" || fatal
return_tar "$PKGNAME"
#!/bin/sh
PKGNAME=portproton
SUPPORTEDARCHES="x86_64"
DESCRIPTION='' #"PortProton from the official site"
. $(dirname $0)/common.sh
epm pack --install $PKGNAME https://github.com/Castro-Fidel/PortWINE/archive/refs/heads/master.tar.gz
res=$?
epm play i586-fix
exit $res
#!/bin/sh -x
# It will run with two args: buildroot spec
BUILDROOT="$1"
SPEC="$2"
PRODUCT=portproton
PRODUCTDIR=/opt/PortProton
. $(dirname $0)/common.sh
move_to_opt /PortWINE-master
remove_dir $PRODUCTDIR/portwine_install_script
add_bin_link_command $PRODUCT $PRODUCTDIR/data_from_portwine/scripts/start.sh
install_file $PRODUCTDIR/data_from_portwine/img/w.png /usr/share/pixmaps/$PRODUCT.png
# create desktop file
mkdir -p $BUILDROOT/usr/share/applications/
cat <<EOF >$BUILDROOT/usr/share/applications/$PRODUCT.desktop
[Desktop Entry]
Version=1.0
Name=PortProton
Comment=PortProton
Exec=$PRODUCT %F
Path=$PRODUCTDIR/data_from_portwine/scripts
Icon=$PRODUCT
Type=Application
Categories=Game;
StartupNotify=true
MimeType=application/x-ms-dos-executable;application/x-wine-extension-msp;application/x-msi;application/x-msdos-program
Keywords=wine;games;
EOF
pack_file /usr/share/applications/$PRODUCT.desktop
# https://github.com/Castro-Fidel/PortWINE/pull/36
subst 's|elif|else|' $BUILDROOT$PRODUCTDIR/data_from_portwine/scripts/portwine_db/WorldOfTanksEnCoreLauncher
subst '1iRequires:bubblewrap cabextract curl gamemode icoutils libvulkan1 vulkan-tools wget zenity zstd libd3d libMesaOpenCL' $SPEC
epm install -skip-installed vulkan-tools
filter_from_requires xneur
mkdir -p $BUILDROOT/var/lib/$PRODUCT
# TODO: use some group?
chmod a+rwX $BUILDROOT/var/lib/$PRODUCT
ln -s /var/lib/$PRODUCT $BUILDROOT$PRODUCTDIR/data
pack_file $PRODUCTDIR/data
pack_file /var/lib/$PRODUCT
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment