License & stuff

master
Ismael Barros 2013-04-14 14:05:22 +02:00
parent 26610e65e1
commit 8efcf4505e
16 changed files with 57 additions and 26 deletions

2
AppRun
View File

@ -1,4 +1,6 @@
#!/bin/sh
# Author : Ismael Barros² <ismael@barros2.org>
# License : BSD http://en.wikipedia.org/wiki/BSD_license
APPDIR=$(dirname "$(readlink -f "$0")")
LOGFILE=$(mktemp --suffix=_AppRun )

View File

@ -1,4 +1,6 @@
#!/bin/sh
# Author : Ismael Barros² <ismael@barros2.org>
# License : BSD http://en.wikipedia.org/wiki/BSD_license
APPDIR=$(dirname "$(readlink -f "$0")")
LOGFILE=$(mktemp --suffix=_AppRun )

View File

@ -1,4 +1,6 @@
#!/bin/sh
# Author : Ismael Barros² <ismael@barros2.org>
# License : BSD http://en.wikipedia.org/wiki/BSD_license
APPDIR=$(dirname "$(readlink -f "$0")")
LOGFILE=$(mktemp --suffix=_AppRun )

View File

@ -1,4 +1,6 @@
#!/bin/bash
# Author : Ismael Barros² <ismael@barros2.org>
# License : BSD http://en.wikipedia.org/wiki/BSD_license
AppImageAssistantDir="$(dirname $(readlink -f "$0"))/AppImageAssistant 0.9"
[ -d "$AppImageAssistantDir" ] || { echo "Could not find $AppImageAssistantDir"; exit 1; }

View File

@ -1,4 +1,6 @@
#!/bin/bash
# Author : Ismael Barros² <ismael@barros2.org>
# License : BSD http://en.wikipedia.org/wiki/BSD_license
EXCEPTIONS=libGL.so.1
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:usr/lib/

View File

@ -1,4 +1,6 @@
#!/bin/bash
# Author : Ismael Barros² <ismael@barros2.org>
# License : BSD http://en.wikipedia.org/wiki/BSD_license
pg4l_dir=$(dirname $(readlink -f $0))
. "$pg4l_dir/util.sh"

View File

@ -1,4 +1,6 @@
#!/bin/bash
# Author : Ismael Barros² <ismael@barros2.org>
# License : BSD http://en.wikipedia.org/wiki/BSD_license
pg4l_dir=$(dirname $(readlink -f $0))
. "$pg4l_dir/util.sh"

View File

@ -1,4 +1,6 @@
#!/bin/bash
# Author : Ismael Barros² <ismael@barros2.org>
# License : BSD http://en.wikipedia.org/wiki/BSD_license
pg4l_dir=$(dirname $(readlink -f $0))
. "$pg4l_dir/util.sh"

View File

@ -1,4 +1,6 @@
#!/bin/bash
# Author : Ismael Barros² <ismael@barros2.org>
# License : BSD http://en.wikipedia.org/wiki/BSD_license
for i in usr opt; do
sed -i -e "s|/${i}/|././/|g" $@

View File

@ -1,4 +1,6 @@
#!/bin/bash
# Author : Ismael Barros² <ismael@barros2.org>
# License : BSD http://en.wikipedia.org/wiki/BSD_license
pg4l_dir=$(dirname $(readlink -f $0))
@ -7,6 +9,8 @@ if [ -z "$*" ]; then
fi
cp -v "$pg4l_dir"/AppRun_quick AppRun || exit 1
cp -v "$pg4l_dir"/util.sh . || exit 1
for i in AppRun.desktop AppRun.png; do
{ [ -f "$i" ] || cp -v "$pg4l_dir"/"$i" "$i"; } || exit 1
done

View File

@ -1,4 +1,6 @@
#!/bin/sh
# Author : Ismael Barros² <ismael@barros2.org>
# License : BSD http://en.wikipedia.org/wiki/BSD_license
sudo apt-get update
sudo apt-get install libc6-i386 libglib2.0-0:i386 libgl1-mesa-glx-lts-quantal:i386

View File

