+; $Id: mingw-ncurses.nsi,v 1.4 2013/10/12 23:13:27 tom Exp $\r
+\r
+; TODO add examples\r
+; TODO bump ABI to 6\r
+\r
+; Define the application name\r
+!define APPNAME "ncurses"\r
+!define EXENAME "ncurses.exe"\r
+\r
+!define VERSION_MAJOR "5"\r
+!define VERSION_MINOR "9"\r
+!define VERSION_YYYY "2013"\r
+!define VERSION_MMDD "1012"\r
+!define VERSION_PATCH ${VERSION_YYYY}${VERSION_MMDD}\r
+\r
+!define MY_ABI "5"\r
+!define MY_MODEL "w"\r
+\r
+!define SUBKEY "ncurses"\r
+\r
+!define INSTALL "${APPNAME} (Console)"\r
+!define VERSION ${VERSION_MAJOR}.${VERSION_MINOR}\r
+!define VERSION_FULL ${VERSION}-${VERSION_PATCH}\r
+\r
+; Main Install settings\r
+Name "${INSTALL}"\r
+InstallDir "c:\mingw"\r
+InstallDirRegKey HKLM "Software\${SUBKEY}" "$INSTDIR\bin"\r
+OutFile "NSIS-Output\${APPNAME}-${VERSION_FULL}-setup.exe"\r
+\r
+CRCCheck on\r
+SetCompressor /SOLID lzma\r
+\r
+VIAddVersionKey ProductName "${SUBKEY}"\r
+VIAddVersionKey CompanyName "http://invisible-island.net"\r
+VIAddVersionKey LegalCopyright "© 2013, Thomas E. Dickey"\r
+VIAddVersionKey FileDescription "NCurses Installer (MinGW)"\r
+VIAddVersionKey FileVersion ${VERSION_FULL}\r
+VIAddVersionKey ProductVersion ${VERSION_FULL}\r
+VIAddVersionKey Comments "This installer was built with NSIS and cross-compiling to MinGW."\r
+VIAddVersionKey InternalName "${APPNAME}-${VERSION_FULL}-setup.exe"\r
+; This is a dotted set of numbers limited to 16-bits each\r
+VIProductVersion "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_YYYY}.${VERSION_MMDD}"\r
+\r
+; Modern interface settings\r
+!include "MUI.nsh"\r
+\r
+!define MUI_ABORTWARNING\r
+;!define MUI_FINISHPAGE_RUN\r
+;"$INSTDIR\bin\${EXENAME}"\r
+\r
+!insertmacro MUI_PAGE_WELCOME\r
+!insertmacro MUI_PAGE_LICENSE "..\COPYING"\r
+!insertmacro MUI_PAGE_COMPONENTS\r
+!insertmacro MUI_PAGE_DIRECTORY\r
+!insertmacro MUI_PAGE_INSTFILES\r
+!insertmacro MUI_PAGE_FINISH\r
+\r
+!insertmacro MUI_UNPAGE_CONFIRM\r
+!insertmacro MUI_UNPAGE_INSTFILES\r
+\r
+; Set languages (first is default language)\r
+!insertmacro MUI_LANGUAGE "English"\r
+!insertmacro MUI_RESERVEFILE_LANGDLL\r
+\r
+InstType "Full" ; SectionIn 1\r
+InstType "Typical" ; SectionIn 2\r
+InstType "Minimal" ; SectionIn 3\r
+\r
+Section "${APPNAME}" Section1\r
+\r
+ SectionIn 1 2 3\r
+\r
+ ; Set Section properties\r
+ SetOverwrite on\r
+\r
+ ; Set Section Files and Shortcuts\r
+ SetOutPath "$INSTDIR\bin"\r
+\r
+ File ".\bin\*.dll"\r
+\r
+ SetOutPath "$INSTDIR\share\${APPNAME}"\r
+ File /oname=README.txt "..\README"\r
+ File /oname=README-mingw.txt "..\README.mingw"\r
+\r
+ CreateDirectory "$SMPROGRAMS\${INSTALL}"\r
+ CreateShortCut "$SMPROGRAMS\${INSTALL}\${APPNAME}.lnk" "$INSTDIR\bin\${EXENAME}"\r
+ CreateShortCut "$SMPROGRAMS\${INSTALL}\Uninstall.lnk" "$INSTDIR\uninstall.exe"\r
+\r
+SectionEnd\r
+\r
+Section "development" Section2\r
+\r
+ SectionIn 1 2\r
+\r
+ ; Set Section properties\r
+ SetOverwrite on\r
+\r
+ ; Set Section Files and Shortcuts\r
+ SetOutPath "$INSTDIR\share\${APPNAME}"\r
+\r
+ SetOutPath "$INSTDIR\include\${APPNAME}${MY_MODEL}"\r
+\r
+ File ".\include\${APPNAME}${MY_MODEL}\*.h"\r
+\r
+ SetOutPath "$INSTDIR\lib"\r
+\r
+ File ".\lib\*.a"\r
+\r
+SectionEnd\r
+\r
+Section "examples" Section3\r
+\r
+ SectionIn 1\r
+\r
+ ; Set Section properties\r
+ SetOverwrite on\r
+\r
+ ; Set Section Files and Shortcuts\r
+ SetOutPath "$INSTDIR\lib\${APPNAME}"\r
+\r
+SectionEnd\r
+\r
+Section -FinishSection\r
+\r
+ WriteRegStr HKLM "Software\${SUBKEY}" "" "$INSTDIR"\r
+ WriteRegStr HKLM "Software\${SUBKEY}" "Environment" ""\r
+ WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${INSTALL}" "DisplayName" "${APPNAME} ${VERSION_FULL} (Console)"\r
+ WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${INSTALL}" "UninstallString" "$INSTDIR\uninstall.exe"\r
+ WriteUninstaller "$INSTDIR\uninstall.exe"\r
+\r
+SectionEnd\r
+\r
+; Modern install component descriptions\r
+!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN\r
+ !insertmacro MUI_DESCRIPTION_TEXT ${Section1} "${SUBKEY} runtime"\r
+ !insertmacro MUI_DESCRIPTION_TEXT ${Section2} "Development headers and libraries"\r
+ !insertmacro MUI_DESCRIPTION_TEXT ${Section3} "Examples"\r
+!insertmacro MUI_FUNCTION_DESCRIPTION_END\r
+\r
+;Uninstall section\r
+Section Uninstall\r
+\r
+ ;Remove from registry...\r
+ DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${INSTALL}"\r
+ DeleteRegKey HKLM "SOFTWARE\${SUBKEY}"\r
+\r
+ ; Delete self\r
+ Delete "$INSTDIR\uninstall.exe"\r
+\r
+ ; Delete Shortcuts\r
+ Delete "$SMPROGRAMS\${INSTALL}\${APPNAME}.lnk"\r
+ Delete "$SMPROGRAMS\${INSTALL}\Uninstall.lnk"\r
+\r
+ ; Clean up application\r
+ Delete "$INSTDIR\bin\libform${MY_MODEL}${MY_ABI}.dll"\r
+ Delete "$INSTDIR\bin\libmenu${MY_MODEL}${MY_ABI}.dll"\r
+ Delete "$INSTDIR\bin\libncurses++${MY_MODEL}${MY_ABI}.dll"\r
+ Delete "$INSTDIR\bin\libncurses${MY_MODEL}${MY_ABI}.dll"\r
+ Delete "$INSTDIR\bin\libpanel${MY_MODEL}${MY_ABI}.dll"\r
+\r
+ Delete "$INSTDIR\include\${APPNAME}${MY_MODEL}\*.h"\r
+\r
+ Delete "$INSTDIR\lib\libform${MY_MODEL}.a"\r
+ Delete "$INSTDIR\lib\libmenu${MY_MODEL}.a"\r
+ Delete "$INSTDIR\lib\libncurses++${MY_MODEL}.a"\r
+ Delete "$INSTDIR\lib\libncurses${MY_MODEL}.a"\r
+ Delete "$INSTDIR\lib\libpanel${MY_MODEL}.a"\r
+\r
+ Delete "$INSTDIR\lib\libform${MY_MODEL}.dll.a"\r
+ Delete "$INSTDIR\lib\libmenu${MY_MODEL}.dll.a"\r
+ Delete "$INSTDIR\lib\libncurses++${MY_MODEL}.dll.a"\r
+ Delete "$INSTDIR\lib\libncurses${MY_MODEL}.dll.a"\r
+ Delete "$INSTDIR\lib\libpanel${MY_MODEL}.dll.a"\r
+\r
+ Delete "$INSTDIR\lib\${APPNAME}\*.exe"\r
+\r
+ Delete "$INSTDIR\share\${APPNAME}\*.*"\r
+\r
+ ; Remove remaining directories\r
+ RMDir "$SMPROGRAMS\${INSTALL}"\r
+ RMDir "$INSTDIR\share\${APPNAME}"\r
+ RMDir "$INSTDIR\share"\r
+ RMDir "$INSTDIR\lib\${APPNAME}"\r
+ RMDir "$INSTDIR\lib"\r
+ RMDir "$INSTDIR\include\${APPNAME}${MY_MODEL}"\r
+ RMDir "$INSTDIR\include"\r
+ RMDir "$INSTDIR\bin"\r
+ RMDir "$INSTDIR\"\r
+\r
+SectionEnd
\ No newline at end of file