apps: refactor appmk infrastructure into sourcing appdwarf

This commit is contained in:
Phantop 2024-07-04 23:22:20 -04:00
parent 2addf3728f
commit e268a141b2
23 changed files with 163 additions and 184 deletions

View file

@ -55,7 +55,7 @@ jobs:
matrix: matrix:
app: app:
- { name: wine, pkgs: dxvk-async-git mono vkd3d-proton-mingw-git wine-gecko wine-mono wine-staging-wow64 winetricks } - { name: wine, pkgs: dxvk-async-git mono vkd3d-proton-mingw-git wine-gecko wine-mono wine-staging-wow64 winetricks }
- { name: emus, pkgs: ares-emu-avx-git cemu citra-canary-git ryujinx yuzu-early-access } - { name: emus, pkgs: ares-emu-avx-git cemu citra-canary-git ryujinx suyu-dev-qt6-git }
runs-on: ubuntu-latest runs-on: ubuntu-latest
container: archlinux:latest container: archlinux:latest
steps: steps:

View file

@ -2,17 +2,46 @@
set -e # exit on failure set -e # exit on failure
IFS=$(printf '\n\t') # smarter ifs IFS=$(printf '\n\t') # smarter ifs
appmk() {
appdwarf "$DIR"
mv "$DIR".sh bin/"$APP"
rm -rf "$DIR"
}
apprun() { apprun() {
export PATH="$APPDIR"/bin:"$PATH" export PATH="$APPDIR"/bin:"$PATH"
export LD_LIBRARY_PATH="$APPDIR"/lib64:"$APPDIR"/lib:"$LD_LIBRARY_PATH" export LD_LIBRARY_PATH="$APPDIR"/lib64:"$APPDIR"/lib:"$LD_LIBRARY_PATH"
exec "$APPDIR/$(basename "$ARGV0")" "$@" exec "$APPDIR/$(basename "$ARGV0")" "$@"
} }
arun() {
outfunc apprun > "$1"
chmod +x "$1"
}
brun() {
outfunc apprun | sed '5s#/#/bin/#' > "$1"
chmod +x "$1"
}
appa() { arun "$DIR"/AppRun; }
appb() { brun "$DIR"/AppRun; }
unarc() { curl -L "$LINK" | bsdtar xf - -C"$DIR"; }
unbz() { curl -L "$LINK" | tar xj -C"$DIR"; }
ungz() { curl -L "$LINK" | tar xz -C"$DIR"; }
unxz() { curl -L "$LINK" | tar xJ -C"$DIR"; }
un7z() {
aria2c "$LINK" -d "$DIR" -o "$1"
7z x -y -o"$DIR" "$DIR"/"$1"
}
bundlehead() { bundlehead() {
MOUNTBIN=$(mktemp) # use provided offsets to supply dwarfs binary mountbin=$(mktemp) # use provided offsets to supply dwarfs binary
tail -n+"$OFF" "$0" | head -n"$LEN" | head -c-1 | zstd -cqd > "$MOUNTBIN" #shellcheck disable=SC2154
tail -n+"$off" "$0" | head -n"$len" | head -c-1 | zstd -cqd > "$mountbin"
#shellcheck disable=SC2317 #shellcheck disable=SC2317
dwarfs() { chmod +x "$MOUNTBIN"; "$MOUNTBIN" "$@"; rm "$MOUNTBIN"; } dwarfs() { chmod +x "$mountbin"; "$mountbin" "$@"; rm "$mountbin"; }
} }
header() { header() {
@ -42,7 +71,7 @@ zzexe() {
[ "$1" = "-p" ] && p="$2" && shift # save prefix if present [ "$1" = "-p" ] && p="$2" && shift # save prefix if present
shift; out=$(mktemp) # make tmp file to avoid io operations shift; out=$(mktemp) # make tmp file to avoid io operations
{ outfunc { outfunc
echo "OFF=$(($( (outfunc; outfunc zzexe_header) | wc -l)+2))" echo "off=$(($( (outfunc; outfunc zzexe_header) | wc -l)+2))"
outfunc zzexe_header | sed -e "3s/)$/${1##*[./]})/" -e "8s/^/$p /" outfunc zzexe_header | sed -e "3s/)$/${1##*[./]})/" -e "8s/^/$p /"
zstdmt -cq19 "$@" zstdmt -cq19 "$@"
} > "$out" } > "$out"
@ -53,7 +82,7 @@ zzexe() {
zzexe_header() { zzexe_header() {
dir="$(dirname "$0")" out=$(mktemp -t .zzXXXX.) dir="$(dirname "$0")" out=$(mktemp -t .zzXXXX.)
tail -n+"$OFF" "$0" | zstd -cd > "$out" tail -n+"$off" "$0" | zstd -cd > "$out"
chmod +x "$out" chmod +x "$out"
[ ! -f "$dir/$(basename "$out")" ] && ln -s "$out" "$dir" [ ! -f "$dir/$(basename "$out")" ] && ln -s "$out" "$dir"
trap 'rm -f "$out" "$dir/$(basename "$out")"' 0 1 2 3 6 14 15 EXIT trap 'rm -f "$out" "$dir/$(basename "$out")"' 0 1 2 3 6 14 15 EXIT
@ -61,35 +90,47 @@ zzexe_header() {
exit $? exit $?
} }
if [ "$SOURCE" ]; then
unset SOURCE
trap 'rm -rf "$DIR"' 0 1 2 3 6 14 15 EXIT
APP=$(basename "$0" | sed 's/^mk//')
DIR=/tmp/appdwarf/$APP
mkdir -p "$DIR"
return
fi
case "$1" in case "$1" in
-a ) -a )
outfunc apprun > "$2" arun "$2"
chmod +x "$2"
exit ;; exit ;;
-b ) -b )
outfunc apprun | sed '5s#/#/bin/#' > "$2" brun "$2"
chmod +x "$2"
exit ;; exit ;;
--bundle ) # allow bundling dwarfs binary --bundle ) # allow bundling dwarfs binary
BUNDLE=$(realpath "$2") bundle=$(realpath "$2")
shift 2;; shift 2;;
-d | --decompress ) -d | --decompress )
d=dwarfs-root # just to keep line shorter, extract if file is dwarfs d=dwarfs-root # just to keep line shorter, extract if file is dwarfs
dwarfsck -d0 -i"$2" && mkdir $d && dwarfsextract -o $d -i "$2" && exit dwarfsck -d0 -i"$2" && mkdir $d && dwarfsextract -o $d -i "$2" && exit
tmp=$(mktemp) # make tmp file to avoid io operations tmp=$(mktemp) # make tmp file to avoid io operations
unappimage "$2" && exit # also extract appimages cuz we can unappimage "$2" && exit # also extract appimages cuz we can
tail -n+"$(sed -n '3s/^OFF=//p' "$2")" "$2" | zstd -cd > "$tmp" tail -n+"$(sed -n '3s/^off=//p' "$2")" "$2" | zstd -cd > "$tmp"
mv "$tmp" "$2" mv "$tmp" "$2"
chmod +x "$2" chmod +x "$2"
exit ;; exit ;;
-f | --fetch ) -f | --fetch )
FETCH=1 fetch=1
shift ;; shift ;;
-g | --get )
gh run -R phantop/appdwarf download -n "$2"
file="$(echo "$2" | sed 's/^arch-//')"
chmod +x "$file"
exit ;;
-p | -z | --prefix | --zzexe ) -p | -z | --prefix | --zzexe )
zzexe "$@" ;; zzexe "$@" ;;
--version | -v ) --version | -v )
printf '\e[32m' printf '\e[32m'
echo 'appdwarf 2023.11.16' echo 'appdwarf 2024.07.04'
printf '\e[36m' printf '\e[36m'
echo Built by July 🏳️‍🌈 echo Built by July 🏳️‍🌈
printf '\e[0m' printf '\e[0m'
@ -102,6 +143,7 @@ case "$1" in
echo echo
echo " --bundle [path/to/dwarfs] bundle dwarfs with the appdwarf image" echo " --bundle [path/to/dwarfs] bundle dwarfs with the appdwarf image"
echo " -f, --fetch only fetch a remote AppImage" echo " -f, --fetch only fetch a remote AppImage"
echo " -g, --get download a prebuild appdwarf from actions"
echo echo
echo " -p, --prefix [PREFIX] zzexe a file with prefix" echo " -p, --prefix [PREFIX] zzexe a file with prefix"
echo " -z, --zzexe zzexe a file" echo " -z, --zzexe zzexe a file"
@ -127,16 +169,16 @@ if [ ! -d "$1" ]; then # directory doesn't exist, see if this is an appimage
echo "Assuming this is a GitHub repo..." echo "Assuming this is a GitHub repo..."
app="$(echo "${1%/}"/releases | sed 's|github.com|api.github.com/repos|')" app="$(echo "${1%/}"/releases | sed 's|github.com|api.github.com/repos|')"
api="$(curl "$app" | jq -r .[].assets[].browser_download_url | grep 'AppImage$')" api="$(curl "$app" | jq -r .[].assets[].browser_download_url | grep 'AppImage$')"
link="$(echo "$api" | grep "$(uname -m)" || echo "$api" | grep -vEe '-(aarch|arm)(64|hf)\.AppImage')" url="$(echo "$api" | grep "$(uname -m)" || echo "$api" | grep -vEe '-(aarch|arm)(64|hf)\.AppImage')"
shift shift
set -- "$(echo "$link" | head -n1)" "$@" set -- "$(echo "$url" | head -n1)" "$@"
fi fi
app=$(basename "$1") # actually try to get the appimage app=$(basename "$1") # actually try to get the appimage
if aria2c -x16 -s16 "$1" -o "$app" || wget "$1" -O "$app"; then if aria2c -x16 -s16 "$1" -o "$app" || wget "$1" -O "$app"; then
shift shift
set -- "$app" "$@" set -- "$app" "$@"
test "$FETCH" && chmod +x "$1" && exit test "$fetch" && chmod +x "$1" && exit
else else
printf '\e[31m' >&2 printf '\e[31m' >&2
echo "No valid remote or local input found. Exiting..." >&2 echo "No valid remote or local input found. Exiting..." >&2
@ -163,17 +205,17 @@ if [ ! -d "$1" ]; then # directory doesn't exist, see if this is an appimage
fi fi
head="$(mktemp)" head="$(mktemp)"
if [ "$BUNDLE" ]; then { # behavior for bundling a dwarfs executable if [ "$bundle" ]; then { # behavior for bundling a dwarfs executable
ZDATA="$(mktemp)" zdata="$(mktemp)"
zstd -cq "$BUNDLE" > "$ZDATA" zstd -cq "$bundle" > "$zdata"
outfunc outfunc
echo "OFF=$(($( (outfunc; outfunc bundlehead; outfunc header) | wc -l)+3))" echo "off=$(($( (outfunc; outfunc bundlehead; outfunc header) | wc -l)+3))"
echo "LEN=$(($(wc -l < "$ZDATA")+1))" echo "len=$(($(wc -l < "$zdata")+1))"
outfunc bundlehead outfunc bundlehead
} > "$head" } > "$head"
fi fi
outfunc header >> "$head" outfunc header >> "$head"
test "$BUNDLE" && cat "$ZDATA" >> "$head" test "$bundle" && cat "$zdata" >> "$head"
echo >> "$head" echo >> "$head"
mkdwarfs -o "$(realpath "$1").sh" -B5 --header "$head" -i "$@" --categorize=pcmaudio -C pcmaudio/waveform::flac:level=8 mkdwarfs -o "$(realpath "$1").sh" -B5 --header "$head" -i "$@" --categorize=pcmaudio -C pcmaudio/waveform::flac:level=8