@ -1,4 +1,6 @@
#!/bin/bash
# Author : Ismael Barros² <ismael@barros2.org>
# License : BSD http://en.wikipedia.org/wiki/BSD_license
pg4l_dir=$(dirname $(readlink -f $0))

View File

@ -1,4 +1,6 @@
#!/bin/bash
# Author : Ismael Barros² <ismael@barros2.org>
# License : BSD http://en.wikipedia.org/wiki/BSD_license
usage() { echo "$0 <image> <target>"; }

View File

@ -1,4 +1,6 @@
#!/bin/bash
# Author : Ismael Barros² <ismael@barros2.org>
# License : BSD http://en.wikipedia.org/wiki/BSD_license
for i in usr opt; do
sed -i -e "s|././/|/${i}/|g" $@

View File

@ -1,4 +1,6 @@
#!/bin/sh
# Author : Ismael Barros² <ismael@barros2.org>
# License : BSD http://en.wikipedia.org/wiki/BSD_license
die() { echo $@; exit 1; }
trimp() { sed -e 's/^[ \t]*//g' -e 's/[ \t]*$//g'; }
@ -63,7 +65,7 @@ unionfs_overlay_setup()
overlay_cleanup 2>/dev/null
unionfs -o cow "$rw_data_path"=RW:"$ro_data_path"=RO "$overlay_path" || return 1
unionfs -o cow,umask=0000 "$rw_data_path"=RW:"$ro_data_path"=RO "$overlay_path" || return 1
#./unionfs-fuse -o cow,umask=0000 "$rw_data_path"=RW:"$ro_data_path"=RO "$overlay_path" || return 1
trap overlay_cleanup EXIT

View File

@ -1,4 +1,6 @@
#!/bin/bash
# Author : Ismael Barros² <ismael@barros2.org>
# License : BSD http://en.wikipedia.org/wiki/BSD_license
pg4l_dir=$(dirname $(readlink -f $0))
. "$pg4l_dir/util.sh"
@ -8,38 +10,35 @@ if [ -z "$*" ]; then
exit
fi
package=$1; shift
bin=$1; shift
wineUsrPath=$1; shift
TRIM=
for i in $@; do
case $i in
-trim)
TRIM=1
;;
esac
done
cp -v "$pg4l_dir/AppRun_wine" AppRun || exit 1
cp "$pg4l_dir/util.sh" . || exit 1
for i in AppRun.desktop AppRun.png; do
{ [ -f "$i" ] || cp -v "$pg4l_dir"/"$i" "$i"; } || exit 1
done
if [ $1 ]; then
sed -e "s|_WINEPREFIX_|~/.local/share/AppImage/${1}_wine|g" AppRun -i
if [ "$package" ]; then
sed -e "s|_WINEPREFIX_|~/.local/share/AppImage/${package}_wine|g" AppRun -i
fi
if [ $2 ]; then
sed -e "s|_BINARY_|$2|g" AppRun -i
if [ "$bin" ]; then
sed -e "s|_BINARY_|$bin|g" AppRun -i
# Trim wine installation
#shopt -s extglob
#rm -rvf usr/share/!(wine)
#rm -vf usr/bin/!(msiexec|regedit|regsvr32|wine|wineboot|winecfg|wineserver)
export WINEARCH="win32"
export WINEDEBUG="-all"
export WINEDLLOVERRIDES="mshtml,mscoree=,winemenubuilder.exe=n"
export WINEPREFIX="$(mktemp -d --suffix=_wine2AppDir)"
LD_LIBRARY_PREFIX=usr/lib/
usr/bin/wineserver -k
echo "Starting test run..."
# Find all used files in a test run
USED_FILES="$PWD/used_files.txt"
strace -e open,openat usr/bin/wine "$2" 2>&1 |\
grep -Po '[^"]*(lib/wine|usr/share/wine|usr/share/fonts)[^"]*' |\
sort | uniq | tee "$USED_FILES"
#echo "Used files: $(cat "$USED_FILES")"
if [ "$TRIM" ]; then
"$pg4l_dir"/wineTrim "$bin" "$wineUsrPath"
fi
fi