diff options
author | Alexander Köplinger <alex.koeplinger@outlook.com> | 2017-06-12 23:44:55 +0300 |
---|---|---|
committer | Alexander Köplinger <alex.koeplinger@outlook.com> | 2017-06-13 05:13:54 +0300 |
commit | 69f8abf794b5215882cf39a59d572ac29039f29c (patch) | |
tree | 1de63df0f45094b02dc4cc961b5b05aab2adb070 /packaging | |
parent | a4d6fccef958b70799f39520d6a7a9974f2d453e (diff) |
[packaging] Simplify Windows packaging scripts
We don't need to build in a separate checkout of mono anymore.
Also use .pkg passed in from upstream build.
Diffstat (limited to 'packaging')
-rwxr-xr-x | packaging/Windows/defs/gtksharp | 2 | ||||
-rwxr-xr-x | packaging/Windows/defs/managed-components | 5 | ||||
-rwxr-xr-x | packaging/Windows/defs/mono | 91 | ||||
-rwxr-xr-x | packaging/Windows/defs/mono64 | 81 | ||||
-rwxr-xr-x | packaging/Windows/mono-MDK-windows | 4 | ||||
-rwxr-xr-x | packaging/Windows/mono-MDK-windows-x64 | 2 |
6 files changed, 71 insertions, 114 deletions
diff --git a/packaging/Windows/defs/gtksharp b/packaging/Windows/defs/gtksharp index cc8f0dcda10..c9f4152ba38 100755 --- a/packaging/Windows/defs/gtksharp +++ b/packaging/Windows/defs/gtksharp @@ -1,6 +1,6 @@ #!/bin/bash -xe -REPO=${2:-"http://download.xamarin.com/GTKforWindows/Windows/gtk-sharp-2.12.26.msi"} +REPO="https://dl.xamarin.com/GTKforWindows/Windows/gtk-sharp-2.12.44.msi" REPODIR=$(dirname $(realpath $0))/../repos/gtksharp error() diff --git a/packaging/Windows/defs/managed-components b/packaging/Windows/defs/managed-components index a24ab18c9fd..00ee1476e59 100755 --- a/packaging/Windows/defs/managed-components +++ b/packaging/Windows/defs/managed-components @@ -1,6 +1,5 @@ #!/bin/bash -xe -REPO=${2:-"http://storage.bos.internalx.com/mono-mac-4.0.0-branch/79/7975f5090d8b0d266dc0ba824295d92edd8873da/MonoFramework-MDK-4.0.0.0.macos10.xamarin.x86.pkg"} REPODIR=$(dirname $(realpath $0))/../repos/managed-components error() @@ -19,8 +18,8 @@ download() mkdir -p ${REPODIR} report "Downloading Xar" wget --quiet -O ${REPODIR}/xar.tar.gz https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/xar/xar-1.5.2.tar.gz || error "*** Could not download Xar ***" - report "Downloading Mono MDK for Mac - ${REPO}" - wget --quiet -O ${REPODIR}/mono.xar ${REPO} + report "Copying Mono MDK for Mac" + cp ${2} ${REPODIR}/mono.xar } clean() diff --git a/packaging/Windows/defs/mono b/packaging/Windows/defs/mono index 8bc4a4d8d02..2897ea1eaf4 100755 --- a/packaging/Windows/defs/mono +++ b/packaging/Windows/defs/mono @@ -1,7 +1,7 @@ #!/bin/bash -xe -REPO=https://github.com/mono/mono.git -REPODIR=$(dirname $(realpath $0))/../repos/mono +REPODIR=$(dirname $(realpath $0))/../../.. +INSTALLDIR=$(realpath -m $(dirname $0)/../tmp/mono) error() { @@ -16,41 +16,20 @@ report() download() { - if [ ! -d "${REPODIR}" ] - then - report "Checking Mono out from Git" - git clone --config core.autocrlf=input $REPO ${REPODIR} || error "*** Could not run git clone ***" - else - report "Fetching the latest Mono from Git" - cd ${REPODIR} && git fetch origin || error "*** Could not run git fetch ***" - fi - if [ -n "$1" ] - then - report "Checkout out revision $1" - cd ${REPODIR} && git reset --hard $1 || error "*** Could not run git checkout ***" - fi - cd ${REPODIR} && git submodule init || error "*** Could not run git submodule init ***" - cd ${REPODIR} && git submodule update || error "*** Could not run git submodule update ***" wget --quiet -O ${REPODIR}/pkgconfig.zip http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/pkg-config_0.26-1_win32.zip } clean() { - rm -fr ${REPODIR}/../../tmp/mono - pushd ${REPODIR} - report "Running git clean and reset" - git clean -fdx || error "*** Could not run git clean ***" - git reset --hard HEAD || error "*** Could not run git reset ***" - popd - wget --quiet -O ${REPODIR}/pkgconfig.zip http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/pkg-config_0.26-1_win32.zip + rm -rf ${INSTALLDIR} } build() { pushd ${REPODIR} report "Building Mono" - mkdir -p ../../tmp/mono - WORKSPACE=${REPODIR} EXTRA_CONF_FLAGS="--prefix=$(realpath ../../tmp/mono)" ghprbPullId=1 CI_TAGS="no-tests" label="w32" scripts/ci/run-jenkins.sh || error "*** Could not run autogen ***" + mkdir -p ${INSTALLDIR} + WORKSPACE=${REPODIR} EXTRA_CONF_FLAGS="--prefix=${INSTALLDIR}" ghprbPullId=1 CI_TAGS="no-tests" label="w32" scripts/ci/run-jenkins.sh || error "*** Could not run autogen ***" popd } @@ -58,37 +37,37 @@ install() { pushd ${REPODIR} MONO_EXECUTABLE=${REPODIR}/msvc/build/sgen/Win32/bin/Release/mono-sgen.exe make install || error "*** Installing to temporary prefix failed ***" - rm -f ../../tmp/mono/bin/mono-sgen.* \ - ../../tmp/mono/bin/mono-boehm.* \ - ../../tmp/mono/lib/libmono-2.0.* \ - ../../tmp/mono/lib/libmonoboehm-2.0.* \ - ../../tmp/mono/lib/libmonosgen-2.0.* \ - ../../tmp/mono/bin/MonoPosixHelper.* \ - ../../tmp/mono/lib/MonoPosixHelper.* \ - ../../tmp/mono/bin/mono \ - ../../tmp/mono/bin/pedump \ - ../../tmp/mono/bin/mono-package-runtime \ - ../../tmp/mono/bin/monodis* + rm -f ${INSTALLDIR}/bin/mono-sgen.* \ + ${INSTALLDIR}/bin/mono-boehm.* \ + ${INSTALLDIR}/lib/libmono-2.0.* \ + ${INSTALLDIR}/lib/libmonoboehm-2.0.* \ + ${INSTALLDIR}/lib/libmonosgen-2.0.* \ + ${INSTALLDIR}/bin/MonoPosixHelper.* \ + ${INSTALLDIR}/lib/MonoPosixHelper.* \ + ${INSTALLDIR}/bin/mono \ + ${INSTALLDIR}/bin/pedump \ + ${INSTALLDIR}/bin/mono-package-runtime \ + ${INSTALLDIR}/bin/monodis* pushd ${REPODIR} - cp -a msvc/build/sgen/Win32/bin/Release/monodis-sgen.exe ../../tmp/mono/bin/monodis.exe - cp -a msvc/build/sgen/Win32/bin/Release/monodis-sgen.pdb ../../tmp/mono/bin/monodis.pdb - cp -a msvc/build/sgen/Win32/bin/Release/mono-sgen.exe ../../tmp/mono/bin/ - cp -a msvc/build/sgen/Win32/bin/Release/mono-sgen.pdb ../../tmp/mono/bin/ - cp -a msvc/build/sgen/Win32/bin/Release/mono-2.0-sgen.dll ../../tmp/mono/bin/ - cp -a msvc/build/sgen/Win32/lib/Release/mono-2.0-sgen.lib ../../tmp/mono/lib/ - cp -a msvc/build/sgen/Win32/bin/Release/mono-2.0-sgen.pdb ../../tmp/mono/lib/ - cp -a msvc/build/sgen/Win32/bin/Release/MonoPosixHelper.dll ../../tmp/mono/bin/ - cp -a msvc/build/sgen/Win32/lib/Release/MonoPosixHelper.lib ../../tmp/mono/lib/ - cp -a msvc/build/sgen/Win32/bin/Release/MonoPosixHelper.pdb ../../tmp/mono/lib/ - cp -a msvc/build/boehm/Win32/bin/Release/mono-boehm.exe ../../tmp/mono/bin/ - cp -a msvc/build/boehm/Win32/bin/Release/mono-boehm.pdb ../../tmp/mono/bin/ - cp -a msvc/build/boehm/Win32/bin/Release/mono-2.0-boehm.dll ../../tmp/mono/bin/ - cp -a msvc/build/boehm/Win32/lib/Release/mono-2.0-boehm.lib ../../tmp/mono/lib/ - cp -a msvc/build/boehm/Win32/bin/Release/mono-2.0-boehm.pdb ../../tmp/mono/lib/ - cp -a ../../tmp/mono/bin/mono-sgen.exe ../../tmp/mono/bin/mono.exe - cp -a ../../tmp/mono/bin/mono-sgen.pdb ../../tmp/mono/bin/mono.pdb + cp -a msvc/build/sgen/Win32/bin/Release/monodis-sgen.exe ${INSTALLDIR}/bin/monodis.exe + cp -a msvc/build/sgen/Win32/bin/Release/monodis-sgen.pdb ${INSTALLDIR}/bin/monodis.pdb + cp -a msvc/build/sgen/Win32/bin/Release/mono-sgen.exe ${INSTALLDIR}/bin/ + cp -a msvc/build/sgen/Win32/bin/Release/mono-sgen.pdb ${INSTALLDIR}/bin/ + cp -a msvc/build/sgen/Win32/bin/Release/mono-2.0-sgen.dll ${INSTALLDIR}/bin/ + cp -a msvc/build/sgen/Win32/lib/Release/mono-2.0-sgen.lib ${INSTALLDIR}/lib/ + cp -a msvc/build/sgen/Win32/bin/Release/mono-2.0-sgen.pdb ${INSTALLDIR}/lib/ + cp -a msvc/build/sgen/Win32/bin/Release/MonoPosixHelper.dll ${INSTALLDIR}/bin/ + cp -a msvc/build/sgen/Win32/lib/Release/MonoPosixHelper.lib ${INSTALLDIR}/lib/ + cp -a msvc/build/sgen/Win32/bin/Release/MonoPosixHelper.pdb ${INSTALLDIR}/lib/ + cp -a msvc/build/boehm/Win32/bin/Release/mono-boehm.exe ${INSTALLDIR}/bin/ + cp -a msvc/build/boehm/Win32/bin/Release/mono-boehm.pdb ${INSTALLDIR}/bin/ + cp -a msvc/build/boehm/Win32/bin/Release/mono-2.0-boehm.dll ${INSTALLDIR}/bin/ + cp -a msvc/build/boehm/Win32/lib/Release/mono-2.0-boehm.lib ${INSTALLDIR}/lib/ + cp -a msvc/build/boehm/Win32/bin/Release/mono-2.0-boehm.pdb ${INSTALLDIR}/lib/ + cp -a ${INSTALLDIR}/bin/mono-sgen.exe ${INSTALLDIR}/bin/mono.exe + cp -a ${INSTALLDIR}/bin/mono-sgen.pdb ${INSTALLDIR}/bin/mono.pdb popd - pushd ${REPODIR}/../../tmp/mono/bin + pushd ${INSTALLDIR}/bin for i in * do if [[ "`file -b $i`" == "POSIX shell script, ASCII text"* ]] then RUNTIME=`grep -ho -m 1 "xbuild/.*/bin/\|[2,3,4]\.[0,5]/" $i | sed 's#/$##'` @@ -96,7 +75,7 @@ install() then EXENAME=$(basename `grep -ho '.:/.*\.exe' $i`) fi if [ -f "../lib/mono/${RUNTIME}/${EXENAME}" ] - then sed "s#@@RUNTIME@@#${RUNTIME}#g" ${REPODIR}/../../resources/wrapper.bat > $i.bat + then sed "s#@@RUNTIME@@#${RUNTIME}#g" $(dirname $0)/../resources/wrapper.bat > $i.bat sed -i "s#@@COMMAND@@#${EXENAME}#g" $i.bat sed -i 's#/#\\#g' $i.bat fi diff --git a/packaging/Windows/defs/mono64 b/packaging/Windows/defs/mono64 index 543fe8c2d83..cec3177f3fb 100755 --- a/packaging/Windows/defs/mono64 +++ b/packaging/Windows/defs/mono64 @@ -1,7 +1,7 @@ #!/bin/bash -xe -REPO=https://github.com/mono/mono.git -REPODIR=$(dirname $(realpath $0))/../repos/mono +REPODIR=$(dirname $(realpath $0))/../../.. +INSTALLDIR=$(realpath -m $(dirname $0)/../tmp/mono) error() { @@ -16,41 +16,20 @@ report() download() { - if [ ! -d "${REPODIR}" ] - then - report "Checking Mono out from Git" - git clone --config core.autocrlf=input $REPO ${REPODIR} || error "*** Could not run git clone ***" - else - report "Fetching the latest Mono from Git" - cd ${REPODIR} && git fetch origin || error "*** Could not run git fetch ***" - fi - if [ -n "$1" ] - then - report "Checkout out revision $1" - cd ${REPODIR} && git reset --hard $1 || error "*** Could not run git checkout ***" - fi - cd ${REPODIR} && git submodule init || error "*** Could not run git submodule init ***" - cd ${REPODIR} && git submodule update || error "*** Could not run git submodule update ***" wget --quiet -O ${REPODIR}/pkgconfig.zip http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/pkg-config_0.26-1_win32.zip } clean() { - rm -fr ${REPODIR}/../../tmp/mono - pushd ${REPODIR} - report "Running git clean and reset" - git clean -fdx || error "*** Could not run git clean ***" - git reset --hard HEAD || error "*** Could not run git reset ***" - popd - wget --quiet -O ${REPODIR}/pkgconfig.zip http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/pkg-config_0.26-1_win32.zip + rm -rf ${INSTALLDIR} } build() { pushd ${REPODIR} report "Building Mono" - mkdir -p ../../tmp/mono - WORKSPACE=${REPODIR} EXTRA_CONF_FLAGS="--prefix=$(realpath ../../tmp/mono)" ghprbPullId=1 CI_TAGS="no-tests" label="w64" scripts/ci/run-jenkins.sh || error "*** Could not run autogen ***" + mkdir -p ${INSTALLDIR} + WORKSPACE=${REPODIR} EXTRA_CONF_FLAGS="--prefix=${INSTALLDIR}" ghprbPullId=1 CI_TAGS="no-tests" label="w64" scripts/ci/run-jenkins.sh || error "*** Could not run autogen ***" popd } @@ -58,32 +37,32 @@ install() { pushd ${REPODIR} MONO_EXECUTABLE=${REPODIR}/msvc/build/sgen/x64/bin/Release/mono-sgen.exe make install || error "*** Installing to temporary prefix failed ***" - rm -f ../../tmp/mono/bin/mono-sgen.* \ - ../../tmp/mono/bin/mono-boehm.* \ - ../../tmp/mono/lib/libmono-2.0.* \ - ../../tmp/mono/lib/libmonoboehm-2.0.* \ - ../../tmp/mono/lib/libmonosgen-2.0.* \ - ../../tmp/mono/bin/MonoPosixHelper.* \ - ../../tmp/mono/lib/MonoPosixHelper.* \ - ../../tmp/mono/bin/mono \ - ../../tmp/mono/bin/pedump \ - ../../tmp/mono/bin/mono-package-runtime \ - ../../tmp/mono/bin/monodis* + rm -f ${INSTALLDIR}/bin/mono-sgen.* \ + ${INSTALLDIR}/bin/mono-boehm.* \ + ${INSTALLDIR}/lib/libmono-2.0.* \ + ${INSTALLDIR}/lib/libmonoboehm-2.0.* \ + ${INSTALLDIR}/lib/libmonosgen-2.0.* \ + ${INSTALLDIR}/bin/MonoPosixHelper.* \ + ${INSTALLDIR}/lib/MonoPosixHelper.* \ + ${INSTALLDIR}/bin/mono \ + ${INSTALLDIR}/bin/pedump \ + ${INSTALLDIR}/bin/mono-package-runtime \ + ${INSTALLDIR}/bin/monodis* pushd ${REPODIR} - cp -a msvc/build/sgen/x64/bin/Release/monodis-sgen.exe ../../tmp/mono/bin/monodis.exe - cp -a msvc/build/sgen/x64/bin/Release/monodis-sgen.pdb ../../tmp/mono/bin/monodis.pdb - cp -a msvc/build/sgen/x64/bin/Release/mono-sgen.exe ../../tmp/mono/bin/ - cp -a msvc/build/sgen/x64/bin/Release/mono-sgen.pdb ../../tmp/mono/bin/ - cp -a msvc/build/sgen/x64/bin/Release/mono-2.0-sgen.dll ../../tmp/mono/bin/ - cp -a msvc/build/sgen/x64/lib/Release/mono-2.0-sgen.lib ../../tmp/mono/lib/ - cp -a msvc/build/sgen/x64/bin/Release/mono-2.0-sgen.pdb ../../tmp/mono/lib/ - cp -a msvc/build/sgen/x64/bin/Release/MonoPosixHelper.dll ../../tmp/mono/bin/ - cp -a msvc/build/sgen/x64/lib/Release/MonoPosixHelper.lib ../../tmp/mono/lib/ - cp -a msvc/build/sgen/x64/bin/Release/MonoPosixHelper.pdb ../../tmp/mono/lib/ - cp -a ../../tmp/mono/bin/mono-sgen.exe ../../tmp/mono/bin/mono.exe - cp -a ../../tmp/mono/bin/mono-sgen.pdb ../../tmp/mono/bin/mono.pdb + cp -a msvc/build/sgen/x64/bin/Release/monodis-sgen.exe ${INSTALLDIR}/bin/monodis.exe + cp -a msvc/build/sgen/x64/bin/Release/monodis-sgen.pdb ${INSTALLDIR}/bin/monodis.pdb + cp -a msvc/build/sgen/x64/bin/Release/mono-sgen.exe ${INSTALLDIR}/bin/ + cp -a msvc/build/sgen/x64/bin/Release/mono-sgen.pdb ${INSTALLDIR}/bin/ + cp -a msvc/build/sgen/x64/bin/Release/mono-2.0-sgen.dll ${INSTALLDIR}/bin/ + cp -a msvc/build/sgen/x64/lib/Release/mono-2.0-sgen.lib ${INSTALLDIR}/lib/ + cp -a msvc/build/sgen/x64/bin/Release/mono-2.0-sgen.pdb ${INSTALLDIR}/lib/ + cp -a msvc/build/sgen/x64/bin/Release/MonoPosixHelper.dll ${INSTALLDIR}/bin/ + cp -a msvc/build/sgen/x64/lib/Release/MonoPosixHelper.lib ${INSTALLDIR}/lib/ + cp -a msvc/build/sgen/x64/bin/Release/MonoPosixHelper.pdb ${INSTALLDIR}/lib/ + cp -a ${INSTALLDIR}/bin/mono-sgen.exe ${INSTALLDIR}/bin/mono.exe + cp -a ${INSTALLDIR}/bin/mono-sgen.pdb ${INSTALLDIR}/bin/mono.pdb popd - pushd ${REPODIR}/../../tmp/mono/bin + pushd ${INSTALLDIR}/bin for i in * do if [[ "`file -b $i`" == "POSIX shell script, ASCII text"* ]] then RUNTIME=`grep -ho -m 1 "xbuild/.*/bin/\|[2,3,4]\.[0,5]/" $i | sed 's#/$##'` @@ -91,7 +70,7 @@ install() then EXENAME=$(basename `grep -ho '.:/.*\.exe' $i`) fi if [ -f "../lib/mono/${RUNTIME}/${EXENAME}" ] - then sed "s#@@RUNTIME@@#${RUNTIME}#g" ${REPODIR}/../../resources/wrapper.bat > $i.bat + then sed "s#@@RUNTIME@@#${RUNTIME}#g" $(dirname $0)/../resources/wrapper.bat > $i.bat sed -i "s#@@COMMAND@@#${EXENAME}#g" $i.bat sed -i 's#/#\\#g' $i.bat fi diff --git a/packaging/Windows/mono-MDK-windows b/packaging/Windows/mono-MDK-windows index 1b485352689..1bec768090f 100755 --- a/packaging/Windows/mono-MDK-windows +++ b/packaging/Windows/mono-MDK-windows @@ -4,8 +4,8 @@ for i in ${COMPONENTS} do defs/$i prerequisites done COMPONENTS="gtksharp managed-components" -defs/mono download ${monosha1} -defs/gtksharp download ${gtksharpmsi} +defs/mono download +defs/gtksharp download defs/managed-components download ${mdk} COMPONENTS="mono gtksharp managed-components" for i in ${COMPONENTS} diff --git a/packaging/Windows/mono-MDK-windows-x64 b/packaging/Windows/mono-MDK-windows-x64 index d958fb38106..737f62f809a 100755 --- a/packaging/Windows/mono-MDK-windows-x64 +++ b/packaging/Windows/mono-MDK-windows-x64 @@ -4,7 +4,7 @@ for i in ${COMPONENTS} do defs/$i prerequisites done COMPONENTS="managed-components" -defs/mono64 download ${monosha1} +defs/mono64 download defs/managed-components download ${mdk} COMPONENTS="mono64 managed-components" for i in ${COMPONENTS} |