View file

@ -11,18 +11,16 @@ These scripts are all targeted for use on x86_64 Linux systems with GLIBC.
Script | Function | Source Script | Function | Source
--- | --- | --- --- | --- | ---
`mkdotnet` | Latest LTS .NET runtime <https://dotnet.microsoft.com> `mkdotnet` | Latest LTS .NET runtime <https://dotnet.microsoft.com>
`mkeopkg` | Converts the given Solus package(s) to an appdwarf | <https://getsol.us>
`mkgo` | Latest official Go release | <https://go.dev> `mkgo` | Latest official Go release | <https://go.dev>
`mkjava` | Accepts an argument for Java version and obtains that build from Adoptium | <https://adoptium.net> `mkjava` | Accepts an argument for Java version and obtains that build from Adoptium | <https://adoptium.net>
`mkmp3tag` | Latest 64-bit Mp3tag release | <https://mp3tag.de/en> `mkmp3tag` | Latest 64-bit Mp3tag release | <https://mp3tag.de/en>
`mkmusikcube` | Latest musikcube release | <https://musikcube.com/> `mkmusikcube` | Latest musikcube release | <https://musikcube.com/>
`mkmusl` | Latest musl.cc toolchain | <https://musl.cc> `mkmusl` | Latest musl.cc toolchain | <https://musl.cc>
`mknode` | Latest official NodeJS release | <https://nodejs.org> `mknode` | Latest official NodeJS release | <https://nodejs.org>
`mkpacman` | Converts the given Arch package(s) to an appdwarf | <https://archlinux.org>
`mkpypy` | Latest PyPy3 release | <https://www.pypy.org> `mkpypy` | Latest PyPy3 release | <https://www.pypy.org>
`mkrenpy` | Latest Ren'Py release | <https://www.renpy.org> `mkrenpy` | Latest Ren'Py release | <https://www.renpy.org>
`mkrust` | Latest Rust nightly | <https://rust-lang.org> `mkrust` | Latest Rust nightly | <https://rust-lang.org>
`mksignal` | Latest Signal stable from the Solus repos (requires `eopkg` and may not work on other distros) | <https://signal.org>
`mktex` | Minimal/custom TeX Live image | <https://ctan.org> `mktex` | Minimal/custom TeX Live image | <https://ctan.org>
`mkwine` | Latest `wine-staging-tkg` release | <https://github.com/Kron4ek/Wine-Builds> `mkwine` | Latest `wine-staging-tkg` release | <https://github.com/Kron4ek/Wine-Builds>
`mkwine proton` | GloriousEggroll Proton Builds | <https://github.com/GloriousEggroll/proton-ge-custom> `mkwine proton` | GloriousEggroll Proton Builds | <https://github.com/GloriousEggroll/proton-ge-custom>
`rustsolus` | Latest Rust stable from the Solus repos (requires `eopkg` and may not work on other distros) | <https://getsol.us>

