adonthell-commits
[Top][All Lists]
Advanced

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

[adonthell-wastesedge-commits] master 98af7a4: ADDED script to build por


From: Kai Sterker
Subject: [adonthell-wastesedge-commits] master 98af7a4: ADDED script to build portable linux binary using AppImageKit
Date: Tue, 16 Aug 2016 20:10:51 +0000 (UTC)

branch: master
commit 98af7a473e9eee4070a0c1a047f7a432084b4cfd
Author: Kai Sterker <address@hidden>
Commit: Kai Sterker <address@hidden>

    ADDED script to build portable linux binary using AppImageKit
---
 .gitignore           |    1 +
 Makefile.am          |    3 +-
 make_linux_appimg.sh |   83 ++++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 86 insertions(+), 1 deletion(-)

diff --git a/.gitignore b/.gitignore
index a30cebe..c51f162 100644
--- a/.gitignore
+++ b/.gitignore
@@ -23,3 +23,4 @@ __pycache__
 *~
 *.gmo
 *.pyc
+*.AppImage
diff --git a/Makefile.am b/Makefile.am
index 3beb7f5..20c7fde 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -14,7 +14,8 @@ EXTRA_DIST = config.rpath mkinstalldirs PLAYING autogen.sh 
ABOUT-NLS \
        win32/COPYING win32/PLAYING.txt win32/make_msi.sh win32/README.txt \
        win32/wastesedge.ico win32/icon32.bmp win32/wastesedge-x64.wxs \
        osx/Copying.html osx/Install.html osx/Playing.html osx/ReadMe.html \
-       osx/adonthell.icns make_osx_bundle.sh make_windows_pkg.sh
+       osx/adonthell.icns make_linux_appimg.sh make_osx_bundle.sh \
+       make_windows_pkg.sh
 
 bin_SCRIPTS = adonthell-wastesedge
 
diff --git a/make_linux_appimg.sh b/make_linux_appimg.sh
new file mode 100755
index 0000000..fd91c11
--- /dev/null
+++ b/make_linux_appimg.sh
@@ -0,0 +1,83 @@
+#!/bin/sh
+
+# -- check for AppImageKit
+appimagekit=`locate -l 1 -r AppImageKit$`
+if test "x$appimagekit" = "x" ; then
+  echo "This script requires AppImageKit"
+  echo "See https://github.com/probonopd/AppImageKit/wiki/Creating-AppImages";
+  exit 1
+fi
+
+cwd=`pwd`
+adonthell_exe="adonthell-0.3"
+appname="adonthell-wastesedge"
+
+# -- check arg
+if test "x$1" = "x" ; then
+  echo "Usage: $0 <path/to/Adonthell.AppDir>"
+  exit 1
+fi
+
+if test ! -f $1"/usr/bin/$adonthell_exe" ; then
+  echo "Error: $1 is not the expected Adonthell.AppDir"
+  exit 1
+fi
+
+# -- we need absolute path to Adonthell.AppDir
+cd $1
+appdir=`pwd`
+prefix=$appdir/usr
+APP=$prefix/bin/$adonthell_exe
+cd $cwd
+
+# -- prepare build
+if [ ! -f "configure" ]; then
+  if [ ! -f "autogen.sh" ]; then
+    echo "This script must be run in the wastesedge-0.3.x directory"
+    exit 1
+  fi
+  ./autogen.sh
+fi
+
+# -- build wastesedge
+echo "Configuring $appname. This may take a while ..."
+./configure --with-adonthell-binary=$APP --disable-pyc --bindir=/tmp 
--mandir=/tmp --datadir=/tmp > /dev/null
+if [ $? -ne 0 ]; then
+   exit 1
+fi
+
+# -- compile wastesedge
+make V=0 -j 2
+if [ $? -ne 0 ]; then
+   exit 1
+fi
+
+# -- install wastesedge
+make V=0 install
+if [ $? -ne 0 ]; then
+   exit 1
+fi
+
+# -- copy icon
+cp pixmaps/48x48/apps/wastesedge.png $appdir/wastesedge.png
+
+# -- copy and update .desktop file
+sed "s/$adonthell_exe wastesedge/$appname/" wastesedge.desktop > 
$appdir/adonthell.desktop
+
+# -- create a launch script that works inside the app image
+cat > $prefix/bin/$appname <<EOF
+#!/bin/sh
+mypath=\$(dirname \$(readlink -f "\${0}"))
+PYTHONHOME=\$(dirname \${mypath}) "\$mypath/$adonthell_exe" wastesedge
+EOF
+chmod 755 $prefix/bin/$appname
+
+# -- copy AppRun
+cp $appimagekit/AppRun $appdir
+
+# -- create app image
+version=`$APP -v`
+arch=`uname -i`
+rm Adonthell-$version-$arch.AppImage
+$appimagekit/AppImageAssistant $1 Adonthell-$version-$arch.AppImage
+



reply via email to

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