Add proton, rust, easy appimagehub converter

This commit is contained in:
Phantop 2022-01-01 13:11:03 -05:00
parent 20452fa6e6
commit 4d1b4358d5
6 changed files with 71 additions and 5 deletions

5
apps/appimage Executable file
View file

@ -0,0 +1,5 @@
#!/bin/bash
LINK1=https://raw.githubusercontent.com/AppImage/appimage.github.io/master/apps/$1.md
LINK2="$(curl $LINK1 | grep -o https.\*releases | sed 's|github.com|api.github.com/repos|')"
LINK3="$(curl $LINK2 | grep -om1 https.\*AppImage)"
appdwarf -u $LINK3

View file

@ -2,7 +2,7 @@
PATH=$(dirname $(readlink -f "${0}"))/..:$PATH
DIR=/tmp/dwarf-portable-executable
mkdir -p $DIR
LINK=$(curl -sL https://golang.org/dl | grep -wo dl/go.\*linux-amd64.tar.gz | head -n1)
LINK=$(curl -sL https://golang.org/dl | grep -om1 dl/go.\*linux-amd64.tar.gz)
curl -L https://golang.org/$LINK | tar xz -C$DIR
cat > $DIR/go/AppRun << 'EOF'
@ -15,5 +15,5 @@ EOF
chmod +x $DIR/go/AppRun
appdwarf $DIR/go
mv go.sh go
mv $DIR/go.sh go
rm -rf $DIR/go

View file

@ -21,5 +21,5 @@ chmod +x $JRE/AppRun
shift
appdwarf $JRE $@
mv $(basename $JRE).sh java$VER
mv $JRE.sh java$VER
rm -rf $DIR

40
apps/mkproton Executable file
View file

@ -0,0 +1,40 @@
#!/bin/bash
PATH=$(dirname $(readlink -f "${0}"))/..:$PATH
DIR=/tmp/dwarf-portable-executable/proton
mkdir -p $DIR
LINK="$(curl https://api.github.com/repos/GloriousEggroll/proton-ge-custom/releases | grep -om1 http.\*tar.gz)"
curl -L $LINK | tar xz -C$DIR
mv $DIR/Proton*/files/* $DIR
rm -rf $DIR/Proton*/
wget -O$DIR/winetricks https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks
chmod +x $DIR/winetricks
cat > $DIR/AppRun << 'EOF'
#!/bin/bash
HERE="$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")"
export WINE="${HERE}"/bin/wine
export WINE64="${HERE}"/bin/wine64
export WINESERVER="${HERE}"/bin/wineserver
export WINETRICKS="${HERE}"/winetricks
export DXVK_STATE_CACHE_PATH=~/.cache DXVK_LOG_PATH=none
if [ "$1" = "winetricks" ]; then
if [ $# -ge 2 ]; then
shift
"${WINETRICKS}" "$@"
else
"${WINETRICKS}" --help
fi
else
"${WINE}" "$@"
"${WINESERVER}" -w
fi
EOF
chmod +x $DIR/AppRun
appdwarf $DIR $@
rm -rf $DIR
mv $DIR.sh proton

21
apps/mkrust Executable file
View file

@ -0,0 +1,21 @@
#!/bin/bash
PATH=$(dirname $(readlink -f "${0}"))/..:$PATH
DIR=/tmp/dwarf-portable-executable
mkdir -p $DIR
LINK=https://static.rust-lang.org/dist/rust-nightly-x86_64-unknown-linux-gnu.tar.gz
curl -L $LINK | tar xz -C$DIR
$DIR/rust*/install.sh --destdir=$DIR/rust --without=rust-docs --prefix=/
cat > $DIR/rust/AppRun << 'EOF'
#!/bin/sh
HERE=$(dirname $(readlink -f "${0}"))
export LD_LIBRARY_PATH="${HERE}":$PATH
"${HERE}"/bin/$APPDWARF_CMD $@
EOF
chmod +x $DIR/rust/AppRun
appdwarf $DIR/rust
mv $DIR/rust.sh rustc
rm -rf $DIR/rust*

View file

@ -3,7 +3,7 @@ PATH=$(dirname $(readlink -f "${0}"))/..:$PATH
DIR=/tmp/dwarf-portable-executable/wine
mkdir -p $DIR
LINK="$(curl https://api.github.com/repos/Kron4ek/Wine-Builds/releases | grep -wo http.\*-staging-tkg-amd64.tar.xz | head -n1)"
LINK="$(curl https://api.github.com/repos/Kron4ek/Wine-Builds/releases | grep -om1 http.\*-staging-tkg-amd64.tar.xz)"
curl -L $LINK | tar xJ -C$DIR
mv $DIR/wine*/* $DIR
rmdir $DIR/wine*/
@ -37,4 +37,4 @@ chmod +x $DIR/AppRun
appdwarf $DIR $@
rm -r $DIR
mv wine.sh wine
mv $DIR.sh wine