1 ; This file is part of the YAZ toolkit.
2 ; Copyright (C) Index Data
3 ; See the file LICENSE for details.
5 !include EnvVarUpdate.nsh
8 ; Microsoft runtime CRT
9 ; Uncomment exactly ONE of the sections below
11 ; !define VS_RUNTIME_DLL ""
12 ; !define VS_RUNTIME_MANIFEST ""
15 ; !define VS_RUNTIME_DLL "c:\Program Files\Microsoft Visual Studio .NET 2003\SDK\v1.1\Bin\msvcr71.dll"
16 ;!define VS_RUNTIME_MANIFEST ""
19 ;!define VS_RUNTIME_DLL "c:\Program Files\Microsoft Visual Studio 8\VC\redist\x86\Microsoft.VC80.CRT\msvcr80.dll"
20 ;!define VS_RUNTIME_MANIFEST "c:\Program Files\Microsoft Visual Studio 8\VC\redist\x86\Microsoft.VC80.CRT\Microsoft.VC80.CRT.manifest"
23 ;!define VS_RUNTIME_DLL "c:\Program Files\Microsoft Visual Studio 9.0\VC\redist\x86\Microsoft.VC90.CRT\msvc*90.dll"
24 ;!define VS_RUNTIME_MANIFEST "c:\Program Files\Microsoft Visual Studio 9.0\VC\redist\x86\Microsoft.VC90.CRT\Microsoft.VC90.CRT.manifest"
27 ;!define VS_RUNTIME_DLL "c:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\redist\x86\Microsoft.VC120.CRT\msvc*.dll"
28 ;!define VS_RUNTIME_MANIFEST ""
36 Caption "Index Data YAZ ${VERSION} Setup"
37 OutFile "yaz_${VERSION}.exe"
39 LicenseText "You must read the following license before installing:"
40 LicenseData license.txt
42 ComponentText "This will install the YAZ Toolkit on your computer:"
43 InstType "Full (w/ Source)"
44 InstType "Lite (w/o Source)"
46 InstallDirRegKey HKLM "SOFTWARE\Index Data\YAZ" ""
49 ;----------------------------
53 !insertmacro MUI_PAGE_LICENSE "license.txt"
54 !insertmacro MUI_PAGE_COMPONENTS
55 !insertmacro MUI_PAGE_DIRECTORY
56 !insertmacro MUI_PAGE_INSTFILES
58 !insertmacro MUI_UNPAGE_CONFIRM
59 !insertmacro MUI_UNPAGE_INSTFILES
64 ; UninstPage uninstConfirm
65 ; UninstPage instfiles
67 ;--------------------------------
70 !insertmacro MUI_LANGUAGE "English"
72 ;--------------------------------
74 Section "" ; (default section)
76 ; add files / whatever that need to be installed here.
77 WriteRegStr HKLM "SOFTWARE\Index Data\YAZ" "" "$INSTDIR"
78 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\YAZ" "DisplayName" "YAZ ${VERSION} (remove only)"
79 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\YAZ" "UninstallString" '"$INSTDIR\uninst.exe"'
80 ; write out uninstaller
81 WriteUninstaller "$INSTDIR\uninst.exe"
82 SetOutPath $SMPROGRAMS\YAZ
83 CreateShortCut "$SMPROGRAMS\YAZ\YAZ Program Directory.lnk" \
85 WriteINIStr "$SMPROGRAMS\YAZ\YAZ Home page.url" \
86 "InternetShortcut" "URL" "http://www.indexdata.com/yaz/"
87 CreateShortCut "$SMPROGRAMS\YAZ\Uninstall YAZ.lnk" \
94 SetOutPath $INSTDIR\ztest
95 File ..\ztest\dummy-grs
96 File ..\ztest\dummy-words
97 SetOutPath $INSTDIR\etc
100 File ..\etc\pqf.properties
102 SectionEnd ; end of default section
104 Section "YAZ Runtime" YAZ_Runtime
106 IfFileExists "$INSTDIR\bin\yaz-ztest.exe" 0 Noservice
107 ExecWait '"$INSTDIR\bin\yaz-ztest.exe" -remove'
109 SetOutPath $INSTDIR\bin
110 File "${VS_RUNTIME_DLL}"
111 !if "${VS_RUNTIME_MANIFEST}" != ""
112 File "${VS_RUNTIME_MANIFEST}"
116 SetOutPath $SMPROGRAMS\YAZ
117 CreateShortCut "$SMPROGRAMS\YAZ\YAZ Client.lnk" \
118 "$INSTDIR\bin\yaz-client.exe"
119 SetOutPath $SMPROGRAMS\YAZ\Server
120 CreateShortCut "$SMPROGRAMS\YAZ\Server\Server on console on port 9999.lnk" \
121 "$INSTDIR\bin\yaz-ztest.exe" '-w"$INSTDIR\ztest"'
122 CreateShortCut "$SMPROGRAMS\YAZ\Server\Install Z39.50 service on port 210.lnk" \
123 "$INSTDIR\bin\yaz-ztest.exe" '-installa tcp:@:210'
124 CreateShortCut "$SMPROGRAMS\YAZ\Server\Remove Z39.50 service.lnk" \
125 "$INSTDIR\bin\yaz-ztest.exe" '-remove'
128 Section "YAZ Development" YAZ_Development
130 SetOutPath $INSTDIR\include\yaz
131 File ..\include\yaz\*.h
132 SetOutPath $INSTDIR\lib
136 Section "YAZ Documentation" YAZ_Documentation
138 SetOutPath $INSTDIR\doc
139 File /nonfatal /r ..\doc\*.css
140 File /nonfatal /r ..\doc\*.ent
141 File /nonfatal /r ..\doc\*.html
144 File /nonfatal /r ..\doc\*.xsl
145 SetOutPath $SMPROGRAMS\YAZ
146 CreateShortCut "$SMPROGRAMS\YAZ\HTML Documentation.lnk" \
147 "$INSTDIR\doc\index.html"
150 Section "YAZ Source" YAZ_Source
155 File /r /x yaz ..\*.h
156 SetOutPath $INSTDIR\util
157 File ..\util\yaz-asncomp
158 SetOutPath $INSTDIR\src
163 File ..\src\codetables*.xml
164 SetOutPath $INSTDIR\test
169 SetOutPath $INSTDIR\win
175 Section "YAZ4J" YAZ4J
177 SetOutPath $INSTDIR\bin
178 File /nonfatal ..\bin\yaz4j.dll
179 SetOutPath $INSTDIR\java
180 File /nonfatal ..\java\yaz4j.jar
183 Section "YAZ Path" YAZ_PATH
185 ${EnvVarUpdate} $0 "PATH" "A" "HKLM" "$INSTDIR\bin"
188 ; begin uninstall settings/section
189 UninstallText "This will uninstall YAZ ${VERSION} from your system"
192 ; add delete commands to delete whatever files/registry keys/etc you installed here.
193 Delete "$INSTDIR\uninst.exe"
194 DeleteRegKey HKLM "SOFTWARE\Index Data\YAZ"
195 DeleteRegKey HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\YAZ"
196 ExecWait '"$INSTDIR\bin\yaz-ztest" -remove'
197 RMDir /r $SMPROGRAMS\YAZ
199 ${un.EnvVarUpdate} $0 "PATH" "R" "HKLM" "$INSTDIR\bin"
200 IfFileExists $INSTDIR 0 Removed
201 MessageBox MB_OK|MB_ICONEXCLAMATION \
202 "Note: $INSTDIR could not be removed."
206 ;--------------------------------
210 LangString DESC_YAZ_Runtime ${LANG_ENGLISH} "YAZ runtime files needed in order for YAZ to run, such as DLLs."
211 LangString DESC_YAZ_Development ${LANG_ENGLISH} "Header files and import libraries required for developing software using YAZ."
212 LangString DESC_YAZ_Documentation ${LANG_ENGLISH} "YAZ Users' guide and reference in HTML. Describes both YAZ applications and the API."
213 LangString DESC_YAZ_Source ${LANG_ENGLISH} "Source code of YAZ. Required if you need to rebuild YAZ (for debugging purposes)."
214 LangString DESC_YAZ4J ${LANG_ENGLISH} "Java wrapper for the ZOOM API of YAZ."
215 LangString DESC_YAZ_PATH ${LANG_ENGLISH} "Update PATH to include binaries of YAZ."
217 ;Assign language strings to sections
218 !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
219 !insertmacro MUI_DESCRIPTION_TEXT ${YAZ_Runtime} $(DESC_YAZ_Runtime)
220 !insertmacro MUI_DESCRIPTION_TEXT ${YAZ_Development} $(DESC_YAZ_Development)
221 !insertmacro MUI_DESCRIPTION_TEXT ${YAZ_Documentation} $(DESC_YAZ_Documentation)
222 !insertmacro MUI_DESCRIPTION_TEXT ${YAZ_Source} $(DESC_YAZ_Source)
223 !insertmacro MUI_DESCRIPTION_TEXT ${YAZ4J} $(DESC_YAZ4J)
224 !insertmacro MUI_DESCRIPTION_TEXT ${YAZ_PATH} $(DESC_YAZ_PATH)
225 !insertmacro MUI_FUNCTION_DESCRIPTION_END