From 4d1b4358d5ffc63008943a27e00f2bca226ff21b Mon Sep 17 00:00:00 2001 From: Phantop Date: Sat, 1 Jan 2022 13:11:03 -0500 Subject: [PATCH] Add proton, rust, easy appimagehub converter --- apps/appimage | 5 +++++ apps/mkgo | 4 ++-- apps/mkjava | 2 +- apps/mkproton | 40 ++++++++++++++++++++++++++++++++++++++++ apps/mkrust | 21 +++++++++++++++++++++ apps/mkwine | 4 ++-- 6 files changed, 71 insertions(+), 5 deletions(-) create mode 100755 apps/appimage create mode 100755 apps/mkproton create mode 100755 apps/mkrust diff --git a/apps/appimage b/apps/appimage new file mode 100755 index 0000000..9242be8 --- /dev/null +++ b/apps/appimage @@ -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 diff --git a/apps/mkgo b/apps/mkgo index eddc481..661e0bb 100755 --- a/apps/mkgo +++ b/apps/mkgo @@ -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 diff --git a/apps/mkjava b/apps/mkjava index 27875fa..6ef0d15 100755 --- a/apps/mkjava +++ b/apps/mkjava @@ -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 diff --git a/apps/mkproton b/apps/mkproton new file mode 100755 index 0000000..f108125 --- /dev/null +++ b/apps/mkproton @@ -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 diff --git a/apps/mkrust b/apps/mkrust new file mode 100755 index 0000000..bd93cca --- /dev/null +++ b/apps/mkrust @@ -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* diff --git a/apps/mkwine b/apps/mkwine index 97b511e..248bcbf 100755 --- a/apps/mkwine +++ b/apps/mkwine @@ -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