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