From afee99373591da057a9cf1f5ce2cf61ccd383902 Mon Sep 17 00:00:00 2001 From: stpohle Date: Sat, 24 May 2003 02:24:41 +0000 Subject: [PATCH] installation of the game and the data is now done. --- Makefile.am | 2 +- bomberclone.prj | 2 +- configure.in | 28 +++++++++++++++++++--------- data/Makefile.am | 29 +++++++++++++++++++++++++++++ src/configuration.c | 2 +- 5 files changed, 51 insertions(+), 12 deletions(-) create mode 100644 data/Makefile.am diff --git a/Makefile.am b/Makefile.am index 1f4a523..f221d92 100644 --- a/Makefile.am +++ b/Makefile.am @@ -3,7 +3,7 @@ ## If you don't want it to overwrite it, ## Please disable it in the Anjuta project configuration -SUBDIRS = src +SUBDIRS = src data bomberclonedocdir = ${prefix}/doc/bomberclone bomberclonedoc_DATA = \ diff --git a/bomberclone.prj b/bomberclone.prj index 36008d9..00604a4 100644 --- a/bomberclone.prj +++ b/bomberclone.prj @@ -67,7 +67,7 @@ anjuta.program.arguments= project.config.blocked=0 -project.config.disable.overwriting=0 0 1 0 0 0 0 0 0 +project.config.disable.overwriting=0 0 1 0 0 0 1 0 0 project.config.extra.modules.before= project.config.extra.modules.after= diff --git a/configure.in b/configure.in index 0f1a674..7899ffe 100644 --- a/configure.in +++ b/configure.in @@ -1,15 +1,12 @@ +dnl Process this file with autoconf to produce a configure script. +dnl Created by Anjuta - will be overwritten +dnl If you don't want it to overwrite it, +dnl Please disable it in the Anjuta project configuration AC_INIT(configure.in) AM_INIT_AUTOMAKE(bomberclone, 0.9.9) -AM_CONFIG_HEADER AM_CONFIG_HEADER(config.h) -AC_CANONICAL_HOST -AC_CANONICAL_TARGET - -AC_EXEEXT -AC_OBJEXT - AC_ISC_POSIX AC_PROG_CC AM_PROG_CC_STDC @@ -17,8 +14,8 @@ AC_HEADER_STDC dnl Checks for programs. -dnl Checks for libraries. +dnl Checks for libraries. dnl Check for SDL AM_PATH_SDL(1.1.0, :, @@ -28,15 +25,27 @@ dnl Check for SDL CFLAGS="$SDL_CFLAGS $CFLAGS" LIBS="$SDL_LIBS $LIBS" -dnl Check for Compiling Type ... i.e. Crosscompiling + +dnl Checks for header files. + + +dnl Checks for typedefs, structures, and compiler characteristics. case "$target" in *cygwin* | *mingw32* | *mingw32msvc* ) CFLAGS="$CFLAGS" LIBS="$LIBS -liberty -lwsock32" + ;; esac CFLAGS="$CFLAGS -Wall" +dnl Checks for library functions. + + +dnl Checks for Additional stuffs. + + + dnl Set PACKAGE SOURCE DIR in config.h. packagesrcdir=`cd $srcdir && pwd` @@ -96,5 +105,6 @@ AC_DEFINE_UNQUOTED(PACKAGE_SOURCE_DIR, "${packagesrcdir}") AC_OUTPUT([ Makefile src/Makefile +data/Makefile ]) diff --git a/data/Makefile.am b/data/Makefile.am new file mode 100644 index 0000000..ef9bb87 --- /dev/null +++ b/data/Makefile.am @@ -0,0 +1,29 @@ +## Process this file with automake to produce Makefile.in + +## Created by Anjuta - will be overwritten +## If you don't want it to overwrite it, +## Please disable it in the Anjuta project configuration + +install: + @if test ! -d player; then \ + echo ""; \ + echo ""; \ + echo "****************************************"; \ + echo "* Please download the Data Package, *"; \ + echo "* so you can complete the installation *"; \ + echo "* URL: http://www.bomberclone.de *"; \ + echo "****************************************"; \ + echo ""; \ + echo ""; \ + exit 1; \ + fi; + @if test ! -d @PACKAGE_DATA_DIR@; then \ + mkdir @PACKAGE_DATA_DIR@; \ + fi; + cp player @PACKAGE_DATA_DIR@ -rf + cp maps @PACKAGE_DATA_DIR@ -rf + cp gfx @PACKAGE_DATA_DIR@ -rf + cp tileset @PACKAGE_DATA_DIR@ -rf + +uninstall: + rm -rf @PACKAGE_DATA_DIR@ diff --git a/src/configuration.c b/src/configuration.c index 2af37fa..1c69303 100644 --- a/src/configuration.c +++ b/src/configuration.c @@ -48,7 +48,7 @@ game_init () gfx.random_tileset = 1; bman.fieldsize.x = 25; bman.fieldsize.y = 17; - sprintf (bman.datapath, "data"); + sprintf (bman.datapath, PACKAGE_DATA_DIR); bman.fieldpath[0] = 0; bman.random_map = 2; init_map_tileset();