Commit e34bad9fcebf1174f95cb3113b48170f3edd00e8

Authored by perry.werneck@gmail.com
1 parent 76f86f6b

Iniciando implementacao do instalador 64 bits

Makefile.in
... ... @@ -223,7 +223,7 @@ ifneq ($(MAKENSIS),no)
223 223 @echo " GEN GTK Runtime"
224 224 @./makegtkruntime.sh
225 225 @echo " GEN Windows installer"
226   - @"$(MAKENSIS)" pw3270.nsi
  226 + @"$(MAKENSIS)" pw3270-@host_cpu@.nsi
227 227 endif
228 228  
229 229 $(PACKAGE_NAME).po: $(TMPDIR)/$(PACKAGE_NAME).pot
... ...
configure.ac
... ... @@ -530,6 +530,8 @@ AC_CONFIG_FILES([
530 530 pw3270.pc
531 531 pw3270.spec
532 532 pw3270.nsi
  533 + pw3270-i686.nsi
  534 + pw3270-x86_64.nsi
533 535 src/include/rules.mak
534 536 src/include/plugin.mak
535 537 src/lib3270/Makefile
... ...
pw3270-i686.nsi.in 0 → 100644
... ... @@ -0,0 +1,285 @@
  1 +!include "MUI2.nsh"
  2 +
  3 +Name "@PACKAGE@"
  4 +Caption "@PACKAGE@ - 3270 Emulator for windows/gtk"
  5 +outfile "@PACKAGE@-@PACKAGE_VERSION@.@PACKAGE_LEVEL@-gtk-@GTK_MODVERSION@-@host_cpu@.exe"
  6 +XPStyle on
  7 +
  8 +# define the directory to install to
  9 +installDir $PROGRAMFILES\@PACKAGE@
  10 +
  11 +#define the installer icon
  12 +!define MUI_ICON "src\pw3270\@PACKAGE@.ico"
  13 +!define MUI_UNICON "src\pw3270\@PACKAGE@.ico"
  14 +icon "src\pw3270\@PACKAGE@.ico"
  15 +
  16 +# Get installation folder from registry if available
  17 +InstallDirRegKey HKLM "Software\@PACKAGE@" "InstallLocation"
  18 +
  19 +RequestExecutionLevel admin
  20 +
  21 +# Properties
  22 +VIProductVersion "@PACKAGE_VERSION@.@PACKAGE_LEVEL@.@PACKAGE_REVISION@"
  23 +VIAddVersionKey "ProductName" "@PACKAGE@"
  24 +VIAddVersionKey "FileDescription" "3270 Emulator for windows/gtk"
  25 +VIAddVersionKey "FileVersion" "@PACKAGE_REVISION@"
  26 +VIAddVersionKey "LegalCopyright" "GPL-2.0"
  27 +
  28 +# Interface
  29 +
  30 +!define MUI_ABORTWARNING
  31 +# !insertmacro MUI_PAGE_WELCOME
  32 +!insertmacro MUI_PAGE_LICENSE "LICENSE"
  33 +!insertmacro MUI_PAGE_COMPONENTS
  34 +!insertmacro MUI_PAGE_DIRECTORY
  35 +!insertmacro MUI_PAGE_INSTFILES
  36 +
  37 +# !insertmacro MUI_UNPAGE_WELCOME
  38 +!insertmacro MUI_UNPAGE_CONFIRM
  39 +!insertmacro MUI_UNPAGE_INSTFILES
  40 +# !insertmacro MUI_UNPAGE_FINISH
  41 +
  42 +# Languages
  43 +!insertmacro MUI_LANGUAGE "English"
  44 +
  45 +# Section scripts
  46 +!include Sections.nsh
  47 +
  48 +# default section
  49 +SubSection "@PACKAGE@" SecMain
  50 +
  51 + Section "Core" SecCore
  52 +
  53 + # define the output path for this file
  54 + setOutPath $INSTDIR
  55 + SetShellVarContext all
  56 +
  57 + createShortCut "$SMPROGRAMS\@PACKAGE@.lnk" "$INSTDIR\@PACKAGE@.exe"
  58 + createShortCut "$DESKTOP\@PACKAGE@.lnk" "$INSTDIR\@PACKAGE@.exe"
  59 +
  60 + # Binary files
  61 + file "/oname=$INSTDIR\@PACKAGE@.exe" ".bin\Release\@PACKAGE@.exe"
  62 + file "/oname=$INSTDIR\@PACKAGE@.ico" "src\pw3270\@PACKAGE@.ico"
  63 + file "/oname=$INSTDIR\lib3270.dll.@PACKAGE_VERSION@" ".bin\Release\lib3270.dll.@PACKAGE_VERSION@"
  64 + file "/oname=$INSTDIR\pw3270.dll.@PACKAGE_VERSION@" ".bin\Release\pw3270.dll.@PACKAGE_VERSION@"
  65 +
  66 + # Configuration files
  67 + file "/oname=$INSTDIR\@PACKAGE@-logo.png" "src\pw3270\@PACKAGE@-logo.png"
  68 + file "/oname=$INSTDIR\@PACKAGE@.png" "src\pw3270\@PACKAGE@.png"
  69 + file "/oname=$INSTDIR\colors.conf" "colors.conf"
  70 +
  71 + # Documentation files
  72 + file "/oname=$INSTDIR\ChangeLog" "ChangeLog"
  73 + file "/oname=$INSTDIR\AUTHORS" "AUTHORS"
  74 + file "/oname=$INSTDIR\LICENSE" "LICENSE"
  75 +
  76 + # Misc folders
  77 + CreateDirectory "$INSTDIR\certs"
  78 + CreateDirectory "$INSTDIR\plugins"
  79 +
  80 + # UI definition files
  81 + CreateDirectory "$INSTDIR\ui"
  82 +
  83 + file "/oname=$INSTDIR\ui\00default.xml" "ui\00default.xml"
  84 + file "/oname=$INSTDIR\ui\10keypad.xml" "ui\10keypad.xml"
  85 +
  86 + # Locale files
  87 + CreateDirectory "$INSTDIR\@localedir@\pt_BR\LC_MESSAGES"
  88 + file "/oname=$INSTDIR\@localedir@\pt_BR\LC_MESSAGES\@PACKAGE@.mo" ".bin\Release\@localedir@\pt_BR\LC_MESSAGES\@PACKAGE@.mo"
  89 +
  90 + # Save DataDir
  91 + WriteRegStr HKLM "Software\@PACKAGE@" \
  92 + "datadir" $INSTDIR
  93 +
  94 + # define uninstaller name
  95 + writeUninstaller $INSTDIR\uninstall.exe
  96 +
  97 + WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@PACKAGE@" \
  98 + "DisplayName" "@PACKAGE@ - 3270 emulator for windows/gtk"
  99 + WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@PACKAGE@" \
  100 + "DisplayIcon" "$INSTDIR\@PACKAGE@.ico"
  101 + WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@PACKAGE@" \
  102 + "DisplayVersion" "@PACKAGE_VERSION@ (Rev: @PACKAGE_REVISION@)"
  103 +
  104 + WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@PACKAGE@" \
  105 + "UninstallString" "$INSTDIR\uninstall.exe"
  106 + WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@PACKAGE@" \
  107 + "InstallLocation" "$INSTDIR"
  108 + WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@PACKAGE@" \
  109 + "NoModify" "1"
  110 + WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@PACKAGE@" \
  111 + "NoRepair" "1"
  112 +
  113 + # Save instalation dir
  114 + WriteRegStr HKCU "Software\@PACKAGE@" "" $INSTDIR
  115 +
  116 + sectionEnd
  117 +
  118 + SubSection "Plugins" SecPLugin
  119 +
  120 + Section /o "HLLAPI" HLLAPIPlugin
  121 + setOutPath $INSTDIR
  122 +
  123 + CreateDirectory "$INSTDIR\plugins"
  124 + file "/oname=$INSTDIR\plugins\hllapi.dll" ".bin\Release\plugins\hllapi.dll"
  125 + file "/oname=$SYSDIR\libhllapi.dll" ".bin\Release\libhllapi.dll"
  126 +
  127 + sectionEnd
  128 +
  129 +#
  130 +# Section /o "Rexx" RexxPlugin
  131 +# setOutPath $INSTDIR
  132 +#
  133 +# CreateDirectory "$INSTDIR"
  134 +# file src\plugins\rexx\rx3270.cls
  135 +#
  136 +# CreateDirectory "$INSTDIR\plugins"
  137 +# file "/oname=$INSTDIR\plugins\rx3270.dll" ".bin\Release\plugins\rx3270.dll"
  138 +# file "/oname=$INSTDIR\ui\rexx.xml" ui\rexx.xml
  139 +#
  140 +# sectionEnd
  141 +#
  142 + SubSectionEnd
  143 +
  144 +SubSectionEnd
  145 +
  146 +Section /o "GTK @GTK_MODVERSION@ Runtime" SecGTK
  147 +
  148 + setOutPath $INSTDIR
  149 + file /r ".bin\gtkruntime\*.*"
  150 +
  151 +SectionEnd
  152 +
  153 +Section /o "Software Development Kit" SecSDK
  154 +
  155 + CreateDirectory "$INSTDIR\sdk"
  156 + CreateDirectory "$INSTDIR\sdk\include"
  157 + CreateDirectory "$INSTDIR\sdk\include\lib3270"
  158 + CreateDirectory "$INSTDIR\sdk\include\pw3270"
  159 +
  160 + file "/oname=$INSTDIR\sdk\include\lib3270.h" "src\include\lib3270.h"
  161 + file "/oname=$INSTDIR\sdk\include\pw3270.h" "src\include\pw3270.h"
  162 + file "/oname=$INSTDIR\sdk\include\pw3270\v3270.h" "src\include\pw3270\v3270.h"
  163 + file "/oname=$INSTDIR\sdk\include\pw3270\hllapi.h" "src\include\pw3270\hllapi.h"
  164 +
  165 + file "/oname=$INSTDIR\sdk\include\lib3270\config.h" "src\include\lib3270\config.h"
  166 + file "/oname=$INSTDIR\sdk\include\lib3270\rules.mak" "src\include\rules.mak"
  167 +
  168 + file "/oname=$INSTDIR\sdk\sample\Makefile" "src\sample\Makefile"
  169 + file "/oname=$INSTDIR\sdk\sample\connect.c" "src\sample\connect.c"
  170 +
  171 + file "/oname=$INSTDIR\sdk\lib3270.def" ".bin\Release\lib3270.dll.@PACKAGE_VERSION@.def"
  172 + file "/oname=$INSTDIR\sdk\pw3270.def" ".bin\Release\pw3270.dll.@PACKAGE_VERSION@.def"
  173 + file "/oname=$INSTDIR\sdk\libhllapi.def" ".bin\Release\libhllapi.dll.def"
  174 +
  175 +SectionEnd
  176 +
  177 +# create a section to define what the uninstaller does.
  178 +# the section will always be named "Uninstall"
  179 +section "Uninstall"
  180 +
  181 + # Always delete uninstaller first
  182 + delete $INSTDIR\uninstaller.exe
  183 +
  184 + # Set SMPROGRAMS and DESKTOP path
  185 + SetShellVarContext all
  186 +
  187 + # now delete installed files
  188 + delete $INSTDIR\@PACKAGE@.exe
  189 +
  190 + delete $SMPROGRAMS\@PACKAGE@.lnk
  191 + delete $DESKTOP\@PACKAGE@.lnk
  192 +
  193 + RMDir /r "$INSTDIR\locale"
  194 + RMDir /r "$INSTDIR\share"
  195 + RMDir /r "$INSTDIR\etc"
  196 + RMDir /r "$INSTDIR\plugins"
  197 + RMDir /r "$INSTDIR\sdk"
  198 + RMDir /r "$INSTDIR\gtk2-runtime"
  199 +
  200 + # Delete all files
  201 + delete "$INSTDIR\*.dll"
  202 +
  203 + # Remove registry
  204 + DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@PACKAGE@"
  205 + DeleteRegKey HKLM "Software\@PACKAGE@"
  206 +
  207 + # Delete System libraries
  208 + delete $SYSDIR\libhllapi.dll
  209 +
  210 + # Delete extension libraries
  211 +# delete $PROGRAMFILES\ooRexx\rx3270.dll
  212 +
  213 + RMDir /r "$INSTDIR"
  214 +
  215 +sectionEnd
  216 +
  217 +Function .onInit
  218 +
  219 +FindProcDLL::FindProc "@PACKAGE@.exe"
  220 +IntCmp $R0 1 0 notRunning
  221 +
  222 + MessageBox MB_OK|MB_ICONEXCLAMATION "@PACKAGE@ is running. Please close it first" /SD IDOK
  223 + Abort
  224 +
  225 +notRunning:
  226 +
  227 +#IfFileExists $PROGRAMFILES\ooRexx\rexx.exe RexxOK RexxNOK
  228 +#
  229 +#RexxOK:
  230 +# SectionGetFlags "${RexxPlugin}" $0
  231 +# IntOp $0 $0 | ${SF_SELECTED}
  232 +# SectionSetFlags "${RexxPlugin}" $0
  233 +#
  234 +# SectionGetFlags "${SecRexxLib}" $0
  235 +# IntOp $0 $0 | ${SF_SELECTED}
  236 +# SectionSetFlags "${SecRexxLib}" $0
  237 +#
  238 +#goto PastRexxCheck
  239 +#
  240 +#RexxNOK:
  241 +# SectionGetFlags "${RexxPlugin}" $0
  242 +# IntOp $0 $0 | ${SF_RO}
  243 +# SectionSetFlags "${RexxPlugin}" $0
  244 +#
  245 +# SectionGetFlags "${SecRexxLib}" $0
  246 +# IntOp $0 $0 | ${SF_RO}
  247 +# SectionSetFlags "${SecRexxLib}" $0
  248 +#
  249 +#PastRexxCheck:
  250 +
  251 + ReadRegStr $4 HKLM "Software\GTK2-Runtime" "DllPath"
  252 +
  253 + # remove trailing back slash
  254 + Push $4
  255 + Exch $EXEDIR
  256 + Exch $EXEDIR
  257 + Pop $4
  258 +
  259 + # if Gtk runtime DLL path exists gtk runtime is already installed.
  260 + IfFileExists $4 gtkOK gtkNOK
  261 +
  262 +gtkOK:
  263 +
  264 + SectionGetFlags "${SecGTK}" $0
  265 + IntOp $0 $0 & ${SECTION_OFF}
  266 + SectionSetFlags "${SecGTK}" $0
  267 +
  268 +goto PastGTKCheck
  269 +
  270 +gtkNOK:
  271 +
  272 + SectionGetFlags "${SecGTK}" $0
  273 + IntOp $0 $0 | ${SF_SELECTED}
  274 + SectionSetFlags "${SecGTK}" $0
  275 +
  276 +goto PastGTKCheck
  277 +
  278 +
  279 +
  280 +PastGTKCheck:
  281 +
  282 +
  283 +FunctionEnd
  284 +
  285 +
... ...
pw3270-x86_64.nsi.in 0 → 100644
... ... @@ -0,0 +1,293 @@
  1 +!include "MUI2.nsh"
  2 +!include x64.nsh
  3 +
  4 +Name "@PACKAGE@"
  5 +Caption "@PACKAGE@ - 3270 Emulator for windows/gtk"
  6 +outfile "@PACKAGE@-@PACKAGE_VERSION@.@PACKAGE_LEVEL@-gtk-@GTK_MODVERSION@-@host_cpu@.exe"
  7 +XPStyle on
  8 +
  9 +installDir "$PROGRAMFILES64\pw3270"
  10 +
  11 +#define the installer icon
  12 +!define MUI_ICON "src\pw3270\@PACKAGE@.ico"
  13 +!define MUI_UNICON "src\pw3270\@PACKAGE@.ico"
  14 +icon "src\pw3270\@PACKAGE@.ico"
  15 +
  16 +# Get installation folder from registry if available
  17 +InstallDirRegKey HKLM "Software\@PACKAGE@" "InstallLocation"
  18 +
  19 +RequestExecutionLevel admin
  20 +
  21 +# Properties
  22 +VIProductVersion "@PACKAGE_VERSION@.@PACKAGE_LEVEL@.@PACKAGE_REVISION@"
  23 +VIAddVersionKey "ProductName" "@PACKAGE@"
  24 +VIAddVersionKey "FileDescription" "3270 Emulator for windows/gtk"
  25 +VIAddVersionKey "FileVersion" "@PACKAGE_REVISION@"
  26 +VIAddVersionKey "LegalCopyright" "GPL-2.0"
  27 +
  28 +# Interface
  29 +
  30 +!define MUI_ABORTWARNING
  31 +# !insertmacro MUI_PAGE_WELCOME
  32 +!insertmacro MUI_PAGE_LICENSE "LICENSE"
  33 +!insertmacro MUI_PAGE_COMPONENTS
  34 +!insertmacro MUI_PAGE_DIRECTORY
  35 +!insertmacro MUI_PAGE_INSTFILES
  36 +
  37 +# !insertmacro MUI_UNPAGE_WELCOME
  38 +!insertmacro MUI_UNPAGE_CONFIRM
  39 +!insertmacro MUI_UNPAGE_INSTFILES
  40 +# !insertmacro MUI_UNPAGE_FINISH
  41 +
  42 +# Languages
  43 +!insertmacro MUI_LANGUAGE "English"
  44 +
  45 +# Section scripts
  46 +!include Sections.nsh
  47 +
  48 +# default section
  49 +SubSection "@PACKAGE@" SecMain
  50 +
  51 + Section "Core" SecCore
  52 +
  53 + SetRegView 64
  54 +
  55 + # define the output path for this file
  56 + setOutPath $INSTDIR
  57 + SetShellVarContext all
  58 +
  59 + createShortCut "$SMPROGRAMS\@PACKAGE@.lnk" "$INSTDIR\@PACKAGE@.exe"
  60 + createShortCut "$DESKTOP\@PACKAGE@.lnk" "$INSTDIR\@PACKAGE@.exe"
  61 +
  62 + # Binary files
  63 + file "/oname=$INSTDIR\@PACKAGE@.exe" ".bin\Release\@PACKAGE@.exe"
  64 + file "/oname=$INSTDIR\@PACKAGE@.ico" "src\pw3270\@PACKAGE@.ico"
  65 + file "/oname=$INSTDIR\lib3270.dll.@PACKAGE_VERSION@" ".bin\Release\lib3270.dll.@PACKAGE_VERSION@"
  66 + file "/oname=$INSTDIR\pw3270.dll.@PACKAGE_VERSION@" ".bin\Release\pw3270.dll.@PACKAGE_VERSION@"
  67 +
  68 + # Configuration files
  69 + file "/oname=$INSTDIR\@PACKAGE@-logo.png" "src\pw3270\@PACKAGE@-logo.png"
  70 + file "/oname=$INSTDIR\@PACKAGE@.png" "src\pw3270\@PACKAGE@.png"
  71 + file "/oname=$INSTDIR\colors.conf" "colors.conf"
  72 +
  73 + # Documentation files
  74 + file "/oname=$INSTDIR\ChangeLog" "ChangeLog"
  75 + file "/oname=$INSTDIR\AUTHORS" "AUTHORS"
  76 + file "/oname=$INSTDIR\LICENSE" "LICENSE"
  77 +
  78 + # Misc folders
  79 + CreateDirectory "$INSTDIR\certs"
  80 + CreateDirectory "$INSTDIR\plugins"
  81 +
  82 + # UI definition files
  83 + CreateDirectory "$INSTDIR\ui"
  84 +
  85 + file "/oname=$INSTDIR\ui\00default.xml" "ui\00default.xml"
  86 + file "/oname=$INSTDIR\ui\10keypad.xml" "ui\10keypad.xml"
  87 +
  88 + # Locale files
  89 + CreateDirectory "$INSTDIR\@localedir@\pt_BR\LC_MESSAGES"
  90 + file "/oname=$INSTDIR\@localedir@\pt_BR\LC_MESSAGES\@PACKAGE@.mo" ".bin\Release\@localedir@\pt_BR\LC_MESSAGES\@PACKAGE@.mo"
  91 +
  92 + # Save DataDir
  93 + WriteRegStr HKLM "Software\@PACKAGE@" \
  94 + "datadir" $INSTDIR
  95 +
  96 + # define uninstaller name
  97 + writeUninstaller $INSTDIR\uninstall.exe
  98 +
  99 + WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@PACKAGE@" \
  100 + "DisplayName" "@PACKAGE@ - 3270 emulator for windows/gtk"
  101 + WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@PACKAGE@" \
  102 + "DisplayIcon" "$INSTDIR\@PACKAGE@.ico"
  103 + WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@PACKAGE@" \
  104 + "DisplayVersion" "@PACKAGE_VERSION@ (Rev: @PACKAGE_REVISION@)"
  105 +
  106 + WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@PACKAGE@" \
  107 + "UninstallString" "$INSTDIR\uninstall.exe"
  108 + WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@PACKAGE@" \
  109 + "InstallLocation" "$INSTDIR"
  110 + WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@PACKAGE@" \
  111 + "NoModify" "1"
  112 + WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@PACKAGE@" \
  113 + "NoRepair" "1"
  114 +
  115 + # Save instalation dir
  116 + WriteRegStr HKCU "Software\@PACKAGE@" "" $INSTDIR
  117 +
  118 + sectionEnd
  119 +
  120 + SubSection "Plugins" SecPLugin
  121 +
  122 + Section /o "HLLAPI" HLLAPIPlugin
  123 + setOutPath $INSTDIR
  124 +
  125 + CreateDirectory "$INSTDIR\plugins"
  126 + file "/oname=$INSTDIR\plugins\hllapi.dll" ".bin\Release\plugins\hllapi.dll"
  127 + file "/oname=$SYSDIR\libhllapi.dll" ".bin\Release\libhllapi.dll"
  128 +
  129 + sectionEnd
  130 +
  131 +#
  132 +# Section /o "Rexx" RexxPlugin
  133 +# setOutPath $INSTDIR
  134 +#
  135 +# CreateDirectory "$INSTDIR"
  136 +# file src\plugins\rexx\rx3270.cls
  137 +#
  138 +# CreateDirectory "$INSTDIR\plugins"
  139 +# file "/oname=$INSTDIR\plugins\rx3270.dll" ".bin\Release\plugins\rx3270.dll"
  140 +# file "/oname=$INSTDIR\ui\rexx.xml" ui\rexx.xml
  141 +#
  142 +# sectionEnd
  143 +#
  144 + SubSectionEnd
  145 +
  146 +SubSectionEnd
  147 +
  148 +Section /o "GTK @GTK_MODVERSION@ Runtime" SecGTK
  149 +
  150 + setOutPath $INSTDIR
  151 + file /r ".bin\gtkruntime\*.*"
  152 +
  153 +SectionEnd
  154 +
  155 +Section /o "Software Development Kit" SecSDK
  156 +
  157 + CreateDirectory "$INSTDIR\sdk"
  158 + CreateDirectory "$INSTDIR\sdk\include"
  159 + CreateDirectory "$INSTDIR\sdk\include\lib3270"
  160 + CreateDirectory "$INSTDIR\sdk\include\pw3270"
  161 +
  162 + file "/oname=$INSTDIR\sdk\include\lib3270.h" "src\include\lib3270.h"
  163 + file "/oname=$INSTDIR\sdk\include\pw3270.h" "src\include\pw3270.h"
  164 + file "/oname=$INSTDIR\sdk\include\pw3270\v3270.h" "src\include\pw3270\v3270.h"
  165 + file "/oname=$INSTDIR\sdk\include\pw3270\hllapi.h" "src\include\pw3270\hllapi.h"
  166 +
  167 + file "/oname=$INSTDIR\sdk\include\lib3270\config.h" "src\include\lib3270\config.h"
  168 + file "/oname=$INSTDIR\sdk\include\lib3270\rules.mak" "src\include\rules.mak"
  169 +
  170 + file "/oname=$INSTDIR\sdk\sample\Makefile" "src\sample\Makefile"
  171 + file "/oname=$INSTDIR\sdk\sample\connect.c" "src\sample\connect.c"
  172 +
  173 + file "/oname=$INSTDIR\sdk\lib3270.def" ".bin\Release\lib3270.dll.@PACKAGE_VERSION@.def"
  174 + file "/oname=$INSTDIR\sdk\pw3270.def" ".bin\Release\pw3270.dll.@PACKAGE_VERSION@.def"
  175 + file "/oname=$INSTDIR\sdk\libhllapi.def" ".bin\Release\libhllapi.dll.def"
  176 +
  177 +SectionEnd
  178 +
  179 +# create a section to define what the uninstaller does.
  180 +# the section will always be named "Uninstall"
  181 +section "Uninstall"
  182 +
  183 + # Always delete uninstaller first
  184 + delete $INSTDIR\uninstaller.exe
  185 +
  186 + # Set SMPROGRAMS and DESKTOP path
  187 + SetShellVarContext all
  188 +
  189 + # now delete installed files
  190 + delete $INSTDIR\@PACKAGE@.exe
  191 +
  192 + delete $SMPROGRAMS\@PACKAGE@.lnk
  193 + delete $DESKTOP\@PACKAGE@.lnk
  194 +
  195 + RMDir /r "$INSTDIR\locale"
  196 + RMDir /r "$INSTDIR\share"
  197 + RMDir /r "$INSTDIR\etc"
  198 + RMDir /r "$INSTDIR\plugins"
  199 + RMDir /r "$INSTDIR\sdk"
  200 +
  201 + # Delete all files
  202 + delete "$INSTDIR\*.dll"
  203 +
  204 + # Remove registry
  205 + DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@PACKAGE@"
  206 + DeleteRegKey HKLM "Software\@PACKAGE@"
  207 +
  208 + # Delete System libraries
  209 + delete $SYSDIR\libhllapi.dll
  210 +
  211 + # Delete extension libraries
  212 +# delete $PROGRAMFILES\ooRexx\rx3270.dll
  213 +
  214 + RMDir /r "$INSTDIR"
  215 +
  216 +sectionEnd
  217 +
  218 +Function .onInit
  219 +
  220 +; define the directory to install to
  221 +; http://bojan-komazec.blogspot.com.br/2011/10/nsis-installer-for-64-bit-windows.html
  222 +;${If} ! ${RunningX64}
  223 +; MessageBox MB_ERROR|MB_ICONEXCLAMATION "You can´t install a 64 bits application on a non 64 bits machine." /SD IDOK
  224 +; Abort
  225 +;${EndIf}
  226 +
  227 +;FindProcDLL::FindProc "@PACKAGE@.exe"
  228 +;IntCmp $R0 1 0 notRunning
  229 +;
  230 +; MessageBox MB_OK|MB_ICONEXCLAMATION "@PACKAGE@ is running. Please close it first" /SD IDOK
  231 +; Abort
  232 +;
  233 +;notRunning:
  234 +
  235 +#IfFileExists $PROGRAMFILES\ooRexx\rexx.exe RexxOK RexxNOK
  236 +#
  237 +#RexxOK:
  238 +# SectionGetFlags "${RexxPlugin}" $0
  239 +# IntOp $0 $0 | ${SF_SELECTED}
  240 +# SectionSetFlags "${RexxPlugin}" $0
  241 +#
  242 +# SectionGetFlags "${SecRexxLib}" $0
  243 +# IntOp $0 $0 | ${SF_SELECTED}
  244 +# SectionSetFlags "${SecRexxLib}" $0
  245 +#
  246 +#goto PastRexxCheck
  247 +#
  248 +#RexxNOK:
  249 +# SectionGetFlags "${RexxPlugin}" $0
  250 +# IntOp $0 $0 | ${SF_RO}
  251 +# SectionSetFlags "${RexxPlugin}" $0
  252 +#
  253 +# SectionGetFlags "${SecRexxLib}" $0
  254 +# IntOp $0 $0 | ${SF_RO}
  255 +# SectionSetFlags "${SecRexxLib}" $0
  256 +#
  257 +#PastRexxCheck:
  258 +
  259 + ReadRegStr $4 HKLM "Software\GTK2-Runtime" "DllPath"
  260 +
  261 + # remove trailing back slash
  262 + Push $4
  263 + Exch $EXEDIR
  264 + Exch $EXEDIR
  265 + Pop $4
  266 +
  267 + # if Gtk runtime DLL path exists gtk runtime is already installed.
  268 + IfFileExists $4 gtkOK gtkNOK
  269 +
  270 +gtkOK:
  271 +
  272 + SectionGetFlags "${SecGTK}" $0
  273 + IntOp $0 $0 & ${SECTION_OFF}
  274 + SectionSetFlags "${SecGTK}" $0
  275 +
  276 +goto PastGTKCheck
  277 +
  278 +gtkNOK:
  279 +
  280 + SectionGetFlags "${SecGTK}" $0
  281 + IntOp $0 $0 | ${SF_SELECTED}
  282 + SectionSetFlags "${SecGTK}" $0
  283 +
  284 +goto PastGTKCheck
  285 +
  286 +
  287 +
  288 +PastGTKCheck:
  289 +
  290 +
  291 +FunctionEnd
  292 +
  293 +
... ...
pw3270.cbp
... ... @@ -55,6 +55,8 @@
55 55 <Unit filename="debian.rules" />
56 56 <Unit filename="makegtkruntime.sh.in" />
57 57 <Unit filename="man/man1/pw3270.1" />
  58 + <Unit filename="pw3270-i686.nsi.in" />
  59 + <Unit filename="pw3270-x86_64.nsi.in" />
58 60 <Unit filename="pw3270.nsi.in" />
59 61 <Unit filename="pw3270.spec.in" />
60 62 <Unit filename="src/include/lib3270.h" />
... ...
pw3270.nsi.in
... ... @@ -86,8 +86,8 @@ SubSection &quot;@PACKAGE@&quot; SecMain
86 86 # Locale files
87 87 CreateDirectory "$INSTDIR\@localedir@\pt_BR\LC_MESSAGES"
88 88 file "/oname=$INSTDIR\@localedir@\pt_BR\LC_MESSAGES\@PACKAGE@.mo" ".bin\Release\@localedir@\pt_BR\LC_MESSAGES\@PACKAGE@.mo"
89   -
90   - # Save DataDir
  89 +
  90 + # Save DataDir
91 91 WriteRegStr HKLM "Software\@PACKAGE@" \
92 92 "datadir" $INSTDIR
93 93  
... ...