Commit 920eab3e3dec8d3de12ec116ef45770ad8bd4197

Authored by Perry Werneck
1 parent e73735bc

Updating windows package.

Showing 3 changed files with 89 additions and 11 deletions   Show diff stats
configure.ac
... ... @@ -81,6 +81,16 @@ dnl INSTALL_PACKAGES="windows-lib ${INSTALL_PACKAGES}"
81 81 AC_CONFIG_FILES(src/main/windows/resources.rc)
82 82 AC_CONFIG_FILES(schemas/windows/application.gschema.xml)
83 83  
  84 + if test "$host_cpu" = "x86_64"; then
  85 + app_cv_programfiles="PROGRAMFILES64"
  86 + app_cv_winarch="64"
  87 + app_cv_nsisredir="DisableX64FSRedirection"
  88 + else
  89 + app_cv_programfiles="PROGRAMFILES"
  90 + app_cv_winarch="32"
  91 + app_cv_nsisredir="EnableX64FSRedirection"
  92 + fi
  93 +
84 94 ;;
85 95  
86 96 *)
... ...
win/pack.sh
... ... @@ -443,6 +443,15 @@ buildApplication()
443 443 failed "Can't install ${1}"
444 444 fi
445 445  
  446 + if [ -x ${PROJECTDIR}/win/install.${1} ]; then
  447 + pushd "${WORKDIR}/build/${ARCH}"
  448 + echo "Executando install.${1} em ${PWD}"
  449 + ${PROJECTDIR}/win/install.${1}
  450 + if [ "$?" != "0" ]; then
  451 + failed "Can't install ${1}"
  452 + fi
  453 + popd
  454 + fi
