Commit a4b6086a3dc9411da68d673cedcb3616e47ce0ef

Authored by Perry Werneck
1 parent 4e1319b9

Atualizando empacotamento windows.

Showing 3 changed files with 63 additions and 25 deletions   Show diff stats
@@ -14,6 +14,7 @@ @@ -14,6 +14,7 @@
14 *.tar 14 *.tar
15 *.bz2 15 *.bz2
16 *.cache 16 *.cache
  17 +*.png
17 ChangeLog* 18 ChangeLog*
18 Makefile 19 Makefile
19 aclocal.m4 20 aclocal.m4
@@ -5,7 +5,7 @@ msgid "" @@ -5,7 +5,7 @@ msgid ""
5 msgstr "" 5 msgstr ""
6 "Project-Id-Version: pw3270 5.0\n" 6 "Project-Id-Version: pw3270 5.0\n"
7 "Report-Msgid-Bugs-To: \n" 7 "Report-Msgid-Bugs-To: \n"
8 -"POT-Creation-Date: 2015-11-09 16:05-0200\n" 8 +"POT-Creation-Date: 2015-11-10 09:56-0200\n"
9 "PO-Revision-Date: 2014-02-17 08:05-0300\n" 9 "PO-Revision-Date: 2014-02-17 08:05-0300\n"
10 "Last-Translator: Perry Werneck <perry.werneck@gmail.com>\n" 10 "Last-Translator: Perry Werneck <perry.werneck@gmail.com>\n"
11 "Language-Team: Portugues <>\n" 11 "Language-Team: Portugues <>\n"
1 #!/bin/bash 1 #!/bin/bash
2 2
  3 +PACKAGE_NAME="pw3270"
  4 +
3 cleanup() 5 cleanup()
4 { 6 {
5 # 7 #
@@ -29,7 +31,7 @@ CopyPacket() @@ -29,7 +31,7 @@ CopyPacket()
29 # 31 #
30 # Primeiro move a versão baseada no runtime 32 # Primeiro move a versão baseada no runtime
31 # 33 #
32 - FILENAME=$(find nsi -maxdepth 1 -name "pw3270-*-requires-gtk-*-${1}.exe" | head --lines 1) 34 + FILENAME=$(find nsi -maxdepth 1 -name "${PACKAGE_NAME}-*-requires-gtk-*-${1}.exe" | head --lines 1)
33 35
34 if [ ! -z ${FILENAME} ]; then 36 if [ ! -z ${FILENAME} ]; then
35 37
@@ -44,12 +46,21 @@ CopyPacket() @@ -44,12 +46,21 @@ CopyPacket()
44 failed "Erro ao copiar instalador sem o runtime" 46 failed "Erro ao copiar instalador sem o runtime"
45 fi 47 fi
46 48
  49 + #
  50 + # Cria link do pacote sem GTK para "latest"
  51 + #
  52 + ln -sf $(basename ${FILENAME}) ${DESTDIR}/${1}/${PACKAGE_NAME}-without-gtk-${2}-${1}.exe
  53 + if [ "$?" != "0" ]; then
  54 + failed "Erro ao criar o link simbólico"
  55 + fi
  56 +
  57 +
47 fi 58 fi
48 59
49 # 60 #
50 # Depois copia o pacote completo 61 # Depois copia o pacote completo
51 # 62 #
52 - FILENAME=$(find nsi -maxdepth 1 -name "pw3270-*-gtk-*-${1}.exe" | head --lines 1) 63 + FILENAME=$(find nsi -maxdepth 1 -name "${PACKAGE_NAME}-*-gtk-*-${1}.exe" | head --lines 1)
53 64
54 if [ ! -z ${FILENAME} ]; then 65 if [ ! -z ${FILENAME} ]; then
55 66
@@ -67,12 +78,11 @@ CopyPacket() @@ -67,12 +78,11 @@ CopyPacket()
67 # 78 #
68 # Cria link do pacote completo para "latest" 79 # Cria link do pacote completo para "latest"
69 # 80 #
70 - ln -sf $(basename ${FILENAME}) ${DESTDIR}/${1}/pw3270-with-gtk-${2}-${1}.exe 81 + ln -sf $(basename ${FILENAME}) ${DESTDIR}/${1}/${PACKAGE_NAME}-with-gtk-${2}-${1}.exe
71 if [ "$?" != "0" ]; then 82 if [ "$?" != "0" ]; then
72 failed "Erro ao criar o link simbólico" 83 failed "Erro ao criar o link simbólico"
73 fi 84 fi
74 85
75 -  
76 fi 86 fi
77 87
78 } 88 }
@@ -85,19 +95,21 @@ CopyPacket() @@ -85,19 +95,21 @@ CopyPacket()
85 # 95 #
86 build() 96 build()
87 { 97 {
88 - echo -e "\e]2;pw3270-${1}\a" 98 + echo -e "\e]2;${PACKAGE_NAME}-${1}\a"
89 99
90 case ${1} in 100 case ${1} in
91 x86_32) 101 x86_32)
92 host=i686-w64-mingw32 102 host=i686-w64-mingw32
93 host_cpu=i686 103 host_cpu=i686
94 prefix=/usr/i686-w64-mingw32/sys-root/mingw 104 prefix=/usr/i686-w64-mingw32/sys-root/mingw
  105 + tools=i686-w64-mingw32
