adonthell-commits
[Top][All Lists]
Advanced

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

[adonthell-wastesedge-commits] master 50af4dd 12/21: ADDED script to cre


From: Kai Sterker
Subject: [adonthell-wastesedge-commits] master 50af4dd 12/21: ADDED script to create a distributable Windows binary package
Date: Mon, 25 Jul 2016 18:16:39 +0000 (UTC)

branch: master
commit 50af4dd56f04db5df89c36d53fe81b29514628bb
Author: Kai Sterker <address@hidden>
Commit: Kai Sterker <address@hidden>

    ADDED script to create a distributable Windows binary package
---
 Makefile.am         |    2 +-
 make_windows_pkg.sh |   66 +++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 67 insertions(+), 1 deletion(-)

diff --git a/Makefile.am b/Makefile.am
index af0aa2c..39de8a9 100755
--- a/Makefile.am
+++ b/Makefile.am
@@ -14,7 +14,7 @@ EXTRA_DIST = config.rpath mkinstalldirs  config.rpath  
$(pkgdata_DATA) PLAYING a
        win32/COPYING win32/PLAYING.txt win32/prepare.bat win32/README.txt \
        win32/wastesedge.ico win32/wastesedge.nsi \
        osx/Copying.html osx/Install.html osx/Playing.html osx/ReadMe.html \
-       osx/adonthell.icns make_bundle.sh
+       osx/adonthell.icns make_bundle.sh make_windows_pkg.sh
 
 bin_SCRIPTS = adonthell-wastesedge
 
diff --git a/make_windows_pkg.sh b/make_windows_pkg.sh
new file mode 100755
index 0000000..001ba66
--- /dev/null
+++ b/make_windows_pkg.sh
@@ -0,0 +1,66 @@
+#!/bin/sh
+
+cwd=`pwd`
+adonthell_exe="adonthell-0.3.exe"
+appname="adonthell-wastesedge"
+
+
+# -- check arg
+if test "x$1" = "x" ; then
+  echo "Usage: $0 <path/to/Adonthell>"
+  exit 1
+fi
+
+if test ! -f $1"/bin/$adonthell_exe" ; then
+  echo "Error: $1 is not the expected adonthell package"
+  exit 1
+fi
+
+# -- we need absolute path to Adonthell.app
+cd $1
+prefix=`pwd`
+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=$prefix/ 
--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 osx/adonthell.icns $prefix/Resources
+
+# -- create a launch script that works inside the bundle
+cat > $prefix/${appname} <<EOF
address@hidden off
+set WD=%~dp0
+set PYTHONHOME=%WD%
+
+start bin\\$adonthell_exe wastesedge
+EOF
+
+# -- add .bat file extension to launch script
+mv $prefix/${appname} $prefix/${appname}.bat
\ No newline at end of file



reply via email to

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