446 455  
447 456 for NSI in $(find ./win -name '*.nsi')
448 457 do
... ... @@ -552,6 +561,15 @@ makeInstaller()
552 561  
553 562 fi
554 563  
  564 + if [ -d ${PROJECTDIR}/ui ]; then
  565 + mkdir -p ${WORKDIR}/build/${ARCH}/${PRODUCT_NAME}/ui
  566 + cp -rv ${PROJECTDIR}/ui/* ${WORKDIR}/build/${ARCH}/${PRODUCT_NAME}/ui
  567 +
  568 + if [ "$?" != "0" ]; then
  569 + failed "Can't copy UI files"
  570 + fi
  571 + fi
  572 +
555 573 cd ${WORKDIR}/build/${ARCH}
556 574  
557 575 TARCH=${ARCH}
... ...
win/pw3270.nsi.in
  1 +#
  2 +# "Software pw3270, desenvolvido com base nos códigos fontes do WC3270 e X3270
  3 +# (Paul Mattes Paul.Mattes@usa.net), de emulação de terminal 3270 para acesso a
  4 +# aplicativos mainframe. Registro no INPI sob o nome G3270.
  5 +#
  6 +# Copyright (C) <2008> <Banco do Brasil S.A.>
  7 +#
  8 +# Este programa é software livre. Você pode redistribuí-lo e/ou modificá-lo sob
  9 +# os termos da GPL v.2 - Licença Pública Geral GNU, conforme publicado pela
  10 +# Free Software Foundation.
  11 +#
  12 +# Este programa é distribuído na expectativa de ser útil, mas SEM QUALQUER
  13 +# GARANTIA; sem mesmo a garantia implícita de COMERCIALIZAÇÃO ou de ADEQUAÇÃO
  14 +# A QUALQUER PROPÓSITO EM PARTICULAR. Consulte a Licença Pública Geral GNU para
  15 +# obter mais detalhes.
  16 +#
  17 +# Você deve ter recebido uma cópia da Licença Pública Geral GNU junto com este
  18 +# programa; se não, escreva para a Free Software Foundation, Inc., 59 Temple
  19 +# Place, Suite 330, Boston, MA, 02111-1307, USA
  20 +#
  21 +# Contatos:
  22 +#
  23 +# perry.werneck@gmail.com (Alexandre Perry de Souza Werneck)
  24 +# erico.mendonca@gmail.com (Erico Mascarenhas de Mendonça)
  25 +#
  26 +
1 27 !include "MUI2.nsh"
2 28 !include "x64.nsh"
3 29 !include "FileFunc.nsh"
4 30 !include "LogicLib.nsh"
  31 +!include "winmessages.nsh"
5 32  
6 33 Name "@PRODUCT_NAME@"
7 34 Caption "@PRODUCT_NAME@ - @PACKAGE_DESCRIPTION@"
... ... @@ -79,7 +106,6 @@ SubSection &quot;@PRODUCT_NAME@&quot; SecMain
79 106 file "/oname=$INSTDIR\lib@LIBRARY_NAME@.dll" "lib@LIBRARY_NAME@.dll"
80 107 file "/oname=$INSTDIR\libv3270.dll" "libv3270.dll"
81 108 file "/oname=$INSTDIR\@PACKAGE@.dll" "@PACKAGE@.dll"
82   - file "/oname=$SYSDIR\libipc3270.dll" "libipc3270.dll"
83 109  
84 110 # Configuration files
85 111 file "/oname=$INSTDIR\@PRODUCT_NAME@-logo.png" "@PRODUCT_NAME@\@PRODUCT_NAME@-logo.png"
... ... @@ -104,7 +130,10 @@ SubSection &quot;@PRODUCT_NAME@&quot; SecMain
104 130  
105 131 # Locale files
106 132 CreateDirectory "$INSTDIR\locale\pt_BR\LC_MESSAGES"
107   - file "/oname=$INSTDIR\locale\pt_BR\LC_MESSAGES\@PACKAGE@.mo" "locale\pt_BR\LC_MESSAGES\@PACKAGE@.mo"
  133 + file "/oname=$INSTDIR\locale\pt_BR\LC_MESSAGES\@PACKAGE@.mo" "locale\pt_BR\LC_MESSAGES\@PACKAGE@.mo"
  134 + file "/oname=$INSTDIR\locale\pt_BR\LC_MESSAGES\lib@LIBRARY_NAME@.mo" "locale\pt_BR\LC_MESSAGES\lib@LIBRARY_NAME@.mo"
  135 + file "/oname=$INSTDIR\locale\pt_BR\LC_MESSAGES\libv3270.mo" "locale\pt_BR\LC_MESSAGES\libv3270.mo"
  136 + file "/oname=$INSTDIR\locale\pt_BR\LC_MESSAGES\libipc3270.mo" "locale\pt_BR\LC_MESSAGES\libipc3270.mo"
108 137  
109 138 # define uninstaller name
110 139 SetRegView 32
... ... @@ -127,12 +156,15 @@ SubSection &quot;@PRODUCT_NAME@&quot; SecMain
127 156 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@PRODUCT_NAME@" \
128 157 "NoRepair" "1"
129 158  
130   - # Customized options
  159 + # Default settings
131 160 SetRegView @WINARCH@
132 161  
133 162 # Required for IPC Library.
134 163 WriteRegStr HKLM "Software\@PRODUCT_NAME@" "InstallLocation" "$INSTDIR"
135 164  
  165 + # Customized options
  166 +
  167 +
136 168 sectionEnd
137 169  
138 170 !ifdef WITHCERTS
... ... @@ -149,10 +181,13 @@ SubSection &quot;@PRODUCT_NAME@&quot; SecMain
149 181 setOutPath $INSTDIR
150 182  
151 183 ${DisableX64FSRedirection}
152   - CreateDirectory "$INSTDIR\plugins"
153 184  
  185 + CreateDirectory "$INSTDIR\plugins"
154 186 file "/oname=$INSTDIR\plugins\ipcserver.dll" "@PRODUCT_NAME@-plugins\ipcserver.dll"
155 187  
  188 + ${@NSISREDIR@}
  189 + file "/oname=$SYSDIR\libipc3270.dll" "libipc3270.dll"
  190 +
156 191 sectionEnd
157 192  
158 193 SubSectionEnd
... ... @@ -163,7 +198,9 @@ SubSection &quot;@PRODUCT_NAME@&quot; SecMain
163 198 !ifdef WITHLIBHLLAPI
164 199 Section /o "HLLAPI" HLLAPIBinding
165 200  
166   - ${DisableX64FSRedirection}
  201 + ${@NSISREDIR@}
  202 +
  203 + # Install HLLAPI connector
167 204 file "/oname=$SYSDIR\hllapi.dll" "libhllapi.dll"
168 205  
169 206 # Install with "lib" prefix for compatibility.
... ... @@ -175,11 +212,13 @@ SubSection &quot;@PRODUCT_NAME@&quot; SecMain
175 212 !ifdef WITHMONO-TN3270
176 213 Section /o ".NET" DOTNET
177 214  
178   - ${DisableX64FSRedirection}
179 215 CreateDirectory "$INSTDIR\dotnet"
180 216  
  217 + ${DisableX64FSRedirection}
181 218 file "/oname=$INSTDIR\dotnet\tn3270.dll" "mono/lib/tn3270-5.2/tn3270.dll"
182 219 file "/oname=$INSTDIR\dotnet\tn3270.xml" "mono/gapi-2.0/tn3270/tn3270.xml"
  220 +
  221 + ${@NSISREDIR@}
183 222 file "/oname=$SYSDIR\mono-tn3270.dll" "mono-tn3270.dll"
184 223  
185 224 SectionEnd
... ... @@ -218,11 +257,13 @@ SubSection &quot;@PRODUCT_NAME@&quot; SecMain
218 257 CreateDirectory "$INSTDIR\sdk\def"
219 258 CreateDirectory "$INSTDIR\sdk\lib"
220 259  
221   - file "/oname=$INSTDIR\sdk\def\lib@LIBRARY_NAME@.def" "@PRODUCT_NAME@\def\lib@LIBRARY_NAME@.def"
  260 + file "/oname=$INSTDIR\sdk\def\lib@LIBRARY_NAME@.def" "@PRODUCT_NAME@\def\lib@LIBRARY_NAME@.def"
222 261 file "/oname=$INSTDIR\sdk\lib\lib3270.dll.a" "lib@LIBRARY_NAME@.dll.a"
223 262 file "/oname=$INSTDIR\sdk\lib\lib3270.delayed.a" "lib@LIBRARY_NAME@.delayed.a"
224 263 file "/oname=$INSTDIR\sdk\lib\lib3270.static.a" "lib@LIBRARY_NAME@.static.a"
225 264  
  265 + file "/oname=$INSTDIR\sdk\lib3270.mak" "@PRODUCT_NAME@\def\lib3270.mak"
  266 +
226 267 file "/oname=$INSTDIR\sdk\def\libv3270.def" "@PRODUCT_NAME@\def\libv3270.def"
227 268 file "/oname=$INSTDIR\sdk\lib\libv3270.dll.a" "libv3270.dll.a"
228 269  
... ... @@ -233,6 +274,10 @@ SubSection &quot;@PRODUCT_NAME@&quot; SecMain
233 274 file "/oname=$INSTDIR\sdk\def\libhllapi.def" "@PRODUCT_NAME@\def\libhllapi.def"
234 275 file "/oname=$INSTDIR\sdk\lib\libhllapi.dll.a" "libhllapi.dll.a"
235 276  
  277 + SetRegView @WINARCH@
  278 + WriteRegExpandStr HKLM "SYSTEM\CurrentControlSet\Control\Session Manager\Environment" "PW3270_SDK_PATH" "$INSTDIR\sdk"
  279 + SendMessage ${HWND_BROADCAST} ${WM_WININICHANGE} 0 "STR:Environment" /TIMEOUT=5000
  280 +
236 281 SectionEnd
237 282 !endif
238 283  
... ... @@ -268,6 +313,7 @@ Section &quot;Uninstall&quot;
268 313 RMDir /r "$INSTDIR\sdk"
269 314 RMDir /r "$INSTDIR\gtk2-runtime"
270 315  
  316 +
271 317 # Delete all files
272 318 delete "$INSTDIR\*.dll"
273 319  
... ... @@ -278,16 +324,20 @@ Section &quot;Uninstall&quot;
278 324  
279 325 SetRegView @WINARCH@
280 326 DeleteRegKey HKLM "Software\@PRODUCT_NAME@"
  327 + DeleteRegValue HKLM "SYSTEM\CurrentControlSet\Control\Session Manager\Environment" "PW3270_SDK_PATH"
  328 + SendMessage ${HWND_BROADCAST} ${WM_WININICHANGE} 0 "STR:Environment" /TIMEOUT=5000
281 329  
282 330 # Delete System libraries
  331 + ${@NSISREDIR@}
  332 +
283 333 delete $SYSDIR\libipc3270.dll
284 334  
285   -!ifdef WITHHLLAPI
  335 +!ifdef WITHLIBHLLAPI
286 336 delete $SYSDIR\libhllapi.dll
287 337 delete $SYSDIR\hllapi.dll
288 338 !endif
289 339  
290   -!ifdef WITHMONO
  340 +!ifdef WITHMONO-TN3270
291 341 delete $SYSDIR\mono-tn3270.dll
292 342 !endif
293 343  
... ... @@ -299,7 +349,7 @@ Function .onInit
299 349  
300 350 #---[ Check DOTNET Command line option ]0-------------------------------------------------------------
301 351  
302   -!ifdef WITHMONO
  352 +!ifdef WITHMONO-TN3270
303 353 Push $0
304 354  
305 355 ${GetParameters} $R0
... ... @@ -329,7 +379,7 @@ Function .onInit
329 379  
330 380 #---[ Check HLLAPI Command line option ]-------------------------------------------------------------
331 381  
332   -!ifdef WITHHLLAPI
  382 +!ifdef WITHLIBHLLAPI
333 383  
334 384 Push $0
335 385  
... ...