From 6cef729eccb67f9cdf3e88243ad01af5f3711793 Mon Sep 17 00:00:00 2001 From: Perry Werneck Date: Mon, 10 Dec 2018 15:35:48 -0200 Subject: [PATCH] Updating info for windows builds. --- README.md | 8 +++++++- win/win-configure.sh | 69 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 76 insertions(+), 1 deletion(-) create mode 100755 win/win-configure.sh diff --git a/README.md b/README.md index 308b499..104849c 100644 --- a/README.md +++ b/README.md @@ -35,8 +35,14 @@ Cross-compiling on SuSE Linux (Native or WSL) 3. Install cross compilers - * ./lib3270/win/install-cross.sh --32 --64 + * ./lib3270/win/install-cross.sh --32 (for 32 bits) + * ./lib3270/win/install-cross.sh --64 (for 64 bits) + * ./lib3270/win/install-cross.sh --all (for 32 and 64 bits) +3. Configure build + + * ./lib3270/win/win-configure.sh --32 (for 32 bits) + * ./lib3270/win/win-configure.sh --64 (for 64 bits) diff --git a/win/win-configure.sh b/win/win-configure.sh new file mode 100755 index 0000000..f30114c --- /dev/null +++ b/win/win-configure.sh @@ -0,0 +1,69 @@ +#!/bin/bash + +aclocal +if test $? != 0 ; then + echo "aclocal failed." + exit -1 +fi + +autoconf +if test $? != 0 ; then + echo "autoconf failed." + exit -1 +fi + +mkdir -p scripts +automake --add-missing 2> /dev/null | true + +export HOST_CC=/usr/bin/gcc + +until [ -z "${1}" ] +do + if [ ${1:0:2} = '--' ]; then + tmp=${1:2} + parameter=${tmp%%=*} + parameter=$(echo $parameter | tr "[:lower:]" "[:upper:]") + + case $parameter in + + 32) + rm -f win32.cache + ./configure \ + --cache-file=win32.cache \ + --host=i686-w64-mingw32 \ + --prefix=/usr/i686-w64-mingw32/sys-root/mingw \ + --libdir=/usr/i686-w64-mingw32/sys-root/mingw/lib + + exit $? + ;; + + 64) + rm -f win64.cache + ./configure \ + --cache-file=win64.cache \ + --host=x86_64-w64-mingw32 \ + --prefix=/usr/x86_64-w64-mingw32/sys-root/mingw \ + --libdir=/usr/x86_64-w64-mingw32/sys-root/mingw/lib + exit $? + ;; + + ALL) + ;; + + + *) + value=${tmp##*=} + eval $parameter=$value + esac + + fi + + shift +done + +echo "Execute:" +echo " ${0} --32 for 32 bits windows." +echo " ${0} --64 for 64 bits windows." + +exit -1 + -- libgit2 0.21.2