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