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