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
13 Caption "Index Data YAZ ${VERSION} Setup"
14 OutFile "yaz_${VERSION}.exe"
16 LicenseText "You must read the following license before installing:"
17 LicenseData license.txt
19 ComponentText "This will install the YAZ Toolkit on your computer:"
20 InstType "Full (w/ Source)"
21 InstType "Lite (w/o Source)"
23 InstallDirRegKey HKLM "SOFTWARE\Index Data\YAZ" ""
26 ;----------------------------
30 !insertmacro MUI_PAGE_LICENSE "license.txt"
31 !insertmacro MUI_PAGE_COMPONENTS
32 !insertmacro MUI_PAGE_DIRECTORY
33 !insertmacro MUI_PAGE_INSTFILES
35 !insertmacro MUI_UNPAGE_CONFIRM
36 !insertmacro MUI_UNPAGE_INSTFILES
41 ; UninstPage uninstConfirm
42 ; UninstPage instfiles
44 ;--------------------------------
47 !insertmacro MUI_LANGUAGE "English"
49 ;--------------------------------
51 Section "" ; (default section)
53 ; add files / whatever that need to be installed here.
54 WriteRegStr HKLM "SOFTWARE\Index Data\YAZ" "" "$INSTDIR"
55 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\YAZ" "DisplayName" "YAZ ${VERSION} (remove only)"
56 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\YAZ" "UninstallString" '"$INSTDIR\uninst.exe"'
57 ; write out uninstaller
58 WriteUninstaller "$INSTDIR\uninst.exe"
59 SetOutPath $SMPROGRAMS\YAZ
60 CreateShortCut "$SMPROGRAMS\YAZ\YAZ Program Directory.lnk" \
62 WriteINIStr "$SMPROGRAMS\YAZ\YAZ Home page.url" \
63 "InternetShortcut" "URL" "http://www.indexdata.com/yaz/"
64 CreateShortCut "$SMPROGRAMS\YAZ\Uninstall YAZ.lnk" \
71 SetOutPath $INSTDIR\ztest
72 File ..\ztest\dummy-grs
73 File ..\ztest\dummy-words
74 SetOutPath $INSTDIR\etc
77 File ..\etc\pqf.properties
79 SectionEnd ; end of default section
81 Section "YAZ Runtime" YAZ_Runtime
83 SetOutPath $INSTDIR\bin
84 !if "${VS_REDIST_FULL}" != ""
85 File "${VS_REDIST_FULL}"
86 ReadRegDword $1 HKLM "${VS_REDIST_KEY}" "Version"
88 ExecWait '"$INSTDIR\bin\${VS_REDIST_EXE}" /passive /nostart'
90 Delete "$INSTDIR\bin\${VS_REDIST_EXE}"
92 IfFileExists "$INSTDIR\bin\yaz-ztest.exe" 0 Noservice
93 ExecWait '"$INSTDIR\bin\yaz-ztest.exe" -remove'
97 SetOutPath $SMPROGRAMS\YAZ
98 CreateShortCut "$SMPROGRAMS\YAZ\YAZ Client.lnk" \
99 "$INSTDIR\bin\yaz-client.exe"
100 SetOutPath $SMPROGRAMS\YAZ\Server
101 CreateShortCut "$SMPROGRAMS\YAZ\Server\Server on console on port 9999.lnk" \
102 "$INSTDIR\bin\yaz-ztest.exe" '-w"$INSTDIR\ztest"'
103 CreateShortCut "$SMPROGRAMS\YAZ\Server\Install Z39.50 service on port 210.lnk" \
104 "$INSTDIR\bin\yaz-ztest.exe" '-installa tcp:@:210'
105 CreateShortCut "$SMPROGRAMS\YAZ\Server\Remove Z39.50 service.lnk" \
106 "$INSTDIR\bin\yaz-ztest.exe" '-remove'
109 Section "YAZ Development" YAZ_Development
111 SetOutPath $INSTDIR\include\yaz
112 File ..\include\yaz\*.h
113 SetOutPath $INSTDIR\lib
117 Section "YAZ Documentation" YAZ_Documentation
119 SetOutPath $INSTDIR\doc
120 File /nonfatal /r ..\doc\*.css
121 File /nonfatal /r ..\doc\*.ent
122 File /nonfatal /r ..\doc\*.html
125 File /nonfatal /r ..\doc\*.xsl
126 SetOutPath $SMPROGRAMS\YAZ
127 CreateShortCut "$SMPROGRAMS\YAZ\HTML Documentation.lnk" \
128 "$INSTDIR\doc\index.html"
131 Section "YAZ Source" YAZ_Source
136 File /r /x yaz ..\*.h
137 SetOutPath $INSTDIR\util
138 File ..\util\yaz-asncomp
139 SetOutPath $INSTDIR\src
144 File ..\src\codetables*.xml
145 SetOutPath $INSTDIR\test
150 SetOutPath $INSTDIR\win
156 Section "YAZ4J" YAZ4J
158 SetOutPath $INSTDIR\bin
159 File /nonfatal ..\bin\yaz4j.dll
160 SetOutPath $INSTDIR\java
161 File /nonfatal ..\java\yaz4j.jar
164 Section "YAZ Path" YAZ_PATH
166 ${EnvVarUpdate} $0 "PATH" "A" "HKLM" "$INSTDIR\bin"
169 ; begin uninstall settings/section
170 UninstallText "This will uninstall YAZ ${VERSION} from your system"
173 ; add delete commands to delete whatever files/registry keys/etc you installed here.
174 Delete "$INSTDIR\uninst.exe"
175 DeleteRegKey HKLM "SOFTWARE\Index Data\YAZ"
176 DeleteRegKey HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\YAZ"
177 ExecWait '"$INSTDIR\bin\yaz-ztest" -remove'
178 RMDir /r $SMPROGRAMS\YAZ
180 ${un.EnvVarUpdate} $0 "PATH" "R" "HKLM" "$INSTDIR\bin"
181 IfFileExists $INSTDIR 0 Removed
182 MessageBox MB_OK|MB_ICONEXCLAMATION \
183 "Note: $INSTDIR could not be removed."
187 ;--------------------------------
191 LangString DESC_YAZ_Runtime ${LANG_ENGLISH} "YAZ runtime files needed in order for YAZ to run, such as DLLs."
192 LangString DESC_YAZ_Development ${LANG_ENGLISH} "Header files and import libraries required for developing software using YAZ."
193 LangString DESC_YAZ_Documentation ${LANG_ENGLISH} "YAZ Users' guide and reference in HTML. Describes both YAZ applications and the API."
194 LangString DESC_YAZ_Source ${LANG_ENGLISH} "Source code of YAZ. Required if you need to rebuild YAZ (for debugging purposes)."
195 LangString DESC_YAZ4J ${LANG_ENGLISH} "Java wrapper for the ZOOM API of YAZ."
196 LangString DESC_YAZ_PATH ${LANG_ENGLISH} "Update PATH to include binaries of YAZ."
198 ;Assign language strings to sections
199 !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
200 !insertmacro MUI_DESCRIPTION_TEXT ${YAZ_Runtime} $(DESC_YAZ_Runtime)
201 !insertmacro MUI_DESCRIPTION_TEXT ${YAZ_Development} $(DESC_YAZ_Development)
202 !insertmacro MUI_DESCRIPTION_TEXT ${YAZ_Documentation} $(DESC_YAZ_Documentation)
203 !insertmacro MUI_DESCRIPTION_TEXT ${YAZ_Source} $(DESC_YAZ_Source)
204 !insertmacro MUI_DESCRIPTION_TEXT ${YAZ4J} $(DESC_YAZ4J)
205 !insertmacro MUI_DESCRIPTION_TEXT ${YAZ_PATH} $(DESC_YAZ_PATH)
206 !insertmacro MUI_FUNCTION_DESCRIPTION_END