1 ; $Id: mingw-ncurses.nsi,v 1.117 2015/08/06 23:13:39 tom Exp $
6 ; Define the application name
7 !define APPNAME
"ncurses"
8 !define EXENAME
"ncurses.exe"
10 !define VERSION_MAJOR
"6"
11 !define VERSION_MINOR
"0"
12 !define VERSION_YYYY
"2015"
13 !define VERSION_MMDD
"0808"
14 !define VERSION_PATCH
${VERSION_YYYY}${VERSION_MMDD}
19 !define SUBKEY
"ncurses"
21 !define INSTALL
"${APPNAME} (Console)"
22 !define VERSION
${VERSION_MAJOR}.${VERSION_MINOR}
23 !define VERSION_FULL
${VERSION}-${VERSION_PATCH}
25 ; Main Install settings
28 InstallDirRegKey HKLM "Software\${SUBKEY}" "$INSTDIR\bin"
29 OutFile "NSIS-Output\${APPNAME}-${VERSION_FULL}-setup.exe"
32 SetCompressor
/SOLID lzma
34 VIAddVersionKey ProductName
"${SUBKEY}"
35 VIAddVersionKey CompanyName
"http://invisible-island.net"
36 VIAddVersionKey FileDescription
"NCurses Installer (MinGW)"
37 VIAddVersionKey FileVersion
${VERSION_FULL}
38 VIAddVersionKey ProductVersion
${VERSION_FULL}
39 VIAddVersionKey Comments
"This installer was built with NSIS and cross-compiling to MinGW."
40 VIAddVersionKey InternalName
"${APPNAME}-${VERSION_FULL}-setup.exe"
41 ; This is a dotted set of numbers limited to 16-bits each
42 VIProductVersion
"${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_YYYY}.${VERSION_MMDD}"
44 ; Modern interface settings
47 !define MUI_ABORTWARNING
48 ;!define MUI_FINISHPAGE_RUN
49 ;"$INSTDIR\bin\${EXENAME}"
51 !insertmacro MUI_PAGE_WELCOME
52 !insertmacro MUI_PAGE_LICENSE
"..\COPYING"
53 !insertmacro MUI_PAGE_COMPONENTS
54 !insertmacro MUI_PAGE_DIRECTORY
55 !insertmacro MUI_PAGE_INSTFILES
56 !insertmacro MUI_PAGE_FINISH
58 !insertmacro MUI_UNPAGE_CONFIRM
59 !insertmacro MUI_UNPAGE_INSTFILES
61 ; Set languages (first is default language)
62 !insertmacro MUI_LANGUAGE
"English"
63 !insertmacro MUI_RESERVEFILE_LANGDLL
65 InstType "Full" ; SectionIn 1
66 InstType "Typical" ; SectionIn 2
67 InstType "Minimal" ; SectionIn 3
69 Section "${APPNAME}" Section1
73 ; Set Section properties
76 ; Set Section Files and Shortcuts
77 SetOutPath "$INSTDIR\bin"
81 SetOutPath "$INSTDIR\share\${APPNAME}"
82 File /oname=README
.txt
"..\README"
83 File /oname=README
-mingw
.txt
"..\README.mingw"
85 CreateDirectory "$SMPROGRAMS\${INSTALL}"
86 CreateShortCut "$SMPROGRAMS\${INSTALL}\${APPNAME}.lnk" "$INSTDIR\bin\${EXENAME}"
87 CreateShortCut "$SMPROGRAMS\${INSTALL}\Uninstall.lnk" "$INSTDIR\uninstall.exe"
91 Section "development" Section2
95 ; Set Section properties
98 ; Set Section Files and Shortcuts
99 SetOutPath "$INSTDIR\share\${APPNAME}"
101 SetOutPath "$INSTDIR\include\${APPNAME}${MY_MODEL}"
103 File ".\include\${APPNAME}${MY_MODEL}\*.h"
105 SetOutPath "$INSTDIR\lib"
111 Section "examples" Section3
115 ; Set Section properties
118 ; Set Section Files and Shortcuts
119 SetOutPath "$INSTDIR\lib\${APPNAME}"
123 Section -FinishSection
125 WriteRegStr HKLM "Software\${SUBKEY}" "" "$INSTDIR"
126 WriteRegStr HKLM "Software\${SUBKEY}" "Environment" ""
127 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${INSTALL}" "DisplayName" "${APPNAME} ${VERSION_FULL} (Console)"
128 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${INSTALL}" "UninstallString" "$INSTDIR\uninstall.exe"
129 WriteUninstaller "$INSTDIR\uninstall.exe"
133 ; Modern install component descriptions
134 !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
135 !insertmacro MUI_DESCRIPTION_TEXT
${Section1} "${SUBKEY} runtime"
136 !insertmacro MUI_DESCRIPTION_TEXT
${Section2} "Development headers and libraries"
137 !insertmacro MUI_DESCRIPTION_TEXT
${Section3} "Examples"
138 !insertmacro MUI_FUNCTION_DESCRIPTION_END
143 ;Remove from registry...
144 DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${INSTALL}"
145 DeleteRegKey HKLM "SOFTWARE\${SUBKEY}"
148 Delete "$INSTDIR\uninstall.exe"
151 Delete "$SMPROGRAMS\${INSTALL}\${APPNAME}.lnk"
152 Delete "$SMPROGRAMS\${INSTALL}\Uninstall.lnk"
154 ; Clean up application
155 Delete "$INSTDIR\bin\libform${MY_MODEL}${MY_ABI}.dll"
156 Delete "$INSTDIR\bin\libmenu${MY_MODEL}${MY_ABI}.dll"
157 Delete "$INSTDIR\bin\libncurses++${MY_MODEL}${MY_ABI}.dll"
158 Delete "$INSTDIR\bin\libncurses${MY_MODEL}${MY_ABI}.dll"
159 Delete "$INSTDIR\bin\libpanel${MY_MODEL}${MY_ABI}.dll"
161 Delete "$INSTDIR\include\${APPNAME}${MY_MODEL}\*.h"
163 Delete "$INSTDIR\lib\libform${MY_MODEL}.a"
164 Delete "$INSTDIR\lib\libmenu${MY_MODEL}.a"
165 Delete "$INSTDIR\lib\libncurses++${MY_MODEL}.a"
166 Delete "$INSTDIR\lib\libncurses${MY_MODEL}.a"
167 Delete "$INSTDIR\lib\libpanel${MY_MODEL}.a"
169 Delete "$INSTDIR\lib\libform${MY_MODEL}.dll.a"
170 Delete "$INSTDIR\lib\libmenu${MY_MODEL}.dll.a"
171 Delete "$INSTDIR\lib\libncurses++${MY_MODEL}.dll.a"
172 Delete "$INSTDIR\lib\libncurses${MY_MODEL}.dll.a"
173 Delete "$INSTDIR\lib\libpanel${MY_MODEL}.dll.a"
175 Delete "$INSTDIR\lib\${APPNAME}\*.exe"
177 Delete "$INSTDIR\share\${APPNAME}\*.*"
179 ; Remove remaining directories
180 RMDir "$SMPROGRAMS\${INSTALL}"
181 RMDir "$INSTDIR\share\${APPNAME}"
182 RMDir "$INSTDIR\share"
183 RMDir "$INSTDIR\lib\${APPNAME}"
185 RMDir "$INSTDIR\include\${APPNAME}${MY_MODEL}"
186 RMDir "$INSTDIR\include"