diff --git a/.gitignore b/.gitignore index b5afaa7d6..069957d8a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,6 @@ eressea.ini +Debug +Release # SlickEdit *.vtg diff --git a/CMakeLists.txt b/CMakeLists.txt index 1a1bb5d1d..361cf6f5e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -79,6 +79,6 @@ add_subdirectory (iniparser) add_subdirectory (quicklist) add_subdirectory (critbit) add_subdirectory (src eressea) -install(DIRECTORY res core conf DESTINATION ${CMAKE_INSTALL_PREFIX} FILES_MATCHING PATTERN "*.xml") +install(DIRECTORY res conf DESTINATION ${CMAKE_INSTALL_PREFIX} FILES_MATCHING PATTERN "*.xml") install(DIRECTORY scripts DESTINATION ${CMAKE_INSTALL_PREFIX} FILES_MATCHING PATTERN "*.lua") -install(DIRECTORY core/scripts DESTINATION core FILES_MATCHING PATTERN "*.lua") + diff --git a/res/core/messages.xml b/res/core/messages.xml index 37b5acafa..f4949cd23 100644 --- a/res/core/messages.xml +++ b/res/core/messages.xml @@ -3732,8 +3732,8 @@ "$unit($unit) in $region($region) rekrutiert $int($amount) von $int($want) Personen." - "$unit($unit) in $region($region) recruits $int($amount) $int($want) people." - "$unit($unit) in $region($region) recruits $int($amount) $int($want) people." + "$unit($unit) in $region($region) recruits + $int($amount) of $int($want) people." @@ -8057,7 +8057,8 @@ "$unit($unit) in $region($region): $int($number) $race($race,$number) $if($eq($number,1),"verschwand", "verschwanden") über Nacht." - "$unit($unit) in $region($region): $int($number) $race($race,$number) disappearedin the night." + "$unit($unit) in $region($region): $int($number) + $race($race,$number) disappeared in the night." diff --git a/s/cmake-init b/s/cmake-init index 2a1813ec1..913aef82b 100755 --- a/s/cmake-init +++ b/s/cmake-init @@ -15,6 +15,7 @@ MACHINE=`uname -m` [ -z "$CC" ] && [ ! -z `which cc` ] && CC="cc" BIN_DIR="build-$MACHINE-$CC-$BUILD" mkdir -p $BIN_DIR +ln -sf $BIN_DIR $BUILD cd $BIN_DIR MACHINE=$(gcc -dumpmachine) diff --git a/s/install b/s/install index 2391ad00c..08d171849 100755 --- a/s/install +++ b/s/install @@ -16,4 +16,4 @@ BIN_DIR="build-$MACHINE-$CC-Debug" cd $ROOT/$BIN_DIR make install -cd $OLDPWD + diff --git a/s/setup b/s/setup index 92fc0091e..9b6202099 100755 --- a/s/setup +++ b/s/setup @@ -8,10 +8,11 @@ exit $2 # otherwise function usage() { cat <] [-r ] [-s DIR] +Usage: $u [-hfn] [-d DIR] [-g ] [-r ] [-s DIR] -h print this message -f force overwrite of existing game -g game id + -n create new eressea.ini file -r name of ruleset -s server installation directory -d override directory name @@ -21,13 +22,14 @@ USAGE game=0 force=0 src=server - -while getopts :d:g:r:s:hf o; do +edit=1 +while getopts :d:g:r:s:hfn o; do case "${o}" in h) usage ; exit 0 ;; s) src=${OPTARG} ;; d) dir=${OPTARG} ;; f) force=1 ;; + n) edit=0 ;; g) game=${OPTARG} ;; r) rules=${OPTARG} ;; *) echo "not implemented ${o} ${OPTARG}" ;; @@ -44,7 +46,7 @@ done [ -e $TOOLS ] || TOOLS=$SOURCE/bin [ -z $INIFILE ] && INIFILE=$TOOLS/inifile [ -e $INIFILE ] || INIFILE=$TOOLS/iniparser/inifile -[ -e $INIFILE ] || abort "tool is not installed: $INIFILE" +#[ -e $INIFILE ] || abort "tool is not installed: $INIFILE" cd $ERESSEA if [ -d $dir ] ; then @@ -55,18 +57,38 @@ cd $dir || abort "could not chdir to game-$game" mkdir -p data reports function ini_sec() { +if [ $edit -eq 1 ]; then $INIFILE eressea.ini add $1 +else +echo "[$1]" >> eressea.ini +fi } function ini_add() { -$INIFILE eressea.ini add $1 $2 +if [ $edit -eq 1 ]; then +$INIFILE eressea.ini add $1:$2 $3 +else +echo "$2 = $3" >> eressea.ini +fi } +function ini_start() { +if [ -e eressea.ini ]; then +if [ ! -e $INIFILE ] && [ $edit -eq 1 ]; then +abort "missing editor for eressea.ini. use -n to create new file." +fi +rm -f eressea.ini +edit=0 +else +edit=0 +fi touch eressea.ini +} + +ini_start ini_sec eressea -ini_add eressea:locales de,en +ini_add eressea locales de,en ini_sec lua -ini_add lua:install $SOURCE -ini_add lua:install $SOURCE -ini_add lua:paths $SOURCE/scripts:$SOURCE/lunit -ini_add lua:rules $rules +ini_add lua install $SOURCE +ini_add lua paths $SOURCE/scripts:$SOURCE/lunit +ini_add lua rules $rules ln -f $SOURCE/scripts/run-turn.lua