Remove zebraidx shortcut. Dont use examples (yet)
[idzebra-moved-to-github.git] / win / zebra.nsi
1 ; $Id: zebra.nsi,v 1.3 2002-09-06 19:55:25 adam Exp $
2
3 !define VERSION "1.3.2"
4
5 Name "Zebra"
6 Caption "Index Data Yebra ${VERSION} Setup"
7 OutFile "zebra_${VERSION}.exe"
8
9 LicenseText "You must read the following license before installing:"
10 LicenseData license.txt
11
12 ComponentText "This will install Zebra on your computer:"
13 InstType "Full (w/ Source)"
14 InstType "Lite (w/o Source)"
15
16 ; Some default compiler settings (uncomment and change at will):
17 ; SetCompress auto ; (can be off or force)
18 ; SetDatablockOptimize on ; (can be off)
19 ; CRCCheck on ; (can be off)
20 ; AutoCloseWindow false ; (can be true for the window go away automatically at end)
21 ; ShowInstDetails hide ; (can be show to have them shown, or nevershow to disable)
22 ; SetDateSave off ; (can be on to have files restored to their orginal date)
23
24 InstallDir "$PROGRAMFILES\Zebra"
25 InstallDirRegKey HKLM "SOFTWARE\Index Data\Zebra" ""
26 DirShow show ; (make this hide to not let the user change it)
27 DirText "Select the directory to install Zebra in:"
28
29 Section "" ; (default section)
30         SetOutPath "$INSTDIR"
31         ; add files / whatever that need to be installed here.
32         WriteRegStr HKLM "SOFTWARE\Index Data\Zebra" "" "$INSTDIR"
33         WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Zebra" "DisplayName" "Zebra ${VERSION} (remove only)"
34         WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Zebra" "UninstallString" '"$INSTDIR\uninst.exe"'
35         ; write out uninstaller
36         WriteUninstaller "$INSTDIR\uninst.exe"
37         SetOutPath $SMPROGRAMS\Zebra
38         CreateShortCut "$SMPROGRAMS\Zebra\Zebra Program Directory.lnk" \
39                  "$INSTDIR"
40         WriteINIStr "$SMPROGRAMS\Zebra\Zebra Home page.url" \
41               "InternetShortcut" "URL" "http://www.indexdata.dk/zebra/"
42         CreateShortCut "$SMPROGRAMS\Zebra\Uninstall Zebra.lnk" \
43                 "$INSTDIR\uninst.exe"
44         SetOutPath $INSTDIR
45         File ..\LICENSE.zebra
46         File ..\README
47         SetOutPath $INSTDIR
48         File /r ..\tab
49 SectionEnd ; end of default section
50
51 Section "Zebra Runtime"
52         SectionIn 1 2
53         IfFileExists "$INSTDIR\bin\zebrasrv.exe" 0 Noservice
54         ExecWait '"$INSTDIR\bin\zebrasrv.exe" -remove'
55 Noservice:
56         SetOutPath $INSTDIR\bin
57         File ..\bin\*.exe
58         File ..\bin\*.dll
59         SetOutPath $SMPROGRAMS\Zebra
60         SetOutPath $SMPROGRAMS\Zebra\Server
61         CreateShortCut "$SMPROGRAMS\Zebra\Server\Server on console on port 9999.lnk" \
62                  "$INSTDIR\bin\zebrasrv.exe"
63         CreateShortCut "$SMPROGRAMS\Zebra\Server\Install Z39.50 service on port 210.lnk" \
64                   "$INSTDIR\bin\zebrasrv.exe" '-installa tcp:@:210'
65         CreateShortCut "$SMPROGRAMS\Zebra\Server\Remove Z39.50 service.lnk" \
66                  "$INSTDIR\bin\zebrasrv.exe" '-remove'
67 SectionEnd
68
69 Section "Zebra Development"
70         SectionIn 1
71         SetOutPath $INSTDIR\include
72         File ..\include\*.h
73         SetOutPath $INSTDIR\lib
74         File ..\lib\*.lib
75 SectionEnd
76
77 Section "Zebra Documentation"
78         SectionIn 1 2
79         SetOutPath $INSTDIR
80         File /r ..\doc
81         SetOutPath $SMPROGRAMS\Zebra
82         CreateShortCut "$SMPROGRAMS\Zebra\HTML Documentation.lnk" \
83                  "$INSTDIR\doc\zebra.html"
84         CreateShortCut "$SMPROGRAMS\Zebra\PDF Documentaion.lnk" \
85                  "$INSTDIR\doc\zebra.pdf"
86 SectionEnd
87
88 Section "Zebra Examples"
89         SectionIn 1 2
90
91         SetOutPath $INSTDIR
92
93         File /r ..\test
94 ;       File /r ..\examples
95 SectionEnd
96
97 Section "Zebra Source"
98         SectionIn 1
99         SetOutPath $INSTDIR\util
100         File ..\util\*.c
101         SetOutPath $INSTDIR\dfa
102         File ..\dfa\*.c
103         File ..\dfa\*.h
104         SetOutPath $INSTDIR\index
105         File ..\index\*.c
106         File ..\index\*.h
107         SetOutPath $INSTDIR\isams
108         File ..\isams\*.c
109         SetOutPath $INSTDIR\isam
110         File ..\isam\*.c
111         File ..\isam\*.h
112         SetOutPath $INSTDIR\isamc
113         File ..\isamc\*.c
114         File ..\isamc\*.h
115         SetOutPath $INSTDIR\isamb
116         File ..\isamb\*.c
117         SetOutPath $INSTDIR\recctrl
118         File ..\recctrl\*.c
119         File ..\recctrl\*.h
120         SetOutPath $INSTDIR\dict
121         File ..\dict\*.c
122         SetOutPath $INSTDIR\bfile
123         File ..\bfile\*.c
124         File ..\bfile\*.h
125         SetOutPath $INSTDIR\rset
126         File ..\rset\*.c
127         SetOutPath $INSTDIR\test\api
128         File ..\test\api\*.c
129         File ..\test\api\*.cfg
130         SetOutPath $INSTDIR\win
131         File makefile
132         File *.nsi
133         File *.txt
134 SectionEnd
135
136 ; begin uninstall settings/section
137 UninstallText "This will uninstall Zebra ${VERSION} from your system"
138
139 Section Uninstall
140 ; add delete commands to delete whatever files/registry keys/etc you installed here.
141         Delete "$INSTDIR\uninst.exe"
142         DeleteRegKey HKLM "SOFTWARE\Index Data\Zebra"
143         DeleteRegKey HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Zebra"
144         ExecWait '"$INSTDIR\bin\zebrasrv" -remove'
145         RMDir /r $SMPROGRAMS\Zebra
146         RMDir /r $INSTDIR
147         IfFileExists $INSTDIR 0 Removed 
148                 MessageBox MB_OK|MB_ICONEXCLAMATION \
149                  "Note: $INSTDIR could not be removed."
150 Removed:
151 SectionEnd
152 ; eof