From 7c7d11ea77c9cd317957a14307ff99ea05f436e8 Mon Sep 17 00:00:00 2001 From: perry.werneck@gmail.com Date: Fri, 28 Aug 2015 13:20:12 +0000 Subject: [PATCH] Melhorando empacotamento windows --- Makefile.in | 5 ++++- pw3270-i686-no-gtk.nsi.in | 247 ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- pw3270-i686.nsi.in | 280 ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- pw3270-x86_64-no-gtk.nsi.in | 257 ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- pw3270-x86_64.nsi.in | 290 -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 5 files changed, 4 insertions(+), 1075 deletions(-) delete mode 100644 pw3270-i686-no-gtk.nsi.in delete mode 100644 pw3270-i686.nsi.in delete mode 100644 pw3270-x86_64-no-gtk.nsi.in delete mode 100644 pw3270-x86_64.nsi.in diff --git a/Makefile.in b/Makefile.in index b2af6a0..b03fcf9 100644 --- a/Makefile.in +++ b/Makefile.in @@ -231,12 +231,15 @@ endif package: Release ifneq ($(MAKENSIS),no) + @make -C nsi $(PACKAGE_NAME)-@host_cpu@.nsi @chmod +x makegtkruntime.sh @echo " GEN GTK Runtime" @./makegtkruntime.sh @echo " GEN Windows installer" @cp -rv $(BINDIR)/Release/$(localedir) $(BINDIR)/Release - @"$(MAKENSIS)" pw3270-@host_cpu@.nsi + @cat nsi/$(PACKAGE_NAME)-@host_cpu@.nsi | "$(MAKENSIS)" \ + -DLOCALEDIR="$(BINDIR)/Release$(localedir)" \ + -Onsis.log - endif ifneq ($(DPKGBUILD),no) diff --git a/pw3270-i686-no-gtk.nsi.in b/pw3270-i686-no-gtk.nsi.in deleted file mode 100644 index 0130daa..0000000 --- a/pw3270-i686-no-gtk.nsi.in +++ /dev/null @@ -1,247 +0,0 @@ -!include "MUI2.nsh" - -Name "@PACKAGE@" -Caption "@PACKAGE@ - 3270 Emulator for windows/gtk" -outfile "@PACKAGE@-@PACKAGE_VERSION@.@PACKAGE_LEVEL@-requires-gtk-@GTK_MODVERSION@-@host_cpu@.exe" -XPStyle on - -# define the directory to install to -installDir $PROGRAMFILES\@PACKAGE@ - -#define the installer icon -!define MUI_ICON "src\pw3270\@PACKAGE@.ico" -!define MUI_UNICON "src\pw3270\@PACKAGE@.ico" -icon "src\pw3270\@PACKAGE@.ico" - -# Get installation folder from registry if available -InstallDirRegKey HKLM "Software\@PACKAGE@" "InstallLocation" - -RequestExecutionLevel admin - -# Properties -VIProductVersion "@PACKAGE_VERSION@.@PACKAGE_LEVEL@.@PACKAGE_REVISION@" -VIAddVersionKey "ProductName" "@PACKAGE@" -VIAddVersionKey "FileDescription" "3270 Emulator for windows/gtk" -VIAddVersionKey "FileVersion" "@PACKAGE_REVISION@" -VIAddVersionKey "LegalCopyright" "GPL-2.0" - -# Interface - -!define MUI_ABORTWARNING -# !insertmacro MUI_PAGE_WELCOME -!insertmacro MUI_PAGE_LICENSE "LICENSE" -!insertmacro MUI_PAGE_COMPONENTS -!insertmacro MUI_PAGE_DIRECTORY -!insertmacro MUI_PAGE_INSTFILES - -# !insertmacro MUI_UNPAGE_WELCOME -!insertmacro MUI_UNPAGE_CONFIRM -!insertmacro MUI_UNPAGE_INSTFILES -# !insertmacro MUI_UNPAGE_FINISH - -# Languages -!insertmacro MUI_LANGUAGE "English" - -# Section scripts -!include Sections.nsh - -# default section -SubSection "@PACKAGE@" SecMain - - Section "Core" SecCore - - # define the output path for this file - setOutPath $INSTDIR - SetShellVarContext all - - createShortCut "$SMPROGRAMS\@PACKAGE@.lnk" "$INSTDIR\@PACKAGE@.exe" - createShortCut "$DESKTOP\@PACKAGE@.lnk" "$INSTDIR\@PACKAGE@.exe" - - # Binary files - file "/oname=$INSTDIR\@PACKAGE@.exe" ".bin\Release\@PACKAGE@.exe" - file "/oname=$INSTDIR\@PACKAGE@.ico" "src\pw3270\@PACKAGE@.ico" - file "/oname=$INSTDIR\lib3270.dll.@PACKAGE_VERSION@" ".bin\Release\lib3270.dll.@PACKAGE_VERSION@" - file "/oname=$INSTDIR\pw3270.dll.@PACKAGE_VERSION@" ".bin\Release\pw3270.dll.@PACKAGE_VERSION@" - - # Configuration files - file "/oname=$INSTDIR\@PACKAGE@-logo.png" "src\pw3270\@PACKAGE@-logo.png" - file "/oname=$INSTDIR\@PACKAGE@.png" "src\pw3270\@PACKAGE@.png" - file "/oname=$INSTDIR\colors.conf" "colors.conf" - - # Documentation files - file "/oname=$INSTDIR\ChangeLog" "ChangeLog" - file "/oname=$INSTDIR\AUTHORS" "AUTHORS" - file "/oname=$INSTDIR\LICENSE" "LICENSE" - - # Misc folders - CreateDirectory "$INSTDIR\certs" - CreateDirectory "$INSTDIR\plugins" - - # UI definition files - CreateDirectory "$INSTDIR\ui" - - file "/oname=$INSTDIR\ui\00default.xml" "ui\00default.xml" - file "/oname=$INSTDIR\ui\10keypad.xml" "ui\10keypad.xml" - - # Locale files - CreateDirectory "$INSTDIR\@localedir@\pt_BR\LC_MESSAGES" - file "/oname=$INSTDIR\@localedir@\pt_BR\LC_MESSAGES\@PACKAGE@.mo" ".bin\Release\@localedir@\pt_BR\LC_MESSAGES\@PACKAGE@.mo" - - # Save DataDir - WriteRegStr HKLM "Software\@PACKAGE@" "datadir" "$INSTDIR" - WriteRegStr HKLM "Software\@PACKAGE@" "appName" "$INSTDIR\@PACKAGE@.exe" - - # define uninstaller name - writeUninstaller $INSTDIR\uninstall.exe - - WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@PACKAGE@" \ - "DisplayName" "@PACKAGE@ - 3270 emulator for windows/gtk" - WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@PACKAGE@" \ - "DisplayIcon" "$INSTDIR\@PACKAGE@.ico" - WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@PACKAGE@" \ - "DisplayVersion" "@PACKAGE_VERSION@ (Rev: @PACKAGE_REVISION@)" - - WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@PACKAGE@" \ - "UninstallString" "$INSTDIR\uninstall.exe" - WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@PACKAGE@" \ - "InstallLocation" "$INSTDIR" - WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@PACKAGE@" \ - "NoModify" "1" - WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@PACKAGE@" \ - "NoRepair" "1" - - # Save instalation dir - WriteRegStr HKCU "Software\@PACKAGE@" "" $INSTDIR - - sectionEnd - - SubSection "Plugins" SecPLugin - - Section /o "HLLAPI" HLLAPIPlugin - setOutPath $INSTDIR - - CreateDirectory "$INSTDIR\plugins" - file "/oname=$INSTDIR\plugins\hllapi.dll" ".bin\Release\plugins\hllapi.dll" - file "/oname=$SYSDIR\libhllapi.dll" ".bin\Release\hllapi.dll.@PACKAGE_VERSION@" - - sectionEnd - - Section /o "Rexx" RexxPlugin - - setOutPath $INSTDIR - - file "/oname=$INSTDIR\plugins\rxplug.dll" ".bin\Release\plugins\rx3270.dll" - file "/oname=$INSTDIR\ui\80rexx.xml" "ui\80rexx.xml" - - file "/oname=$PROGRAMFILES\ooRexx\rx3270.cls" "src\plugins\rx3270\rx3270.cls" - file "/oname=$INSTDIR\rx3270.dll.@PACKAGE_VERSION@" ".bin\Release\rx3270.dll.@PACKAGE_VERSION@" - file "/oname=$PROGRAMFILES\ooRexx\rx3270.dll" ".bin\Release\rx3270.dll.@PACKAGE_VERSION@" - - sectionEnd - - SubSectionEnd - - SubSection "Menus, Keypads & Toolbars" SecMenu - - Section /o "View trace Menu" TraceMenu - file "/oname=$INSTDIR\ui\98trace.xml" "ui\98trace.xml" - sectionEnd - - Section /o "Application debug" DBGMenu - file "/oname=$INSTDIR\ui\99debug.xml" "ui\99debug.xml" - sectionEnd - - SubSectionEnd - -SubSectionEnd - -Section /o "Software Development Kit" SecSDK - - CreateDirectory "$INSTDIR\sdk" - CreateDirectory "$INSTDIR\sdk\include" - CreateDirectory "$INSTDIR\sdk\include\lib3270" - CreateDirectory "$INSTDIR\sdk\include\pw3270" - CreateDirectory "$INSTDIR\sdk\sample" - CreateDirectory "$INSTDIR\sdk\sample\classlib" - - setOutPath $INSTDIR\sdk\include - file "src\include\lib3270.h" - file "src\include\pw3270.h" - - setOutPath $INSTDIR\sdk\include\pw3270 - file "src\include\pw3270\class.h" - file "src\include\pw3270\hllapi.h" - file "src\include\pw3270\ipcpackets.h" - file "src\include\pw3270\plugin.h" - file "src\include\pw3270\trace.h" - file "src\include\pw3270\v3270.h" - - setOutPath $INSTDIR\sdk\include\lib3270 - file "src\include\lib3270\config.h" - file "src\include\rules.mak" - - setOutPath $INSTDIR\sdk\sample\connect - file "src\sample\Makefile" - file "src\sample\connect.c" - - setOutPath $INSTDIR\sdk\sample\classlib - file "src\classlib\*.cc" - file "src\include\pw3270\class.h" - -SectionEnd - -# create a section to define what the uninstaller does. -# the section will always be named "Uninstall" -section "Uninstall" - - # Always delete uninstaller first - delete $INSTDIR\uninstaller.exe - - # Set SMPROGRAMS and DESKTOP path - SetShellVarContext all - - # now delete installed files - delete $INSTDIR\@PACKAGE@.exe - - delete $SMPROGRAMS\@PACKAGE@.lnk - delete $DESKTOP\@PACKAGE@.lnk - - RMDir /r "$INSTDIR\locale" - RMDir /r "$INSTDIR\share" - RMDir /r "$INSTDIR\etc" - RMDir /r "$INSTDIR\plugins" - RMDir /r "$INSTDIR\sdk" - RMDir /r "$INSTDIR\gtk2-runtime" - - # Delete all files - delete "$INSTDIR\*.dll" - - # Remove registry - DeleteRegKey HKLM "Software\@PACKAGE@" - DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@PACKAGE@" - DeleteRegKey HKLM "Software\@PACKAGE@" - - # Delete System libraries - delete $SYSDIR\libhllapi.dll - - # Delete extension libraries - delete "$PROGRAMFILES\ooRexx\rx3270.cls" - delete "$PROGRAMFILES\ooRexx\rx3270.dll" - - RMDir /r "$INSTDIR" - -sectionEnd - -Function .onInit - -${if} ${FileExists} `$PROGRAMFILES\ooRexx\rexx.exe` - - SectionGetFlags "${RexxPlugin}" $0 - IntOp $0 $0 | ${SF_SELECTED} - SectionSetFlags "${RexxPlugin}" $0 - -${EndIf} - -FunctionEnd - - diff --git a/pw3270-i686.nsi.in b/pw3270-i686.nsi.in deleted file mode 100644 index b5eda20..0000000 --- a/pw3270-i686.nsi.in +++ /dev/null @@ -1,280 +0,0 @@ -!include "MUI2.nsh" - -Name "@PACKAGE@" -Caption "@PACKAGE@ - 3270 Emulator for windows/gtk" -outfile "@PACKAGE@-@PACKAGE_VERSION@.@PACKAGE_LEVEL@-gtk-@GTK_MODVERSION@-@host_cpu@.exe" -XPStyle on - -# define the directory to install to -installDir $PROGRAMFILES\@PACKAGE@ - -#define the installer icon -!define MUI_ICON "src\pw3270\@PACKAGE@.ico" -!define MUI_UNICON "src\pw3270\@PACKAGE@.ico" -icon "src\pw3270\@PACKAGE@.ico" - -# Get installation folder from registry if available -InstallDirRegKey HKLM "Software\@PACKAGE@" "InstallLocation" - -RequestExecutionLevel admin - -# Properties -VIProductVersion "@PACKAGE_VERSION@.@PACKAGE_LEVEL@.@PACKAGE_REVISION@" -VIAddVersionKey "ProductName" "@PACKAGE@" -VIAddVersionKey "FileDescription" "3270 Emulator for windows/gtk" -VIAddVersionKey "FileVersion" "@PACKAGE_REVISION@" -VIAddVersionKey "LegalCopyright" "GPL-2.0" - -# Interface - -!define MUI_ABORTWARNING -# !insertmacro MUI_PAGE_WELCOME -!insertmacro MUI_PAGE_LICENSE "LICENSE" -!insertmacro MUI_PAGE_COMPONENTS -!insertmacro MUI_PAGE_DIRECTORY -!insertmacro MUI_PAGE_INSTFILES - -# !insertmacro MUI_UNPAGE_WELCOME -!insertmacro MUI_UNPAGE_CONFIRM -!insertmacro MUI_UNPAGE_INSTFILES -# !insertmacro MUI_UNPAGE_FINISH - -# Languages -!insertmacro MUI_LANGUAGE "English" - -# Section scripts -!include Sections.nsh - -# default section -SubSection "@PACKAGE@" SecMain - - Section "Core" SecCore - - # define the output path for this file - setOutPath $INSTDIR - SetShellVarContext all - - createShortCut "$SMPROGRAMS\@PACKAGE@.lnk" "$INSTDIR\@PACKAGE@.exe" - createShortCut "$DESKTOP\@PACKAGE@.lnk" "$INSTDIR\@PACKAGE@.exe" - - # Binary files - file "/oname=$INSTDIR\@PACKAGE@.exe" ".bin\Release\@PACKAGE@.exe" - file "/oname=$INSTDIR\@PACKAGE@.ico" "src\pw3270\@PACKAGE@.ico" - file "/oname=$INSTDIR\lib3270.dll.@PACKAGE_VERSION@" ".bin\Release\lib3270.dll.@PACKAGE_VERSION@" - file "/oname=$INSTDIR\pw3270.dll.@PACKAGE_VERSION@" ".bin\Release\pw3270.dll.@PACKAGE_VERSION@" - - # Configuration files - file "/oname=$INSTDIR\@PACKAGE@-logo.png" "src\pw3270\@PACKAGE@-logo.png" - file "/oname=$INSTDIR\@PACKAGE@.png" "src\pw3270\@PACKAGE@.png" - file "/oname=$INSTDIR\colors.conf" "colors.conf" - - # Documentation files - file "/oname=$INSTDIR\ChangeLog" "ChangeLog" - file "/oname=$INSTDIR\AUTHORS" "AUTHORS" - file "/oname=$INSTDIR\LICENSE" "LICENSE" - - # Misc folders - CreateDirectory "$INSTDIR\certs" - CreateDirectory "$INSTDIR\plugins" - - # UI definition files - CreateDirectory "$INSTDIR\ui" - - file "/oname=$INSTDIR\ui\00default.xml" "ui\00default.xml" - file "/oname=$INSTDIR\ui\10keypad.xml" "ui\10keypad.xml" - - # Locale files - CreateDirectory "$INSTDIR\@localedir@\pt_BR\LC_MESSAGES" - file "/oname=$INSTDIR\@localedir@\pt_BR\LC_MESSAGES\@PACKAGE@.mo" ".bin\Release\@localedir@\pt_BR\LC_MESSAGES\@PACKAGE@.mo" - - # Save DataDir - WriteRegStr HKLM "Software\@PACKAGE@" "datadir" "$INSTDIR" - WriteRegStr HKLM "Software\@PACKAGE@" "appName" "$INSTDIR\@PACKAGE@.exe" - - # define uninstaller name - writeUninstaller $INSTDIR\uninstall.exe - - WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@PACKAGE@" \ - "DisplayName" "@PACKAGE@ - 3270 emulator for windows/gtk" - WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@PACKAGE@" \ - "DisplayIcon" "$INSTDIR\@PACKAGE@.ico" - WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@PACKAGE@" \ - "DisplayVersion" "@PACKAGE_VERSION@ (Rev: @PACKAGE_REVISION@)" - - WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@PACKAGE@" \ - "UninstallString" "$INSTDIR\uninstall.exe" - WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@PACKAGE@" \ - "InstallLocation" "$INSTDIR" - WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@PACKAGE@" \ - "NoModify" "1" - WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@PACKAGE@" \ - "NoRepair" "1" - - # Save instalation dir - WriteRegStr HKCU "Software\@PACKAGE@" "" $INSTDIR - - sectionEnd - - SubSection "Plugins" SecPLugin - - Section /o "HLLAPI" HLLAPIPlugin - setOutPath $INSTDIR - - CreateDirectory "$INSTDIR\plugins" - file "/oname=$INSTDIR\plugins\hllapi.dll" ".bin\Release\plugins\hllapi.dll" - file "/oname=$SYSDIR\libhllapi.dll" ".bin\Release\hllapi.dll.@PACKAGE_VERSION@" - - sectionEnd - - Section /o "Rexx" RexxPlugin - - setOutPath $INSTDIR - - file "/oname=$INSTDIR\plugins\rxplug.dll" ".bin\Release\plugins\rx3270.dll" - file "/oname=$INSTDIR\ui\80rexx.xml" "ui\80rexx.xml" - - file "/oname=$PROGRAMFILES\ooRexx\rx3270.cls" "src\plugins\rx3270\rx3270.cls" - file "/oname=$INSTDIR\rx3270.dll.@PACKAGE_VERSION@" ".bin\Release\rx3270.dll.@PACKAGE_VERSION@" - file "/oname=$PROGRAMFILES\ooRexx\rx3270.dll" ".bin\Release\rx3270.dll.@PACKAGE_VERSION@" - - sectionEnd - - SubSectionEnd - - SubSection "Menus, Keypads & Toolbars" SecMenu - - Section /o "View trace Menu" TraceMenu - file "/oname=$INSTDIR\ui\98trace.xml" "ui\98trace.xml" - sectionEnd - - Section /o "Application debug" DBGMenu - file "/oname=$INSTDIR\ui\99debug.xml" "ui\99debug.xml" - sectionEnd - - SubSectionEnd - -SubSectionEnd - -Section "GTK @GTK_MODVERSION@ Runtime" SecGTK - - setOutPath $INSTDIR - file /r ".bin\gtkruntime\*.*" - -SectionEnd - -Section /o "Software Development Kit" SecSDK - - CreateDirectory "$INSTDIR\sdk" - CreateDirectory "$INSTDIR\sdk\include" - CreateDirectory "$INSTDIR\sdk\include\lib3270" - CreateDirectory "$INSTDIR\sdk\include\pw3270" - CreateDirectory "$INSTDIR\sdk\sample" - CreateDirectory "$INSTDIR\sdk\sample\classlib" - - setOutPath $INSTDIR\sdk\include - file "src\include\lib3270.h" - file "src\include\pw3270.h" - - setOutPath $INSTDIR\sdk\include\pw3270 - file "src\include\pw3270\class.h" - file "src\include\pw3270\hllapi.h" - file "src\include\pw3270\ipcpackets.h" - file "src\include\pw3270\plugin.h" - file "src\include\pw3270\trace.h" - file "src\include\pw3270\v3270.h" - - setOutPath $INSTDIR\sdk\include\lib3270 - file "src\include\lib3270\config.h" - file "src\include\rules.mak" - - setOutPath $INSTDIR\sdk\sample\connect - file "src\sample\Makefile" - file "src\sample\connect.c" - - setOutPath $INSTDIR\sdk\sample\classlib - file "src\classlib\*.cc" - file "src\include\pw3270\class.h" - -SectionEnd - -# create a section to define what the uninstaller does. -# the section will always be named "Uninstall" -section "Uninstall" - - # Always delete uninstaller first - delete $INSTDIR\uninstaller.exe - - # Set SMPROGRAMS and DESKTOP path - SetShellVarContext all - - # now delete installed files - delete $INSTDIR\@PACKAGE@.exe - - delete $SMPROGRAMS\@PACKAGE@.lnk - delete $DESKTOP\@PACKAGE@.lnk - - RMDir /r "$INSTDIR\locale" - RMDir /r "$INSTDIR\share" - RMDir /r "$INSTDIR\etc" - RMDir /r "$INSTDIR\plugins" - RMDir /r "$INSTDIR\sdk" - RMDir /r "$INSTDIR\gtk2-runtime" - - # Delete all files - delete "$INSTDIR\*.dll" - - # Remove registry - DeleteRegKey HKLM "Software\@PACKAGE@" - DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@PACKAGE@" - DeleteRegKey HKLM "Software\@PACKAGE@" - - # Delete System libraries - delete $SYSDIR\libhllapi.dll - - # Delete extension libraries - delete "$PROGRAMFILES\ooRexx\rx3270.cls" - delete "$PROGRAMFILES\ooRexx\rx3270.dll" - - RMDir /r "$INSTDIR" - -sectionEnd - -Function .onInit - -${if} ${FileExists} `$PROGRAMFILES\ooRexx\rexx.exe` - - SectionGetFlags "${RexxPlugin}" $0 - IntOp $0 $0 | ${SF_SELECTED} - SectionSetFlags "${RexxPlugin}" $0 - -${EndIf} - -ReadRegStr $4 HKLM "Software\gtkwin\@GTK_MODVERSION@" "path" - -${if} $4 == "" - - SectionGetFlags "${SecGTK}" $0 - IntOp $0 $0 | ${SF_SELECTED} - SectionSetFlags "${SecGTK}" $0 - -${Else} - - ${if} ${FileExists} `$4\*.*` - - SectionGetFlags "${SecGTK}" $0 - IntOp $0 $0 & ${SECTION_OFF} - SectionSetFlags "${SecGTK}" $0 - - ${Else} - - SectionGetFlags "${SecGTK}" $0 - IntOp $0 $0 | ${SF_SELECTED} - SectionSetFlags "${SecGTK}" $0 - - ${EndIf} - -${EndIf} - -FunctionEnd - - diff --git a/pw3270-x86_64-no-gtk.nsi.in b/pw3270-x86_64-no-gtk.nsi.in deleted file mode 100644 index be81067..0000000 --- a/pw3270-x86_64-no-gtk.nsi.in +++ /dev/null @@ -1,257 +0,0 @@ -!include "MUI2.nsh" -!include x64.nsh - -Name "@PACKAGE@" -Caption "@PACKAGE@ - 3270 Emulator for windows/gtk" -outfile "@PACKAGE@-@PACKAGE_VERSION@.@PACKAGE_LEVEL@-requires-gtk-@GTK_MODVERSION@-@host_cpu@.exe" -XPStyle on - -installDir "$PROGRAMFILES64\pw3270" - -#define the installer icon -!define MUI_ICON "src\pw3270\@PACKAGE@.ico" -!define MUI_UNICON "src\pw3270\@PACKAGE@.ico" -icon "src\pw3270\@PACKAGE@.ico" - -# Get installation folder from registry if available -InstallDirRegKey HKLM "Software\@PACKAGE@" "InstallLocation" - -RequestExecutionLevel admin - -# Properties -VIProductVersion "@PACKAGE_VERSION@.@PACKAGE_LEVEL@.@PACKAGE_REVISION@" -VIAddVersionKey "ProductName" "@PACKAGE@" -VIAddVersionKey "FileDescription" "3270 Emulator for windows/gtk" -VIAddVersionKey "FileVersion" "@PACKAGE_REVISION@" -VIAddVersionKey "LegalCopyright" "GPL-2.0" - -# Interface - -!define MUI_ABORTWARNING -# !insertmacro MUI_PAGE_WELCOME -!insertmacro MUI_PAGE_LICENSE "LICENSE" -!insertmacro MUI_PAGE_COMPONENTS -!insertmacro MUI_PAGE_DIRECTORY -!insertmacro MUI_PAGE_INSTFILES - -# !insertmacro MUI_UNPAGE_WELCOME -!insertmacro MUI_UNPAGE_CONFIRM -!insertmacro MUI_UNPAGE_INSTFILES -# !insertmacro MUI_UNPAGE_FINISH - -# Languages -!insertmacro MUI_LANGUAGE "English" - -# Section scripts -!include Sections.nsh - -# default section -SubSection "@PACKAGE@" SecMain - - Section "Core" SecCore - - SetRegView 64 - ${DisableX64FSRedirection} - - # define the output path for this file - setOutPath $INSTDIR - SetShellVarContext all - - createShortCut "$SMPROGRAMS\@PACKAGE@.lnk" "$INSTDIR\@PACKAGE@.exe" - createShortCut "$DESKTOP\@PACKAGE@.lnk" "$INSTDIR\@PACKAGE@.exe" - - # Binary files - file "/oname=$INSTDIR\@PACKAGE@.exe" ".bin\Release\@PACKAGE@.exe" - file "/oname=$INSTDIR\@PACKAGE@.ico" "src\pw3270\@PACKAGE@.ico" - file "/oname=$INSTDIR\lib3270.dll.@PACKAGE_VERSION@" ".bin\Release\lib3270.dll.@PACKAGE_VERSION@" - file "/oname=$INSTDIR\pw3270.dll.@PACKAGE_VERSION@" ".bin\Release\pw3270.dll.@PACKAGE_VERSION@" - - # Configuration files - file "/oname=$INSTDIR\@PACKAGE@-logo.png" "src\pw3270\@PACKAGE@-logo.png" - file "/oname=$INSTDIR\@PACKAGE@.png" "src\pw3270\@PACKAGE@.png" - file "/oname=$INSTDIR\colors.conf" "colors.conf" - - # Documentation files - file "/oname=$INSTDIR\ChangeLog" "ChangeLog" - file "/oname=$INSTDIR\AUTHORS" "AUTHORS" - file "/oname=$INSTDIR\LICENSE" "LICENSE" - - # Misc folders - CreateDirectory "$INSTDIR\certs" - CreateDirectory "$INSTDIR\plugins" - - # UI definition files - CreateDirectory "$INSTDIR\ui" - - file "/oname=$INSTDIR\ui\00default.xml" "ui\00default.xml" - file "/oname=$INSTDIR\ui\10keypad.xml" "ui\10keypad.xml" - - # Locale files - CreateDirectory "$INSTDIR\@localedir@\pt_BR\LC_MESSAGES" - file "/oname=$INSTDIR\@localedir@\pt_BR\LC_MESSAGES\@PACKAGE@.mo" ".bin\Release\@localedir@\pt_BR\LC_MESSAGES\@PACKAGE@.mo" - - # Save DataDir - SetRegView 64 - WriteRegStr HKLM "Software\@PACKAGE@" "datadir" "$INSTDIR" - WriteRegStr HKLM "Software\@PACKAGE@" "appName" "$INSTDIR\@PACKAGE@.exe" - - # define uninstaller name - SetRegView 32 - - writeUninstaller $INSTDIR\uninstall.exe - - WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@PACKAGE@" \ - "DisplayName" "@PACKAGE@ - 3270 emulator for windows/gtk" - WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@PACKAGE@" \ - "DisplayIcon" "$INSTDIR\@PACKAGE@.ico" - WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@PACKAGE@" \ - "DisplayVersion" "@PACKAGE_VERSION@ (Rev: @PACKAGE_REVISION@)" - - WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@PACKAGE@" \ - "UninstallString" "$INSTDIR\uninstall.exe" - WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@PACKAGE@" \ - "InstallLocation" "$INSTDIR" - WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@PACKAGE@" \ - "NoModify" "1" - WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@PACKAGE@" \ - "NoRepair" "1" - - # Save instalation dir - WriteRegStr HKCU "Software\@PACKAGE@" "" $INSTDIR - - sectionEnd - - SubSection "Plugins" SecPLugin - - Section /o "HLLAPI" HLLAPIPlugin - setOutPath $INSTDIR - - CreateDirectory "$INSTDIR\plugins" - file "/oname=$INSTDIR\plugins\hllapi.dll" ".bin\Release\plugins\hllapi.dll" - file "/oname=$SYSDIR\libhllapi.dll" ".bin\Release\hllapi.dll" - - sectionEnd - - Section /o "Rexx" RexxPlugin - - setOutPath $INSTDIR - - file "/oname=$INSTDIR\plugins\rxplug.dll" ".bin\Release\plugins\rx3270.dll" - file "/oname=$INSTDIR\ui\80rexx.xml" "ui\80rexx.xml" - - file "/oname=$PROGRAMFILES64\ooRexx\rx3270.cls" "src\plugins\rx3270\rx3270.cls" - file "/oname=$INSTDIR\rx3270.dll.@PACKAGE_VERSION@" ".bin\Release\rx3270.dll.@PACKAGE_VERSION@" - file "/oname=$PROGRAMFILES64\ooRexx\rx3270.dll" ".bin\Release\rx3270.dll" - - sectionEnd - - SubSectionEnd - - SubSection "Menus, Keypads & Toolbars" SecMenu - - Section /o "View trace Menu" TraceMenu - file "/oname=$INSTDIR\ui\98trace.xml" "ui\98trace.xml" - sectionEnd - - Section /o "Application debug" DBGMenu - file "/oname=$INSTDIR\ui\99debug.xml" "ui\99debug.xml" - sectionEnd - - SubSectionEnd - -SubSectionEnd - -Section /o "Software Development Kit" SecSDK - - CreateDirectory "$INSTDIR\sdk" - CreateDirectory "$INSTDIR\sdk\include" - CreateDirectory "$INSTDIR\sdk\include\lib3270" - CreateDirectory "$INSTDIR\sdk\include\pw3270" - CreateDirectory "$INSTDIR\sdk\sample" - CreateDirectory "$INSTDIR\sdk\sample\classlib" - - setOutPath $INSTDIR\sdk\include - file "src\include\lib3270.h" - file "src\include\pw3270.h" - - setOutPath $INSTDIR\sdk\include\pw3270 - file "src\include\pw3270\class.h" - file "src\include\pw3270\hllapi.h" - file "src\include\pw3270\ipcpackets.h" - file "src\include\pw3270\plugin.h" - file "src\include\pw3270\trace.h" - file "src\include\pw3270\v3270.h" - - setOutPath $INSTDIR\sdk\include\lib3270 - file "src\include\lib3270\config.h" - file "src\include\rules.mak" - - setOutPath $INSTDIR\sdk\sample\connect - file "src\sample\Makefile" - file "src\sample\connect.c" - - setOutPath $INSTDIR\sdk\sample\classlib - file "src\classlib\*.cc" - file "src\include\pw3270\class.h" - -SectionEnd - -# create a section to define what the uninstaller does. -# the section will always be named "Uninstall" -section "Uninstall" - - # Always delete uninstaller first - delete $INSTDIR\uninstaller.exe - - # Set SMPROGRAMS and DESKTOP path - SetShellVarContext all - - # now delete installed files - delete $INSTDIR\@PACKAGE@.exe - - delete $SMPROGRAMS\@PACKAGE@.lnk - delete $DESKTOP\@PACKAGE@.lnk - - RMDir /r "$INSTDIR\locale" - RMDir /r "$INSTDIR\share" - RMDir /r "$INSTDIR\etc" - RMDir /r "$INSTDIR\plugins" - RMDir /r "$INSTDIR\sdk" - - # Delete all files - delete "$INSTDIR\*.dll" - - # Remove registry - SetRegView 64 - DeleteRegKey HKLM "Software\@PACKAGE@" - - SetRegView 32 - DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@PACKAGE@" - DeleteRegKey HKLM "Software\@PACKAGE@" - - # Delete System libraries - delete $SYSDIR\libhllapi.dll - - # Delete extension libraries - delete "$PROGRAMFILES64\ooRexx\rx3270.cls" - delete "$PROGRAMFILES64\ooRexx\rx3270.dll" - - RMDir /r "$INSTDIR" - -sectionEnd - -Function .onInit - -SetRegView 64 - -${if} ${FileExists} `$PROGRAMFILES64\ooRexx\rexx.exe` - - SectionGetFlags "${RexxPlugin}" $0 - IntOp $0 $0 | ${SF_SELECTED} - SectionSetFlags "${RexxPlugin}" $0 - -${EndIf} - -FunctionEnd - - diff --git a/pw3270-x86_64.nsi.in b/pw3270-x86_64.nsi.in deleted file mode 100644 index e906001..0000000 --- a/pw3270-x86_64.nsi.in +++ /dev/null @@ -1,290 +0,0 @@ -!include "MUI2.nsh" -!include x64.nsh - -Name "@PACKAGE@" -Caption "@PACKAGE@ - 3270 Emulator for windows/gtk" -outfile "@PACKAGE@-@PACKAGE_VERSION@.@PACKAGE_LEVEL@-gtk-@GTK_MODVERSION@-@host_cpu@.exe" -XPStyle on - -installDir "$PROGRAMFILES64\pw3270" - -#define the installer icon -!define MUI_ICON "src\pw3270\@PACKAGE@.ico" -!define MUI_UNICON "src\pw3270\@PACKAGE@.ico" -icon "src\pw3270\@PACKAGE@.ico" - -# Get installation folder from registry if available -InstallDirRegKey HKLM "Software\@PACKAGE@" "InstallLocation" - -RequestExecutionLevel admin - -# Properties -VIProductVersion "@PACKAGE_VERSION@.@PACKAGE_LEVEL@.@PACKAGE_REVISION@" -VIAddVersionKey "ProductName" "@PACKAGE@" -VIAddVersionKey "FileDescription" "3270 Emulator for windows/gtk" -VIAddVersionKey "FileVersion" "@PACKAGE_REVISION@" -VIAddVersionKey "LegalCopyright" "GPL-2.0" - -# Interface - -!define MUI_ABORTWARNING -# !insertmacro MUI_PAGE_WELCOME -!insertmacro MUI_PAGE_LICENSE "LICENSE" -!insertmacro MUI_PAGE_COMPONENTS -!insertmacro MUI_PAGE_DIRECTORY -!insertmacro MUI_PAGE_INSTFILES - -# !insertmacro MUI_UNPAGE_WELCOME -!insertmacro MUI_UNPAGE_CONFIRM -!insertmacro MUI_UNPAGE_INSTFILES -# !insertmacro MUI_UNPAGE_FINISH - -# Languages -!insertmacro MUI_LANGUAGE "English" - -# Section scripts -!include Sections.nsh - -# default section -SubSection "@PACKAGE@" SecMain - - Section "Core" SecCore - - SetRegView 64 - ${DisableX64FSRedirection} - - # define the output path for this file - setOutPath $INSTDIR - SetShellVarContext all - - createShortCut "$SMPROGRAMS\@PACKAGE@.lnk" "$INSTDIR\@PACKAGE@.exe" - createShortCut "$DESKTOP\@PACKAGE@.lnk" "$INSTDIR\@PACKAGE@.exe" - - # Binary files - file "/oname=$INSTDIR\@PACKAGE@.exe" ".bin\Release\@PACKAGE@.exe" - file "/oname=$INSTDIR\@PACKAGE@.ico" "src\pw3270\@PACKAGE@.ico" - file "/oname=$INSTDIR\lib3270.dll.@PACKAGE_VERSION@" ".bin\Release\lib3270.dll.@PACKAGE_VERSION@" - file "/oname=$INSTDIR\pw3270.dll.@PACKAGE_VERSION@" ".bin\Release\pw3270.dll.@PACKAGE_VERSION@" - - # Configuration files - file "/oname=$INSTDIR\@PACKAGE@-logo.png" "src\pw3270\@PACKAGE@-logo.png" - file "/oname=$INSTDIR\@PACKAGE@.png" "src\pw3270\@PACKAGE@.png" - file "/oname=$INSTDIR\colors.conf" "colors.conf" - - # Documentation files - file "/oname=$INSTDIR\ChangeLog" "ChangeLog" - file "/oname=$INSTDIR\AUTHORS" "AUTHORS" - file "/oname=$INSTDIR\LICENSE" "LICENSE" - - # Misc folders - CreateDirectory "$INSTDIR\certs" - CreateDirectory "$INSTDIR\plugins" - - # UI definition files - CreateDirectory "$INSTDIR\ui" - - file "/oname=$INSTDIR\ui\00default.xml" "ui\00default.xml" - file "/oname=$INSTDIR\ui\10keypad.xml" "ui\10keypad.xml" - - # Locale files - CreateDirectory "$INSTDIR\@localedir@\pt_BR\LC_MESSAGES" - file "/oname=$INSTDIR\@localedir@\pt_BR\LC_MESSAGES\@PACKAGE@.mo" ".bin\Release\@localedir@\pt_BR\LC_MESSAGES\@PACKAGE@.mo" - - # Save DataDir - SetRegView 64 - WriteRegStr HKLM "Software\@PACKAGE@" "datadir" "$INSTDIR" - WriteRegStr HKLM "Software\@PACKAGE@" "appName" "$INSTDIR\@PACKAGE@.exe" - - # define uninstaller name - SetRegView 32 - - writeUninstaller $INSTDIR\uninstall.exe - - WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@PACKAGE@" \ - "DisplayName" "@PACKAGE@ - 3270 emulator for windows/gtk" - WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@PACKAGE@" \ - "DisplayIcon" "$INSTDIR\@PACKAGE@.ico" - WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@PACKAGE@" \ - "DisplayVersion" "@PACKAGE_VERSION@ (Rev: @PACKAGE_REVISION@)" - - WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@PACKAGE@" \ - "UninstallString" "$INSTDIR\uninstall.exe" - WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@PACKAGE@" \ - "InstallLocation" "$INSTDIR" - WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@PACKAGE@" \ - "NoModify" "1" - WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@PACKAGE@" \ - "NoRepair" "1" - - # Save instalation dir - WriteRegStr HKCU "Software\@PACKAGE@" "" $INSTDIR - - sectionEnd - - SubSection "Plugins" SecPLugin - - Section /o "HLLAPI" HLLAPIPlugin - setOutPath $INSTDIR - - CreateDirectory "$INSTDIR\plugins" - file "/oname=$INSTDIR\plugins\hllapi.dll" ".bin\Release\plugins\hllapi.dll" - file "/oname=$SYSDIR\libhllapi.dll" ".bin\Release\hllapi.dll" - - sectionEnd - - Section /o "Rexx" RexxPlugin - - setOutPath $INSTDIR - - file "/oname=$INSTDIR\plugins\rxplug.dll" ".bin\Release\plugins\rx3270.dll" - file "/oname=$INSTDIR\ui\80rexx.xml" "ui\80rexx.xml" - - file "/oname=$PROGRAMFILES64\ooRexx\rx3270.cls" "src\plugins\rx3270\rx3270.cls" - file "/oname=$INSTDIR\rx3270.dll.@PACKAGE_VERSION@" ".bin\Release\rx3270.dll.@PACKAGE_VERSION@" - file "/oname=$PROGRAMFILES64\ooRexx\rx3270.dll" ".bin\Release\rx3270.dll" - - sectionEnd - - SubSectionEnd - - SubSection "Menus, Keypads & Toolbars" SecMenu - - Section /o "View trace Menu" TraceMenu - file "/oname=$INSTDIR\ui\98trace.xml" "ui\98trace.xml" - sectionEnd - - Section /o "Application debug" DBGMenu - file "/oname=$INSTDIR\ui\99debug.xml" "ui\99debug.xml" - sectionEnd - - SubSectionEnd - -SubSectionEnd - -Section "GTK @GTK_MODVERSION@ Runtime" SecGTK - - setOutPath $INSTDIR - file /r ".bin\gtkruntime\*.*" - -SectionEnd - -Section /o "Software Development Kit" SecSDK - - CreateDirectory "$INSTDIR\sdk" - CreateDirectory "$INSTDIR\sdk\include" - CreateDirectory "$INSTDIR\sdk\include\lib3270" - CreateDirectory "$INSTDIR\sdk\include\pw3270" - CreateDirectory "$INSTDIR\sdk\sample" - CreateDirectory "$INSTDIR\sdk\sample\classlib" - - setOutPath $INSTDIR\sdk\include - file "src\include\lib3270.h" - file "src\include\pw3270.h" - - setOutPath $INSTDIR\sdk\include\pw3270 - file "src\include\pw3270\class.h" - file "src\include\pw3270\hllapi.h" - file "src\include\pw3270\ipcpackets.h" - file "src\include\pw3270\plugin.h" - file "src\include\pw3270\trace.h" - file "src\include\pw3270\v3270.h" - - setOutPath $INSTDIR\sdk\include\lib3270 - file "src\include\lib3270\config.h" - file "src\include\rules.mak" - - setOutPath $INSTDIR\sdk\sample\connect - file "src\sample\Makefile" - file "src\sample\connect.c" - - setOutPath $INSTDIR\sdk\sample\classlib - file "src\classlib\*.cc" - file "src\include\pw3270\class.h" - -SectionEnd - -# create a section to define what the uninstaller does. -# the section will always be named "Uninstall" -section "Uninstall" - - # Always delete uninstaller first - delete $INSTDIR\uninstaller.exe - - # Set SMPROGRAMS and DESKTOP path - SetShellVarContext all - - # now delete installed files - delete $INSTDIR\@PACKAGE@.exe - - delete $SMPROGRAMS\@PACKAGE@.lnk - delete $DESKTOP\@PACKAGE@.lnk - - RMDir /r "$INSTDIR\locale" - RMDir /r "$INSTDIR\share" - RMDir /r "$INSTDIR\etc" - RMDir /r "$INSTDIR\plugins" - RMDir /r "$INSTDIR\sdk" - - # Delete all files - delete "$INSTDIR\*.dll" - - # Remove registry - SetRegView 64 - DeleteRegKey HKLM "Software\@PACKAGE@" - - SetRegView 32 - DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@PACKAGE@" - DeleteRegKey HKLM "Software\@PACKAGE@" - - # Delete System libraries - delete $SYSDIR\libhllapi.dll - - # Delete extension libraries - delete "$PROGRAMFILES64\ooRexx\rx3270.cls" - delete "$PROGRAMFILES64\ooRexx\rx3270.dll" - - RMDir /r "$INSTDIR" - -sectionEnd - -Function .onInit - -SetRegView 64 - -${if} ${FileExists} `$PROGRAMFILES64\ooRexx\rexx.exe` - - SectionGetFlags "${RexxPlugin}" $0 - IntOp $0 $0 | ${SF_SELECTED} - SectionSetFlags "${RexxPlugin}" $0 - -${EndIf} - -ReadRegStr $4 HKLM "Software\gtkwin\@GTK_MODVERSION@" "path" - -${if} $4 == "" - - SectionGetFlags "${SecGTK}" $0 - IntOp $0 $0 | ${SF_SELECTED} - SectionSetFlags "${SecGTK}" $0 - -${Else} - - ${if} ${FileExists} `$4\*.*` - - SectionGetFlags "${SecGTK}" $0 - IntOp $0 $0 & ${SECTION_OFF} - SectionSetFlags "${SecGTK}" $0 - - ${Else} - - SectionGetFlags "${SecGTK}" $0 - IntOp $0 $0 | ${SF_SELECTED} - SectionSetFlags "${SecGTK}" $0 - - ${EndIf} - -${EndIf} - -FunctionEnd - - -- libgit2 0.21.2