modularity
parent
964764d69b
commit
cbb9a110de
7
AppRun
7
AppRun
|
@ -2,10 +2,10 @@
|
|||
# Author : Ismael Barros² <ismael@barros2.org>
|
||||
# License : BSD http://en.wikipedia.org/wiki/BSD_license
|
||||
|
||||
APPDIR=$(dirname "$(readlink -f "$0")")
|
||||
export APPDIR="$(dirname "$(readlink -f "$0")")"
|
||||
LOGFILE=$(mktemp --suffix=_AppRun )
|
||||
|
||||
BINARY=_BINARY_
|
||||
BINARY="_BINARY_"
|
||||
BINARY_ARGS=
|
||||
|
||||
cd "$APPDIR"
|
||||
|
@ -20,8 +20,7 @@ setup_keepResolution
|
|||
ret=0
|
||||
cd usr/
|
||||
{
|
||||
LD_LIBRARY_PATH="$APPDIR/usr/lib/:$LD_LIBRARY_PATH" \
|
||||
"$APPDIR"/usr/lib/ld-linux.so.2 ./$BINARY $BINARY_ARGS $@
|
||||
run_withLocalLibs "$APPDIR"/usr/lib/ld-linux.so.2 ./$BINARY $BINARY_ARGS $@
|
||||
ret=$?
|
||||
} 2>&1 | tee "$LOGFILE"
|
||||
|
||||
|
|
|
@ -2,10 +2,10 @@
|
|||
# Author : Ismael Barros² <ismael@barros2.org>
|
||||
# License : BSD http://en.wikipedia.org/wiki/BSD_license
|
||||
|
||||
APPDIR=$(dirname "$(readlink -f "$0")")
|
||||
export APPDIR="$(dirname "$(readlink -f "$0")")"
|
||||
LOGFILE=$(mktemp --suffix=_AppRun )
|
||||
|
||||
BINARY=_BINARY_
|
||||
BINARY="_BINARY_"
|
||||
BINARY_ARGS=
|
||||
|
||||
cd "$APPDIR"
|
||||
|
@ -19,8 +19,7 @@ setup_keepResolution
|
|||
|
||||
ret=0
|
||||
{
|
||||
LD_LIBRARY_PATH="$APPDIR/usr/lib/:$LD_LIBRARY_PATH" \
|
||||
./$BINARY $BINARY_ARGS $@
|
||||
run_withLocalLibs ./$BINARY $BINARY_ARGS $@
|
||||
ret=$?
|
||||
} 2>&1 | tee "$LOGFILE"
|
||||
|
||||
|
|
|
@ -2,17 +2,16 @@
|
|||
# Author : Ismael Barros² <ismael@barros2.org>
|
||||
# License : BSD http://en.wikipedia.org/wiki/BSD_license
|
||||
|
||||
APPDIR=$(dirname "$(readlink -f "$0")")
|
||||
export APPDIR="$(dirname "$(readlink -f "$0")")"
|
||||
LOGFILE=$(mktemp --suffix=_AppRun )
|
||||
|
||||
BINARY="_BINARY_"
|
||||
BINARY_ARGS=
|
||||
WINETRICKS=
|
||||
|
||||
cd "${APPDIR}"
|
||||
cd "$APPDIR"
|
||||
. ./util.sh
|
||||
|
||||
export LD_LIBRARY_PATH=$PWD/usr/lib/:${LD_LIBRARY_PATH}
|
||||
export PATH=$PWD/usr/bin/:${PATH}
|
||||
|
||||
[ -z "$*" ] && show_usage "usage.txt"
|
||||
|
@ -58,7 +57,7 @@ done
|
|||
|
||||
cd "$WINEPREFIX"
|
||||
if [ $CONF ]; then
|
||||
$APPDIR/usr/bin/winecfg $@
|
||||
run_withLocalLibs $APPDIR/usr/bin/winecfg $@
|
||||
else
|
||||
$APPDIR/usr/bin/wine "$APPDIR/$BINARY" $BINARY_ARGS $@
|
||||
run_withLocalLibs $APPDIR/usr/bin/wine "$APPDIR/$BINARY" $BINARY_ARGS $@
|
||||
fi
|
||||
|
|
6
util.sh
6
util.sh
|
@ -23,8 +23,12 @@ xml_extract_property() {
|
|||
get_resolution() { xrandr | grep \* | cut -d' ' -f4; }
|
||||
set_resolution() { xrandr -s $1; }
|
||||
|
||||
run_oss() { if [ $(which padspp 2>/dev/null) ]; then padsp $@; else $@; fi; }
|
||||
run_withLocalLibs() { LD_LIBRARY_PATH="$APPDIR/usr/lib/:$LD_LIBRARY_PATH" exec "$@"; }
|
||||
run_shell() { if [[ $(tty) = "not a tty" ]]; then xterm -e "$@"; else $@; fi; }
|
||||
|
||||
setup_aoss() { [ -d /proc/asound ] && export LD_PRELOAD="libaoss.so"${LD_PRELOAD:+:$LD_PRELOAD}; }
|
||||
setup_padsp() { [ $(which pulseaudio 2>/dev/null) ] && export LD_PRELOAD="libpulsedsp.so"${LD_PRELOAD:+:$LD_PRELOAD}; }
|
||||
|
||||
setup_keepResolution()
|
||||
{
|
||||
resolution=$(get_resolution)
|
||||
|
|
Loading…
Reference in New Issue