[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[adonthell-wastesedge-commits] master a296535 02/21: ADDED script to add
From: |
Kai Sterker |
Subject: |
[adonthell-wastesedge-commits] master a296535 02/21: ADDED script to add game data to OSX app bundle |
Date: |
Mon, 25 Jul 2016 18:16:37 +0000 (UTC) |
branch: master
commit a296535b65899441673b6db9793c596e1672f09b
Author: Kai Sterker <address@hidden>
Commit: Kai Sterker <address@hidden>
ADDED script to add game data to OSX app bundle
ADDED --disable-pyc configure option to disable compilation of python
scripts
---
Makefile.am | 4 +-
configure.in | 19 +++++----
make_bundle.sh | 57 +++++++++++++++++++++++++++
scripts/Makefile.am | 15 ++++---
scripts/actions/Makefile.am | 15 ++++---
scripts/dialogues/Makefile.am | 15 ++++---
scripts/game_events/Makefile.am | 15 ++++---
scripts/modules/Makefile.am | 15 ++++---
scripts/schedules/Makefile.am | 13 ++++--
scripts/schedules/audio/Makefile.am | 15 ++++---
scripts/schedules/mapcharacters/Makefile.am | 15 ++++---
scripts/schedules/mapviews/Makefile.am | 15 ++++---
12 files changed, 161 insertions(+), 52 deletions(-)
diff --git a/Makefile.am b/Makefile.am
index 67808e0..a34880a 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
+ osx/adonthell.icns make_bundle.sh
bin_SCRIPTS = adonthell-wastesedge
@@ -25,7 +25,7 @@ install-exec-local:
rm -Rf $(DESTDIR)$(gamedatadir)
adonthell-wastesedge: Makefile
- echo -e "#!/bin/sh\n\$(adonthell_binary) wastesedge" >
adonthell-wastesedge
+ echo "#!/bin/sh\n\$(adonthell_binary) wastesedge" > adonthell-wastesedge
# -- make sure the data directory gets deleted
uninstall-local:
diff --git a/configure.in b/configure.in
index dae0193..89f8e28 100755
--- a/configure.in
+++ b/configure.in
@@ -19,17 +19,22 @@ dnl ********************
dnl Additional arguments
dnl ********************
-AC_ARG_WITH(data-dir,
-[ --with-data-dir=DIR Directory where data files will be installed],
- adonthelldatadir="$withval", adonthelldatadir=none)
+AC_ARG_WITH([data-dir],
+ [AS_HELP_STRING([--with-data-dir=DIR], [Directory where data files will be
installed])],
+ [adonthelldatadir="$withval"], [adonthelldatadir=none])
-AC_ARG_WITH(adonthell-binary,
-[ --with-adonthell-binary=PATH to the 'adonthell' binary],
- adonthell_binary="$withval", adonthell_binary=none)
+AC_ARG_WITH([adonthell-binary],
+ [AS_HELP_STRING([--with-adonthell-binary=PATH], [to the 'adonthell'
binary])],
+ [adonthell_binary="$withval"], [adonthell_binary=none])
+
+AC_ARG_ENABLE([pyc],
+ [AS_HELP_STRING([--disable-pyc], [Do not compile Python scripts])])
+
+AM_CONDITIONAL([COMPILE_SCRIPTS], [test "x$enable_pyc" != "xno"])
dnl Checking for Adonthell
-if test x$adonthelldatadir = xnone; then
+if test x$adonthell_binary = xnone; then
AC_PATH_PROG(adonthell_binary, adonthell-0.3, no)
if test "$adonthell_binary" = "no" ; then
echo "*** Waste's Edge requires the Adonthell game engine. Exiting ..."
diff --git a/make_bundle.sh b/make_bundle.sh
new file mode 100755
index 0000000..7ba166b
--- /dev/null
+++ b/make_bundle.sh
@@ -0,0 +1,57 @@
+#!/bin/sh
+
+cwd=`pwd`
+
+# -- check arg
+if test "x$1" = "x" ; then
+ echo "Usage: $0 <path/to/Adonthell.app>"
+ exit 1
+fi
+
+if test ! -f $1"/Contents/MacOS/adonthell-0.3" ; then
+ echo "Error: $1 is not the expected Adonthell.app"
+ exit 1
+fi
+
+# -- we need absolute path to Adonthell.app
+cd $1
+prefix=`pwd`/Contents
+APP=$prefix/MacOS/adonthell-0.3
+cd $cwd
+
+# -- build wastesedge
+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
+
+# -- strip path from application name
+appname="adonthell-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
+ 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
+
+# -- update executable
+sed -i '' 's/adonthell-0.3/adonthell-wastesedge/' $prefix/Info.plist
\ No newline at end of file
diff --git a/scripts/Makefile.am b/scripts/Makefile.am
index 35113c4..33197cc 100755
--- a/scripts/Makefile.am
+++ b/scripts/Makefile.am
@@ -2,13 +2,18 @@ SUBDIRS = dialogues game_events modules schedules actions
pkgdatadir = $(gamedatadir)/scripts
-pkgdata_DATA = *.pyc
-
-EXTRA_DIST = init.py
-
+if COMPILE_SCRIPTS
+scripts = *.pyc
all:
$(adonthell_binary) -c
+else
+scripts = *.py
+endif
+
+nodist_pkgdata_DATA = $(scripts)
+
+EXTRA_DIST = init.py
-*.pyc: *.py
+*.pyc : *.py
CLEANFILES = *.pyc
diff --git a/scripts/actions/Makefile.am b/scripts/actions/Makefile.am
index d4ac6e7..8c38e1b 100755
--- a/scripts/actions/Makefile.am
+++ b/scripts/actions/Makefile.am
@@ -1,12 +1,17 @@
pkgdatadir = $(gamedatadir)/scripts/actions
-pkgdata_DATA = *.pyc
-
-EXTRA_DIST = talk.py __init__.py
-
+if COMPILE_SCRIPTS
+scripts = *.pyc
all:
$(adonthell_binary) -c
+else
+scripts = *.py
+endif
+
+nodist_pkgdata_DATA = $(scripts)
+
+EXTRA_DIST = talk.py __init__.py
-*.pyc: *.py
+*.pyc : *.py
CLEANFILES = *.pyc
diff --git a/scripts/dialogues/Makefile.am b/scripts/dialogues/Makefile.am
index ccd04f3..47cd48b 100755
--- a/scripts/dialogues/Makefile.am
+++ b/scripts/dialogues/Makefile.am
@@ -1,6 +1,14 @@
pkgdatadir = $(gamedatadir)/scripts/dialogues
-pkgdata_DATA = *.pyc
+if COMPILE_SCRIPTS
+scripts = *.pyc
+all:
+ $(adonthell_binary) -c
+else
+scripts = *.py
+endif
+
+nodist_pkgdata_DATA = $(scripts)
EXTRA_DIST = orloth_start.py lucia_start.py sarin_start.py \
janesta_start.py erek_start.py oliver_start.py bjarn_start.py \
@@ -8,9 +16,6 @@ EXTRA_DIST = orloth_start.py lucia_start.py sarin_start.py \
tristan_start.py jelom_2nd.py demo_intro_1.py extro.py \
silverhair_start.py fellnir_start.py __init__.py
-all:
- $(adonthell_binary) -c
-
-*.pyc: *.py
+*.pyc : *.py
CLEANFILES = *.pyc
diff --git a/scripts/game_events/Makefile.am b/scripts/game_events/Makefile.am
index 22f0a14..426bbe3 100755
--- a/scripts/game_events/Makefile.am
+++ b/scripts/game_events/Makefile.am
@@ -1,6 +1,14 @@
pkgdatadir = $(gamedatadir)/scripts/game_events
-pkgdata_DATA = *.pyc
+if COMPILE_SCRIPTS
+scripts = *.pyc
+all:
+ $(adonthell_binary) -c
+else
+scripts = *.py
+endif
+
+nodist_pkgdata_DATA = $(scripts)
EXTRA_DIST = teleport.py cellar_to_bjarn.py fst_to_silverhair.py \
character_speak.py open_inn_door.py silverhair_to_fst.py \
@@ -8,9 +16,6 @@ EXTRA_DIST = teleport.py cellar_to_bjarn.py
fst_to_silverhair.py \
to_storage.py lft_to_vnd.py vnd_to_lft.py __init__.py \
speak.py
-all:
- $(adonthell_binary) -c
-
-*.pyc: *.py
+*.pyc : *.py
CLEANFILES = *.pyc
diff --git a/scripts/modules/Makefile.am b/scripts/modules/Makefile.am
index 0dc7ef4..3b4ba4b 100755
--- a/scripts/modules/Makefile.am
+++ b/scripts/modules/Makefile.am
@@ -1,6 +1,14 @@
pkgdatadir = $(gamedatadir)/scripts/modules
-pkgdata_DATA = *.pyc
+if COMPILE_SCRIPTS
+scripts = *.pyc
+all:
+ $(adonthell_binary) -c
+else
+scripts = *.py
+endif
+
+nodist_pkgdata_DATA = $(scripts)
EXTRA_DIST = \
achievement_screen.py \
@@ -13,9 +21,6 @@ EXTRA_DIST = \
player_text.py \
__init__.py
-all:
- $(adonthell_binary) -c
-
-*.pyc: *.py
+*.pyc : *.py
CLEANFILES = *.pyc
diff --git a/scripts/schedules/Makefile.am b/scripts/schedules/Makefile.am
index 156ccdc..b5e64d8 100755
--- a/scripts/schedules/Makefile.am
+++ b/scripts/schedules/Makefile.am
@@ -2,11 +2,18 @@ SUBDIRS = audio mapcharacters mapviews
pkgdatadir = $(gamedatadir)/scripts/schedules
-pkgdata_DATA = *.pyc
+if COMPILE_SCRIPTS
+scripts = *.pyc
+all:
+ $(adonthell_binary) -c
+else
+scripts = *.py
+endif
+
+nodist_pkgdata_DATA = $(scripts)
EXTRA_DIST = control.py __init__.py
-*.pyc: *.py
- $(adonthell_binary) -c
+*.pyc : *.py
CLEANFILES = *.pyc
diff --git a/scripts/schedules/audio/Makefile.am
b/scripts/schedules/audio/Makefile.am
index 2fa19b4..68d49db 100644
--- a/scripts/schedules/audio/Makefile.am
+++ b/scripts/schedules/audio/Makefile.am
@@ -1,12 +1,17 @@
pkgdatadir = $(gamedatadir)/scripts/schedules/audio
-pkgdata_DATA = *.pyc
-
-EXTRA_DIST = in_game.py __init__.py
-
+if COMPILE_SCRIPTS
+scripts = *.pyc
all:
$(adonthell_binary) -c
+else
+scripts = *.py
+endif
+
+nodist_pkgdata_DATA = $(scripts)
+
+EXTRA_DIST = in_game.py __init__.py
-*.pyc: *.py
+*.pyc : *.py
CLEANFILES = *.pyc
diff --git a/scripts/schedules/mapcharacters/Makefile.am
b/scripts/schedules/mapcharacters/Makefile.am
index 39796a8..89c625f 100644
--- a/scripts/schedules/mapcharacters/Makefile.am
+++ b/scripts/schedules/mapcharacters/Makefile.am
@@ -1,15 +1,20 @@
pkgdatadir = $(gamedatadir)/scripts/schedules/mapcharacters
-pkgdata_DATA = *.pyc
+if COMPILE_SCRIPTS
+scripts = *.pyc
+all:
+ $(adonthell_binary) -c
+else
+scripts = *.py
+endif
+
+nodist_pkgdata_DATA = $(scripts)
EXTRA_DIST = alek.py erek.py frostbloom.py janesta.py jelom.py bjarn.py \
keyboard_control.py oliver.py orloth.py sarin.py silverhair.py \
talan.py tristan.py fellnir.py to_cellar.py lucia.py intro.py \
extro.py __init__.py schedule.py
-all:
- $(adonthell_binary) -c
-
-*.pyc: *.py
+*.pyc : *.py
CLEANFILES = *.pyc
diff --git a/scripts/schedules/mapviews/Makefile.am
b/scripts/schedules/mapviews/Makefile.am
index ad99d0d..6cbc00f 100644
--- a/scripts/schedules/mapviews/Makefile.am
+++ b/scripts/schedules/mapviews/Makefile.am
@@ -1,12 +1,17 @@
pkgdatadir = $(gamedatadir)/scripts/schedules/mapviews
-pkgdata_DATA = *.pyc
-
-EXTRA_DIST = center_character.py __init__.py
-
+if COMPILE_SCRIPTS
+scripts = *.pyc
all:
$(adonthell_binary) -c
+else
+scripts = *.py
+endif
+
+nodist_pkgdata_DATA = $(scripts)
+
+EXTRA_DIST = center_character.py __init__.py
-*.pyc: *.py
+*.pyc : *.py
CLEANFILES = *.pyc
- [adonthell-wastesedge-commits] branch master created (now d1164d8), Kai Sterker, 2016/07/25
- [adonthell-wastesedge-commits] master d0bc1d0 03/21: FIXED creation of adonthell-wastesedge script, Kai Sterker, 2016/07/25
- [adonthell-wastesedge-commits] master 6fe08b7 06/21: FIXED label size not adjusted properly after changing option value, Kai Sterker, 2016/07/25
- [adonthell-wastesedge-commits] master a296535 02/21: ADDED script to add game data to OSX app bundle,
Kai Sterker <=
- [adonthell-wastesedge-commits] master e5e4325 15/21: FIXED game quitting when pressing ESC while menu labels are sliding in, Kai Sterker, 2016/07/25
- [adonthell-wastesedge-commits] master 16eedb1 17/21: ADDED bitmap to use as Window and taskbar icon, Kai Sterker, 2016/07/25
- [adonthell-wastesedge-commits] master 20eb806 04/21: FIXED launcher script inside bundle needs to determine correct path at runtime, Kai Sterker, 2016/07/25
- [adonthell-wastesedge-commits] master 2b7e807 07/21: FIXED garbage showing up in first frame of intro, due to uninitialized label, Kai Sterker, 2016/07/25
- [adonthell-wastesedge-commits] master 17ad166 05/21: FIXED replacing of bundle executable, Kai Sterker, 2016/07/25
- [adonthell-wastesedge-commits] master 8267c01 08/21: FIXED compatibility with Python 2.3, Kai Sterker, 2016/07/25
- [adonthell-wastesedge-commits] master 2120713 19/21: REMOVED Debian specific files; those are taken care of by the package maintainer, Kai Sterker, 2016/07/25
- [adonthell-wastesedge-commits] master d1164d8 21/21: UPDATED windows package and installer scripts, Kai Sterker, 2016/07/25
- [adonthell-wastesedge-commits] master 88062ca 14/21: UPDATE text position during Redwyne Inn part of intro, so it is better readable, Kai Sterker, 2016/07/25
- [adonthell-wastesedge-commits] master 428cd53 20/21: CHANGED font from avatar.ttf (whose license was unclear) with Aclonica, which is licensed under the Apache 2.0 License, Kai Sterker, 2016/07/25