From 8efcf4505e05703e29b402e33f72d284a71048ec Mon Sep 17 00:00:00 2001 From: Ismael Barros Date: Sun, 14 Apr 2013 14:05:22 +0200 Subject: [PATCH] License & stuff --- AppRun | 2 ++ AppRun_quick | 2 ++ AppRun_wine | 2 ++ buildAppImage | 2 ++ copyMissingLibraries | 2 ++ lgp2appImage | 2 ++ loki2appDir | 2 ++ pacman2appDir | 2 ++ patchAbsolutePaths | 2 ++ quickAppDir | 4 ++++ setup64.sh | 2 ++ unity2AppImage | 2 ++ unpackAppImage | 2 ++ unpatchAbsolutePaths | 2 ++ util.sh | 4 +++- wine2AppDir | 49 ++++++++++++++++++++++---------------------- 16 files changed, 57 insertions(+), 26 deletions(-) diff --git a/AppRun b/AppRun index bdbbe47..73b8370 100755 --- a/AppRun +++ b/AppRun @@ -1,4 +1,6 @@ #!/bin/sh +# Author : Ismael Barros² +# License : BSD http://en.wikipedia.org/wiki/BSD_license APPDIR=$(dirname "$(readlink -f "$0")") LOGFILE=$(mktemp --suffix=_AppRun ) diff --git a/AppRun_quick b/AppRun_quick index cfdc44e..39a1dba 100755 --- a/AppRun_quick +++ b/AppRun_quick @@ -1,4 +1,6 @@ #!/bin/sh +# Author : Ismael Barros² +# License : BSD http://en.wikipedia.org/wiki/BSD_license APPDIR=$(dirname "$(readlink -f "$0")") LOGFILE=$(mktemp --suffix=_AppRun ) diff --git a/AppRun_wine b/AppRun_wine index 7caed85..39b4398 100755 --- a/AppRun_wine +++ b/AppRun_wine @@ -1,4 +1,6 @@ #!/bin/sh +# Author : Ismael Barros² +# License : BSD http://en.wikipedia.org/wiki/BSD_license APPDIR=$(dirname "$(readlink -f "$0")") LOGFILE=$(mktemp --suffix=_AppRun ) diff --git a/buildAppImage b/buildAppImage index ae10b87..9be78da 100755 --- a/buildAppImage +++ b/buildAppImage @@ -1,4 +1,6 @@ #!/bin/bash +# Author : Ismael Barros² +# 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; } diff --git a/copyMissingLibraries b/copyMissingLibraries index b06158f..e690c6a 100755 --- a/copyMissingLibraries +++ b/copyMissingLibraries @@ -1,4 +1,6 @@ #!/bin/bash +# Author : Ismael Barros² +# License : BSD http://en.wikipedia.org/wiki/BSD_license EXCEPTIONS=libGL.so.1 export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:usr/lib/ diff --git a/lgp2appImage b/lgp2appImage index 338dbc3..53f8b7d 100755 --- a/lgp2appImage +++ b/lgp2appImage @@ -1,4 +1,6 @@ #!/bin/bash +# Author : Ismael Barros² +# License : BSD http://en.wikipedia.org/wiki/BSD_license pg4l_dir=$(dirname $(readlink -f $0)) . "$pg4l_dir/util.sh" diff --git a/loki2appDir b/loki2appDir index 721fe2d..31ea9fc 100755 --- a/loki2appDir +++ b/loki2appDir @@ -1,4 +1,6 @@ #!/bin/bash +# Author : Ismael Barros² +# License : BSD http://en.wikipedia.org/wiki/BSD_license pg4l_dir=$(dirname $(readlink -f $0)) . "$pg4l_dir/util.sh" diff --git a/pacman2appDir b/pacman2appDir index 66e6751..83d75ff 100755 --- a/pacman2appDir +++ b/pacman2appDir @@ -1,4 +1,6 @@ #!/bin/bash +# Author : Ismael Barros² +# License : BSD http://en.wikipedia.org/wiki/BSD_license pg4l_dir=$(dirname $(readlink -f $0)) . "$pg4l_dir/util.sh" diff --git a/patchAbsolutePaths b/patchAbsolutePaths index f7dac7e..5a1b7cb 100755 --- a/patchAbsolutePaths +++ b/patchAbsolutePaths @@ -1,4 +1,6 @@ #!/bin/bash +# Author : Ismael Barros² +# License : BSD http://en.wikipedia.org/wiki/BSD_license for i in usr opt; do sed -i -e "s|/${i}/|././/|g" $@ diff --git a/quickAppDir b/quickAppDir index eed8618..8d4dded 100755 --- a/quickAppDir +++ b/quickAppDir @@ -1,4 +1,6 @@ #!/bin/bash +# Author : Ismael Barros² +# 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 diff --git a/setup64.sh b/setup64.sh index 69bf6b8..dc1e2e2 100755 --- a/setup64.sh +++ b/setup64.sh @@ -1,4 +1,6 @@ #!/bin/sh +# Author : Ismael Barros² +# 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 diff --git a/unity2AppImage b/unity2AppImage index 0c56bc2..e91d3a2 100755 --- a/unity2AppImage +++ b/unity2AppImage @@ -1,4 +1,6 @@ #!/bin/bash +# Author : Ismael Barros² +# License : BSD http://en.wikipedia.org/wiki/BSD_license pg4l_dir=$(dirname $(readlink -f $0)) diff --git a/unpackAppImage b/unpackAppImage index 2abff4b..95926cf 100755 --- a/unpackAppImage +++ b/unpackAppImage @@ -1,4 +1,6 @@ #!/bin/bash +# Author : Ismael Barros² +# License : BSD http://en.wikipedia.org/wiki/BSD_license usage() { echo "$0 "; } diff --git a/unpatchAbsolutePaths b/unpatchAbsolutePaths index d096ab0..b678912 100755 --- a/unpatchAbsolutePaths +++ b/unpatchAbsolutePaths @@ -1,4 +1,6 @@ #!/bin/bash +# Author : Ismael Barros² +# License : BSD http://en.wikipedia.org/wiki/BSD_license for i in usr opt; do sed -i -e "s|././/|/${i}/|g" $@ diff --git a/util.sh b/util.sh index 14eaf27..a237e53 100755 --- a/util.sh +++ b/util.sh @@ -1,4 +1,6 @@ #!/bin/sh +# Author : Ismael Barros² +# 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 diff --git a/wine2AppDir b/wine2AppDir index 5ed4717..8b0ca32 100755 --- a/wine2AppDir +++ b/wine2AppDir @@ -1,4 +1,6 @@ #!/bin/bash +# Author : Ismael Barros² +# 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