adonthell-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[adonthell-wastesedge-commits] master 20eb806 04/21: FIXED launcher scri


From: Kai Sterker
Subject: [adonthell-wastesedge-commits] master 20eb806 04/21: FIXED launcher script inside bundle needs to determine correct path at runtime
Date: Mon, 25 Jul 2016 18:16:37 +0000 (UTC)

branch: master
commit 20eb80614bae6382a5c9f294f423013ef4064797
Author: Kai Sterker <address@hidden>
Commit: Kai Sterker <address@hidden>

    FIXED launcher script inside bundle needs to determine correct path at 
runtime
---
 make_bundle.sh |   23 +++++++++++++++--------
 1 file changed, 15 insertions(+), 8 deletions(-)

diff --git a/make_bundle.sh b/make_bundle.sh
index 7ba166b..f5e3145 100755
--- a/make_bundle.sh
+++ b/make_bundle.sh
@@ -1,6 +1,9 @@
 #!/bin/sh
 
 cwd=`pwd`
+adonthell_exe="adonthell-0.3"
+appname="adonthell-wastesedge"
+
 
 # -- check arg
 if test "x$1" = "x" ; then
@@ -8,7 +11,7 @@ if test "x$1" = "x" ; then
   exit 1
 fi
 
-if test ! -f $1"/Contents/MacOS/adonthell-0.3" ; then
+if test ! -f $1"/Contents/MacOS/$adonthell_exe" ; then
   echo "Error: $1 is not the expected Adonthell.app"
   exit 1
 fi
@@ -16,10 +19,10 @@ fi
 # -- we need absolute path to Adonthell.app
 cd $1
 prefix=`pwd`/Contents
-APP=$prefix/MacOS/adonthell-0.3
+APP=$prefix/MacOS/$adonthell_exe
 cd $cwd
 
-# -- build wastesedge
+# -- prepare build
 if [ ! -f "configure" ]; then
   if [ ! -f "autogen.sh" ]; then
     echo "This script must be run in the wastesedge-0.3.x directory"
@@ -28,9 +31,7 @@ if [ ! -f "configure" ]; then
   ./autogen.sh
 fi
 
-# -- strip path from application name
-appname="adonthell-wastesedge"
-
+# -- build wastesedge
 echo "Configuring $appname. This may take a while ..."
 ./configure --with-adonthell-binary=$APP --disable-pyc --bindir=$prefix/MacOS 
--datadir=/tmp > /dev/null
 if [ $? -ne 0 ]; then
@@ -43,7 +44,6 @@ if [ $? -ne 0 ]; then
    exit 1
 fi
 
-
 # -- install wastesedge
 make V=0 install
 if [ $? -ne 0 ]; then
@@ -53,5 +53,12 @@ fi
 # -- copy icon
 cp osx/adonthell.icns $prefix/Resources
 
+# -- create a launch script that works inside the bundle
+cat > $prefix/MacOS/$appname <<EOF
+#!/bin/sh
+mypath=\`dirname "\$0"\`
+"\$mypath/$adonthell_exe" wastesedge
+EOF
+
 # -- update executable
-sed -i '' 's/adonthell-0.3/adonthell-wastesedge/' $prefix/Info.plist
\ No newline at end of file
+sed -i '' 's/$adonthell_exe/$appname/' $prefix/Info.plist
\ No newline at end of file



reply via email to

[Prev in Thread] Current Thread [Next in Thread]