Complete.Org: Mailing Lists: Archives: freeciv: January 2002:
[Freeciv] Re: app-defaults
Home

[Freeciv] Re: app-defaults

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv@xxxxxxxxxxx
Subject: [Freeciv] Re: app-defaults
From: Reinier Post <rp@xxxxxxxxxx>
Date: Mon, 14 Jan 2002 02:11:45 +0100

On Sun, Jan 13, 2002 at 04:07:18PM -0000, Laurenz Wiskott wrote:
> 
> 
> Dear freeciv experts,
> 
> we have freeciv version 1.11.4 installed on our computer network.  I have
> tried to compile version 1.12.0 locally on my machine.  When I type
> "./configure" in the freeciv source code directory I get, among many other
> (positive) messages, the error message
> 
> *** The imlib-config script installed by IMLIB could not be found
> *** If IMLIB was installed in PREFIX, make sure PREFIX/bin is in
> *** your path, or set the IMLIB_CONFIG environment variable to the
> *** full path to imlib-config.
> 
> I ignored this message for the time being and compiled freeciv by typing
> "gmake" in the freeciv directory.  Everything compiles fine, it seems.  I
> can also start the civserver with "./server/civserver".  When I start the
> civclient by typing "./client/civclient" I get the error message:
> 
> 0: Game version does not match Resource version.
> 0: Game version: 1.12.0 - Resource version: 1.11.4
> 0: You might have an old Freeciv resourcefile in /usr/lib/X11/app-defaults
> 
> which means that civclient version 1.12.0 is looking into the Freeciv file
> in /usr/lib/X11/app-defaults.  Which is not quite understandable, because
> it says in the INSTALL file that freeciv first looks in the local data
> directory, which has the new resource file.  However, as suggested in
> INSTALL I then typed (under bash)

If the INSTALL says that, it is wrong.

> FREECIV_PATH="/export/freeciv-1.12.0/data:./data"; export FREECIV_PATH
> 
> since the source code directory is /export/freeciv-1.12.0, but that didn't
> help either.

That doesn't affect your X resources search path.
You may find the attached replacement for 'civ' useful.

-- 
Reinier


-- Attached file included as plaintext by Listar --

#!/bin/sh
#
# cv - connect to a given civserver
#
# $Id$

case "$FREECIV_NICK" in
"") mynick=`whoami` ;;
 *) mynick=$FREECIV_NICK ;;
esac

mytiles=trident
mygeom=-0-0

[ -n "$FREECIV" ] || FREECIV=.

#
#--- end of config ---#

Usage()
{
   echo "Usage: $0 [server] [civclient options]" 1>&2
   exit 1
}

sv=
pl="-n $mynick"
tl="-tiles $mytiles"
geom="-geometry $mygeom"
#ms="-M http://www.daimi.aau.dk/~lancelot/freeciv";

while :
do
  case "$1" in
  -tiles)
    tl="-tiles $2"
    shift
    ;;
  -n)
    pl="-n $2"
    shift
    ;;
#  -M)
#    ms="-M $2"
#    shift
#    ;;
  -geom*)
    geom="-geometry $2"
    shift
    ;;
  -*|"")
    break
    ;;
  *)
    sv="-server $1"
    ;;
  esac
  shift
done

arg="$1"

for d in $FREECIV $FREECIV/../share $FREECIV/..
do
  for sd in freeciv data
  do
    if [ -d $d/$sd ]
    then
      FREECIV_DATADIR=$d/$sd
      export FREECIV_DATADIR
      break 2
    fi
  done
done

if [ ! -f $FREECIV_DATADIR/Freeciv ]
then
  echo $0: cannot find resource file $FREECIV_DATADIR/Freeciv 1>&2; exit 2
fi

cd $FREECIV || { echo $0: cannot cd to $FREECIV; exit 2; }

if [ -x ./client/civclient ]
then
  x=./client/civclient
else
  x=./civclient
fi

#$x $pl $tl $sv "$arg" $geom "$@"

FREECIV_PATH=$FREECIV_DATADIR\:$FREECIV_PATH; export FREECIV_PATH
FREECIV_PATH=$HOME/.freeciv/data\:$FREECIV_PATH

# kludge to allow X to find the Freeciv resources:
# (ignores the existence of $XUSERFILESEARCHPATH)
if [ -n "$XAPPLRESDIR" ]
then
  unsetenv XAPPLRESDIR
fi
XUSERFILESEARCHPATH=$FREECIV_DATADIR/%N:$XUSERFILESEARCHPATH
export XUSERFILESEARCHPATH

#$x "$@" $pl $tl $sv "$arg" $geom
$x "$@" $pl $tl $sv $arg




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