DELTA 34212 0 24
SVN  ‹tŒ
 ˆh Ÿ ƒˆe			\
		installer_cross/winbuildENDREP
DELTA
SVN   ——€—#!/bin/sh

# winbuild.sh: Cross-compiling freeciv from linux to Windows using Crosser dllstack
#
# (c) 2008-2016 Marko Lindqvist
#
# This script is licensed under Gnu General Public License version 2 or later.
# See COPYING available from the same location you got this script.

# Version 2.0 (31-Oct-16)

WINBUILD_VERSION="2.0"
MIN_WINVER=0x0600 # Vista

if test "x$1" = x || test "x$1" = "x-h" || test "x$1" = "x--help" ; then
  echo "Usage: $0 <crosser dir>"
  exit 1
fi

if test "x$1" = "x-v" || test "x$1" = "x--version" ; then
  echo "winbuild.sh version $WINBUILD_VERSION"
  exit 
fi

DLLSPATH="$1"

if ! test -d "$DLLSPATH" ; then
  echo "Dllstack directory \"$DLLSPATH\" not found!" >&2
  exit 1
fi

if ! test -f "$DLLSPATH/crosser.txt" ; then
  echo "Directory \"$DLLSPATH\" does not look like crosser environment!" >&2
  exit 1
fi

if test -d ../../.svn ; then
  VERREV="$(../../fc_version)-r$(cd ../.. && svn info | grep Revision | sed 's/Revision: //')"
else
  VERREV="$(../../fc_version)"
fi

SETUP=$(grep "Setup=" $DLLSPATH/crosser.txt | sed -e 's/Setup="//' -e 's/"//')

if ! mkdir -p build-$SETUP ; then
  echo "Can't create build directory \"build-$SETUP\"!" >&2
  exit 1
fi

if test x$SETUP = xwin64 ; then
  TARGET=x86_64-w64-mingw32
  CLIENTS="gtk3,sdl2"
  FCMP="gtk3,cli"
  VERREV="win64-$VERREV"
else
  TARGET=i686-w64-mingw32
  CLIENTS="gtk2,gtk3,sdl2"
  FCMP="gtk2,gtk3,cli"
  VERREV="win32-$VERREV"
fi

if grep "CROSSER_QT" $DLLSPATH/crosser.txt | grep yes > /dev/null
then
    CLIENTS="$CLIENTS,qt"
    FCMP="$FCMP,qt"
fi

echo "----------------------------------"
echo "Building for $SETUP"
echo "Freeciv version $VERREV"
echo "Clients: $CLIENTS"
echo "----------------------------------"

export CC="$TARGET-gcc -static-libgcc -static-libstdc++"
export CXX="$TARGET-g++ -static-libgcc -static-libstdc++"

if ! ../../autogen.sh --no-configure-run ; then
  echo "Autogen failed" >&2
  exit 1
fi

INSTALL_DIR="$(pwd)/freeciv-${VERREV}"

(
cd build-$SETUP

if ! ../../../configure CPPFLAGS="-I${DLLSPATH}/include -D_WIN32_WINNT=${MIN_WINVER}" CFLAGS="-Wno-error" PKG_CONFIG_LIBDIR="${DLLSPATH}/lib/pkgconfig" --enable-sys-tolua-cmd --with-magickwand="${DLLSPATH}/bin" --prefix="/" --enable-client=$CLIENTS --enable-fcmp=$FCMP --enable-svnrev --enable-debug --host=$TARGET --build=$(../../../bootstrap/config.guess) --with-libiconv-prefix=${DLLSPATH} --with-sqlite3-prefix=${DLLSPATH} --with-followtag="crosser" --enable-crosser --enable-ai-static=classic --disable-freeciv-manual --enable-sdl-mixer=sdl2 --with-qt5-includes=${DLLSPATH}/include --with-qt5-libs=${DLLSPATH}/lib --with-tinycthread
then
  echo "Configure failed" >&2
  exit 1
fi

if ! make DESTDIR="$INSTALL_DIR" clean install
then
  echo "Build failed" >&2
  exit 1
fi

if ! cp gen_headers/fc_config.h $INSTALL_DIR/share/freeciv/ ; then
  echo "Storing fc_config.h failed" >&2
  exit 1
fi
)

if ! 7z a -r freeciv-${VERREV}.7z freeciv-${VERREV}
then
  echo "7z failed" >&2
  exit 1
fi
ENDREP
id: 3g1.5x1.r34324/3076
type: file
pred: 3g1.5x1.r34212/127
count: 23
text: 34324 0 52 1558 475d98ba0f8bdacda840e406552935ca
props: 12670 97345 34 0 25e6c2f7558b7484000d4d090dea5b92
cpath: /trunk/windows/Makefile.am
copyroot: 33448 /trunk/windows

