From f865586c9c4ff4546460800c82692eb48241fb88 Mon Sep 17 00:00:00 2001 From: Perry Werneck Date: Wed, 5 Apr 2017 17:09:03 -0300 Subject: [PATCH] Incluindo scripts para cross-compiling em windows. --- win/install-cross.sh | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ win/pack.sh | 30 ++++++++++++++++++++++++++++++ 2 files changed, 90 insertions(+), 0 deletions(-) create mode 100755 win/install-cross.sh create mode 100755 win/pack.sh diff --git a/win/install-cross.sh b/win/install-cross.sh new file mode 100755 index 0000000..08b65e7 --- /dev/null +++ b/win/install-cross.sh @@ -0,0 +1,60 @@ +#!/bin/bash + +install_packages() +{ + +# Instala apicativos e temas necessários +sudo zypper --non-interactive in \ + ${1}-cross-gcc-c++ \ + ${1}-cross-pkg-config \ + ${1}-cross-cpp \ + ${1}-cross-binutils \ + ${1}-pw3270 \ + ${1}-lib3270-devel \ + ${1}-pw3270-devel + +} + + +until [ -z "${1}" ] +do + if [ ${1:0:2} = '--' ]; then + tmp=${1:2} + parameter=${tmp%%=*} + parameter=$(echo $parameter | tr "[:lower:]" "[:upper:]") + + case $parameter in + + ar) + zypper ar --refresh http://download.opensuse.org/repositories/windows:/mingw:/win32/openSUSE_42.2/ mingw32 + zypper ar --refresh http://download.opensuse.org/repositories/windows:/mingw:/win64/openSUSE_42.2/ mingw64 + zypper ar --refresh http://download.opensuse.org/repositories/home:/PerryWerneck:/mingw32/openSUSE_Leap_42.2/ mingw32-pw3270 + zypper ar --refresh http://download.opensuse.org/repositories/home:/PerryWerneck:/mingw64/openSUSE_Leap_42.2/ mingw64-pw3270 + zypper ref + ;; + + 32) + install_packages mingw32 + ;; + + 64) + install_packages mingw64 + ;; + + ALL) + install_packages mingw32 + install_packages mingw64 + ;; + + + *) + value=${tmp##*=} + eval $parameter=$value + esac + + fi + + shift +done + + diff --git a/win/pack.sh b/win/pack.sh new file mode 100755 index 0000000..aa22b83 --- /dev/null +++ b/win/pack.sh @@ -0,0 +1,30 @@ +#!/bin/bash + +myDIR=$(dirname $(dirname $(readlink -f $0))) + +cd $myDIR + +rm -f *.zip + +win32-configure && make clean && make zip +if [ "$?" != "0" ]; then + exit -1 +fi + +win64-configure && make clean && make zip +if [ "$?" != "0" ]; then + exit -1 +fi + +if [ -d ~/public_html/win/pw3270/x86_32 ]; then + cp *i686*.zip ~/public_html/win/pw3270/x86_32 +elif [ -d ~/public_html/win/x86_32 ]; then + cp *i686*.zip ~/public_html/win/x86_32 +fi + +if [ -d ~/public_html/win/pw3270/x86_64 ]; then + cp *x86_64*.zip ~/public_html/win/pw3270/x86_64 +elif [ -d ~/public_html/win/x86_32 ]; then + cp *x86_64*.zip ~/public_html/win/x86_64 +fi + -- libgit2 0.21.2