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