diff options
author | Alan Antonuk <alan.antonuk@gmail.com> | 2015-12-25 20:42:52 -0800 |
---|---|---|
committer | Alan Antonuk <alan.antonuk@gmail.com> | 2015-12-25 20:42:52 -0800 |
commit | 5c2a19178bd6e86c513235394c2a31c8896bc267 (patch) | |
tree | bab06f991cdad83cded8a5e239847f0da89c4eaa | |
parent | 9fbea0f2d063cfd989e9866859c6aafcadff8057 (diff) | |
download | rabbitmq-c-5c2a19178bd6e86c513235394c2a31c8896bc267.tar.gz |
Remove obsolete mingw build scripts
-rw-r--r-- | README-win32.md | 131 | ||||
-rwxr-xr-x | etc/build-ms.sh | 78 | ||||
-rwxr-xr-x | etc/install-mingw.sh | 78 |
3 files changed, 0 insertions, 287 deletions
diff --git a/README-win32.md b/README-win32.md deleted file mode 100644 index 48bdc8b..0000000 --- a/README-win32.md +++ /dev/null @@ -1,131 +0,0 @@ -# Using rabbitmq-c on Windows - -================== -# This document is out of date - -To build rabbitmq-c on Win32 look at the "Building and Installing with CMake" section of README.md -================== - -There are three approaches to building rabbitmq-c under Windows: - -- THE PREFERRED METHOD: - Build using CMake, which will cover building with MSVC or MinGW - See the README file for details on how to build with cmake. - -- Build using the MinGW/MSYS (MinGW/MSYS is a port of the GNU - toolchain and utilities to Windows, including the gcc compiler). - The results of building in this way are native Windows DLLs and - EXEs, and can be used without having MinGW installed. The drawback - to this approach is that you cannot safely call the resulting - librabbitmq DLL from code compiled with Microsoft's C compiler. The - advantage is that the whole of rabbitmq-c can be built under - Windows, including the tools. - -- Build using Microsoft's C compiler. You will still need to install - MinGW/MSYS in order to run the rabbitmq-c build scripts, but - Microsoft's compiler is used to compile the code. The resulting - librabbitmq DLL can be used from code compiled with Microsoft's C - compiler (i.e. code developed in Visual Studio). The downside to - this approach is that the rabbitmq-c tools cannot be built, due to - dependencies on other libraries. - - -## Common steps - -With either of the approaches, the initial steps are the same: You -should download and install MinGW/MSYS and Python. - -Installing installing the relevant parts of MinGW/MSYS can be fairly -time consuming - there are dozens of files to be downloaded and -unpacked. To make it easier, we provide a bash script that automates -this process, in `rabbitmq-c/etc/install-mingw.sh`. You can run this -script under cygwin or Linux (obviously if you use Linux you'll need -to transfer the resulting files over to the Windows machine). - -Note that some MinGW packages are .tar.lzma files, so it requires a -system with the xz compression utility and a tar that supports the -J -option. Recent cygwin and Linux distros should be fine here. - -Run the install-mingw.sh script specifying the destination directory, -e.g. - - $ etc/install-mingw.sh mingw - -This will download all the required MinGW/MSYS packages, and unpack -them into the `mingw` directory. - -The other prerequisite for the rabbitmq-c build is Python. The -Windows installer from python.org for the latest 2.x version of Python -will do fine. - -You will also need to copy the source code for rabbitmq-c and -rabbitmq-codegen somewhere under your `mingw` directory. - -Then to start the MSYS bash shell, open a `cmd` window, and ensure -that both the MinGW bin directory and the python install directory are -in the path, e.g. - - C:\>set PATH=%PATH%;C:\mingw\bin;C:\Python27 - -Then start bash, and run the following mount command (substituting the -Windows path of your MinGW install if it isn't `C:\mingw`): - - C:\>bash - bash-3.1$ mount 'C:\mingw' /mingw - -Finally, go to wherever you copied the rabbitmq-c source. - - bash-3.1$ cd /rabbitmq-c - - -## Building rabbitmq-c with Microsoft's C compiler - -The Microsoft C/C++ compiler is part of MS Visual Studio, including -the gratis Visual Studio Express. Visual Studio 2005 and higher are -known to work. - -Start by following the steps in the previous section. The GNU build -tools have limited support for Microsoft toolchain, but the -install-mingw.sh script will install versions of the packages that are -known to be suitable. In particular, only libtool version 2.2.7a is -known to work; later versions have been reported to introduce -problems. - -Once you are at the bash prompt, build rabbitmq-c by running the -script in `rabbitmq-c/etc/build-ms.sh`: - - bash-3.1$ etc/build-ms.sh - -You should end up with a directory `build` containing the librabbitmq -DLL, the corresponding .lib file, and header files. These are -sufficient to create applications using librabbitmq within Visual -Studio. - -build-ms.sh produces 32-bit binaries by default. If you have an -appropriate version of Visual Studio (e.g. VS2010), you can build -64-bit binaries with: - - bash-3.1$ etc/build-ms.sh --enable-64-bit - - -## Building rabbitmq-c with gcc - -There is no script to build rabbitmq-c with gcc, but it is as -documented in the README file: - - bash-3.1$ autoreconf -i && ./configure && make - -You can run the resulting tool EXEs without needing the rest of MinGW. To do -this, copy the following files into a single directory: - -- rabbitmq-c/tools/.libs/*.exe - -- rabbitmq-c/librabbitmq/.libs/librabbitmq-0.dll - -- /bin/libpopt-0.dll - -- /bin/libiconv-2.dll - -- /bin/libintl-8.dll - - diff --git a/etc/build-ms.sh b/etc/build-ms.sh deleted file mode 100755 index 02d024c..0000000 --- a/etc/build-ms.sh +++ /dev/null @@ -1,78 +0,0 @@ -#!/bin/bash - -# Build rabbitmq-c using Microsoft's C compiler - -set -e - -vs64= -sdk64= - -while [ $# -gt 0 ] ; do - case $1 in - --enable-64-bit) - vs64=/amd64 - sdk64=/x64 - ;; - *) - echo "Usage: build-ms.sh [ --enable-64-bit ]" 1>&2 - exit 1 - esac - shift -done - -# Locate the necessary lib and include directories - -drive=$(echo "$SYSTEMDRIVE" | sed 's|^\([A-Za-z]\):$|/\1|') - -for vsvers in 10.0 9.0 8 ; do - vsdir="$drive/Program Files/Microsoft Visual Studio $vsvers" - [ -x "$vsdir/VC/bin$vs64/cl.exe" ] && break - - vsdir="$drive/Program Files (x86)/Microsoft Visual Studio $vsvers" - [ -x "$vsdir/VC/bin$vs64/cl.exe" ] && break - - vsdir= -done - -if [ -z "$vsdir" ] ; then - echo "Couldn't find a suitable Visual Studio installation" - exit 1 -fi - -echo "Using Visual Studio install at $vsdir" - -for sdkpath in "Microsoft SDKs/Windows/"{v7.0A,v6.0A} "Microsoft Visual Studio 8/VC/PlatformSDK" ; do - sdkdir="$drive/Program Files/$sdkpath" - [ -d "$sdkdir/lib$sdk64" -a -d "$sdkdir/include" ] && break - - sdkdir="$drive/Program Files (x86)/$sdkpath" - [ -d "$sdkdir/lib$sdk64" -a -d "$sdkdir/include" ] && break - - sdkdir= -done - -if [ -z "$sdkdir" ] ; then - echo "Couldn't find suitable Windows SDK installation" - exit 1 -fi - -echo "Using Windows SDK install at $sdkdir" - -PATH="$PATH:$vsdir/VC/bin$vs64:$vsdir/Common7/IDE" -LIB="$vsdir/VC/lib$vs64:$sdkdir/lib$sdk64" -INCLUDE="$vsdir/VC/include:$sdkdir/include" -export PATH LIB INCLUDE - -# Do the build -set -x -autoreconf -i -./configure CC=cl.exe LD=link.exe CFLAGS='-nologo' -sed -i -e 's/^fix_srcfile_path=.*$/fix_srcfile_path=""/;s/^deplibs_check_method=.*$/deplibs_check_method=pass_all/;/^archive_cmds=/s/-link -dll/& -implib:\\$libname.\\$libext/' libtool -make - -# Copy the results of the build into one place, as "make install" -# isn't too useful here. -mkdir -p build/lib build/include build/bin -cp -a librabbitmq/.libs/*.dll examples/.libs/*.exe build/bin -cp -a librabbitmq/win32/msinttypes/*.h librabbitmq/amqp.h librabbitmq/amqp_framing.h build/include -cp -a librabbitmq/*.exp librabbitmq/*.lib build/lib diff --git a/etc/install-mingw.sh b/etc/install-mingw.sh deleted file mode 100755 index 289315f..0000000 --- a/etc/install-mingw.sh +++ /dev/null @@ -1,78 +0,0 @@ -#!/bin/bash - -if [ $# -ne 1 ] ; then - echo "usage: install-mingw.sh <destination directory>" 1>&2 - exit 1 -fi - -unpack_dir=$1 - -if [ -e "$unpack_dir" ] ; then - echo "Destination directory already exists; please delete it if you are sure" 1>&2 - exit 1 -fi - -set -e - -download_dir=/tmp/install-mingw.$$ -mkdir -p $download_dir $unpack_dir - -while read f ; do - wget -P $download_dir -N http://switch.dl.sourceforge.net/project/mingw/$f -done <<EOF -MinGW/Base/mpc/mpc-0.8.1-1/libmpc-0.8.1-1-mingw32-dll-2.tar.lzma -MinGW/Base/gcc/Version4/gcc-4.5.0-1/gcc-core-4.5.0-1-mingw32-bin.tar.lzma -MinGW/Base/gcc/Version4/gcc-4.5.0-1/libgcc-4.5.0-1-mingw32-dll-1.tar.lzma -MSYS/Base/msys-core/msys-1.0.14-1/msysCORE-1.0.14-1-msys-1.0.14-bin.tar.lzma -MinGW/Base/binutils/binutils-2.20.1/binutils-2.20.1-2-mingw32-bin.tar.gz -MinGW/Base/mingw-rt/mingwrt-3.18/mingwrt-3.18-mingw32-dll.tar.gz -MinGW/Base/mingw-rt/mingwrt-3.18/mingwrt-3.18-mingw32-dev.tar.gz -MinGW/Base/pthreads-w32/pthreads-w32-2.8.0-3/libpthread-2.8.0-3-mingw32-dll-2.tar.lzma -MinGW/Base/mpfr/mpfr-2.4.1-1/libmpfr-2.4.1-1-mingw32-dll-1.tar.lzma -MinGW/Base/gmp/gmp-5.0.1-1/libgmpxx-5.0.1-1-mingw32-dll-4.tar.lzma -MinGW/Base/gmp/gmp-5.0.1-1/libgmp-5.0.1-1-mingw32-dll-10.tar.lzma -MinGW/Base/w32api/w32api-3.14/w32api-3.14-mingw32-dev.tar.gz -MSYS/Base/make/make-3.81-2/make-3.81-2-msys-1.0.11-bin.tar.lzma -MSYS/Base/bash/bash-3.1.17-2/bash-3.1.17-2-msys-1.0.11-bin.tar.lzma -MSYS/Base/coreutils/coreutils-5.97-2/coreutils-5.97-2-msys-1.0.11-bin.tar.lzma -MinGW/Extension/popt/popt-1.15-1/libpopt-1.15-1-mingw32-dll-0.tar.lzma -MinGW/Extension/popt/popt-1.15-1/libpopt-1.15-1-mingw32-dev.tar.lzma -MSYS/Base/diffutils/diffutils-2.8.7.20071206cvs-2/diffutils-2.8.7.20071206cvs-2-msys-1.0.11-bin.tar.lzma -MSYS/Base/gawk/gawk-3.1.7-1/gawk-3.1.7-1-msys-1.0.11-bin.tar.lzma -MSYS/Base/grep/grep-2.5.4-1/grep-2.5.4-1-msys-1.0.11-bin.tar.lzma -MSYS/Base/sed/sed-4.2.1-1/sed-4.2.1-1-msys-1.0.11-bin.tar.lzma -MSYS/msysdev/libtool/libtool-2.2.7a-2/libtool-2.2.7a-2-msys-1.0.13-bin.tar.lzma -MinGW/Base/gettext/gettext-0.17-1/libintl-0.17-1-mingw32-dll-8.tar.lzma -MinGW/Base/gettext/gettext-0.17-1/gettext-0.17-1-mingw32-dev.tar.lzma -MinGW/Base/libiconv/libiconv-1.13.1-1/libiconv-1.13.1-1-mingw32-dll-2.tar.lzma -MinGW/Base/libiconv/libiconv-1.13.1-1/libiconv-1.13.1-1-mingw32-dev.tar.lzma -MinGW/Base/libiconv/libiconv-1.13.1-1/libcharset-1.13.1-1-mingw32-dll-1.tar.lzma -MSYS/msysdev/autoconf/autoconf-2.65-1/autoconf-2.65-1-msys-1.0.13-bin.tar.lzma -MSYS/msysdev/automake/automake-1.11.1-1/automake-1.11.1-1-msys-1.0.13-bin.tar.lzma -MSYS/Extension/m4/m4-1.4.14-1/m4-1.4.14-1-msys-1.0.13-bin.tar.lzma -MSYS/Base/tar/tar-1.23-1/tar-1.23-1-msys-1.0.13-bin.tar.lzma -MSYS/Base/regex/regex-1.20090805-2/libregex-1.20090805-2-msys-1.0.13-dll-1.tar.lzma -MSYS/Base/libiconv/libiconv-1.13.1-2/libiconv-1.13.1-2-msys-1.0.13-dll-2.tar.lzma -MSYS/Base/gettext/gettext-0.17-2/libintl-0.17-2-msys-dll-8.tar.lzma -MSYS/Extension/perl/perl-5.6.1_2-2/perl-5.6.1_2-2-msys-1.0.13-bin.tar.lzma -MSYS/Extension/crypt/crypt-1.1_1-3/libcrypt-1.1_1-3-msys-1.0.13-dll-0.tar.lzma -EOF - -for f in $download_dir/* ; do - case $f in - *.tar.gz) - tar -C $unpack_dir -xzf $f - ;; - - *.tar.lzma) - tar -C $unpack_dir -xJf $f - ;; - - *) - echo "Don't know how to unpack $f" 1>&2 - exit 1 - ;; - esac -done - -rm -rf $download_dir |