Commit 11d78d97cc48d73dbf20e1cca5a8a6ce619db4f1
1 parent
b3c93adf
Exists in
master
and in
1 other branch
Updating README, adding scripts for mingw builds.
Showing
3 changed files
with
161 additions
and
5 deletions
Show diff stats
README.md
@@ -6,7 +6,7 @@ See more details at https://softwarepublico.gov.br/social/pw3270/ | @@ -6,7 +6,7 @@ See more details at https://softwarepublico.gov.br/social/pw3270/ | ||
6 | 6 | ||
7 | [](https://www.gnu.org/licenses/gpl-3.0) | 7 | [](https://www.gnu.org/licenses/gpl-3.0) |
8 |  | 8 |  |
9 | - | 9 | + |
10 |  | 10 |  |
11 | 11 | ||
12 | ## Instalation | 12 | ## Instalation |
@@ -44,13 +44,17 @@ For the supported distributions get the install repositories and instructions fr | @@ -44,13 +44,17 @@ For the supported distributions get the install repositories and instructions fr | ||
44 | $ git clone https://github.com/PerryWerneck/libipc3270.git ./libipc3270 | 44 | $ git clone https://github.com/PerryWerneck/libipc3270.git ./libipc3270 |
45 | ``` | 45 | ``` |
46 | 46 | ||
47 | -3. Install cross compilers | 47 | +3. Install 64 bits cross compilers |
48 | 48 | ||
49 | - TODO | 49 | + ```shell |
50 | + $ ./libipc3270/win/install-cross.sh --64 | ||
51 | + ``` | ||
50 | 52 | ||
51 | -3. Configure build | 53 | +3. Configure 64 bits build environment |
52 | 54 | ||
53 | - TODO | 55 | + ```shell |
56 | + $ ./libipc3270/win/win-configure.sh --64 | ||
57 | + ``` | ||
54 | 58 | ||
55 | 4. Build | 59 | 4. Build |
56 | 60 |
@@ -0,0 +1,69 @@ | @@ -0,0 +1,69 @@ | ||
1 | +#!/bin/bash | ||
2 | + | ||
3 | +aclocal | ||
4 | +if test $? != 0 ; then | ||
5 | + echo "aclocal failed." | ||
6 | + exit -1 | ||
7 | +fi | ||
8 | + | ||
9 | +autoconf | ||
10 | +if test $? != 0 ; then | ||
11 | + echo "autoconf failed." | ||
12 | + exit -1 | ||
13 | +fi | ||
14 | + | ||
15 | +mkdir -p scripts | ||
16 | +automake --add-missing 2> /dev/null | true | ||
17 | + | ||
18 | +export HOST_CC=/usr/bin/gcc | ||
19 | + | ||
20 | +until [ -z "${1}" ] | ||
21 | +do | ||
22 | + if [ ${1:0:2} = '--' ]; then | ||
23 | + tmp=${1:2} | ||
24 | + parameter=${tmp%%=*} | ||
25 | + parameter=$(echo $parameter | tr "[:lower:]" "[:upper:]") | ||
26 | + | ||
27 | + case $parameter in | ||
28 | + | ||
29 | + 32) | ||
30 | + rm -f win32.cache | ||
31 | + ./configure \ | ||
32 | + --cache-file=win32.cache \ | ||
33 | + --host=i686-w64-mingw32 \ | ||
34 | + --prefix=/usr/i686-w64-mingw32/sys-root/mingw \ | ||
35 | + --libdir=/usr/i686-w64-mingw32/sys-root/mingw/lib | ||
36 | + | ||
37 | + exit $? | ||
38 | + ;; | ||
39 | + | ||
40 | + 64) | ||
41 | + rm -f win64.cache | ||
42 | + ./configure \ | ||
43 | + --cache-file=win64.cache \ | ||
44 | + --host=x86_64-w64-mingw32 \ | ||
45 | + --prefix=/usr/x86_64-w64-mingw32/sys-root/mingw \ | ||
46 | + --libdir=/usr/x86_64-w64-mingw32/sys-root/mingw/lib | ||
47 | + exit $? | ||
48 | + ;; | ||
49 | + | ||
50 | + ALL) | ||
51 | + ;; | ||
52 | + | ||
53 | + | ||
54 | + *) | ||
55 | + value=${tmp##*=} | ||
56 | + eval $parameter=$value | ||
57 | + esac | ||
58 | + | ||
59 | + fi | ||
60 | + | ||
61 | + shift | ||
62 | +done | ||
63 | + | ||
64 | +echo "Execute:" | ||
65 | +echo " ${0} --32 for 32 bits windows." | ||
66 | +echo " ${0} --64 for 64 bits windows." | ||
67 | + | ||
68 | +exit -1 | ||
69 | + |
@@ -0,0 +1,83 @@ | @@ -0,0 +1,83 @@ | ||
1 | +#!/bin/bash | ||
2 | + | ||
3 | +install_packages() { | ||
4 | + | ||
5 | +TEMPFILE=$(mktemp) | ||
6 | + | ||
7 | +cat > ${TEMPFILE} << EOF | ||
8 | +libtool | ||
9 | +gettext-devel | ||
10 | +cross-binutils | ||
11 | +cross-gcc | ||
12 | +cross-gcc-c++ | ||
13 | +cross-pkg-config | ||
14 | +filesystem | ||
15 | +lib3270-devel | ||
16 | +libv3270-devel | ||
17 | +EOF | ||
18 | + | ||
19 | +# Instala apicativos e temas necessários | ||
20 | +sudo zypper --non-interactive in \ | ||
21 | + adwaita-icon-theme \ | ||
22 | + gettext-tools \ | ||
23 | + glib2-devel \ | ||
24 | + autoconf \ | ||
25 | + automake \ | ||
26 | + libtool | ||
27 | + | ||
28 | +while read FILE | ||
29 | +do | ||
30 | + sudo zypper --non-interactive in ${1}-${FILE} | ||
31 | +done < ${TEMPFILE} | ||
32 | + | ||
33 | +rm -f ${TEMPFILE} | ||
34 | + | ||
35 | +} | ||
36 | + | ||
37 | +if [ -z ${1} ]; then | ||
38 | + echo "Use ${0} --32 for 32 bits cross-compiler" | ||
39 | + echo "Use ${0} --64 for 64 bits cross-compiler" | ||
40 | + exit -1 | ||
41 | +fi | ||
42 | + | ||
43 | + | ||
44 | +until [ -z "${1}" ] | ||
45 | +do | ||
46 | + if [ ${1:0:2} = '--' ]; then | ||
47 | + tmp=${1:2} | ||
48 | + parameter=${tmp%%=*} | ||
49 | + parameter=$(echo $parameter | tr "[:lower:]" "[:upper:]") | ||
50 | + | ||
51 | + case $parameter in | ||
52 | + | ||
53 | + ar) | ||
54 | + zypper ar obs://windows:mingw:win32 mingw32 | ||
55 | + zypper ar obs://windows:mingw:win64 mingw64 | ||
56 | + zypper ar obs://home:PerryWerneck:pw3270 pw3270 | ||
57 | + ;; | ||
58 | + | ||
59 | + 32) | ||
60 | + install_packages mingw32 | ||
61 | + ;; | ||
62 | + | ||
63 | + 64) | ||
64 | + install_packages mingw64 | ||
65 | + ;; | ||
66 | + | ||
67 | + ALL) | ||
68 | + install_packages mingw32 | ||
69 | + install_packages mingw64 | ||
70 | + ;; | ||
71 | + | ||
72 | + | ||
73 | + *) | ||
74 | + value=${tmp##*=} | ||
75 | + eval $parameter=$value | ||
76 | + esac | ||
77 | + | ||
78 | + fi | ||
79 | + | ||
80 | + shift | ||
81 | +done | ||
82 | + | ||
83 | + |