Commit 2bbbd2510740d8a2c1e6dd450c8de1a76a1086ee
1 parent
cade5629
Exists in
master
and in
3 other branches
Adding script for windows cross-compiling.
Showing
1 changed file
with
83 additions
and
0 deletions
Show diff stats
... | ... | @@ -0,0 +1,83 @@ |
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 | +cross-nsis | |
17 | +win_iconv-devel | |
18 | +zlib-devel | |
19 | +winpthreads-devel | |
20 | +cross-cpp | |
21 | +gettext-tools | |
22 | +headers | |
23 | +EOF | |
24 | + | |
25 | +# Instala apicativos e temas necessários | |
26 | +sudo zypper --non-interactive in \ | |
27 | + gettext-tools | |
28 | + | |
29 | +while read FILE | |
30 | +do | |
31 | + sudo zypper --non-interactive in ${1}-${FILE} | |
32 | +done < ${TEMPFILE} | |
33 | + | |
34 | +rm -f ${TEMPFILE} | |
35 | + | |
36 | +} | |
37 | + | |
38 | +if [ -z ${1} ]; then | |
39 | + echo "Use ${0} --32 for 32 bits cross-compiler" | |
40 | + echo "Use ${0} --64 for 64 bits cross-compiler" | |
41 | + exit -1 | |
42 | +fi | |
43 | + | |
44 | + | |
45 | +until [ -z "${1}" ] | |
46 | +do | |
47 | + if [ ${1:0:2} = '--' ]; then | |
48 | + tmp=${1:2} | |
49 | + parameter=${tmp%%=*} | |
50 | + parameter=$(echo $parameter | tr "[:lower:]" "[:upper:]") | |
51 | + | |
52 | + case $parameter in | |
53 | + | |
54 | + ar) | |
55 | + zypper ar --refresh http://download.opensuse.org/repositories/windows:/mingw:/win32/openSUSE_42.3/ mingw32 | |
56 | + zypper ar --refresh http://download.opensuse.org/repositories/windows:/mingw:/win64/openSUSE_42.3/ mingw64 | |
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 | + | ... | ... |