Commit 0ad6fb48e3cd7c675594bbcb628afe00669e9f62
1 parent
32e67f93
Exists in
master
and in
5 other branches
Refactoring windows package.
Showing
2 changed files
with
90 additions
and
35 deletions
Show diff stats
win/pack.sh
@@ -65,7 +65,7 @@ getSource() | @@ -65,7 +65,7 @@ getSource() | ||
65 | fi | 65 | fi |
66 | 66 | ||
67 | if [ "${GET_PREREQS}" != "0" ]; then | 67 | if [ "${GET_PREREQS}" != "0" ]; then |
68 | - for ARCH in ${ARCHS} | 68 | + for ARCH in ${TARGET_ARCHS} |
69 | do | 69 | do |
70 | 70 | ||
71 | if [ -d ${WORKDIR}/sources/${1}/win/${ARCH} ]; then | 71 | if [ -d ${WORKDIR}/sources/${1}/win/${ARCH} ]; then |
@@ -97,7 +97,9 @@ getSource() | @@ -97,7 +97,9 @@ getSource() | ||
97 | # | 97 | # |
98 | buildLibrary() | 98 | buildLibrary() |
99 | { | 99 | { |
100 | - for ARCH in ${ARCHS} | 100 | + echo "Building library ${1}" |
101 | + | ||
102 | + for ARCH in ${TARGET_ARCHS} | ||
101 | do | 103 | do |
102 | 104 | ||
103 | echo -e "\e]2;Building ${1} for ${ARCH}\a" | 105 | echo -e "\e]2;Building ${1} for ${ARCH}\a" |
@@ -129,12 +131,8 @@ buildLibrary() | @@ -129,12 +131,8 @@ buildLibrary() | ||
129 | 131 | ||
130 | mkdir -p ${WORKDIR}/build/${ARCH} | 132 | mkdir -p ${WORKDIR}/build/${ARCH} |
131 | mkdir -p ${WORKDIR}/cache/${ARCH} | 133 | mkdir -p ${WORKDIR}/cache/${ARCH} |
132 | - mkdir -p ${WORKDIR}/build/${ARCH}/bin | ||
133 | - mkdir -p ${WORKDIR}/build/${ARCH}/lib | ||
134 | mkdir -p ${WORKDIR}/build/${ARCH}/locale | 134 | mkdir -p ${WORKDIR}/build/${ARCH}/locale |
135 | mkdir -p ${WORKDIR}/build/${ARCH}/include | 135 | mkdir -p ${WORKDIR}/build/${ARCH}/include |
136 | - mkdir -p ${WORKDIR}/build/${ARCH}/sysconfig | ||
137 | - mkdir -p ${WORKDIR}/build/${ARCH}/data | ||
138 | 136 | ||
139 | export PKG_CONFIG_PATH=${WORKDIR}/build/${ARCH}/lib/pkgconfig | 137 | export PKG_CONFIG_PATH=${WORKDIR}/build/${ARCH}/lib/pkgconfig |
140 | export cache=${WORKDIR}/cache/${ARCH}/${1}.cache | 138 | export cache=${WORKDIR}/cache/${ARCH}/${1}.cache |
@@ -143,17 +141,16 @@ buildLibrary() | @@ -143,17 +141,16 @@ buildLibrary() | ||
143 | 141 | ||
144 | ./configure \ | 142 | ./configure \ |
145 | CFLAGS="-I${WORKDIR}/build/${ARCH}/include" \ | 143 | CFLAGS="-I${WORKDIR}/build/${ARCH}/include" \ |
146 | - LDFLAGS="-L${WORKDIR}/build/${ARCH}/lib" \ | 144 | + LDFLAGS="-L${WORKDIR}/build/${ARCH}" \ |
147 | --host=${host} \ | 145 | --host=${host} \ |
148 | --prefix=${prefix} \ | 146 | --prefix=${prefix} \ |
149 | - --bindir=${WORKDIR}/build/${ARCH}/bin \ | ||
150 | - --libdir=${WORKDIR}/build/${ARCH}/bin \ | 147 | + --bindir=${WORKDIR}/build/${ARCH} \ |
148 | + --libdir=${WORKDIR}/build/${ARCH} \ | ||
151 | --localedir=${WORKDIR}/build/${ARCH}/locale \ | 149 | --localedir=${WORKDIR}/build/${ARCH}/locale \ |
152 | --includedir=${WORKDIR}/build/${ARCH}/include \ | 150 | --includedir=${WORKDIR}/build/${ARCH}/include \ |
153 | - --sysconfdir=${WORKDIR}/build/${ARCH}/sysconfig \ | ||
154 | - --datadir=${WORKDIR}/build/${ARCH}/data \ | ||
155 | - --datarootdir=${WORKDIR}/build/${ARCH}/data | ||
156 | - | 151 | + --sysconfdir=${WORKDIR}/build/${ARCH} \ |
152 | + --datadir=${WORKDIR}/build/${ARCH} \ | ||
153 | + --datarootdir=${WORKDIR}/build/${ARCH} | ||
157 | 154 | ||
158 | if [ "$?" != "0" ]; then | 155 | if [ "$?" != "0" ]; then |
159 | failed "Can't configure ${1}" | 156 | failed "Can't configure ${1}" |
@@ -178,7 +175,7 @@ buildLibrary() | @@ -178,7 +175,7 @@ buildLibrary() | ||
178 | # | 175 | # |
179 | buildApplication() | 176 | buildApplication() |
180 | { | 177 | { |
181 | - for ARCH in ${ARCHS} | 178 | + for ARCH in ${TARGET_ARCHS} |
182 | do | 179 | do |
183 | 180 | ||
184 | echo -e "\e]2;Building ${1} for ${ARCH}\a" | 181 | echo -e "\e]2;Building ${1} for ${ARCH}\a" |
@@ -210,11 +207,8 @@ buildApplication() | @@ -210,11 +207,8 @@ buildApplication() | ||
210 | 207 | ||
211 | mkdir -p ${WORKDIR}/build/${ARCH} | 208 | mkdir -p ${WORKDIR}/build/${ARCH} |
212 | mkdir -p ${WORKDIR}/cache/${ARCH} | 209 | mkdir -p ${WORKDIR}/cache/${ARCH} |
213 | - mkdir -p ${WORKDIR}/build/${ARCH}/bin | ||
214 | mkdir -p ${WORKDIR}/build/${ARCH}/locale | 210 | mkdir -p ${WORKDIR}/build/${ARCH}/locale |
215 | mkdir -p ${WORKDIR}/build/${ARCH}/include | 211 | mkdir -p ${WORKDIR}/build/${ARCH}/include |
216 | - mkdir -p ${WORKDIR}/build/${ARCH}/sysconfig | ||
217 | - mkdir -p ${WORKDIR}/build/${ARCH}/data | ||
218 | 212 | ||
219 | export PKG_CONFIG_PATH=${WORKDIR}/build/${ARCH}/lib/pkgconfig | 213 | export PKG_CONFIG_PATH=${WORKDIR}/build/${ARCH}/lib/pkgconfig |
220 | export cache=${WORKDIR}/cache/${ARCH}/${1}.cache | 214 | export cache=${WORKDIR}/cache/${ARCH}/${1}.cache |
@@ -223,16 +217,16 @@ buildApplication() | @@ -223,16 +217,16 @@ buildApplication() | ||
223 | 217 | ||
224 | ./configure \ | 218 | ./configure \ |
225 | CFLAGS="-I${WORKDIR}/build/${ARCH}/include" \ | 219 | CFLAGS="-I${WORKDIR}/build/${ARCH}/include" \ |
226 | - LDFLAGS="-L${WORKDIR}/build/${ARCH}/lib" \ | 220 | + LDFLAGS="-L${WORKDIR}/build/${ARCH}" \ |
227 | --host=${host} \ | 221 | --host=${host} \ |
228 | --prefix=${prefix} \ | 222 | --prefix=${prefix} \ |
229 | - --bindir=${WORKDIR}/build/${ARCH}/bin \ | ||
230 | - --libdir=${WORKDIR}/build/${ARCH}/bin \ | 223 | + --bindir=${WORKDIR}/build/${ARCH} \ |
224 | + --libdir=${WORKDIR}/build/${ARCH} \ | ||
231 | --localedir=${WORKDIR}/build/${ARCH}/locale \ | 225 | --localedir=${WORKDIR}/build/${ARCH}/locale \ |
232 | --includedir=${WORKDIR}/build/${ARCH}/include \ | 226 | --includedir=${WORKDIR}/build/${ARCH}/include \ |
233 | - --sysconfdir=${WORKDIR}/build/${ARCH}/sysconfig \ | ||
234 | - --datadir=${WORKDIR}/build/${ARCH}/data \ | ||
235 | - --datarootdir=${WORKDIR}/build/${ARCH}/data | 227 | + --sysconfdir=${WORKDIR}/build/${ARCH} \ |
228 | + --datadir=${WORKDIR}/build/${ARCH} \ | ||
229 | + --datarootdir=${WORKDIR}/build/${ARCH} | ||
236 | 230 | ||
237 | if [ "$?" != "0" ]; then | 231 | if [ "$?" != "0" ]; then |
238 | failed "Can't configure ${1}" | 232 | failed "Can't configure ${1}" |
@@ -262,6 +256,29 @@ buildApplication() | @@ -262,6 +256,29 @@ buildApplication() | ||
262 | fi | 256 | fi |
263 | fi | 257 | fi |
264 | 258 | ||
259 | + if [ -e branding/${1}.svg ]; then | ||
260 | + convert -density 384 -background transparent branding/${1}.svg -define icon:auto-resize -colors 256 ${WORKDIR}/build/${ARCH}/${1}.ico | ||
261 | + if [ "$?" != "0" ]; then | ||
262 | + cleanup | ||
263 | + exit -1 | ||
264 | + fi | ||
265 | + fi | ||
266 | + | ||
267 | + for doc in LICENSE LICENCA README.md AUTHORS | ||
268 | + do | ||
269 | + | ||
270 | + if [ -e ${doc} ]; then | ||
271 | + cp ${doc} ${WORKDIR}/build/${ARCH} | ||
272 | + | ||
273 | + if [ "$?" != "0" ]; then | ||
274 | + cleanup | ||
275 | + exit -1 | ||
276 | + fi | ||
277 | + | ||
278 | + fi | ||
279 | + | ||
280 | + done | ||
281 | + | ||
265 | done | 282 | done |
266 | 283 | ||
267 | } | 284 | } |
@@ -269,9 +286,10 @@ buildApplication() | @@ -269,9 +286,10 @@ buildApplication() | ||
269 | # | 286 | # |
270 | # Make runtime | 287 | # Make runtime |
271 | # | 288 | # |
272 | -makeRuntime() { | 289 | +makeRuntime() |
290 | +{ | ||
273 | 291 | ||
274 | - for ARCH in ${ARCHS} | 292 | + for ARCH in ${TARGET_ARCHS} |
275 | do | 293 | do |
276 | 294 | ||
277 | echo -e "\e]2;Building runtime for ${ARCH}\a" | 295 | echo -e "\e]2;Building runtime for ${ARCH}\a" |
@@ -285,7 +303,7 @@ makeRuntime() { | @@ -285,7 +303,7 @@ makeRuntime() { | ||
285 | chmod +x ${SCRIPT} | 303 | chmod +x ${SCRIPT} |
286 | 304 | ||
287 | cd ${WORKDIR}/build/${ARCH} | 305 | cd ${WORKDIR}/build/${ARCH} |
288 | - ${SCRIPT} --path="${WORKDIR}/build/${ARCH}/runtime" --bindir="${WORKDIR}/build/${ARCH}/bin" | 306 | + ${SCRIPT} --output-dir="${WORKDIR}/build/${ARCH}/runtime" --bindir="${WORKDIR}/build/${ARCH}" |
289 | if [ "$?" != "0" ]; then | 307 | if [ "$?" != "0" ]; then |
290 | failed "Error on ${SCRIPT}" | 308 | failed "Error on ${SCRIPT}" |
291 | fi | 309 | fi |
@@ -296,6 +314,26 @@ makeRuntime() { | @@ -296,6 +314,26 @@ makeRuntime() { | ||
296 | } | 314 | } |
297 | 315 | ||
298 | # | 316 | # |
317 | +# Make packages | ||
318 | +# | ||
319 | +makeInstaller() | ||
320 | +{ | ||
321 | + | ||
322 | + for ARCH in ${TARGET_ARCHS} | ||
323 | + do | ||
324 | + | ||
325 | + echo -e "\e]2;Creating installer for ${ARCH}\a" | ||
326 | + echo "Creating installer for ${ARCH}" | ||
327 | + | ||
328 | + cd ${WORKDIR}/build/${ARCH} | ||
329 | + /bin/bash | ||
330 | + | ||
331 | + | ||
332 | + done | ||
333 | + | ||
334 | +} | ||
335 | + | ||
336 | +# | ||
299 | # Check command line parameters | 337 | # Check command line parameters |
300 | # | 338 | # |
301 | until [ -z "$1" ] | 339 | until [ -z "$1" ] |
@@ -393,6 +431,7 @@ done | @@ -393,6 +431,7 @@ done | ||
393 | # Create runtime | 431 | # Create runtime |
394 | # | 432 | # |
395 | makeRuntime | 433 | makeRuntime |
434 | +makeInstaller | ||
396 | 435 | ||
397 | cleanup | 436 | cleanup |
398 | 437 |
win/pw3270.nsi.in
@@ -71,10 +71,11 @@ SubSection "@PACKAGE@" SecMain | @@ -71,10 +71,11 @@ SubSection "@PACKAGE@" SecMain | ||
71 | createShortCut "$DESKTOP\@PACKAGE@.lnk" "$INSTDIR\@PACKAGE@.exe" | 71 | createShortCut "$DESKTOP\@PACKAGE@.lnk" "$INSTDIR\@PACKAGE@.exe" |
72 | 72 | ||
73 | # Binary files | 73 | # Binary files |
74 | - file "/oname=$INSTDIR\@PACKAGE@.exe" "bin\@PACKAGE@.exe" | 74 | + file "/oname=$INSTDIR\@PACKAGE@.exe" "@PACKAGE@.exe" |
75 | file "/oname=$INSTDIR\@PACKAGE@.ico" "@PACKAGE@.ico" | 75 | file "/oname=$INSTDIR\@PACKAGE@.ico" "@PACKAGE@.ico" |
76 | - file "/oname=$INSTDIR\lib3270.dll" "bin\lib3270.dll" | ||
77 | - file "/oname=$INSTDIR\@PACKAGE@.dll" "bin\@PACKAGE@.dll" | 76 | + file "/oname=$INSTDIR\lib3270.dll" "lib3270.dll" |
77 | + file "/oname=$INSTDIR\libv3270.dll" "libv3270.dll" | ||
78 | + file "/oname=$INSTDIR\@PACKAGE@.dll" "@PACKAGE@.dll" | ||
78 | 79 | ||
79 | # Configuration files | 80 | # Configuration files |
80 | file "/oname=$INSTDIR\@PACKAGE@-logo.png" "@PACKAGE@-logo.png" | 81 | file "/oname=$INSTDIR\@PACKAGE@-logo.png" "@PACKAGE@-logo.png" |
@@ -95,7 +96,7 @@ SubSection "@PACKAGE@" SecMain | @@ -95,7 +96,7 @@ SubSection "@PACKAGE@" SecMain | ||
95 | 96 | ||
96 | # Charset definition files | 97 | # Charset definition files |
97 | CreateDirectory "$INSTDIR\charsets" | 98 | CreateDirectory "$INSTDIR\charsets" |
98 | - file "/oname=$INSTDIR\charsets\bracket.xml" "bracket.xml" | 99 | + file "/oname=$INSTDIR\charsets\bracket.xml" "charsets\bracket.xml" |
99 | 100 | ||
100 | # Locale files | 101 | # Locale files |
101 | CreateDirectory "$INSTDIR\locale\pt_BR\LC_MESSAGES" | 102 | CreateDirectory "$INSTDIR\locale\pt_BR\LC_MESSAGES" |
@@ -134,18 +135,29 @@ SubSection "@PACKAGE@" SecMain | @@ -134,18 +135,29 @@ SubSection "@PACKAGE@" SecMain | ||
134 | 135 | ||
135 | SubSection "Plugins" SecPLugin | 136 | SubSection "Plugins" SecPLugin |
136 | 137 | ||
137 | - Section /o "HLLAPI" HLLAPIPlugin | 138 | + Section /o "Remote control" IPCPlugin |
138 | 139 | ||
139 | setOutPath $INSTDIR | 140 | setOutPath $INSTDIR |
140 | 141 | ||
141 | ${DisableX64FSRedirection} | 142 | ${DisableX64FSRedirection} |
142 | CreateDirectory "$INSTDIR\plugins" | 143 | CreateDirectory "$INSTDIR\plugins" |
143 | 144 | ||
144 | - file "/oname=$INSTDIR\plugins\ipc3270c.dll" "bin\ipc3270c.dll" | ||
145 | - file "/oname=$SYSDIR\libhllapi.dll" "bin\libhllapi.dll" | 145 | + file "/oname=$INSTDIR\plugins\ipc3270c.dll" "pw3270-plugins\ipcserver.dll" |
146 | 146 | ||
147 | sectionEnd | 147 | sectionEnd |
148 | 148 | ||
149 | + SubSectionEnd | ||
150 | + | ||
151 | + SubSection "Language bindins" Languages | ||
152 | + | ||
153 | + Section /o "HLLAPI" HLLAPIPlugin | ||
154 | + | ||
155 | + setOutPath $INSTDIR | ||
156 | + | ||
157 | + ${DisableX64FSRedirection} | ||
158 | + file "/oname=$SYSDIR\libhllapi.dll" "libhllapi.dll" | ||
159 | + | ||
160 | + sectionEnd | ||
149 | 161 | ||
150 | SubSectionEnd | 162 | SubSectionEnd |
151 | 163 | ||
@@ -175,7 +187,7 @@ SubSectionEnd | @@ -175,7 +187,7 @@ SubSectionEnd | ||
175 | Section /o "GTK+ Runtime" SecGTK | 187 | Section /o "GTK+ Runtime" SecGTK |
176 | 188 | ||
177 | setOutPath $INSTDIR | 189 | setOutPath $INSTDIR |
178 | - file /r "bin\runtime\*.*" | 190 | + file /r "runtime\*.*" |
179 | 191 | ||
180 | SectionEnd | 192 | SectionEnd |
181 | !endif | 193 | !endif |
@@ -221,7 +233,7 @@ SectionEnd | @@ -221,7 +233,7 @@ SectionEnd | ||
221 | 233 | ||
222 | Function .onInit | 234 | Function .onInit |
223 | 235 | ||
224 | - #---[ Verifica opção de instalação HLLAPI ]---------------------------------------------------------- | 236 | + #---[ Check HLLAPI Command line option ]------------------------------------------------------------- |
225 | 237 | ||
226 | Push $0 | 238 | Push $0 |
227 | 239 | ||
@@ -241,6 +253,10 @@ Function .onInit | @@ -241,6 +253,10 @@ Function .onInit | ||
241 | IntOp $0 $0 | ${SF_SELECTED} | 253 | IntOp $0 $0 | ${SF_SELECTED} |
242 | SectionSetFlags ${HLLAPIPlugin} $0 | 254 | SectionSetFlags ${HLLAPIPlugin} $0 |
243 | 255 | ||
256 | + SectionGetFlags ${IPCPlugin} $0 | ||
257 | + IntOp $0 $0 | ${SF_SELECTED} | ||
258 | + SectionSetFlags ${IPCPlugin} $0 | ||
259 | + | ||
244 | ${EndIf} | 260 | ${EndIf} |
245 | 261 | ||
246 | Pop $0 | 262 | Pop $0 |