Move/refactoring of public interfaces..
[idzebra-moved-to-github.git] / win / zebra.nsi
1 ; $Id: zebra.nsi,v 1.25 2004-12-08 12:23:10 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\include\idzebra
85         File ..\include\idzebra\*.h
86         SetOutPath $INSTDIR\lib
87         File ..\lib\*.lib
88 SectionEnd
89
90 Section "Zebra Documentation"
91         SectionIn 1 2
92         SetOutPath $INSTDIR\doc
93         File ..\doc\*.html
94         File ..\doc\*.png
95         File ..\doc\*.pdf
96         File ..\doc\*.xml
97         File ..\doc\*.in
98         File ..\doc\*.xsl
99         SetOutPath "$SMPROGRAMS\Index Data\Zebra\"
100         CreateShortCut "$SMPROGRAMS\Index Data\Zebra\HTML Documentation.lnk" \
101                  "$INSTDIR\doc\zebra.html"
102         CreateShortCut "$SMPROGRAMS\Index Data\Zebra\PDF Documentaion.lnk" \
103                  "$INSTDIR\doc\zebra.pdf"
104 SectionEnd
105
106 Section "Zebra Examples"
107         SectionIn 1 2
108
109         SetOutPath $INSTDIR
110
111         File /r ..\test
112         File /r ..\examples
113 SectionEnd
114
115 Section "Zebra Source"
116         SectionIn 1
117         SetOutPath $INSTDIR\util
118         File ..\util\*.c
119         SetOutPath $INSTDIR\dfa
120         File ..\dfa\*.c
121         File ..\dfa\*.h
122         SetOutPath $INSTDIR\index
123         File ..\index\*.c
124         File ..\index\*.h
125         SetOutPath $INSTDIR\isams
126         File ..\isams\*.c
127         SetOutPath $INSTDIR\isamc
128         File ..\isamc\*.c
129         File ..\isamc\*.h
130         SetOutPath $INSTDIR\isamb
131         File ..\isamb\*.c
132         SetOutPath $INSTDIR\data1
133         File ..\data1\*.c
134         SetOutPath $INSTDIR\recctrl
135         File ..\recctrl\*.c
136         File ..\recctrl\*.h
137         SetOutPath $INSTDIR\dict
138         File ..\dict\*.c
139         File ..\dict\*.h
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