Directory recctrl no longer part of dist
[idzebra-moved-to-github.git] / win / zebra.nsi
1 ; $Id: zebra.nsi,v 1.33 2006-07-05 12:34:17 adam 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\dict
139         File ..\dict\*.c
140         File ..\dict\*.h
141         SetOutPath $INSTDIR\bfile
142         File ..\bfile\*.c
143         File ..\bfile\*.h
144         SetOutPath $INSTDIR\rset
145         File ..\rset\*.c
146         SetOutPath $INSTDIR\test\api
147         File ..\test\api\*.c
148         File ..\test\api\*.cfg
149         SetOutPath $INSTDIR\win
150         File makefile
151         File *.nsi
152         File *.txt
153 SectionEnd
154
155 ; begin uninstall settings/section
156 UninstallText "This will uninstall Zebra ${VERSION} from your system"
157
158 Section Uninstall
159 ; add delete commands to delete whatever files/registry keys/etc you installed here.
160         Delete "$INSTDIR\uninst.exe"
161         DeleteRegKey HKLM "SOFTWARE\Index Data\Zebra"
162         DeleteRegKey HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Zebra"
163         ExecWait '"$INSTDIR\bin\zebrasrv" -remove'
164         RMDir /r "$SMPROGRAMS\Index Data\Zebra"
165         RMDir /r $INSTDIR
166         IfFileExists $INSTDIR 0 Removed 
167                 MessageBox MB_OK|MB_ICONEXCLAMATION \
168                  "Note: $INSTDIR could not be removed."
169 Removed:
170 SectionEnd
171 ; eof