Fixes for MARC-8 in yaz_iconv character set utilies. The MARC-8
[yaz-moved-to-github.git] / win / yaz.nsi
1 ; $Id: yaz.nsi,v 1.50 2004-08-07 08:18:20 adam Exp $
2
3 !define VERSION "2.0.22"
4
5 !include "MUI.nsh"
6
7 Name "YAZ"
8 Caption "Index Data YAZ ${VERSION} Setup"
9 OutFile "yaz_${VERSION}.exe"
10
11 LicenseText "You must read the following license before installing:"
12 LicenseData license.txt
13
14 ComponentText "This will install the YAZ Toolkit on your computer:"
15 InstType "Full (w/ Source)"
16 InstType "Lite (w/o Source)"
17
18 InstallDir "$PROGRAMFILES\YAZ"
19 InstallDirRegKey HKLM "SOFTWARE\Index Data\YAZ" ""
20
21
22 ;----------------------------
23 ; Pages
24
25
26   !insertmacro MUI_PAGE_LICENSE "license.txt"
27   !insertmacro MUI_PAGE_COMPONENTS
28   !insertmacro MUI_PAGE_DIRECTORY
29   !insertmacro MUI_PAGE_INSTFILES
30   
31   !insertmacro MUI_UNPAGE_CONFIRM
32   !insertmacro MUI_UNPAGE_INSTFILES
33 ; Page components
34 ; Page directory
35 ; Page instfiles
36
37 ; UninstPage uninstConfirm
38 ; UninstPage instfiles
39
40 ;--------------------------------
41 ;Languages
42  
43 !insertmacro MUI_LANGUAGE "English"
44
45 ;--------------------------------
46
47 Section "" ; (default section)
48         SetOutPath "$INSTDIR"
49         ; add files / whatever that need to be installed here.
50         WriteRegStr HKLM "SOFTWARE\Index Data\YAZ" "" "$INSTDIR"
51         WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\YAZ" "DisplayName" "YAZ ${VERSION} (remove only)"
52         WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\YAZ" "UninstallString" '"$INSTDIR\uninst.exe"'
53         ; write out uninstaller
54         WriteUninstaller "$INSTDIR\uninst.exe"
55         SetOutPath $SMPROGRAMS\YAZ
56         CreateShortCut "$SMPROGRAMS\YAZ\YAZ Program Directory.lnk" \
57                  "$INSTDIR"
58         WriteINIStr "$SMPROGRAMS\YAZ\YAZ Home page.url" \
59               "InternetShortcut" "URL" "http://www.indexdata.dk/yaz/"
60         CreateShortCut "$SMPROGRAMS\YAZ\Uninstall YAZ.lnk" \
61                 "$INSTDIR\uninst.exe"
62         SetOutPath $INSTDIR
63         File LICENSE.txt
64         File ..\README
65         File ..\NEWS
66         SetOutPath $INSTDIR
67         SetOutPath $INSTDIR\ztest
68         File ..\ztest\dummy-records
69         File ..\ztest\dummy-grs
70         File ..\ztest\dummy-words
71         SetOutPath $INSTDIR\etc
72         File ..\etc\*.xml
73         File ..\etc\*.xsl
74         File ..\etc\pqf.properties
75
76 SectionEnd ; end of default section
77
78 Section "YAZ Runtime" YAZ_Runtime
79         SectionIn 1 2
80         IfFileExists "$INSTDIR\bin\yaz-ztest.exe" 0 Noservice
81         ExecWait '"$INSTDIR\bin\yaz-ztest.exe" -remove'
82 Noservice:
83         SetOutPath $INSTDIR\bin
84         File ..\bin\*.exe
85         File ..\bin\*.dll
86         SetOutPath $SMPROGRAMS\YAZ
87         CreateShortCut "$SMPROGRAMS\YAZ\YAZ Client.lnk" \
88                  "$INSTDIR\bin\yaz-client.exe"
89         SetOutPath $SMPROGRAMS\YAZ\Server
90         CreateShortCut "$SMPROGRAMS\YAZ\Server\Server on console on port 9999.lnk" \
91                  "$INSTDIR\bin\yaz-ztest.exe" '-w"$INSTDIR\ztest"'
92         CreateShortCut "$SMPROGRAMS\YAZ\Server\Install Z39.50 service on port 210.lnk" \
93                   "$INSTDIR\bin\yaz-ztest.exe" '-installa tcp:@:210'
94         CreateShortCut "$SMPROGRAMS\YAZ\Server\Remove Z39.50 service.lnk" \
95                  "$INSTDIR\bin\yaz-ztest.exe" '-remove'
96 SectionEnd
97
98 Section "YAZ Development" YAZ_Development
99         SectionIn 1 2
100         SetOutPath $INSTDIR\include\yaz
101         File ..\include\yaz\*.h
102         SetOutPath $INSTDIR\lib
103         File ..\lib\*.lib
104 SectionEnd
105
106 Section "YAZ Documentation" YAZ_Documentation
107         SectionIn 1 2
108         SetOutPath $INSTDIR\doc
109         File ..\doc\*.html
110         File ..\doc\*.png
111         File ..\doc\*.pdf
112         File ..\doc\*.xml
113         File ..\doc\*.in
114         File ..\doc\*.dsl
115         File ..\doc\*.xsl
116         File ..\doc\*.css
117         SetOutPath $SMPROGRAMS\YAZ
118         CreateShortCut "$SMPROGRAMS\YAZ\HTML Documentation.lnk" \
119                  "$INSTDIR\doc\yaz.html"
120         CreateShortCut "$SMPROGRAMS\YAZ\PDF Documentaion.lnk" \
121                  "$INSTDIR\doc\yaz.pdf"
122 SectionEnd
123
124 Section "YAZ Source" YAZ_Source
125         SectionIn 1
126         SetOutPath $INSTDIR\util
127         File ..\util\*.c
128         File ..\util\yaz-asncomp
129         SetOutPath $INSTDIR\src
130         File ..\src\*.c
131         File ..\src\*.h
132         File ..\src\*.y
133         File ..\src\*.tcl
134         File ..\src\*.asn
135         File ..\src\codetables.xml
136         SetOutPath $INSTDIR\zoom
137         File ..\zoom\*.c
138         SetOutPath $INSTDIR\ztest
139         File ..\ztest\*.c
140         SetOutPath $INSTDIR\client
141         File ..\client\*.c
142         File ..\client\*.h
143         SetOutPath $INSTDIR\win
144         File makefile
145         File *.nsi
146         File *.rc
147         File *.h
148 SectionEnd
149
150 ; begin uninstall settings/section
151 UninstallText "This will uninstall YAZ ${VERSION} from your system"
152
153 Section Uninstall
154 ; add delete commands to delete whatever files/registry keys/etc you installed here.
155         Delete "$INSTDIR\uninst.exe"
156         DeleteRegKey HKLM "SOFTWARE\Index Data\YAZ"
157         DeleteRegKey HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\YAZ"
158         ExecWait '"$INSTDIR\bin\yaz-ztest" -remove'
159         RMDir /r $SMPROGRAMS\YAZ
160         RMDir /r $INSTDIR
161         IfFileExists $INSTDIR 0 Removed 
162                 MessageBox MB_OK|MB_ICONEXCLAMATION \
163                  "Note: $INSTDIR could not be removed."
164 Removed:
165 SectionEnd
166
167 ;--------------------------------
168 ;Descriptions
169
170   ;Language strings
171 LangString DESC_YAZ_Runtime ${LANG_ENGLISH} "YAZ runtime files needed in order for YAZ to run, such as DLLs."
172 LangString DESC_YAZ_Development ${LANG_ENGLISH} "Header files and import libraries required for developing software using YAZ."
173 LangString DESC_YAZ_Documentation ${LANG_ENGLISH} "YAZ Users' guide and reference in HTML and PDF. Describes both YAZ applications and the API."
174 LangString DESC_YAZ_Source ${LANG_ENGLISH} "Source code of YAZ. Required if you need to rebuild YAZ (for debugging purposes)."
175
176 ;Assign language strings to sections
177 !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
178 !insertmacro MUI_DESCRIPTION_TEXT ${YAZ_Runtime} $(DESC_YAZ_Runtime)
179 !insertmacro MUI_DESCRIPTION_TEXT ${YAZ_Development} $(DESC_YAZ_Development)
180 !insertmacro MUI_DESCRIPTION_TEXT ${YAZ_Documentation} $(DESC_YAZ_Documentation)
181 !insertmacro MUI_DESCRIPTION_TEXT ${YAZ_Source} $(DESC_YAZ_Source)
182 !insertmacro MUI_FUNCTION_DESCRIPTION_END
183
184 ; eof