7bf5760a37f7d80679c5cb6e8a69ca226a5c6bb6
[yaz-moved-to-github.git] / win / yaz.nsi
1 ; $Id: yaz.nsi,v 1.11 2002-09-05 13:36:53 adam Exp $
2
3 !define VERSION "1.9"
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         File /r ..\tab
49         SetOutPath $INSTDIR\ztest
50         File ..\ztest\dummy-records
51         File ..\ztest\dummy-grs
52         File ..\ztest\dummy-words
53 SectionEnd ; end of default section
54
55 Section "YAZ Runtime"
56         SectionIn 1 2
57         IfFileExists "$INSTDIR\bin\yaz-ztest.exe" 0 Noservice
58         ExecWait '"$INSTDIR\bin\yaz-ztest.exe" -remove'
59 Noservice:
60         SetOutPath $INSTDIR\bin
61         File ..\bin\*.exe
62         File ..\bin\*.dll
63         SetOutPath $SMPROGRAMS\YAZ
64         CreateShortCut "$SMPROGRAMS\YAZ\YAZ Client.lnk" \
65                  "$INSTDIR\bin\yaz-client.exe"
66         SetOutPath $SMPROGRAMS\YAZ\Server
67         CreateShortCut "$SMPROGRAMS\YAZ\Server\Server on console on port 9999.lnk" \
68                  "$INSTDIR\bin\yaz-ztest.exe" '-w"$INSTDIR\ztest"'
69         CreateShortCut "$SMPROGRAMS\YAZ\Server\Install Z39.50 service on port 210.lnk" \
70                   "$INSTDIR\bin\yaz-ztest.exe" '-installa tcp:@:210'
71         CreateShortCut "$SMPROGRAMS\YAZ\Server\Remove Z39.50 service.lnk" \
72                  "$INSTDIR\bin\yaz-ztest.exe" '-remove'
73 SectionEnd
74
75 Section "YAZ Development"
76         SectionIn 1 2
77         SetOutPath $INSTDIR\include\yaz
78         File ..\include\yaz\*.h
79         SetOutPath $INSTDIR\lib
80         File ..\lib\*.lib
81 SectionEnd
82
83 Section "YAZ Documentation"
84         SectionIn 1 2
85         SetOutPath $INSTDIR
86         File /r ..\doc
87         SetOutPath $SMPROGRAMS\YAZ
88         CreateShortCut "$SMPROGRAMS\YAZ\HTML Documentation.lnk" \
89                  "$INSTDIR\doc\yaz.html"
90         CreateShortCut "$SMPROGRAMS\YAZ\PDF Documentaion.lnk" \
91                  "$INSTDIR\doc\yaz.pdf"
92 SectionEnd
93
94 Section "YAZ Source"
95         SectionIn 1
96         SetOutPath $INSTDIR\util
97         File ..\util\*.c
98         File ..\util\*.tcl
99         SetOutPath $INSTDIR\odr
100         File ..\odr\*.c
101         File ..\odr\*.h
102         SetOutPath $INSTDIR\z39.50
103         File ..\z39.50\*.c
104         File ..\z39.50\*.asn
105         SetOutPath $INSTDIR\ill
106         File ..\ill\*.c
107         File ..\ill\*.asn
108         SetOutPath $INSTDIR\zutil
109         File ..\zutil\*.c
110         SetOutPath $INSTDIR\ccl
111         File ..\ccl\*.c
112         SetOutPath $INSTDIR\zoom
113         File ..\zoom\*.c
114         File ..\zoom\*.h
115         SetOutPath $INSTDIR\comstack
116         File ..\comstack\*.c
117         SetOutPath $INSTDIR\server
118         File ..\server\*.c
119         File ..\server\*.h
120         SetOutPath $INSTDIR\retrieval
121         File ..\retrieval\*.c
122         SetOutPath $INSTDIR\ztest
123         File ..\ztest\*.c
124         SetOutPath $INSTDIR\client
125         File ..\client\*.c
126         File ..\client\*.h
127         SetOutPath $INSTDIR\win
128         File makefile
129         File *.nsi
130         File *.rc
131         File *.h
132 SectionEnd
133
134 ; begin uninstall settings/section
135 UninstallText "This will uninstall YAZ ${VERSION} from your system"
136
137 Section Uninstall
138 ; add delete commands to delete whatever files/registry keys/etc you installed here.
139         Delete "$INSTDIR\uninst.exe"
140         DeleteRegKey HKLM "SOFTWARE\Index Data\YAZ"
141         DeleteRegKey HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\YAZ"
142         ExecWait '"$INSTDIR\bin\yaz-ztest" -remove'
143         RMDir /r $SMPROGRAMS\YAZ
144         RMDir /r $INSTDIR
145         IfFileExists $INSTDIR 0 Removed 
146                 MessageBox MB_OK|MB_ICONEXCLAMATION \
147                  "Note: $INSTDIR could not be removed."
148 Removed:
149 SectionEnd
150 ; eof