Compare commits

...

26 commits

Author SHA1 Message Date
Phantop 50ab3e3fbb fix workflow w/ ubuntu updates 2024-11-02 01:07:16 -04:00
Phantop 76daa9ca27 fix outfunc handling better 2024-08-19 02:00:57 -04:00
Phantop a9d91c3471 fix appdwarf indentation 2024-08-19 01:59:41 -04:00
Phantop 4f6c908ee9 fix regression in outfunc handling for app scripts 2024-07-05 08:19:40 -04:00
Phantop a6a30c56ad appmk: make output target consistent 2024-07-05 07:49:59 -04:00
Phantop e268a141b2 apps: refactor appmk infrastructure into sourcing appdwarf 2024-07-05 00:23:24 -04:00
Phantop 2addf3728f add single arch emu package 2024-06-10 17:51:45 -04:00
Phantop 1cf64d2ef6 getapp: adapt for arch apps 2024-06-10 17:48:10 -04:00
Phantop 70edc265f5 attempt arch package workflow 2024-06-08 14:52:27 -04:00
Phantop 5309dfd607 apps: add helper script to get build app from github actions 2024-06-06 11:30:08 -04:00
Phantop 59f6169e63 action: fix gh cli authentication 2024-06-06 11:17:31 -04:00
Phantop 769fa7642e action: build pinta too 2024-06-06 11:12:55 -04:00
Phantop 525e328eaf mkjava: left a shift in oops 2024-06-06 11:12:37 -04:00
Phantop 33df429748 apps: dotnet, java: easily pick type/ver; add pinta 2024-06-06 11:07:44 -04:00
Phantop 3947511604 fix small helptext errors 2024-05-11 16:51:56 -04:00
Phantop eb24f0857b deal with some missing unmounts and fix musikcube 2024-04-16 13:35:01 -04:00
Phantop 738f62a7b7 Revert "appdwarf: reduce the change of unmounts failing slightly"
This reverts commit 60dfcd3a66.
2024-04-13 20:42:01 -04:00
Phantop 60dfcd3a66 appdwarf: reduce the change of unmounts failing slightly 2024-04-07 15:23:08 -04:00
Phantop f87a42698e use escape codes instead of tput to drop ncurses dependency 2024-03-24 00:51:21 -04:00
Phantop c09f7ea933 mkpacman: powerpill doesn't resolve provides right 2024-03-16 10:27:41 -04:00
Phantop f180a2962d appdwarf: short fetch option, better help 2024-03-12 13:40:25 -04:00
Phantop 86cc5317c1 attempt actions for building apps 2024-03-08 20:28:37 -05:00
Phantop 272ed9a1d5 mkpacman: use powerpill to not need root 2024-03-08 20:05:26 -05:00
Phantop 869c9666cf update for dwarfs 0.8.0 and pcm categorization 2024-02-01 12:08:44 -05:00
Phantop baffb207d3 update README.md 2023-12-29 02:57:52 -05:00
Phantop 4a82495225 mkcalibre: get architecture better 2023-12-17 14:32:21 -05:00
24 changed files with 327 additions and 187 deletions

96
.github/workflows/build.yml vendored Normal file
View file

