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 ""
31 ;!define VS_RUNTIME_DLL "c:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\redist\x86\Microsoft.VC140.CRT\msvc*.dll"
32 ;!define VS_RUNTIME_MANIFEST ""
40 Caption "Index Data YAZ ${VERSION} Setup"
41 OutFile "yaz_${VERSION}.exe"
43 LicenseText "You must read the following license before installing:"
44 LicenseData license.txt
46 ComponentText "This will install the YAZ Toolkit on your computer:"
47 InstType "Full (w/ Source)"
48 InstType "Lite (w/o Source)"
50 InstallDirRegKey HKLM "SOFTWARE\Index Data\YAZ" ""
53 ;----------------------------
57 !insertmacro MUI_PAGE_LICENSE "license.txt"
58 !insertmacro MUI_PAGE_COMPONENTS
59 !insertmacro MUI_PAGE_DIRECTORY
60 !insertmacro MUI_PAGE_INSTFILES
62 !insertmacro MUI_UNPAGE_CONFIRM
63 !insertmacro MUI_UNPAGE_INSTFILES
68 ; UninstPage uninstConfirm
69 ; UninstPage instfiles
71 ;--------------------------------
74 !insertmacro MUI_LANGUAGE "English"
76 ;--------------------------------
78 Section "" ; (default section)
80 ; add files / whatever that need to be installed here.
81 WriteRegStr HKLM "SOFTWARE\Index Data\YAZ" "" "$INSTDIR"
82 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\YAZ" "DisplayName" "YAZ ${VERSION} (remove only)"
83 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\YAZ" "UninstallString" '"$INSTDIR\uninst.exe"'
84 ; write out uninstaller
85 WriteUninstaller "$INSTDIR\uninst.exe"
86 SetOutPath $SMPROGRAMS\YAZ
87 CreateShortCut "$SMPROGRAMS\YAZ\YAZ Program Directory.lnk" \
89 WriteINIStr "$SMPROGRAMS\YAZ\YAZ Home page.url" \
90 "InternetShortcut" "URL" "http://www.indexdata.com/yaz/"
91 CreateShortCut "$SMPROGRAMS\YAZ\Uninstall YAZ.lnk" \
98 SetOutPath $INSTDIR\ztest
99 File ..\ztest\dummy-grs
100 File ..\ztest\dummy-words
101 SetOutPath $INSTDIR\etc
104 File ..\etc\pqf.properties
106 SectionEnd ; end of default section
108 Section "YAZ Runtime" YAZ_Runtime
110 IfFileExists "$INSTDIR\bin\yaz-ztest.exe" 0 Noservice
111 ExecWait '"$INSTDIR\bin\yaz-ztest.exe" -remove'
113 SetOutPath $INSTDIR\bin
114 File "${VS_RUNTIME_DLL}"
115 !if "${VS_RUNTIME_MANIFEST}" != ""
116 File "${VS_RUNTIME_MANIFEST}"
120 SetOutPath $SMPROGRAMS\YAZ
121 CreateShortCut "$SMPROGRAMS\YAZ\YAZ Client.lnk" \
122 "$INSTDIR\bin\yaz-client.exe"
123 SetOutPath $SMPROGRAMS\YAZ\Server
124 CreateShortCut "$SMPROGRAMS\YAZ\Server\Server on console on port 9999.lnk" \
125 "$INSTDIR\bin\yaz-ztest.exe" '-w"$INSTDIR\ztest"'
126 CreateShortCut "$SMPROGRAMS\YAZ\Server\Install Z39.50 service on port 210.lnk" \
127 "$INSTDIR\bin\yaz-ztest.exe" '-installa tcp:@:210'
128 CreateShortCut "$SMPROGRAMS\YAZ\Server\Remove Z39.50 service.lnk" \
129 "$INSTDIR\bin\yaz-ztest.exe" '-remove'
132 Section "YAZ Development" YAZ_Development
134 SetOutPath $INSTDIR\include\yaz
135 File ..\include\yaz\*.h
136 SetOutPath $INSTDIR\lib
140 Section "YAZ Documentation" YAZ_Documentation
142 SetOutPath $INSTDIR\doc
143 File /nonfatal /r ..\doc\*.css
144 File /nonfatal /r ..\doc\*.ent
145 File /nonfatal /r ..\doc\*.html
148 File /nonfatal /r ..\doc\*.xsl
149 SetOutPath $SMPROGRAMS\YAZ
150 CreateShortCut "$SMPROGRAMS\YAZ\HTML Documentation.lnk" \
151 "$INSTDIR\doc\index.html"
154 Section "YAZ Source" YAZ_Source
159 File /r /x yaz ..\*.h
160 SetOutPath $INSTDIR\util
161 File ..\util\yaz-asncomp
162 SetOutPath $INSTDIR\src
167 File ..\src\codetables*.xml
168 SetOutPath $INSTDIR\test
173 SetOutPath $INSTDIR\win
179 Section "YAZ4J" YAZ4J
181 SetOutPath $INSTDIR\bin
182 File /nonfatal ..\bin\yaz4j.dll
183 SetOutPath $INSTDIR\java
184 File /nonfatal ..\java\yaz4j.jar
187 Section "YAZ Path" YAZ_PATH
189 ${EnvVarUpdate} $0 "PATH" "A" "HKLM" "$INSTDIR\bin"
192 ; begin uninstall settings/section
193 UninstallText "This will uninstall YAZ ${VERSION} from your system"
196 ; add delete commands to delete whatever files/registry keys/etc you installed here.
197 Delete "$INSTDIR\uninst.exe"
198 DeleteRegKey HKLM "SOFTWARE\Index Data\YAZ"
199 DeleteRegKey HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\YAZ"
200 ExecWait '"$INSTDIR\bin\yaz-ztest" -remove'
201 RMDir /r $SMPROGRAMS\YAZ
203 ${un.EnvVarUpdate} $0 "PATH" "R" "HKLM" "$INSTDIR\bin"
204 IfFileExists $INSTDIR 0 Removed
205 MessageBox MB_OK|MB_ICONEXCLAMATION \
206 "Note: $INSTDIR could not be removed."
210 ;--------------------------------
214 LangString DESC_YAZ_Runtime ${LANG_ENGLISH} "YAZ runtime files needed in order for YAZ to run, such as DLLs."
215 LangString DESC_YAZ_Development ${LANG_ENGLISH} "Header files and import libraries required for developing software using YAZ."
216 LangString DESC_YAZ_Documentation ${LANG_ENGLISH} "YAZ Users' guide and reference in HTML. Describes both YAZ applications and the API."
217 LangString DESC_YAZ_Source ${LANG_ENGLISH} "Source code of YAZ. Required if you need to rebuild YAZ (for debugging purposes)."
218 LangString DESC_YAZ4J ${LANG_ENGLISH} "Java wrapper for the ZOOM API of YAZ."
219 LangString DESC_YAZ_PATH ${LANG_ENGLISH} "Update PATH to include binaries of YAZ."
221 ;Assign language strings to sections
222 !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
223 !insertmacro MUI_DESCRIPTION_TEXT ${YAZ_Runtime} $(DESC_YAZ_Runtime)
224 !insertmacro MUI_DESCRIPTION_TEXT ${YAZ_Development} $(DESC_YAZ_Development)
225 !insertmacro MUI_DESCRIPTION_TEXT ${YAZ_Documentation} $(DESC_YAZ_Documentation)
226 !insertmacro MUI_DESCRIPTION_TEXT ${YAZ_Source} $(DESC_YAZ_Source)
227 !insertmacro MUI_DESCRIPTION_TEXT ${YAZ4J} $(DESC_YAZ4J)
228 !insertmacro MUI_DESCRIPTION_TEXT ${YAZ_PATH} $(DESC_YAZ_PATH)
229 !insertmacro MUI_FUNCTION_DESCRIPTION_END