Towards 1.3.30
[idzebra-moved-to-github.git] / win / zebra.nsi
1 ; $Id: zebra.nsi,v 1.20.2.13 2005-10-27 17:39:10 adam Exp $
2
3 !define VERSION "1.3.30"
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\zlib1.dll
74         File ..\bin\libxml2.dll
75         File ..\bin\yaz.dll
76         File ..\bin\libexpat.dll
77         File ..\bin\idzebra.dll
78         File c:\winnt\system32\msvcr71.dll
79 SectionEnd
80
81 Section "Zebra Development"
82         SectionIn 1
83         SetOutPath $INSTDIR\include
84         File ..\include\*.h
85         SetOutPath $INSTDIR\lib
86         File ..\lib\*.lib
87 SectionEnd
88
89 Section "Zebra Documentation"
90         SectionIn 1 2
91         SetOutPath $INSTDIR\doc
92         File ..\doc\*.html
93         File ..\doc\*.png
94         File ..\doc\*.pdf
95         File ..\doc\*.xml
96         File ..\doc\*.in
97         File ..\doc\*.xsl
98         SetOutPath "$SMPROGRAMS\Index Data\Zebra\"
99         CreateShortCut "$SMPROGRAMS\Index Data\Zebra\HTML Documentation.lnk" \
100                  "$INSTDIR\doc\zebra.html"
101         CreateShortCut "$SMPROGRAMS\Index Data\Zebra\PDF Documentaion.lnk" \
102                  "$INSTDIR\doc\zebra.pdf"
103 SectionEnd
104
105 Section "Zebra Examples"
106         SectionIn 1 2
107
108         SetOutPath $INSTDIR
109
110         File /r ..\test
111         File /r ..\examples
112 SectionEnd
113
114 Section "Zebra Source"
115         SectionIn 1
116         SetOutPath $INSTDIR\util
117         File ..\util\*.c
118         SetOutPath $INSTDIR\dfa
119         File ..\dfa\*.c
120         File ..\dfa\*.h
121         SetOutPath $INSTDIR\index
122         File ..\index\*.c
123         File ..\index\*.h
124         SetOutPath $INSTDIR\isams
125         File ..\isams\*.c
126         SetOutPath $INSTDIR\isam
127         File ..\isam\*.c
128         File ..\isam\*.h
129         SetOutPath $INSTDIR\isamc
130         File ..\isamc\*.c
131         File ..\isamc\*.h
132         SetOutPath $INSTDIR\isamb
133         File ..\isamb\*.c
134         SetOutPath $INSTDIR\data1
135         File ..\data1\*.c
136         SetOutPath $INSTDIR\recctrl
137         File ..\recctrl\*.c
138         File ..\recctrl\*.h
139         SetOutPath $INSTDIR\dict
140         File ..\dict\*.c
141         SetOutPath $INSTDIR\bfile
142         File ..\bfile\*.c
143         File ..\bfile\*.h
144         SetOutPath $INSTDIR\rset
145         File ..\rset\*.c
146         SetOutPath $INSTDIR\test\api
147         File ..\test\api\*.c
148         File ..\test\api\*.cfg
149         SetOutPath $INSTDIR\win
150         File makefile
151         File *.nsi
152         File *.txt
153 SectionEnd
154
155 ; begin uninstall settings/section
156 UninstallText "This will uninstall Zebra ${VERSION} from your system"
157
158 Section Uninstall
159 ; add delete commands to delete whatever files/registry keys/etc you installed here.
160         Delete "$INSTDIR\uninst.exe"
161         DeleteRegKey HKLM "SOFTWARE\Index Data\Zebra"
162         DeleteRegKey HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Zebra"
163         ExecWait '"$INSTDIR\bin\zebrasrv" -remove'
164         RMDir /r "$SMPROGRAMS\Index Data\Zebra"
165         RMDir /r $INSTDIR
166         IfFileExists $INSTDIR 0 Removed 
167                 MessageBox MB_OK|MB_ICONEXCLAMATION \
168                  "Note: $INSTDIR could not be removed."
169 Removed:
170 SectionEnd
171 ; eof