@ -0,0 +1,96 @@
name: build
on:
workflow_dispatch:
push:
branches:
- main
jobs:
build:
name: Build
strategy:
fail-fast: false
matrix:
app:
- calibre
- dotnet
- go
- java
- mp3tag
- musikcube
- musl
- node
- pinta
- pypy
- renpy
- rust
- tex
- wine
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Install packaging dependencies
run: |
sudo apt update -y
sudo apt install -y aria2 libarchive-tools
- name: Setup DwarFS
run: |
sudo cp appdwarf /bin
sudo wget https://github.com/mhx/dwarfs/releases/download/v0.9.6/dwarfs-universal-0.9.6-Linux-x86_64-clang -O /bin/mkdwarfs
sudo chmod +x /bin/mkdwarfs
- name: Build image
env:
GH_TOKEN: ${{ github.token }}
run: |
cd apps
./mk${{ matrix.app }}
- name: Upload build artifact
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.app }}
path: |
bin/${{ matrix.app }}
arch:
name: Arch
strategy:
fail-fast: false
matrix:
app:
- { 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 suyu-dev-qt6-git }
runs-on: ubuntu-latest
container: archlinux:latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Update system base
run: |
pacman -Syu --noconfirm
pacman -S --noconfirm aria2 base-devel git libarchive parallel wget
pacman -S --noconfirm budgie-desktop vulkan-intel
- name: Add Chaotic-AUR for additional depends
run: |
pacman-key --init
pacman-key --recv-key 3056513887B78AEB --keyserver keyserver.ubuntu.com
pacman-key --lsign-key 3056513887B78AEB
pacman -U --noconfirm 'https://cdn-mirror.chaotic.cx/chaotic-aur/chaotic-keyring.pkg.tar.zst' 'https://cdn-mirror.chaotic.cx/chaotic-aur/chaotic-mirrorlist.pkg.tar.zst'
printf '[chaotic-aur]\nInclude = /etc/pacman.d/chaotic-mirrorlist\n' >> /etc/pacman.conf
printf '[multilib]\nInclude = /etc/pacman.d/mirrorlist\n' >> /etc/pacman.conf
pacman -Syu --noconfirm
- name: Setup DwarFS
run: |
sudo cp appdwarf /bin
sudo wget https://github.com/mhx/dwarfs/releases/download/v0.9.6/dwarfs-universal-0.9.6-Linux-x86_64-clang -O /bin/mkdwarfs
sudo chmod +x /bin/mkdwarfs
- name: Build image
run: |
cd apps
./mkpacman ${{ matrix.app.pkgs }}
pkg1=$(echo ${{ matrix.app.pkgs }} | cut -d\ -f1)
mv bin/$pkg1 bin/${{ matrix.app.name }}
- name: Upload build artifact
uses: actions/upload-artifact@v4
with:
name: arch-${{ matrix.app.name }}
path: |
bin/${{ matrix.app.name }}

View file

