3 REPODIR
=$
(dirname $
(realpath
$0))/..
/..
/..
4 INSTALLDIR
=$
(realpath
-m $
(dirname $0)/..
/tmp
/mono
)
8 echo "$(date "+%F@
%T
") :: $1" 1>&2
14 echo "$(date "+%F@
%T
") :: $1"
19 wget
--quiet -O ${REPODIR}/pkgconfig.
zip http
://ftp.gnome.org
/pub
/gnome
/binaries
/win32
/dependencies
/pkg-config_0.26
-1_win32.
zip
30 report
"Building Mono"
31 mkdir
-p ${INSTALLDIR}
32 EXTRA_CONF_FLAGS
="--prefix=${INSTALLDIR}" CI_TAGS
="win-i386,no-tests" scripts
/ci
/run-jenkins.sh || error
"*** Could not run autogen ***"
39 MONO_EXECUTABLE
=${REPODIR}/msvc
/build
/sgen
/Win32
/bin
/Release
/mono-sgen.exe
make install || error
"*** Installing to temporary prefix failed ***"
40 rm -f ${INSTALLDIR}/bin
/mono-sgen.
* \
41 ${INSTALLDIR}/bin
/mono-boehm.
* \
42 ${INSTALLDIR}/lib
/libmono-2.0.
* \
43 ${INSTALLDIR}/bin
/libmonoboehm-2.0.
* \
44 ${INSTALLDIR}/lib
/libmonoboehm-2.0.
* \
45 ${INSTALLDIR}/bin
/libmonosgen-2.0.
* \
46 ${INSTALLDIR}/lib
/libmonosgen-2.0.
* \
47 ${INSTALLDIR}/bin
/*MonoPosixHelper.
* \
48 ${INSTALLDIR}/lib
/*MonoPosixHelper.
* \
49 ${INSTALLDIR}/bin
/mono \
50 ${INSTALLDIR}/bin
/pedump \
51 ${INSTALLDIR}/bin
/mono-package-runtime \
52 ${INSTALLDIR}/bin
/monodis
*
54 cp -a msvc
/build
/sgen
/Win32
/bin
/Release
/monodis-sgen.exe
${INSTALLDIR}/bin
/monodis.exe
55 cp -a msvc
/build
/sgen
/Win32
/bin
/Release
/monodis-sgen.pdb
${INSTALLDIR}/bin
/monodis.pdb
56 cp -a msvc
/build
/sgen
/Win32
/bin
/Release
/mono-sgen.exe
${INSTALLDIR}/bin
/
57 cp -a msvc
/build
/sgen
/Win32
/bin
/Release
/mono-sgen.pdb
${INSTALLDIR}/bin
/
58 cp -a msvc
/build
/sgen
/Win32
/bin
/Release
/mono-2.0
-sgen.dll
${INSTALLDIR}/bin
/
59 cp -a msvc
/build
/sgen
/Win32
/bin
/Release
/mono-2.0
-sgen.pdb
${INSTALLDIR}/bin
/
60 cp -a msvc
/build
/sgen
/Win32
/lib
/Release
/mono-2.0
-sgen.lib
${INSTALLDIR}/lib
/
61 cp -a msvc
/build
/sgen
/Win32
/bin
/Release
/mono-2.0
-sgen.pdb
${INSTALLDIR}/lib
/
62 cp -a msvc
/build
/sgen
/Win32
/lib
/Release
/libmono-static-sgen.lib
${INSTALLDIR}/lib
/
63 cp -a msvc
/build
/sgen
/Win32
/bin
/Release
/MonoPosixHelper.dll
${INSTALLDIR}/bin
/
64 cp -a msvc
/build
/sgen
/Win32
/bin
/Release
/MonoPosixHelper.pdb
${INSTALLDIR}/bin
/
65 cp -a msvc
/build
/sgen
/Win32
/lib
/Release
/MonoPosixHelper.lib
${INSTALLDIR}/lib
/
66 cp -a msvc
/build
/sgen
/Win32
/bin
/Release
/MonoPosixHelper.pdb
${INSTALLDIR}/lib
/
67 cp -a msvc
/build
/boehm
/Win32
/bin
/Release
/mono-boehm.exe
${INSTALLDIR}/bin
/
68 cp -a msvc
/build
/boehm
/Win32
/bin
/Release
/mono-boehm.pdb
${INSTALLDIR}/bin
/
69 cp -a msvc
/build
/boehm
/Win32
/bin
/Release
/mono-2.0
-boehm.dll
${INSTALLDIR}/bin
/
70 cp -a msvc
/build
/boehm
/Win32
/bin
/Release
/mono-2.0
-boehm.pdb
${INSTALLDIR}/bin
/
71 cp -a msvc
/build
/boehm
/Win32
/lib
/Release
/mono-2.0
-boehm.lib
${INSTALLDIR}/lib
/
72 cp -a msvc
/build
/boehm
/Win32
/bin
/Release
/mono-2.0
-boehm.pdb
${INSTALLDIR}/lib
/
73 if [ -e msvc
/build
/sgen
/Win32
/bin
/Release
/libmono-btls-shared.dll
]; then
74 cp -a msvc
/build
/sgen
/Win32
/bin
/Release
/libmono-btls-shared.dll
${INSTALLDIR}/bin
/
76 cp -a msvc
/build
/boehm
/Win32
/lib
/Release
/libmono-static-boehm.lib
${INSTALLDIR}/lib
/
77 cp -a ${INSTALLDIR}/bin
/mono-sgen.exe
${INSTALLDIR}/bin
/mono.exe
78 cp -a ${INSTALLDIR}/bin
/mono-sgen.pdb
${INSTALLDIR}/bin
/mono.pdb
80 pushd ${INSTALLDIR}/bin
82 do if [[ "`file -b $i`" == "POSIX shell script, ASCII text"* ]]
83 then RUNTIME
=`grep -ho -m 1 "xbuild/.*/bin/\|[2,3,4]\.[0,5]/" $i | sed 's#/$##'`
84 if [ -n "$(grep -ho '.:/.*\.exe' $i)" ]
85 then EXENAME
=$
(basename `grep -ho '.:/.*\.exe' $i`)
87 if [ -f "../lib/mono/${RUNTIME}/${EXENAME}" ]
88 then sed "s#@@RUNTIME@@#${RUNTIME}#g" ${REPODIR}/packaging
/Windows
/resources
/wrapper.bat
> $i.bat
89 sed -i "s#@@COMMAND@@#${EXENAME}#g" $i.bat
90 sed -i 's#/#\\#g' $i.bat
92 sed -i "s#.:/.*/#\"\$\(cygpath -w \"\$\{BASH_SOURCE%/\*\}\"/../lib/mono/${RUNTIME}/\)\"#g" $i
93 sed -i 's#/.*/tmp/mono/bin#\"\$\{BASH_SOURCE%/\*\}\"#g' $i
96 unzip -jd .
${REPODIR}/pkgconfig.
zip bin
/pkg-config.exe
101 find ${INSTALLDIR} -name monodoc.dll.config
-exec sed -i 's#value=".*/lib/monodoc#value="C:\\Program Files (x86)\\Mono\\lib\\monodoc#g' {} \
;
106 which mcs
2>/dev
/null || error
"*** mcs is not in \$PATH ***"