Towards 2.0.5
[yaz-moved-to-github.git] / win / yaz.nsi
1 ; $Id: yaz.nsi,v 1.25 2003-10-09 15:51:36 adam Exp $
2
3 !define VERSION "2.0.5"
4
5 Name "YAZ"
6 Caption "Index Data YAZ ${VERSION} Setup"
7 OutFile "yaz_${VERSION}.exe"
8
9 LicenseText "You must read the following license before installing:"
10 LicenseData license.txt
11
12 ComponentText "This will install the YAZ Toolkit 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\YAZ"
25 InstallDirRegKey HKLM "SOFTWARE\Index Data\YAZ" ""
26 DirShow show ; (make this hide to not let the user change it)
27 DirText "Select the directory to install YAZ 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\YAZ" "" "$INSTDIR"
33         WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\YAZ" "DisplayName" "YAZ ${VERSION} (remove only)"
34         WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\YAZ" "UninstallString" '"$INSTDIR\uninst.exe"'
35         ; write out uninstaller
36         WriteUninstaller "$INSTDIR\uninst.exe"
37         SetOutPath $SMPROGRAMS\YAZ
38         CreateShortCut "$SMPROGRAMS\YAZ\YAZ Program Directory.lnk" \
39                  "$INSTDIR"
40         WriteINIStr "$SMPROGRAMS\YAZ\YAZ Home page.url" \
41               "InternetShortcut" "URL" "http://www.indexdata.dk/yaz/"
42         CreateShortCut "$SMPROGRAMS\YAZ\Uninstall YAZ.lnk" \
43                 "$INSTDIR\uninst.exe"
44         SetOutPath $INSTDIR
45         File LICENSE.txt
46         File ..\README
47         SetOutPath $INSTDIR
48         SetOutPath $INSTDIR\ztest
49         File ..\ztest\dummy-records
50         File ..\ztest\dummy-grs
51         File ..\ztest\dummy-words
52 SectionEnd ; end of default section
53
54 Section "YAZ Runtime"
55         SectionIn 1 2
56         IfFileExists "$INSTDIR\bin\yaz-ztest.exe" 0 Noservice
57         ExecWait '"$INSTDIR\bin\yaz-ztest.exe" -remove'
58 Noservice:
59         SetOutPath $INSTDIR\bin
60         File ..\bin\*.exe
61         File ..\bin\*.dll
62         SetOutPath $SMPROGRAMS\YAZ
63         CreateShortCut "$SMPROGRAMS\YAZ\YAZ Client.lnk" \
64                  "$INSTDIR\bin\yaz-client.exe"
65         SetOutPath $SMPROGRAMS\YAZ\Server
66         CreateShortCut "$SMPROGRAMS\YAZ\Server\Server on console on port 9999.lnk" \
67                  "$INSTDIR\bin\yaz-ztest.exe" '-w"$INSTDIR\ztest"'
68         CreateShortCut "$SMPROGRAMS\YAZ\Server\Install Z39.50 service on port 210.lnk" \
69                   "$INSTDIR\bin\yaz-ztest.exe" '-installa tcp:@:210'
70         CreateShortCut "$SMPROGRAMS\YAZ\Server\Remove Z39.50 service.lnk" \
71                  "$INSTDIR\bin\yaz-ztest.exe" '-remove'
72 SectionEnd
73
74 Section "YAZ Development"
75         SectionIn 1 2
76         SetOutPath $INSTDIR\include\yaz
77         File ..\include\yaz\*.h
78         SetOutPath $INSTDIR\lib
79         File ..\lib\*.lib
80 SectionEnd
81
82 Section "YAZ Documentation"
83         SectionIn 1 2
84         SetOutPath $INSTDIR
85         File /r ..\doc
86         SetOutPath $SMPROGRAMS\YAZ
87         CreateShortCut "$SMPROGRAMS\YAZ\HTML Documentation.lnk" \
88                  "$INSTDIR\doc\yaz.html"
89         CreateShortCut "$SMPROGRAMS\YAZ\PDF Documentaion.lnk" \
90                  "$INSTDIR\doc\yaz.pdf"
91 SectionEnd
92
93 Section "YAZ Source"
94         SectionIn 1
95         SetOutPath $INSTDIR\util
96         File ..\util\*.c
97         File ..\util\*.tcl
98         File ..\util\*.sgm
99         File ..\util\*.xml
100         File ..\util\yaz-asncomp
101         SetOutPath $INSTDIR\odr
102         File ..\odr\*.c
103         File ..\odr\*.h
104         SetOutPath $INSTDIR\z39.50
105         File ..\z39.50\*.c
106         File ..\z39.50\*.asn
107         File ..\z39.50\*.tcl
108         SetOutPath $INSTDIR\ill
109         File ..\ill\*.c
110         File ..\ill\*.asn
111         File ..\ill\*.tcl
112         SetOutPath $INSTDIR\cql
113         File ..\cql\*.c
114         File ..\cql\*.y
115         SetOutPath $INSTDIR\zutil
116         File ..\zutil\*.c
117         File ..\zutil\*.h
118         SetOutPath $INSTDIR\ccl
119         File ..\ccl\*.c
120         SetOutPath $INSTDIR\zoom
121         File ..\zoom\*.c
122         SetOutPath $INSTDIR\comstack
123         File ..\comstack\*.c
124         SetOutPath $INSTDIR\server
125         File ..\server\*.c
126         File ..\server\*.h
127         SetOutPath $INSTDIR\ztest
128         File ..\ztest\*.c
129         SetOutPath $INSTDIR\client
130         File ..\client\*.c
131         File ..\client\*.h
132         SetOutPath $INSTDIR\win
133         File makefile
134         File *.nsi
135         File *.rc
136         File *.h
137 SectionEnd
138
139 ; begin uninstall settings/section
140 UninstallText "This will uninstall YAZ ${VERSION} from your system"
141
142 Section Uninstall
143 ; add delete commands to delete whatever files/registry keys/etc you installed here.
144         Delete "$INSTDIR\uninst.exe"
145         DeleteRegKey HKLM "SOFTWARE\Index Data\YAZ"
146         DeleteRegKey HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\YAZ"
147         ExecWait '"$INSTDIR\bin\yaz-ztest" -remove'
148         RMDir /r $SMPROGRAMS\YAZ
149         RMDir /r $INSTDIR
150         IfFileExists $INSTDIR 0 Removed 
151                 MessageBox MB_OK|MB_ICONEXCLAMATION \
152                  "Note: $INSTDIR could not be removed."
153 Removed:
154 SectionEnd
155 ; eof