3 CROSS_DIR
=${1:-/opt/cross/}
4 MINGW
=${1:-i386-mingw32msvc}
5 CROSS_BIN_DIR
="$CROSS_DIR/bin"
6 CROSS_DLL_DIR
="$CROSS_DIR/$MINGW/bin"
7 CROSS_PKG_CONFIG_DIR
=$CROSS_DIR/$MINGW/lib
/pkgconfig
8 COPY_DLLS
="libgio*.dll libglib*.dll libgmodule*.dll libgthread*.dll libgobject*.dll"
9 PATH
=$CROSS_BIN_DIR:$PATH
10 INSTALL_DESTDIR
="$CURDIR/mono-win32"
11 PROFILES
="default net_2_0 net_2_1 net_3_5"
17 if [ -d .
/.git
/svn
]; then
18 SVN_INFO
='git svn info'
19 elif [ -d .
/.svn
]; then
25 if [ -n "$SVN_INFO" ]; then
26 MONO_SVN_REVISION
=`$SVN_INFO | grep Revision | sed 's/.*: //'`
27 MONO_BRANCH
=`$SVN_INFO | grep URL | sed -e 's;.*source/;;g' -e 's;/mono;;g'`
29 MONO_SVN_REVISION
="rUNKNOWN"
33 MONO_VERSION
=`grep AM_INIT_AUTOMAKE configure.in | cut -d ',' -f 2|tr -d '\)'`
34 MONO_RELEASE
="$MONO_VERSION-$MONO_BRANCH-r$MONO_SVN_REVISION"
35 MONO_PREFIX
="/mono-$MONO_RELEASE"
40 echo Mono Win32 installation prefix
: $MONO_PREFIX
47 if [ -f .
/Makefile
]; then
51 if [ ! -d "$CURDIR/build-cross-windows" ]; then
52 mkdir
"$CURDIR/build-cross-windows"
55 cd "$CURDIR/build-cross-windows"
57 ..
/configure
--prefix=$MONO_PREFIX --with-crosspkgdir=$CROSS_PKG_CONFIG_DIR --target=$MINGW --host=$MINGW --enable-parallel-mark --program-transform-name=""
61 if [ ! -d "$CURDIR/build-cross-windows-mcs" ]; then
62 mkdir
"$CURDIR/build-cross-windows-mcs"
64 cd "$CURDIR/build-cross-windows-mcs"
66 ..
/configure
--prefix=$MONO_PREFIX --enable-parallel-mark
72 if [ -d "$INSTALL_DIR" ]; then
75 cd "$CURDIR/build-cross-windows"
76 make DESTDIR
="$INSTALL_DESTDIR" USE_BATCH_FILES
=yes install
78 cd "$CURDIR/../mcs/mcs"
80 for p
in $PROFILES; do
81 make DESTDIR
="$INSTALL_DESTDIR" PROFILE
=$p install ||
echo "mcs profile $p installation failed"
84 cd "$CURDIR/../mcs/class"
85 for p
in $PROFILES; do
86 make DESTDIR
="$INSTALL_DESTDIR" PROFILE
=$p install ||
echo "class library profile $p installation failed"
89 cd "$CURDIR/../mcs/tools"
90 for p
in $PROFILES; do
91 make DESTDIR
="$INSTALL_DESTDIR" PROFILE
=$p install ||
echo "tools profile $p installation failed"
94 cd "$CURDIR/mono-win32"
95 for dll
in $COPY_DLLS; do
96 cp -ap "$CROSS_DLL_DIR"/$dll "$INSTALL_DESTDIR/$MONO_PREFIX/bin"
99 rm -f "$CURDIR/mono-win32-$MONO_RELEASE".
zip
100 zip -9r "$CURDIR/mono-win32-$MONO_RELEASE".
zip .