95 ;; 106 ;;
96 107
97 x86_64) 108 x86_64)
98 host=x86_64-w64-mingw32 109 host=x86_64-w64-mingw32
99 host_cpu=x86_64 110 host_cpu=x86_64
100 prefix=/usr/x86_64-w64-mingw32/sys-root/mingw 111 prefix=/usr/x86_64-w64-mingw32/sys-root/mingw
  112 + tools=x86_64-w64-mingw32
101 ;; 113 ;;
102 114
103 115
@@ -106,10 +118,20 @@ build() @@ -106,10 +118,20 @@ build()
106 118
107 esac 119 esac
108 120
  121 + # Detecto argumentos
  122 + ARGS=""
  123 +
  124 + REXXCONFIG=$(which ${tools}-oorexx-config)
  125 + if [ -z ${REXXCONFIG} ]; then
  126 + echo "Desabilitando suporte ooRexx"
  127 + ARGS="${ARGS} --disable-rexx"
  128 + fi
  129 +
109 ./configure \ 130 ./configure \
110 --cache-file=.${1}.cache \ 131 --cache-file=.${1}.cache \
111 --host=${host} \ 132 --host=${host} \
112 - --prefix=${prefix} 133 + --prefix=${prefix} \
  134 + ${ARGS}
113 135
114 if [ "$?" != "0" ]; then 136 if [ "$?" != "0" ]; then
115 failed "Erro ao configurar" 137 failed "Erro ao configurar"
@@ -118,7 +140,7 @@ build() @@ -118,7 +140,7 @@ build()
118 make clean 140 make clean
119 rm -f *.exe 141 rm -f *.exe
120 142
121 - make -C nsi pw3270-${host_cpu}.nsi 143 + make -C nsi ${PACKAGE_NAME}-${host_cpu}.nsi
122 if [ "$?" != "0" ]; then 144 if [ "$?" != "0" ]; then
123 failed "Erro ao gerar script de empacotamento windows" 145 failed "Erro ao gerar script de empacotamento windows"
124 fi 146 fi
@@ -133,21 +155,31 @@ build() @@ -133,21 +155,31 @@ build()
133 failed "Erro ao criar link para traduções" 155 failed "Erro ao criar link para traduções"
134 fi 156 fi
135 157
136 - chmod +x makegtkruntime.sh  
137 - ./makegtkruntime.sh  
138 - if [ "$?" != "0" ]; then  
139 - failed "Erro ao construir runtime gtk"  
140 - fi 158 + if [ "${COMPLETE}" != "0" ]; then
  159 +
  160 + # Gera pacote completo
  161 +
  162 + chmod +x makegtkruntime.sh
  163 + ./makegtkruntime.sh
  164 + if [ "$?" != "0" ]; then
  165 + failed "Erro ao construir runtime gtk"
  166 + fi
  167 +
  168 + echo -e "\e]2;${PACKAGE_NAME}-install-${host_cpu}.exe\a"
  169 + make -C nsi package
  170 + if [ "$?" != "0" ]; then
  171 + failed "Erro ao gerar pacote windows"
  172 + fi
