1 ; $Id: yaz.nsi,v 1.79 2006-04-20 08:38:01 marc Exp $
3 !define VERSION "2.1.18"
4 !define VS_RUNTIME_LOCATION "c:\Program Files\Microsoft Visual Studio .NET 2003\SDK\v1.1\Bin"
11 Caption "Index Data YAZ ${VERSION} Setup"
12 OutFile "yaz_${VERSION}.exe"
14 LicenseText "You must read the following license before installing:"
15 LicenseData license.txt
17 ComponentText "This will install the YAZ Toolkit on your computer:"
18 InstType "Full (w/ Source)"
19 InstType "Lite (w/o Source)"
21 InstallDir "$PROGRAMFILES\YAZ"
22 InstallDirRegKey HKLM "SOFTWARE\Index Data\YAZ" ""
25 ;----------------------------
29 !insertmacro MUI_PAGE_LICENSE "license.txt"
30 !insertmacro MUI_PAGE_COMPONENTS
31 !insertmacro MUI_PAGE_DIRECTORY
32 !insertmacro MUI_PAGE_INSTFILES
34 !insertmacro MUI_UNPAGE_CONFIRM
35 !insertmacro MUI_UNPAGE_INSTFILES
40 ; UninstPage uninstConfirm
41 ; UninstPage instfiles
43 ;--------------------------------
46 !insertmacro MUI_LANGUAGE "English"
48 ;--------------------------------
50 Section "" ; (default section)
52 ; add files / whatever that need to be installed here.
53 WriteRegStr HKLM "SOFTWARE\Index Data\YAZ" "" "$INSTDIR"
54 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\YAZ" "DisplayName" "YAZ ${VERSION} (remove only)"
55 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\YAZ" "UninstallString" '"$INSTDIR\uninst.exe"'
56 ; write out uninstaller
57 WriteUninstaller "$INSTDIR\uninst.exe"
58 SetOutPath $SMPROGRAMS\YAZ
59 CreateShortCut "$SMPROGRAMS\YAZ\YAZ Program Directory.lnk" \
61 WriteINIStr "$SMPROGRAMS\YAZ\YAZ Home page.url" \
62 "InternetShortcut" "URL" "http://www.indexdata.dk/yaz/"
63 CreateShortCut "$SMPROGRAMS\YAZ\Uninstall YAZ.lnk" \
70 SetOutPath $INSTDIR\ztest
71 File ..\ztest\dummy-records
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 IfFileExists "$INSTDIR\bin\yaz-ztest.exe" 0 Noservice
84 ExecWait '"$INSTDIR\bin\yaz-ztest.exe" -remove'
86 SetOutPath $INSTDIR\bin
87 File "${VS_RUNTIME_LOCATION}\msvcr71.dll"
90 File ..\bin\libxml2.dll
93 SetOutPath $SMPROGRAMS\YAZ
94 CreateShortCut "$SMPROGRAMS\YAZ\YAZ Client.lnk" \
95 "$INSTDIR\bin\yaz-client.exe"
96 SetOutPath $SMPROGRAMS\YAZ\Server
97 CreateShortCut "$SMPROGRAMS\YAZ\Server\Server on console on port 9999.lnk" \
98 "$INSTDIR\bin\yaz-ztest.exe" '-w"$INSTDIR\ztest"'
99 CreateShortCut "$SMPROGRAMS\YAZ\Server\Install Z39.50 service on port 210.lnk" \
100 "$INSTDIR\bin\yaz-ztest.exe" '-installa tcp:@:210'
101 CreateShortCut "$SMPROGRAMS\YAZ\Server\Remove Z39.50 service.lnk" \
102 "$INSTDIR\bin\yaz-ztest.exe" '-remove'
105 Section "YAZ Development" YAZ_Development
107 SetOutPath $INSTDIR\include\yaz
108 File ..\include\yaz\*.h
109 SetOutPath $INSTDIR\lib
112 SetOutPath $INSTDIR\bin
116 Section "YAZ Documentation" YAZ_Documentation
118 SetOutPath $INSTDIR\doc
128 SetOutPath $SMPROGRAMS\YAZ
129 CreateShortCut "$SMPROGRAMS\YAZ\HTML Documentation.lnk" \
130 "$INSTDIR\doc\yaz.html"
131 CreateShortCut "$SMPROGRAMS\YAZ\PDF Documentaion.lnk" \
132 "$INSTDIR\doc\yaz.pdf"
135 Section "YAZ Source" YAZ_Source
137 SetOutPath $INSTDIR\util
139 File ..\util\yaz-asncomp
140 SetOutPath $INSTDIR\src
147 File ..\src\codetables.xml
148 SetOutPath $INSTDIR\test
154 SetOutPath $INSTDIR\zoom
156 SetOutPath $INSTDIR\ztest
158 SetOutPath $INSTDIR\client
161 SetOutPath $INSTDIR\win
168 ; begin uninstall settings/section
169 UninstallText "This will uninstall YAZ ${VERSION} from your system"
172 ; add delete commands to delete whatever files/registry keys/etc you installed here.
173 Delete "$INSTDIR\uninst.exe"
174 DeleteRegKey HKLM "SOFTWARE\Index Data\YAZ"
175 DeleteRegKey HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\YAZ"
176 ExecWait '"$INSTDIR\bin\yaz-ztest" -remove'
177 RMDir /r $SMPROGRAMS\YAZ
179 IfFileExists $INSTDIR 0 Removed
180 MessageBox MB_OK|MB_ICONEXCLAMATION \
181 "Note: $INSTDIR could not be removed."
185 ;--------------------------------
189 LangString DESC_YAZ_Runtime ${LANG_ENGLISH} "YAZ runtime files needed in order for YAZ to run, such as DLLs."
190 LangString DESC_YAZ_Development ${LANG_ENGLISH} "Header files and import libraries required for developing software using YAZ."
191 LangString DESC_YAZ_Documentation ${LANG_ENGLISH} "YAZ Users' guide and reference in HTML and PDF. Describes both YAZ applications and the API."
192 LangString DESC_YAZ_Source ${LANG_ENGLISH} "Source code of YAZ. Required if you need to rebuild YAZ (for debugging purposes)."
194 ;Assign language strings to sections
195 !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
196 !insertmacro MUI_DESCRIPTION_TEXT ${YAZ_Runtime} $(DESC_YAZ_Runtime)
197 !insertmacro MUI_DESCRIPTION_TEXT ${YAZ_Development} $(DESC_YAZ_Development)
198 !insertmacro MUI_DESCRIPTION_TEXT ${YAZ_Documentation} $(DESC_YAZ_Documentation)
199 !insertmacro MUI_DESCRIPTION_TEXT ${YAZ_Source} $(DESC_YAZ_Source)
200 !insertmacro MUI_FUNCTION_DESCRIPTION_END