View file

@ -1,42 +0,0 @@
#!/bin/sh
set -e # exit on failure
IFS=$(printf '\n\t') # smarter ifs
trap 'rm -rf "$DIR"' 0 1 2 3 6 14 15 EXIT
part0() { # dir setup
APP=$(basename "$0" | sed 's/^mk//')
DIR=/tmp/appdwarf/$APP
mkdir -p "$DIR"
}
ungz() { # default decomps
curl -L "$LINK" | tar xz -C"$DIR"
}
unbz() {
curl -L "$LINK" | tar xj -C"$DIR"
}
unxz() {
curl -L "$LINK" | tar xJ -C"$DIR"
}
unarc() {
curl -L "$LINK" | bsdtar xf - -C"$DIR"
}
appa() { # default appruns
appdwarf -a "$DIR"/AppRun
}
appb() {
appdwarf -b "$DIR"/AppRun
}
part9() { # ending bit
appdwarf "$DIR"
mv "$DIR".sh bin/"$APP"
rm -rf "$DIR"
}

View file

@ -2,7 +2,5 @@
set -e # exit on failure set -e # exit on failure
IFS=$(printf '\n\t') # smarter ifs IFS=$(printf '\n\t') # smarter ifs
gh run download -n "$1" cd "$(dirname "$(realpath "$0")")/bin"
file="$(echo "$1" | sed 's/^arch-//')" appdwarf -g "$1"
chmod +x "$file"
mv "$file" "$(dirname "$(realpath "$0")")/bin"