141 173
142 - echo -e "\e]2;pw3270-install-${host_cpu}.exe\a"  
143 - make -C nsi package  
144 - if [ "$?" != "0" ]; then  
145 - failed "Erro ao gerar pacote windows"  
146 fi 174 fi
147 175
148 - make -C nsi package-no-gtk  
149 - if [ "$?" != "0" ]; then  
150 - failed "Erro ao gerar pacote windows" 176 + if [ "${RUNTIME}" != "0" ]; then
  177 +
  178 + make -C nsi package-no-gtk
  179 + if [ "$?" != "0" ]; then
  180 + failed "Erro ao gerar pacote windows"
  181 + fi
  182 +
151 fi 183 fi
152 184
153 CopyPacket ${host_cpu} "latest" 185 CopyPacket ${host_cpu} "latest"
@@ -162,7 +194,7 @@ TEMPDIR=$(mktemp -d) @@ -162,7 +194,7 @@ TEMPDIR=$(mktemp -d)
162 DESTDIR=${HOME}/public_html/win 194 DESTDIR=${HOME}/public_html/win
163 RUNTIMEDIR=$(mktemp -d) 195 RUNTIMEDIR=$(mktemp -d)
164 ARCHS="x86_32 x86_64" 196 ARCHS="x86_32 x86_64"
165 -RUNTIME=0 197 +RUNTIME=1
166 COMPLETE=1 198 COMPLETE=1
167 199
168 trap cleanup INT 200 trap cleanup INT
@@ -185,7 +217,7 @@ do @@ -185,7 +217,7 @@ do
185 ;; 217 ;;
186 218
187 FULL) 219 FULL)
188 - RUNTIME=1 220 + RUNTIME=0
189 COMPLETE=1 221 COMPLETE=1
190 ;; 222 ;;
191 223
@@ -194,6 +226,10 @@ do @@ -194,6 +226,10 @@ do
194 COMPLETE=0 226 COMPLETE=0
195 ;; 227 ;;
196 228
  229 + NAME)
  230 + PACKAGE_NAME=$value
  231 + ;;
  232 +
197 OUT) 233 OUT)
198 DESTDIR=$value 234 DESTDIR=$value
199 ;; 235 ;;
@@ -304,9 +340,10 @@ cd $myDIR @@ -304,9 +340,10 @@ cd $myDIR
304 rm -fr ${TEMPDIR} 340 rm -fr ${TEMPDIR}
305 rm -fr ${RUNTIMEDIR} 341 rm -fr ${RUNTIMEDIR}
306 342
307 -#zip -r -j ${HOME}/public_html/win/pw3270-latest.zip \  
308 -# ${HOME}/public_html/win/x86_32/pw3270-x86_32-latest.exe \  
309 -# ${HOME}/public_html/win/x86_64/pw3270-x86_64-latest.exe 343 +# Gera pacotes para envio ao SPB
  344 +zip -9 -r -j ${HOME}/public_html/win/${PACKAGE_NAME}-latest.zip \
  345 + ${HOME}/public_html/win/x86_32/${PACKAGE_NAME}-with-gtk-latest-i686.exe \
  346 + ${HOME}/public_html/win/x86_64/${PACKAGE_NAME}-with-gtk-latest-x86_64.exe
310 347
311 echo -e "\e]2;Success!\a" 348 echo -e "\e]2;Success!\a"
312 349