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