NSIS script.
[yaz-moved-to-github.git] / win / yaz.nsi
1 ; $Id: yaz.nsi,v 1.1 2002-03-15 19:32:39 adam Exp $
2
3 !define VERSION "1.8.6"
4
5 Name "YAZ"
6 Caption "Index Data YAZ 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 v${VERSION} 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 (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 SectionEnd ; end of default section
38
39 Section "yaz core (required)"
40         SectionIn 12
41         SetOutPath $INSTDIR
42         File ..\LICENSE.txt
43         File ..\README
44         SetOutPath $INSTDIR\bin
45         File ..\bin\*.exe
46         File ..\bin\*.dll
47         SetOutPath $INSTDIR\ztest
48         File ..\ztest\dummy-records
49         File ..\ztest\dummy-grs
50         File ..\ztest\dummy-words
51         SetOutPath $INSTDIR
52         File /r ..\tab
53         SetOutPath $SMPROGRAMS\YAZ
54         CreateShortCut "$SMPROGRAMS\YAZ\YAZ Program Directory.lnk" \
55                  "$INSTDIR"
56         CreateShortCut "$SMPROGRAMS\YAZ\YAZ Client.lnk" \
57                  "$INSTDIR\bin\yaz-client.exe"
58         CreateShortCut "$SMPROGRAMS\YAZ\YAZ Server.lnk" \
59                  "$INSTDIR\bin\yaz-ztest.exe" -w"$INSTDIR\ztest"
60         WriteINIStr "$SMPROGRAMS\YAZ\YAZ Home page.url" \
61               "InternetShortcut" "URL" "http://www.indexdata.dk/yaz/"
62 SectionEnd
63
64 Section "yaz development"
65         SectionIn 12
66         SetOutPath $INSTDIR\include\yaz
67         File ..\include\yaz\*.h
68         SetOutPath $INSTDIR\lib
69         File ..\lib\*.lib
70 SectionEnd
71
72 Section "yaz documentation"
73         SectionIn 12
74         SetOutPath $INSTDIR
75         File /r ..\doc
76         SetOutPath $SMPROGRAMS\YAZ
77         CreateShortCut "$SMPROGRAMS\YAZ\HTML Documentation.lnk" \
78                  "$INSTDIR\doc\yaz.html"
79         CreateShortCut "$SMPROGRAMS\YAZ\PDF Documentaion.lnk" \
80                  "$INSTDIR\doc\yaz.pdf"
81 SectionEnd
82
83 Section "yaz source"
84         SectionIn 1
85         SetOutPath $INSTDIR\util
86         File ..\util\*.c
87         File ..\util\*.tcl
88         SetOutPath $INSTDIR\odr
89         File ..\odr\*.c
90         SetOutPath $INSTDIR\z39.50
91         File ..\z39.50\*.c
92         File ..\z39.50\*.asn
93         SetOutPath $INSTDIR\ill
94         File ..\ill\*.c
95         File ..\ill\*.asn
96         SetOutPath $INSTDIR\zutil
97         File ..\zutil\*.c
98         SetOutPath $INSTDIR\ccl
99         File ..\ccl\*.c
100         SetOutPath $INSTDIR\zoom
101         File ..\zoom\*.c
102         File ..\zoom\*.h
103         SetOutPath $INSTDIR\comstack
104         File ..\comstack\*.c
105         SetOutPath $INSTDIR\server
106         File ..\server\*.c
107         File ..\server\*.h
108         SetOutPath $INSTDIR\retrieval
109         File ..\retrieval\*.c
110         SetOutPath $INSTDIR\ztest
111         File ..\ztest\*.c
112         SetOutPath $INSTDIR\client
113         File ..\client\*.c
114         File ..\client\*.h
115         SetOutPath $INSTDIR\win
116         File makefile
117         File *.nsi
118         File *.rc
119         File *.h
120 SectionEnd
121
122 ; begin uninstall settings/section
123 UninstallText "This will uninstall YAZ from your system"
124
125 Section Uninstall
126 ; add delete commands to delete whatever files/registry keys/etc you installed here.
127         Delete "$INSTDIR\uninst.exe"
128         DeleteRegKey HKLM "SOFTWARE\Index Data\YAZ"
129         DeleteRegKey HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\YAZ"
130         RMDir /r "$INSTDIR"
131         Delete $SMPROGRAMS\YAZ\*.lnk
132         Delete $SMPROGRAMS\YAZ\*.url
133         RMDir $SMPROGRAMS\YAZ
134 SectionEnd ; end of uninstall section
135
136 ; eof