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