View file

@ -1,10 +1,10 @@
#!/bin/sh #!/bin/sh
. "$(dirname "$0")"/appmk # shellcheck source=../appdwarf
part0 SOURCE=1 . "$(which appdwarf)"
base=https://download.calibre-ebook.com base=https://download.calibre-ebook.com
LINK="$(curl "$base" | tail -n 1 | cut -d\" -f2)" LINK="$(curl "$base" | tail -n 1 | cut -d\" -f2)"
LINK="$(curl "$base/$LINK" | tail -n 1 | cut -d\" -f4 | tr -d /)" LINK="$(curl "$base/$LINK" | tail -n 1 | cut -d\" -f4 | tr -d /)"
LINK="$base/$LINK/calibre-$LINK-$(uname -m).txz" LINK="$base/$LINK/calibre-$LINK-$(uname -m).txz"
unxz unxz
appa appa
part9 appmk

View file

@ -1,6 +1,6 @@
#!/bin/sh #!/bin/sh
. "$(dirname "$0")"/appmk # shellcheck source=../appdwarf
part0 SOURCE=1 . "$(which appdwarf)"
TYPE=Runtime TYPE=Runtime
VER=LTS VER=LTS
@ -16,9 +16,20 @@ done
LINK=https://dotnetcli.azureedge.net/dotnet/$TYPE LINK=https://dotnetcli.azureedge.net/dotnet/$TYPE
VER=$(curl $LINK/"$VER"/latest.version)
TYPE=$(echo "$TYPE" | tr "[:upper:]" "[:lower:]") TYPE=$(echo "$TYPE" | tr "[:upper:]" "[:lower:]")
VER=$(curl $LINK/"$VER"/latest.version)
LINK="$LINK/$VER/dotnet-$TYPE-$VER-linux-x64.tar.gz" LINK="$LINK/$VER/dotnet-$TYPE-$VER-linux-x64.tar.gz"
ungz ungz
ln -s dotnet "$DIR"/AppRun
part9 apprun() {
export DOTNET_ROOT="$APPDIR"
case "$(basename "$ARGV0")" in
dotnetenv )
exec "$@" ;;
* )
exec "$APPDIR/$(basename "$ARGV0")" "$@" ;;
esac
}
appa
appmk

