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