Commit ea56dee9a3987780523ee66cde8e191c83fffa77
1 parent
978260fe
Exists in
master
and in
1 other branch
Incluindo scripts para empacotamento em windows.
Showing
2 changed files
with
154 additions
and
0 deletions
Show diff stats
@@ -0,0 +1,85 @@ | @@ -0,0 +1,85 @@ | ||
1 | +#!/bin/bash | ||
2 | + | ||
3 | +install_packages() { | ||
4 | + | ||
5 | +TEMPFILE=$(mktemp) | ||
6 | + | ||
7 | +cat > ${TEMPFILE} << EOF | ||
8 | +cross-binutils | ||
9 | +cross-gcc | ||
10 | +cross-gcc-c++ | ||
11 | +cross-pkg-config | ||
12 | +filesystem | ||
13 | +libopenssl | ||
14 | +libopenssl-devel | ||
15 | +libintl-devel | ||
16 | +win_iconv-devel | ||
17 | +zlib-devel | ||
18 | +winpthreads-devel | ||
19 | +cross-cpp | ||
20 | +gettext-tools | ||
21 | +headers | ||
22 | +lib3270-5_2-devel | ||
23 | +libv3270-5_2-devel | ||
24 | +EOF | ||
25 | + | ||
26 | +# Instala apicativos e temas necessários | ||
27 | +sudo zypper --non-interactive in \ | ||
28 | + gettext-tools \ | ||
29 | + automake | ||
30 | + | ||
31 | +while read FILE | ||
32 | +do | ||
33 | + sudo zypper --non-interactive in ${1}-${FILE} | ||
34 | +done < ${TEMPFILE} | ||
35 | + | ||
36 | +rm -f ${TEMPFILE} | ||
37 | + | ||
38 | +} | ||
39 | + | ||
40 | +if [ -z ${1} ]; then | ||
41 | + echo "Use ${0} --32 for 32 bits cross-compiler" | ||
42 | + echo "Use ${0} --64 for 64 bits cross-compiler" | ||
43 | + exit -1 | ||
44 | +fi | ||
45 | + | ||
46 | + | ||
47 | +until [ -z "${1}" ] | ||
48 | +do | ||
49 | + if [ ${1:0:2} = '--' ]; then | ||
50 | + tmp=${1:2} | ||
51 | + parameter=${tmp%%=*} | ||
52 | + parameter=$(echo $parameter | tr "[:lower:]" "[:upper:]") | ||
53 | + | ||
54 | + case $parameter in | ||
55 | + | ||
56 | + ar) | ||
57 | + zypper ar --refresh http://download.opensuse.org/repositories/windows:/mingw:/win32/openSUSE_42.3/ mingw32 | ||
58 | + zypper ar --refresh http://download.opensuse.org/repositories/windows:/mingw:/win64/openSUSE_42.3/ mingw64 | ||
59 | + ;; | ||
60 | + | ||
61 | + 32) | ||
62 | + install_packages mingw32 | ||
63 | + ;; | ||
64 | + | ||
65 | + 64) | ||
66 | + install_packages mingw64 | ||
67 | + ;; | ||
68 | + | ||
69 | + ALL) | ||
70 | + install_packages mingw32 | ||
71 | + install_packages mingw64 | ||
72 | + ;; | ||
73 | + | ||
74 | + | ||
75 | + *) | ||
76 | + value=${tmp##*=} | ||
77 | + eval $parameter=$value | ||
78 | + esac | ||
79 | + | ||
80 | + fi | ||
81 | + | ||
82 | + shift | ||
83 | +done | ||
84 | + | ||
85 | + |
@@ -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 | + |