View file

@ -1,10 +0,0 @@
#!/bin/sh
. "$(dirname "$0")"/appmk
part0
APP="$1"
eopkg fc -o "$DIR" "$@"
parallel "unzip -op {} install.tar.xz | tar xJf - -C$DIR" ::: "$DIR"/*.eopkg
rm "$DIR"/*.eopkg
appb
sed -i 3,5s#/bin#/usr/bin# "$DIR"/AppRun
part9

View file

@ -1,8 +1,8 @@
#!/bin/sh #!/bin/sh
. "$(dirname "$0")"/appmk # shellcheck source=../appdwarf
part0 SOURCE=1 . "$(which appdwarf)"
LINK=$(curl https://go.dev/dl/ | grep -m1 linux | cut -d\" -f4) LINK=$(curl https://go.dev/dl/ | grep -m1 linux | cut -d\" -f4)
curl -L https://go.dev/"$LINK" | tar xz -C"$DIR"/.. curl -L https://go.dev/"$LINK" | tar xz -C"$DIR"/..
appb appb
sed -i '5i export GOPROXY=direct' "$DIR"/AppRun sed -i '5i export GOPROXY=direct' "$DIR"/AppRun
part9 appmk

View file

@ -1,6 +1,6 @@
#!/bin/sh #!/bin/sh
. "$(dirname "$0")"/appmk # shellcheck source=../appdwarf
part0 SOURCE=1 . "$(which appdwarf)"
TYPE=jre TYPE=jre
VER=21 VER=21
@ -15,8 +15,7 @@ while [ $# -gt 0 ]; do
done done
LINK=https://api.adoptium.net/v3/binary/latest/$VER/ga/linux/x64/"$TYPE"/hotspot/normal/eclipse LINK=https://api.adoptium.net/v3/binary/latest/$VER/ga/linux/x64/"$TYPE"/hotspot/normal/eclipse
echo $LINK
ungz ungz
mv "$DIR"/jdk*/* "$DIR" mv "$DIR"/jdk*/* "$DIR"
appb appb
part9 appmk

View file

@ -1,10 +1,9 @@
#!/bin/sh #!/bin/sh
. "$(dirname "$0")"/appmk # shellcheck source=../appdwarf
part0 SOURCE=1 . "$(which appdwarf)"
LINK=$(curl -L mp3tag.de/dodownload64.html | awk -F'[="]' /URL/'{print $7}') LINK=$(curl -L mp3tag.de/dodownload64.html | awk -F'[="]' /URL/'{print $7}')
aria2c "$LINK" -d "$DIR" -o mp3tag un7z mp3tag
7z x -y -o"$DIR" "$DIR"/mp3tag
mv "$DIR"/Mp3tag.exe "$DIR"/mp3tag mv "$DIR"/Mp3tag.exe "$DIR"/mp3tag
appa appa
sed -i '5s/ / wine /' "$DIR"/AppRun sed -i '5s/ / wine /' "$DIR"/AppRun
part9 appmk

View file

@ -1,8 +1,8 @@
#!/bin/sh #!/bin/sh
. "$(dirname "$0")"/appmk # shellcheck source=../appdwarf
part0 SOURCE=1 . "$(which appdwarf)"
LINK=$(curl https://api.github.com/repos/clangen/musikcube/releases | grep -om1 'http.*_64.*bz2') LINK=$(curl https://api.github.com/repos/clangen/musikcube/releases | grep -om1 'http.*_64.*bz2')
unbz unbz
mv "$DIR"/musikcube*/* "$DIR" mv "$DIR"/musikcube*/* "$DIR"
appa appa
part9 appmk

View file

@ -1,10 +1,10 @@
#!/bin/sh #!/bin/sh
. "$(dirname "$0")"/appmk # shellcheck source=../appdwarf
part0 SOURCE=1 . "$(which appdwarf)"
LINK=http://musl.cc/x86_64-linux-musl-native.tgz LINK=http://musl.cc/x86_64-linux-musl-native.tgz
ungz ungz
mv "$DIR"/x86_64-linux-musl-native/* "$DIR" mv "$DIR"/x86_64-linux-musl-native/* "$DIR"
ln -s gcc "$DIR"/bin/cc ln -s gcc "$DIR"/bin/cc
appa appa
sed -i '5d;4a exec "$@"' "$DIR"/AppRun sed -i '5d;4a exec "$@"' "$DIR"/AppRun
part9 appmk

View file

@ -1,9 +1,9 @@
#!/bin/sh #!/bin/sh
. "$(dirname "$0")"/appmk # shellcheck source=../appdwarf
part0 SOURCE=1 . "$(which appdwarf)"
LINK=https://nodejs.org/dist/latest/ LINK=https://nodejs.org/dist/latest/
LINK=$LINK$(curl $LINK | grep linux-x64.tar.xz | cut -d\" -f2) LINK=$LINK$(curl $LINK | grep linux-x64.tar.xz | cut -d\" -f2)
unxz unxz
mv "$DIR"/node*/* "$DIR" mv "$DIR"/node*/* "$DIR"
appb appb
part9 appmk

View file

@ -1,6 +1,6 @@
#!/bin/sh #!/bin/sh
. "$(dirname "$0")"/appmk # shellcheck source=../appdwarf
part0 SOURCE=1 . "$(which appdwarf)"
APP="$1" APP="$1"
sudo pacman -Sw --cachedir "$DIR" --noconfirm "$@" sudo pacman -Sw --cachedir "$DIR" --noconfirm "$@"
parallel "tar xf {} -C$DIR" ::: "$DIR"/*.tar.zst parallel "tar xf {} -C$DIR" ::: "$DIR"/*.tar.zst
@ -8,4 +8,4 @@ rm -f "$DIR"/*.tar.zst*
appb appb
sed -i 4s#/lib#/usr/lib#g "$DIR"/AppRun sed -i 4s#/lib#/usr/lib#g "$DIR"/AppRun
sed -i 3,5s#/bin#/usr/bin# "$DIR"/AppRun sed -i 3,5s#/bin#/usr/bin# "$DIR"/AppRun
part9 appmk

View file

@ -1,6 +1,6 @@
#!/bin/sh #!/bin/sh
. "$(dirname "$0")"/appmk # shellcheck source=../appdwarf
part0 SOURCE=1 . "$(which appdwarf)"
API=/repos/PintaProject/Pinta/actions/artifacts API=/repos/PintaProject/Pinta/actions/artifacts
QUERY='.artifacts[] | select(.name == "Pinta-linux-dotnet-8.0.x.zip") | .archive_download_url' QUERY='.artifacts[] | select(.name == "Pinta-linux-dotnet-8.0.x.zip") | .archive_download_url'
LINK=$(gh api $API -q "$QUERY" | head -n1) LINK=$(gh api $API -q "$QUERY" | head -n1)
@ -8,4 +8,4 @@ gh api "$LINK" | bsdtar xf - -C"$DIR"
bsdtar xf "$DIR"/*.zip -C"$DIR" bsdtar xf "$DIR"/*.zip -C"$DIR"
rm "$DIR"/*.zip rm "$DIR"/*.zip
appa appa
part9 appmk

View file

@ -1,10 +1,10 @@
#!/bin/sh #!/bin/sh
. "$(dirname "$0")"/appmk # shellcheck source=../appdwarf
part0 SOURCE=1 . "$(which appdwarf)"
LINK="$(curl https://www.pypy.org/download.html | grep http.\*linux64.tar.bz2 | head -n1 | cut -d\" -f4)" LINK="$(curl https://www.pypy.org/download.html | grep http.\*linux64.tar.bz2 | head -n1 | cut -d\" -f4)"
unbz unbz
mv "$DIR"/pypy*/* "$DIR" mv "$DIR"/pypy*/* "$DIR"
"$DIR"/bin/pypy -m ensurepip "$DIR"/bin/pypy -m ensurepip
"$DIR"/bin/pypy -m pip install pipx "$DIR"/bin/pypy -m pip install pipx
appb appb
part9 appmk

View file

@ -1,12 +1,11 @@
#!/bin/sh #!/bin/sh
. "$(dirname "$0")"/appmk # shellcheck source=../appdwarf
part0 SOURCE=1 . "$(which appdwarf)"
LINK=$(curl https://www.renpy.org/latest.html | grep 7z | cut -d\" -f2) LINK=$(curl https://www.renpy.org/latest.html | grep 7z | cut -d\" -f2)
aria2c "$LINK" -d "$DIR" -o renpy.exe un7z renpy.exe
7z x -y -o"$DIR" "$DIR"/renpy.exe
mkdir "$DIR"/lib mkdir "$DIR"/lib
mv "$DIR"/renpy-*/lib/py3-linux-x86_64 "$DIR"/renpy-*/lib/python* "$DIR"/lib mv "$DIR"/renpy-*/lib/py3-linux-x86_64 "$DIR"/renpy-*/lib/python* "$DIR"/lib
mv "$DIR"/renpy-*/renpy* "$DIR" mv "$DIR"/renpy-*/renpy* "$DIR"
rm -r "$DIR"/*.exe "$DIR"/renpy-* "$DIR/renpy.app" rm -r "$DIR"/*.exe "$DIR"/renpy-* "$DIR/renpy.app"
ln -s renpy.sh "$DIR/AppRun" ln -s renpy.sh "$DIR/AppRun"
part9 appmk

View file

@ -1,10 +1,10 @@
#!/bin/sh #!/bin/sh
. "$(dirname "$0")"/appmk # shellcheck source=../appdwarf
part0 SOURCE=1 . "$(which appdwarf)"
ARCH=x86_64-unknown-linux-gnu ARCH=x86_64-unknown-linux-gnu
LINK=https://static.rust-lang.org/dist/rust-nightly-$ARCH.tar.gz LINK=https://static.rust-lang.org/dist/rust-nightly-$ARCH.tar.gz
ungz ungz
"$DIR"/rust-nightly-$ARCH/install.sh --prefix="$DIR" --components=cargo,rustc,rust-std-$ARCH "$DIR"/rust-nightly-$ARCH/install.sh --prefix="$DIR" --components=cargo,rustc,rust-std-$ARCH
rm -rf "$DIR"/rust-nightly-$ARCH rm -rf "$DIR"/rust-nightly-$ARCH
appb appb
part9 appmk

View file

@ -1,8 +0,0 @@
#!/bin/sh
. "$(dirname "$0")"/appmk
part0
eopkg fc -o "$DIR" signal-desktop
parallel "unzip -op {} install.tar.xz | tar xJf - -C$DIR" ::: "$DIR"/*.eopkg
ln -s usr/share/signal-desktop/signal-desktop "$DIR"/AppRun
rm "$DIR"/*.eopkg
part9

View file

@ -1,6 +1,6 @@
#!/bin/sh #!/bin/sh
. "$(dirname "$0")"/appmk # shellcheck source=../appdwarf
part0 SOURCE=1 . "$(which appdwarf)"
LINK=https://mirror.ctan.org/systems/texlive/tlnet/install-tl-unx.tar.gz LINK=https://mirror.ctan.org/systems/texlive/tlnet/install-tl-unx.tar.gz
ungz ungz
mv "$DIR"/install-tl-* "$DIR"/tl mv "$DIR"/install-tl-* "$DIR"/tl
@ -39,8 +39,8 @@ tlpdbopt_sys_man /usr/local/share/man
tlpdbopt_w32_multi_user 1 tlpdbopt_w32_multi_user 1
EOF EOF
"$DIR"/tl/install-tl -profile "$DIR"/tl/prof "$DIR"/tl/install-tl -profile "$DIR"/tl/prof
rm -r "$DIR"/texmf-dist/scripts/tlcockpit
"$DIR"/bin/x86_64-linux/tlmgr install bookhands fontawesome5 markdown paralist titlesec titling xstring soul "$DIR"/bin/x86_64-linux/tlmgr install bookhands fontawesome5 markdown paralist titlesec titling xstring soul
rm -r "$DIR"/texmf-dist/scripts/tlcockpit
appb appb
sed -i 3,5s#/bin#/bin/x86_64-linux# "$DIR"/AppRun sed -i 3,5s#/bin#/bin/x86_64-linux# "$DIR"/AppRun
part9 appmk

View file

@ -1,25 +1,27 @@
#!/bin/sh #!/bin/sh
. "$(dirname "$0")"/appmk # shellcheck source=../appdwarf
part0 SOURCE=1 . "$(which appdwarf)"
VER=Kron4ek/Wine-Builds VER=Kron4ek/Wine-Builds
[ "$1" = "-p" ] && PREFIX=1 && shift [ "$1" = "-p" ] && PREFIX=1 && shift
[ "$1" = "proton" ] && VER=GloriousEggroll/proton-ge-custom && shift
[ "$1" = "lutris" ] && VER=lutris/wine && shift [ "$1" = "lutris" ] && VER=lutris/wine && shift
[ "$1" = "proton" ] && VER=GloriousEggroll/proton-ge-custom && shift
LINK=$(curl -L api.github.com/repos/$VER/releases | jq .[0].assets[1] | grep -om1 git.\*tar..z) LINK=$(curl -L api.github.com/repos/$VER/releases | jq .[0].assets[1] | grep -om1 git.\*tar..z)
unarc unarc
mv "$DIR"/wine*/* "$DIR"/GE-Proton*/files/* "$DIR"/lutris*/* "$DIR" || true mv "$DIR"/wine*/* "$DIR"/GE-Proton*/files/* "$DIR"/lutris*/* "$DIR" || true
t=winetricks; wget -O"$DIR"/bin/$t github.com/$t/$t/raw/master/src/$t
chmod +x "$DIR"/bin/$t
rm -r "$DIR"/lib/wine/i386* rm -r "$DIR"/lib/wine/i386*
appb
if [ "$PREFIX" ]; then t=winetricks
WINEPREFIX="$DIR/prefix" "$DIR/bin/wine" cmd /c exit wget -O"$DIR"/bin/$t github.com/$t/$t/raw/master/src/$t
cat > "$DIR/AppRun" << 'EOF' chmod +x "$DIR"/bin/$t
#!/bin/sh
apprun() {
export PATH="$APPDIR"/bin:"$PATH" export PATH="$APPDIR"/bin:"$PATH"
export LD_LIBRARY_PATH="$APPDIR"/lib64:"$APPDIR"/lib:"$LD_LIBRARY_PATH" export LD_LIBRARY_PATH="$APPDIR"/lib64:"$APPDIR"/lib:"$LD_LIBRARY_PATH"
if [ ! $WINEPREFIX ]; then if [ ! "$WINEPREFIX" ]; then
mkdir -p "$APPDIR.prefix" ~/.wine/work mkdir -p "$APPDIR.prefix" ~/.wine/work
fuse-overlayfs -o "lowerdir=$APPDIR/prefix,upperdir=$HOME/.wine,workdir=$HOME/.wine/work" "$APPDIR.prefix" fuse-overlayfs -o "lowerdir=$APPDIR/prefix,upperdir=$HOME/.wine,workdir=$HOME/.wine/work" "$APPDIR.prefix"
export WINEPREFIX="$APPDIR.prefix" export WINEPREFIX="$APPDIR.prefix"
@ -29,10 +31,10 @@ fi
fusermount -quz "$APPDIR.prefix" fusermount -quz "$APPDIR.prefix"
rmdir "$APPDIR.prefix" rmdir "$APPDIR.prefix"
EOF }
chmod +x "$DIR/AppRun" if [ "$PREFIX" ]; then
else WINEPREFIX="$DIR/prefix" "$DIR/bin/wine" cmd /c exit
appb appb
fi fi
part9 appmk

View file

@ -1,9 +0,0 @@
#!/bin/sh
. "$(dirname "$0")"/appmk
part0
eopkg fc -o "$DIR" cargo rust
parallel "unzip -op {} install.tar.xz | tar xJf - -C$DIR" ::: "$DIR"/*.eopkg
rm -r "$DIR"/usr/lib64/rustlib/i686-unknown-linux-gnu "$DIR"/*.eopkg
mv "$DIR"/usr/* "$DIR"
appb
part9