Commit b956a1dc authored by Markus Koschany's avatar Markus Koschany

Imported Upstream version 0.11.6+dfsg

parent 20bf3312

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.

......@@ -14,7 +14,7 @@ VI. About
I. Requirements
=================================
The program is written in Java. It can be ran with any Java
Runtime Environment (JRE) that is at least version 1.5.0.
Runtime Environment (JRE) that is at least version 1.8.
The JRE (or JVM) can be downloaded from:
http://java.sun.com/getjava/download.html
......@@ -118,6 +118,6 @@ http://sourceforge.net/tracker/?func=add&group_id=43225&atid=435578
VI. About
=================================
Content is (C) 2002-2006 The FreeCol Team
Content is Copyright (C) 2002-2015 The FreeCol Team
The authors of FreeCol can be found on the FreeCol homepage.
FreeCol's homepage can be found at http://www.freecol.org
#! /bin/bash
# btan.sh
# Analyze bigtest run
# Has to be bash now we are using arrays
#
# Usage:
# btan.sh <tag> < <fc-log-score-output>
#
nations="dutch english french spanish danish portuguese swedish russian"
if test "x$1" = "x" ; then name=Unknown ; else name="$1" ; fi
name=`date +%Y%m%d`-"$name"
if test "x$STATS" = "x" ; then
dpath=`dirname "$0"`
if test -x "${dpath}/stats.awk" ; then
STATS="${dpath}/stats.awk"
fi
fi
STATS=${STATS:-stats.awk} # Where is the stats awk script?
blockitstate=y
blockit () {
if test "$blockitstate" = "y" ; then
echo -n " "
blockitstate=n
else
echo
blockitstate=y
fi
}
section () {
printf "%-16s" "$1"
}
statit () {
statitMEAN=0 ; statitSD=0
eval `$STATS | sed -n -e 's/^n=[^ ]* *mean=\([^ ]*\) *sd=\(.*\)$/statitMEAN="\1";statitSD="\2"/p' -`
printf "%9.3f ~ %8.3f" "$statitMEAN" "$statitSD"
}
tmp=`mktemp btan.XXXXXXXX`
trap "rm -f '$tmp'" 0
cat - > "$tmp"
runs=`sed -n -e 's/^run: .*colonies: n=\([0-9]*\) mean=\([\.0-9]*\) sd=\([\.0-9]*\), buildings: \([0-9]*\), euroExpense: \([0-9]*\), euroIncome: \([0-9]*\)$/NC="\1";MEAN="\2";SD="\3";NB="\4";EE="\5";EI="\6"/p' "$tmp"`
N=0
for r in $runs ; do N=`expr $N + 1`; done
echo "$name x $N"
section "Builds"
sed -n -e 's/^Count builds: *\(.*\)$/\1/p' "$tmp" | statit
blockit
section "Building#"
(for r in $runs ; do eval $r ; echo $NB ; done) | statit
blockit
section "Colony#"
(for r in $runs ; do eval $r ; echo $NC ; done) | statit
blockit
section "ColonySize"
(for r in $runs ; do eval $r ; echo $MEAN ; done) | statit
blockit
section "ColonyFalls"
sed -n -e 's/^Count colony-fall: *\(.*\)$/\1/p' "$tmp" | statit
blockit
section "SettlementFalls"
sed -n -e 's/^Count native-fall: *\(.*\)$/\1/p' "$tmp" | statit
blockit
section "Cashins"
sed -n -e 's/^Count cashins: *\(.*\)$/\1/p' "$tmp" | statit
blockit
section "Cibola Finds"
sed -n -e 's/^Count Cibola: *\(.*\)$/\1/p' "$tmp" | statit
blockit
section "EuroExpense"
(for r in $runs ; do eval $r ; echo $EE ; done) | statit
blockit
section "EuroIncome"
(for r in $runs ; do eval $r ; echo $EI ; done) | statit
blockit
section "Fountain Finds"
sed -n -e 's/^Count fountain: *\(.*\)$/\1/p' "$tmp" | statit
blockit
section "Defences"
sed -n -e 's/^Count defences: *\(.*\)$/\1/p' "$tmp" | statit
blockit
section "FoundingFathers"
sed -n -e 's/^Count FF: *\(.*\)$/\1/p' "$tmp" | statit
blockit
section "Missions"
sed -n -e 's/^Count missions: *\(.*\)$/\1/p' "$tmp" | statit
blockit
section "Native Demands"
sed -n -e 's/^Count demands: *\(.*\)$/\1/p' "$tmp" | statit
blockit
section "Native Gifts"
sed -n -e 's/^Count gifts: *\(.*\)$/\1/p' "$tmp" | statit
blockit
section "Pioneerings"
sed -n -e 's/^Count pioneerings: *\(.*\)$/\1/p' "$tmp" | statit
blockit
section "Piracies"
sed -n -e 's/^Count piracies: *\(.*\)$/\1/p' "$tmp" | statit
blockit
section "Scoutings"
sed -n -e 's/^Count scoutings: *\(.*\)$/\1/p' "$tmp" | statit
blockit
section "Seek+Destroys"
sed -n -e 's/^Count seek+dests: *\(.*\)$/\1/p' "$tmp" | statit
blockit
section "Transports"
sed -n -e 's/^Count transports: *\(.*\)$/\1/p' "$tmp" | statit
blockit
section "Turn Speed"
sed -n -e 's/^Average turn: *\(.*\)$/\1/p' "$tmp" | statit
blockit
section "Wishes"
sed -n -e 's/^Count wishes: *\(.*\)$/\1/p' "$tmp" | statit
blockit
section ""
blockit
for n in $nations ; do
section "$n"
sed -n -e 's/^'"$n"' \([0-9]*\)$/\1/p' "$tmp" | statit
blockit
done
test "$blockitstate" = "y" || echo
#! /bin/sh
# Update the copyright year in the boilerplate at the top of the files.
#
test -r "src/net/sf/freecol/FreeCol.java" \
|| (echo "Run from a FreeCol git directory" ; exit 1)
Y=`date +%Y`
sed -i -e "s/\(copyright 2...--\)2.../\1$Y/" doc/FreeCol.tex
find ./data ./schema ./src ./packaging ./test \
-type f \
-a \( -name \*.java -o -name \*.xml -o -name \*.xsd -o -name copyright \
-o -name README -o -name FreeColMessages.properties \) \
-exec sed -i -e "s/\(Copyright (C) 2...-\)2...\( *The FreeCol Team\)/\1$Y\2/" {} \;
exec find ./www.freecol.org -name -type f -a \*.html \
-exec sed -i -e "s/\(&copy; 2...-\)2...\( *FreeCol\)/\1$Y\2/" {} \;
#! /bin/sh
# fclogscore
# Analyze FC log
#
# Usage:
# fclogscore.sh <freecol-log-file>...
#
STATS=${STATS:-stats.awk} # Where is the stats awk script?
statit () {
statitMEAN=0 ; statitSD=0
eval `$STATS | sed -n -e 's/^n=[^ ]* *mean=\([^ ]*\) *sd=\(.*\)$/statitMEAN="\1";statitSD="\2"/p' -`
printf "%7.3f" "$statitMEAN"
}
countinlog () {
w0=`sed -n -e 's/^.*AI transport.*\(COMPLETED, at wish-target.*fulfills at\)[^]]*, collecting.*$/\1/p' "$1" | sed -e 's/fulfills/#/g' -e 's/[^#]//g' | tr -d '\010' | wc -c`
w1=`grep -c 'AI wisher.*, COMPLETED' "$1"`
t0=`sed -n -e 's/^.*AI transport.*, delivering,\(.*COMPLETED.*\), collecting.*$/\1/p' "$1" | sed -e 's/COMPLETED/#/g' -e 's/[^#]//g' | tr -d '\010' | wc -c`
echo -n 'Count builds: ' ; grep -c 'AI colony builder.*, COMPLETED' "$1"
echo -n 'Count cashins: ' ; grep -c 'AI treasureTrain.*, COMPLETED' "$1"
echo -n 'Count defences: ' ; grep -c 'AI defender.*, attacking' "$1"
echo -n 'Count missions: ' ; grep -c 'AI missionary.*, COMPLETED' "$1"
echo -n 'Count demands: ' ; grep -c 'AI native demander.*, COMPLETED' "$1"
echo -n 'Count gifts: ' ; grep -c 'AI native gifter.*, COMPLETED' "$1"
echo -n 'Count pioneerings: ' ; grep -c 'AI pioneer.*, COMPLETED' "$1"
echo -n 'Count piracies: ' ; grep -c 'AI privateer.*, attacking' "$1"
echo -n 'Count scoutings: ' ; grep -c 'AI scout.*, COMPLETED' "$1"
echo -n 'Count seek+dests: ' ; grep -c 'AI seek+destroyer.*, attacking' "$1"
echo -n 'Count transports: ' ; echo $t0
echo -n 'Count wishes: ' ; expr $w0 + $w1
echo -n 'Count Cibola: ' ; grep -c 'is exploring rumour CIBOLA' "$1"
echo -n 'Count fountain: ' ; grep -c 'is exploring rumour FOUNTAIN' "$1"
echo -n 'Count colony-fall: ' ; grep -c 'DESTROY_COLONY' "$1"
echo -n 'Count native-fall: ' ; grep -c 'DESTROY_SETTLEMENT' "$1"
echo -n 'Count FF: ' ; grep -c 'chose founding father:' "$1"
echo -n 'Average turn: '
avg=`sed -n -e 's/^.*duration = \(.*\)ms$/\1/p' "$1" | statit`
echo "scale=3; $avg / 1000.0" | bc
# echo "########## Spanish Succession"
# sed -n -e '{ s/^\t\(INFO: Spanish succession.*\)/\1/p ; T ; n ; p }' "$1"
}
for f in ${1+"$@"} ; do
if test -r "$f" ; then
countinlog "$f"
else
echo "can not read: $f" >&2
exit 1
fi
done
exit 0
#! /bin/sh
# fsgpack.sh