PLAIN
K 14
svn:executable
V 1
*
END
ENDREP
id: 2ted.5x1.r34324/3367
type: file
count: 0
text: 34324 76 2987 2973 b2dad46b82545d59ddb161e2213acef0
props: 34324 3324 30 0 4160c74de5f4e580dc15660c798ff9fc
cpath: /trunk/windows/installer_cross/winbuild.sh
copyroot: 33448 /trunk/windows

PLAIN
K 11
winbuild.sh
V 25
file 2ted.5x1.r34324/3367
END
ENDREP
id: 2teb.5x1.r34324/3673
type: dir
count: 0
text: 34324 3608 52 0 91300b00cf81d717bc86a6e626c7b75b
cpath: /trunk/windows/installer_cross
copyroot: 33448 /trunk/windows

PLAIN
K 11
Makefile.am
V 24
file 3g1.5x1.r34324/3076
K 10
client.ico
V 23
file 2ev.5ck.r22609/426
K 13
clienticon.rc
V 22
file 3g2.0.r13125/6677
K 15
installer_cross
V 24
dir 2teb.5x1.r34324/3673
K 16
installer_legacy
V 22
dir fym.5x6.r33651/292
K 15
installer_msys2
V 23
dir fym.5x2.r34291/9232
K 6
mp.ico
V 24
file 72x.5ck.r19955/7192
K 9
mpicon.rc
V 24
file 72y.5ck.r19955/7402
K 10
server.ico
V 22
file 2ey.5ck.r22609/95
K 13
servericon.rc
V 23
file 3g3.0.r12679/13778
END
ENDREP
id: 2eu.5x1.r34324/4326
type: dir
pred: 2eu.5x1.r34291/9876
count: 128
text: 34324 3842 471 0 d88f1a50b92799bf359a31134c2b98d7
props: 12365 0 48 0 b9a57a7aba6d25f821a6f26036518d8d
cpath: /trunk/windows
copyroot: 33448 /trunk/windows

PLAIN
K 9
ABOUT-NLS
V 24
file fu.5ck.r33136/31347
K 7
AUTHORS
V 24
file 5u.5ck.r22143/14016
K 7
COPYING
V 22
file 1h.5ck.r29454/952
K 9
ChangeLog
V 26
file 6l.5ck.r31297/7697235
K 7
INSTALL
V 21
file 6.5ck.r34244/281
K 11
Makefile.am
V 23
file 59.5ck.r34099/1112
K 4
NEWS
V 24
file 6m.5ck.r25634/30702
K 6
README
V 20
file 7.0.r4421/96382
K 2
ai
V 21
dir 8.5ck.r34309/4174
K 10
autogen.sh
V 23
file 12o.5ck.r33470/442
K 9
bootstrap
V 23
dir 2p5.5ck.r34163/4577
K 6
client
V 21
dir d.5ck.r34323/8341
K 6
common
V 21
dir p.5ck.r34317/5550
K 12
configure.ac
V 23
file 149.5ck.r34181/354
K 4
data
V 21
dir w.5ck.r34313/4333
K 12
dependencies
V 23
dir 2yu.5ck.r33404/2662
K 3
doc
V 23
dir k7.5ck.r34309/12326
K 10
fc_version
V 25
file 2lo.5en.r34309/12551
K 11
gen_headers
V 24
dir 1hsw.5ck.r32371/1764
K 3
lua
V 24
dir 2c5e.5ck.r31919/4841
K 2
m4
V 23
dir 12p.5ck.r34230/2516
K 7
scripts
V 23
dir 2yo.5ck.r31852/3843
K 6
server
V 21
dir z.5ck.r34311/6292
K 5
tests
V 22
dir 2g9.5ck.r32361/591
K 5
tools
V 24
dir 4pj.5js.r34289/34377
K 12
translations
V 25
dir t0a.5ck.r34294/118641
K 7
utility
V 22
dir 1c.5ck.r34165/4356
K 7
windows
V 23
dir 2eu.5x1.r34324/4326
END
ENDREP
id: 3.5ck.r34324/5730
type: dir
pred: 3.5ck.r34323/9740
count: 22177
text: 34324 4560 1157 0 02bc07f568d084a78c6fbabad78587a4
props: 28036 14655 292 0 9e1d5de0253c723466868990c52c129f
cpath: /trunk
copyroot: 15280 /trunk

PLAIN
K 8
branches
V 20
dir 1.0.r34322/10547
K 4
tags
V 19
dir 2.0.r33382/6667
K 5
trunk
V 21
dir 3.5ck.r34324/5730
K 7
website
V 21
dir 3ge.0.r33387/2571
END
ENDREP
id: 0.0.r34324/6118
type: dir
pred: 0.0.r34323/10128
count: 34324
text: 34324 5952 153 0 4f20c8c54c198039aa70c636cb8cfe81
cpath: /
copyroot: 0 /

3g1.5x1.t34323-1 modify true false /trunk/windows/Makefile.am

_2.5x1.t34323-1 add false false /trunk/windows/installer_cross

_4.5x1.t34323-1 add true true /trunk/windows/installer_cross/winbuild.sh


6118 6264
