Use bash for appdwarf and add AppRun example

This commit is contained in:
Phantop 2021-06-08 15:53:29 -04:00
parent 1e1e9c4fdd
commit 509fcc2e28
4 changed files with 11 additions and 5 deletions

5
AppRun.example Executable file
View File

@ -0,0 +1,5 @@
#!/bin/sh
HERE=$(dirname $(readlink -f "${0}"))
export LD_LIBRARY_PATH="${HERE}":$PATH
export DXVK_STATE_CACHE_PATH=~/.cache DXVK_LOG_PATH=none
wine "${HERE}"/Pine.exe $@

View File

@ -1,10 +1,10 @@
#!/bin/sh
#!/bin/bash
set -eo pipefail
IFS=$'\n\t'
version=1
usage(){
echo "Usage: $0 [option] [FILE/FOLDER/URL]"
echo "Usage: $(basename "$0") [option] [FILE/FOLDER/URL]"
echo " Compress a given AppDir (default)"
echo " -a, --appimage Convert a given AppImage to appdwarf"
echo " -u, --url Fetch AppImage from URL and convert to appdwarf"
@ -33,7 +33,7 @@ appimage() {
./"$1" --appimage-extract || exit 1
dwarf squashfs-root
rm -rf squashfs-root
mv squashfs-root.sh $(basename "$1" .AppImage).sh
mv squashfs-root.sh "$(basename "$1" .AppImage)".sh
else
echo "$1" is not a valid file
exit 1

View File

@ -10,6 +10,7 @@ export WINE="${script_dir}"/wine/bin/wine
export WINE64="${script_dir}"/wine/bin/wine64
export WINESERVER="${script_dir}"/wine/bin/wineserver
export WINETRICKS="${script_dir}"/winetricks
export DXVK_STATE_CACHE_PATH=~/.cache DXVK_LOG_PATH=none
if [ "$1" = "winetricks" ]; then
if [ $# -ge 2 ]; then

View File

@ -1,8 +1,8 @@
#!/usr/bin/env bash
PATH=$(dirname $(readlink -f "${0}"))/../:$PATH
start="$PWD"
winedir=/tmp/dwarf-portable-executable/wine
script_dir="$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")"
PATH=$script_dir/..:$PATH
# You can change the url below if you want to use a different Wine build
# You can also put your directory (named wine) containing Wine build near the script
@ -10,7 +10,7 @@ script_dir="$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")"
wine_url="$(curl https://api.github.com/repos/Kron4ek/Wine-Builds/releases | grep -wo http.\*-staging-tkg-amd64.tar.xz | head -n1)"
# If there is no wine directory, then download Wine build from the URL
mkdir $winedir && cd $winedir
mkdir -p $winedir && cd $winedir
if [ ! -d wine ]; then
wget -nv -O wine.tar.xz "${wine_url}" -q --show-progress