@ -1,4 +1,4 @@
appdwarf
[appdwarf](https://github.com/phantop/appdwarf)
=======
A tool to convert an AppDir or an existing [AppImage](https://appimage.org/) file,
either as a local file or from a URL, into a highly compressed portable image using

118
appdwarf
View file

@ -2,17 +2,46 @@
set -e # exit on failure
IFS=$(printf '\n\t') # smarter ifs
appmk() {
appdwarf "$DIR"
mv "$DIR".sh "$(dirname "$(realpath "$0")")/bin/$APP"
rm -rf "$DIR"
}
apprun() {
export PATH="$APPDIR"/bin:"$PATH"
export LD_LIBRARY_PATH="$APPDIR"/lib64:"$APPDIR"/lib:"$LD_LIBRARY_PATH"
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() {
MOUNTBIN=$(mktemp) # use provided offsets to supply dwarfs binary
tail -n+"$OFF" "$0" | head -n"$LEN" | head -c-1 | zstd -cqd > "$MOUNTBIN"
mountbin=$(mktemp) # use provided offsets to supply dwarfs binary
#shellcheck disable=SC2154
tail -n+"$off" "$0" | head -n"$len" | head -c-1 | zstd -cqd > "$mountbin"
#shellcheck disable=SC2317
dwarfs() { chmod +x "$MOUNTBIN"; "$MOUNTBIN" "$@"; rm "$MOUNTBIN"; }
dwarfs() { chmod +x "$mountbin"; "$mountbin" "$@"; rm "$mountbin"; }
}
header() {
@ -21,13 +50,14 @@ header() {
dwarfs -o offset=auto -o tidy_strategy=swap -o workers="$(nproc)" "$0" "$APPDIR"
trap 'fusermount -quz $APPDIR; rmdir $APPDIR' 0 1 2 3 6 14 15 EXIT
"$APPDIR/AppRun" "$@"
fusermount -quz "$APPDIR" || true
exit $?
}
outfunc() {
echo '#!/bin/sh'
echo 'set -e' # running outfunc with no input just prints these two lines
sed -n "/^$1() {$/,/^}$/s/^ *//p" "$0" | tail -n+2 | head -n-1
sed -n "/^$1() {$/,/^}$/s/^ *//p" "$script" | tail -n+2 | head -n-1
}
unappimage() {
@ -41,7 +71,7 @@ zzexe() {
[ "$1" = "-p" ] && p="$2" && shift # save prefix if present
shift; out=$(mktemp) # make tmp file to avoid io operations
{ 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 /"
zstdmt -cq19 "$@"
} > "$out"
@ -52,7 +82,7 @@ zzexe() {
zzexe_header() {
dir="$(dirname "$0")" out=$(mktemp -t .zzXXXX.)
tail -n+"$OFF" "$0" | zstd -cd > "$out"
tail -n+"$off" "$0" | zstd -cd > "$out"
chmod +x "$out"
[ ! -f "$dir/$(basename "$out")" ] && ln -s "$out" "$dir"
trap 'rm -f "$out" "$dir/$(basename "$out")"' 0 1 2 3 6 14 15 EXIT
@ -60,46 +90,66 @@ zzexe_header() {
exit $?
}
if [ "$SOURCE" ]; then
unset SOURCE
script="$(which appdwarf)"
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
else
script="$0"
fi
case "$1" in
-a )
outfunc apprun > "$2"
chmod +x "$2"
arun "$2"
exit ;;
-b )
outfunc apprun | sed '5s#/#/bin/#' > "$2"
chmod +x "$2"
brun "$2"
exit ;;
--bundle ) # allow bundling dwarfs binary
BUNDLE=$(realpath "$2")
bundle=$(realpath "$2")
shift 2;;
-d | --decompress )
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
tmp=$(mktemp) # make tmp file to avoid io operations
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"
chmod +x "$2"
exit ;;
--fetch )
FETCH=1
-f | --fetch )
fetch=1
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 )
zzexe "$@" ;;
--version | -v )
tput setaf 2; echo appdwarf 2023.11.16
tput setaf 6; echo Built by July 🏳️‍🌈; exit ;;
printf '\e[32m'
echo 'appdwarf 2024.07.04'
printf '\e[36m'
echo Built by July 🏳️‍🌈
printf '\e[0m'
exit ;;
-* | '' )
echo "Usage: appdwarf [option] [APP/FILE/FOLDER/URL] [compression options]"
echo " -a [FILE] write example AppRun file"
echo " -b [FILE] write bin subdir AppRun file"
echo " -d [--decompress] [FILE] decompress a compressed program"
echo " -d, --decompress [FILE] decompress a compressed program"
echo
echo " --bundle [path/to/dwarfs] bundle dwarfs with the appdwarf image"
echo " --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 " -p [--prefix] [PREFIX] zzexe a file with prefix"
echo " -z [--zzexe] zzexe a file"
echo " -p, --prefix [PREFIX] zzexe a file with prefix"
echo " -z, --zzexe zzexe a file"
echo
echo " -h, --help Print this help text"
echo " -v, --version Print the appdwarf version"; exit ;;
@ -122,18 +172,20 @@ if [ ! -d "$1" ]; then # directory doesn't exist, see if this is an appimage
echo "Assuming this is a GitHub repo..."
app="$(echo "${1%/}"/releases | sed 's|github.com|api.github.com/repos|')"
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
set -- "$(echo "$link" | head -n1)" "$@"
set -- "$(echo "$url" | head -n1)" "$@"
fi
app=$(basename "$1") # actually try to get the appimage
if aria2c -x16 -s16 "$1" -o "$app" || wget "$1" -O "$app"; then
shift
set -- "$app" "$@"
test "$FETCH" && chmod +x "$1" && exit
test "$fetch" && chmod +x "$1" && exit
else
tput setaf 1; echo "No valid remote or local input found. Exiting..." >&2
printf '\e[31m' >&2
echo "No valid remote or local input found. Exiting..." >&2
printf '\e[0m' >&2
rm -f "$app"; exit 1
fi
fi
@ -148,25 +200,27 @@ if [ ! -d "$1" ]; then # directory doesn't exist, see if this is an appimage
shift
set -- "$app" "$@"
else
tput setaf 4; echo "$1 is not an AppImage, it will be zzexe'd"
printf '\e[34m'
echo "$1 is not an AppImage, it will be zzexe'd"
printf '\e[0m'
zzexe -z "$@"
fi
fi
head="$(mktemp)"
if [ "$BUNDLE" ]; then { # behavior for bundling a dwarfs executable
ZDATA="$(mktemp)"
zstd -cq "$BUNDLE" > "$ZDATA"
if [ "$bundle" ]; then { # behavior for bundling a dwarfs executable
zdata="$(mktemp)"
zstd -cq "$bundle" > "$zdata"
outfunc
echo "OFF=$(($( (outfunc; outfunc bundlehead; outfunc header) | wc -l)+3))"
echo "LEN=$(($(wc -l < "$ZDATA")+1))"
echo "off=$(($( (outfunc; outfunc bundlehead; outfunc header) | wc -l)+3))"
echo "len=$(($(wc -l < "$zdata")+1))"
outfunc bundlehead
} > "$head"
fi
outfunc header >> "$head"
test "$BUNDLE" && cat "$ZDATA" >> "$head"
test "$bundle" && cat "$zdata" >> "$head"
echo >> "$head"
mkdwarfs -o "$(realpath "$1").sh" -B5 --header "$head" -i "$@"
mkdwarfs -o "$(realpath "$1").sh" -B5 --header "$head" -i "$@" --categorize=pcmaudio -C pcmaudio/waveform::flac:level=8
rm -rf "$head" "$1"
chmod +x "$(realpath "$1").sh"

View file

@ -11,18 +11,16 @@ These scripts are all targeted for use on x86_64 Linux systems with GLIBC.
Script | Function | Source
--- | --- | ---
`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>
`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>
`mkmusikcube` | Latest musikcube release | <https://musikcube.com/>
`mkmusl` | Latest musl.cc toolchain | <https://musl.cc>
`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>
`mkrenpy` | Latest Ren'Py release | <https://www.renpy.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>
`mkwine` | Latest `wine-staging-tkg` release | <https://github.com/Kron4ek/Wine-Builds>
`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"
}

