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 ; !define VS_REDIST_EXE "vcredist_x86.exe"
9 ; !define VS_REDIST_FULL "c:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\redist\1033\${VS_REDIST_EXE}"
10 ; !define VS_REDIST_KEY "SOFTWARE\Microsoft\VisualStudio\12.0\VC\Runtimes\x86"
17 Caption "Index Data YAZ ${VERSION} Setup"
18 OutFile "yaz_${VERSION}.exe"
20 LicenseText "You must read the following license before installing:"
21 LicenseData license.txt
23 ComponentText "This will install the YAZ Toolkit on your computer:"
24 InstType "Full (w/ Source)"
25 InstType "Lite (w/o Source)"
27 InstallDirRegKey HKLM "SOFTWARE\Index Data\YAZ" ""
30 ;----------------------------
34 !insertmacro MUI_PAGE_LICENSE "license.txt"
35 !insertmacro MUI_PAGE_COMPONENTS
36 !insertmacro MUI_PAGE_DIRECTORY
37 !insertmacro MUI_PAGE_INSTFILES
39 !insertmacro MUI_UNPAGE_CONFIRM
40 !insertmacro MUI_UNPAGE_INSTFILES
45 ; UninstPage uninstConfirm
46 ; UninstPage instfiles
48 ;--------------------------------
51 !insertmacro MUI_LANGUAGE "English"
53 ;--------------------------------
55 Section "" ; (default section)
57 ; add files / whatever that need to be installed here.
58 WriteRegStr HKLM "SOFTWARE\Index Data\YAZ" "" "$INSTDIR"
59 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\YAZ" "DisplayName" "YAZ ${VERSION} (remove only)"
60 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\YAZ" "UninstallString" '"$INSTDIR\uninst.exe"'
61 ; write out uninstaller
62 WriteUninstaller "$INSTDIR\uninst.exe"
63 SetOutPath $SMPROGRAMS\YAZ
64 CreateShortCut "$SMPROGRAMS\YAZ\YAZ Program Directory.lnk" \
66 WriteINIStr "$SMPROGRAMS\YAZ\YAZ Home page.url" \
67 "InternetShortcut" "URL" "http://www.indexdata.com/yaz/"
68 CreateShortCut "$SMPROGRAMS\YAZ\Uninstall YAZ.lnk" \
75 SetOutPath $INSTDIR\ztest
76 File ..\ztest\dummy-grs
77 File ..\ztest\dummy-words
78 SetOutPath $INSTDIR\etc
81 File ..\etc\pqf.properties
83 SectionEnd ; end of default section
85 Section "YAZ Runtime" YAZ_Runtime
87 SetOutPath $INSTDIR\bin
88 !if "${VS_REDIST_FULL}" != ""
89 File "${VS_REDIST_FULL}"
90 ReadRegStr $1 HKLM "${VS_REDIST_KEY}" "Installed"
91 StrCmp $1 1 installed_redist
92 ExecWait '"$INSTDIR\bin\${VS_REDIST_EXE}" /passive /nostart'
94 Delete "$INSTDIR\bin\${VS_REDIST_EXE}"
96 IfFileExists "$INSTDIR\bin\yaz-ztest.exe" 0 Noservice
97 ExecWait '"$INSTDIR\bin\yaz-ztest.exe" -remove'
101 SetOutPath $SMPROGRAMS\YAZ
102 CreateShortCut "$SMPROGRAMS\YAZ\YAZ Client.lnk" \
103 "$INSTDIR\bin\yaz-client.exe"
104 SetOutPath $SMPROGRAMS\YAZ\Server
105 CreateShortCut "$SMPROGRAMS\YAZ\Server\Server on console on port 9999.lnk" \
106 "$INSTDIR\bin\yaz-ztest.exe" '-w"$INSTDIR\ztest"'
107 CreateShortCut "$SMPROGRAMS\YAZ\Server\Install Z39.50 service on port 210.lnk" \
108 "$INSTDIR\bin\yaz-ztest.exe" '-installa tcp:@:210'
109 CreateShortCut "$SMPROGRAMS\YAZ\Server\Remove Z39.50 service.lnk" \
110 "$INSTDIR\bin\yaz-ztest.exe" '-remove'
113 Section "YAZ Development" YAZ_Development
115 SetOutPath $INSTDIR\include\yaz
116 File ..\include\yaz\*.h
117 SetOutPath $INSTDIR\lib
121 Section "YAZ Documentation" YAZ_Documentation
123 SetOutPath $INSTDIR\doc
124 File /nonfatal /r ..\doc\*.css
125 File /nonfatal /r ..\doc\*.ent
126 File /nonfatal /r ..\doc\*.html
129 File /nonfatal /r ..\doc\*.xsl
130 SetOutPath $SMPROGRAMS\YAZ
131 CreateShortCut "$SMPROGRAMS\YAZ\HTML Documentation.lnk" \
132 "$INSTDIR\doc\index.html"
135 Section "YAZ Source" YAZ_Source
140 File /r /x yaz ..\*.h
141 SetOutPath $INSTDIR\util
142 File ..\util\yaz-asncomp
143 SetOutPath $INSTDIR\src
148 File ..\src\codetables*.xml
149 SetOutPath $INSTDIR\test
154 SetOutPath $INSTDIR\win
160 Section "YAZ4J" YAZ4J
162 SetOutPath $INSTDIR\bin
163 File /nonfatal ..\bin\yaz4j.dll
164 SetOutPath $INSTDIR\java
165 File /nonfatal ..\java\yaz4j.jar
168 Section "YAZ Path" YAZ_PATH
170 ${EnvVarUpdate} $0 "PATH" "A" "HKLM" "$INSTDIR\bin"
173 ; begin uninstall settings/section
174 UninstallText "This will uninstall YAZ ${VERSION} from your system"
177 ; add delete commands to delete whatever files/registry keys/etc you installed here.
178 Delete "$INSTDIR\uninst.exe"
179 DeleteRegKey HKLM "SOFTWARE\Index Data\YAZ"
180 DeleteRegKey HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\YAZ"
181 ExecWait '"$INSTDIR\bin\yaz-ztest" -remove'
182 RMDir /r $SMPROGRAMS\YAZ
184 ${un.EnvVarUpdate} $0 "PATH" "R" "HKLM" "$INSTDIR\bin"
185 IfFileExists $INSTDIR 0 Removed
186 MessageBox MB_OK|MB_ICONEXCLAMATION \
187 "Note: $INSTDIR could not be removed."
191 ;--------------------------------
195 LangString DESC_YAZ_Runtime ${LANG_ENGLISH} "YAZ runtime files needed in order for YAZ to run, such as DLLs."
196 LangString DESC_YAZ_Development ${LANG_ENGLISH} "Header files and import libraries required for developing software using YAZ."
197 LangString DESC_YAZ_Documentation ${LANG_ENGLISH} "YAZ Users' guide and reference in HTML. Describes both YAZ applications and the API."
198 LangString DESC_YAZ_Source ${LANG_ENGLISH} "Source code of YAZ. Required if you need to rebuild YAZ (for debugging purposes)."
199 LangString DESC_YAZ4J ${LANG_ENGLISH} "Java wrapper for the ZOOM API of YAZ."
200 LangString DESC_YAZ_PATH ${LANG_ENGLISH} "Update PATH to include binaries of YAZ."
202 ;Assign language strings to sections
203 !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
204 !insertmacro MUI_DESCRIPTION_TEXT ${YAZ_Runtime} $(DESC_YAZ_Runtime)
205 !insertmacro MUI_DESCRIPTION_TEXT ${YAZ_Development} $(DESC_YAZ_Development)
206 !insertmacro MUI_DESCRIPTION_TEXT ${YAZ_Documentation} $(DESC_YAZ_Documentation)
207 !insertmacro MUI_DESCRIPTION_TEXT ${YAZ_Source} $(DESC_YAZ_Source)
208 !insertmacro MUI_DESCRIPTION_TEXT ${YAZ4J} $(DESC_YAZ4J)
209 !insertmacro MUI_DESCRIPTION_TEXT ${YAZ_PATH} $(DESC_YAZ_PATH)
210 !insertmacro MUI_FUNCTION_DESCRIPTION_END