b56a6bd57aa892658d99b7bf7f26d366f31ae47c
[idzebra-moved-to-github.git] / win / zebra.nsi
1 ; $Id: zebra.nsi,v 1.20.2.3 2004-08-19 12:51:28 adam Exp $
2
3 !define VERSION "1.3.17"
4
5 !include "MUI.nsh"
6
7 Name "Zebra"
8 Caption "Index Data Zebra ${VERSION} Setup"
9 OutFile "idzebra_${VERSION}.exe"
10
11 LicenseText "You must read the following license before installing:"
12 LicenseData license.txt
13
14 ComponentText "This will install Zebra on your computer:"
15 InstType "Full (w/ Source)"
16 InstType "Lite (w/o Source)"
17
18 InstallDir "$PROGRAMFILES\Zebra"
19 InstallDirRegKey HKLM "SOFTWARE\Index Data\Zebra" ""
20
21 ;--------------------------------
22 ; Pages
23
24   !insertmacro MUI_PAGE_LICENSE "license.txt"
25   !insertmacro MUI_PAGE_COMPONENTS
26   !insertmacro MUI_PAGE_DIRECTORY
27   !insertmacro MUI_PAGE_INSTFILES
28   
29   !insertmacro MUI_UNPAGE_CONFIRM
30   !insertmacro MUI_UNPAGE_INSTFILES
31 ; Page components
32 ; Page directory
33 ; Page instfiles
34
35 ; UninstPage uninstConfirm
36 ; UninstPage instfiles
37
38 ;--------------------------------
39 ;Languages
40  
41 !insertmacro MUI_LANGUAGE "English"
42
43 ;--------------------------------
44 Section "" ; (default section)
45         SetOutPath "$INSTDIR"
46         ; add files / whatever that need to be installed here.
47         WriteRegStr HKLM "SOFTWARE\Index Data\Zebra" "" "$INSTDIR"
48         WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Zebra" "DisplayName" "Zebra ${VERSION} (remove only)"
49         WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Zebra" "UninstallString" '"$INSTDIR\uninst.exe"'
50         ; write out uninstaller
51         WriteUninstaller "$INSTDIR\uninst.exe"
52         SetOutPath "$SMPROGRAMS\Index Data\Zebra\"
53         CreateShortCut "$SMPROGRAMS\Index Data\Zebra\Zebra Program Directory.lnk" \
54                  "$INSTDIR"
55         WriteINIStr "$SMPROGRAMS\Index Data\Zebra\Zebra Home page.url" \
56               "InternetShortcut" "URL" "http://www.indexdata.dk/zebra/"
57         CreateShortCut "$SMPROGRAMS\Index Data\Zebra\Uninstall Zebra.lnk" \
58                 "$INSTDIR\uninst.exe"
59         SetOutPath $INSTDIR
60         File ..\LICENSE.zebra
61         File ..\README
62         SetOutPath $INSTDIR
63         File /r ..\tab
64 SectionEnd ; end of default section
65
66 Section "Zebra Runtime"
67         SectionIn 1 2
68         SetOutPath $INSTDIR\bin
69         File ..\bin\*.exe
70         File ..\bin\*.dll
71         File c:\winnt\system32\msvcr71.dll
72 SectionEnd
73
74 Section "Zebra Development"
75         SectionIn 1
76         SetOutPath $INSTDIR\include
77         File ..\include\*.h
78         SetOutPath $INSTDIR\lib
79         File ..\lib\*.lib
80 SectionEnd
81
82 Section "Zebra Documentation"
83         SectionIn 1 2
84         SetOutPath $INSTDIR\doc
85         File ..\doc\*.html
86         File ..\doc\*.png
87         File ..\doc\*.pdf
88         File ..\doc\*.xml
89         File ..\doc\*.in
90         File ..\doc\*.xsl
91         SetOutPath "$SMPROGRAMS\Index Data\Zebra\"
92         CreateShortCut "$SMPROGRAMS\Index Data\Zebra\HTML Documentation.lnk" \
93                  "$INSTDIR\doc\zebra.html"
94         CreateShortCut "$SMPROGRAMS\Index Data\Zebra\PDF Documentaion.lnk" \
95                  "$INSTDIR\doc\zebra.pdf"
96 SectionEnd
97
98 Section "Zebra Examples"
99         SectionIn 1 2
100
101         SetOutPath $INSTDIR
102
103         File /r ..\test
104         File /r ..\examples
105 SectionEnd
106
107 Section "Zebra Source"
108         SectionIn 1
109         SetOutPath $INSTDIR\util
110         File ..\util\*.c
111         SetOutPath $INSTDIR\dfa
112         File ..\dfa\*.c
113         File ..\dfa\*.h
114         SetOutPath $INSTDIR\index
115         File ..\index\*.c
116         File ..\index\*.h
117         SetOutPath $INSTDIR\isams
118         File ..\isams\*.c
119         SetOutPath $INSTDIR\isam
120         File ..\isam\*.c
121         File ..\isam\*.h
122         SetOutPath $INSTDIR\isamc
123         File ..\isamc\*.c
124         File ..\isamc\*.h
125         SetOutPath $INSTDIR\isamb
126         File ..\isamb\*.c
127         SetOutPath $INSTDIR\data1
128         File ..\data1\*.c
129         SetOutPath $INSTDIR\recctrl
130         File ..\recctrl\*.c
131         File ..\recctrl\*.h
132         SetOutPath $INSTDIR\dict
133         File ..\dict\*.c
134         SetOutPath $INSTDIR\bfile
135         File ..\bfile\*.c
136         File ..\bfile\*.h
137         SetOutPath $INSTDIR\rset
138         File ..\rset\*.c
139         SetOutPath $INSTDIR\test\api
140         File ..\test\api\*.c
141         File ..\test\api\*.cfg
142         SetOutPath $INSTDIR\win
143         File makefile
144         File *.nsi
145         File *.txt
146 SectionEnd
147
148 ; begin uninstall settings/section
149 UninstallText "This will uninstall Zebra ${VERSION} from your system"
150
151 Section Uninstall
152 ; add delete commands to delete whatever files/registry keys/etc you installed here.
153         Delete "$INSTDIR\uninst.exe"
154         DeleteRegKey HKLM "SOFTWARE\Index Data\Zebra"
155         DeleteRegKey HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Zebra"
156         ExecWait '"$INSTDIR\bin\zebrasrv" -remove'
157         RMDir /r "$SMPROGRAMS\Index Data\Zebra"
158         RMDir /r $INSTDIR
159         IfFileExists $INSTDIR 0 Removed 
160                 MessageBox MB_OK|MB_ICONEXCLAMATION \
161                  "Note: $INSTDIR could not be removed."
162 Removed:
163 SectionEnd
164 ; eof