7
apps/getapp Executable file
View file

@ -0,0 +1,7 @@
#!/bin/sh
set -e # exit on failure
IFS=$(printf '\n\t') # smarter ifs
cd "$(dirname "$(realpath "$0")")/bin"
rm -f "$(echo "$1" | sed 's/arch-//')"
appdwarf -g "$1"

View file

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

View file

@ -1,9 +1,37 @@
#!/bin/sh
. "$(dirname "$0")"/appmk
part0
LINK=https://dotnetcli.azureedge.net/dotnet/Sdk
VER=$(curl $LINK/STS/latest.version)
LINK="$LINK/$VER/dotnet-sdk-$VER-linux-x64.tar.gz"
# shellcheck source=../appdwarf
SOURCE=1 . "$(which appdwarf)"
TYPE=Runtime
VER=LTS
while [ $# -gt 0 ]; do
case "$1" in
STS | sts )
VER=STS ;;
SDK | Sdk | sdk )
TYPE=Sdk ;;
esac
shift
done
LINK=https://dotnetcli.azureedge.net/dotnet/$TYPE
TYPE=$(echo "$TYPE" | tr "[:upper:]" "[:lower:]")
VER=$(curl $LINK/"$VER"/latest.version)
LINK="$LINK/$VER/dotnet-$TYPE-$VER-linux-x64.tar.gz"
ungz
ln -s dotnet "$DIR"/AppRun
part9
script="$0"
apprun() {
export DOTNET_ROOT="$APPDIR"
case "$(basename "$ARGV0")" in
dotnetenv )
exec "$@" ;;
* )
exec "$APPDIR/$(basename "$ARGV0")" "$@" ;;
esac
}
appa
script="$(which appdwarf)"
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
. "$(dirname "$0")"/appmk
part0
# shellcheck source=../appdwarf
SOURCE=1 . "$(which appdwarf)"
LINK=$(curl https://go.dev/dl/ | grep -m1 linux | cut -d\" -f4)
curl -L https://go.dev/"$LINK" | tar xz -C"$DIR"/..
appb
sed -i '5i export GOPROXY=direct' "$DIR"/AppRun
part9
appmk

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

11
apps/mkpinta Executable file
View file

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

View file

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

View file

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

View file

@ -1,10 +1,10 @@
#!/bin/sh
. "$(dirname "$0")"/appmk
part0
# shellcheck source=../appdwarf
SOURCE=1 . "$(which appdwarf)"
ARCH=x86_64-unknown-linux-gnu
LINK=https://static.rust-lang.org/dist/rust-nightly-$ARCH.tar.gz
ungz
"$DIR"/rust-nightly-$ARCH/install.sh --prefix="$DIR" --components=cargo,rustc,rust-std-$ARCH
rm -rf "$DIR"/rust-nightly-$ARCH
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
. "$(dirname "$0")"/appmk
part0
# shellcheck source=../appdwarf
SOURCE=1 . "$(which appdwarf)"
LINK=https://mirror.ctan.org/systems/texlive/tlnet/install-tl-unx.tar.gz
ungz
mv "$DIR"/install-tl-* "$DIR"/tl
@ -39,8 +39,8 @@ tlpdbopt_sys_man /usr/local/share/man
tlpdbopt_w32_multi_user 1
EOF
"$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
rm -r "$DIR"/texmf-dist/scripts/tlcockpit
appb
sed -i 3,5s#/bin#/bin/x86_64-linux# "$DIR"/AppRun
part9
appmk

View file

@ -1,38 +1,42 @@
#!/bin/sh
. "$(dirname "$0")"/appmk
part0
# shellcheck source=../appdwarf
SOURCE=1 . "$(which appdwarf)"
VER=Kron4ek/Wine-Builds
[ "$1" = "-p" ] && PREFIX=1 && shift
[ "$1" = "proton" ] && VER=GloriousEggroll/proton-ge-custom && 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)
unarc
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*
appb
t=winetricks
wget -O"$DIR"/bin/$t github.com/$t/$t/raw/master/src/$t
chmod +x "$DIR"/bin/$t
script="$0"
apprun() {
export PATH="$APPDIR"/bin:"$PATH"
export LD_LIBRARY_PATH="$APPDIR"/lib64:"$APPDIR"/lib:"$LD_LIBRARY_PATH"
if [ ! "$WINEPREFIX" ]; then
mkdir -p "$APPDIR.prefix" ~/.wine/work
fuse-overlayfs -o "lowerdir=$APPDIR/prefix,upperdir=$HOME/.wine,workdir=$HOME/.wine/work" "$APPDIR.prefix"
export WINEPREFIX="$APPDIR.prefix"
fi
"$APPDIR/bin/$(basename "$ARGV0")" "$@"
fusermount -quz "$APPDIR.prefix"
rmdir "$APPDIR.prefix"
}
if [ "$PREFIX" ]; then
WINEPREFIX="$DIR/prefix" "$DIR/bin/wine" cmd /c exit
cat > "$DIR/AppRun" << 'EOF'
#!/bin/sh
export PATH="$APPDIR"/bin:"$PATH"
export LD_LIBRARY_PATH="$APPDIR"/lib64:"$APPDIR"/lib:"$LD_LIBRARY_PATH"
if [ ! $WINEPREFIX ]; then
mkdir -p "$APPDIR.prefix" ~/.wine/work
fuse-overlayfs -o "lowerdir=$APPDIR/prefix,upperdir=$HOME/.wine,workdir=$HOME/.wine/work" "$APPDIR.prefix"
export WINEPREFIX="$APPDIR.prefix"
appa
fi
"$APPDIR/bin/$(basename "$ARGV0")" "$@"
fusermount -quz "$APPDIR.prefix"
rmdir "$APPDIR.prefix"
EOF
chmod +x "$DIR/AppRun"
else
appb
fi
part9
script="$(which appdwarf)"
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