1 ; $Id: yaz.nsi,v 1.86 2006-06-07 11:18:04 adam Exp $
3 !define VERSION "2.1.21"
5 ; Microsoft runtime CRT
7 ; !define VS_RUNTIME "c:\Program Files\Microsoft Visual Studio .NET 2003\SDK\v1.1\Bin\msvcr71.dll"
10 !define VS_RUNTIME "c:\Program Files\Microsoft Visual Studio 8\VC\redist\x86\Microsoft.VC80.CRT\msvcr80.dll"
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 InstallDir "$PROGRAMFILES\YAZ"
28 InstallDirRegKey HKLM "SOFTWARE\Index Data\YAZ" ""
31 ;----------------------------
35 !insertmacro MUI_PAGE_LICENSE "license.txt"
36 !insertmacro MUI_PAGE_COMPONENTS
37 !insertmacro MUI_PAGE_DIRECTORY
38 !insertmacro MUI_PAGE_INSTFILES
40 !insertmacro MUI_UNPAGE_CONFIRM
41 !insertmacro MUI_UNPAGE_INSTFILES
46 ; UninstPage uninstConfirm
47 ; UninstPage instfiles
49 ;--------------------------------
52 !insertmacro MUI_LANGUAGE "English"
54 ;--------------------------------
56 Section "" ; (default section)
58 ; add files / whatever that need to be installed here.
59 WriteRegStr HKLM "SOFTWARE\Index Data\YAZ" "" "$INSTDIR"
60 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\YAZ" "DisplayName" "YAZ ${VERSION} (remove only)"
61 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\YAZ" "UninstallString" '"$INSTDIR\uninst.exe"'
62 ; write out uninstaller
63 WriteUninstaller "$INSTDIR\uninst.exe"
64 SetOutPath $SMPROGRAMS\YAZ
65 CreateShortCut "$SMPROGRAMS\YAZ\YAZ Program Directory.lnk" \
67 WriteINIStr "$SMPROGRAMS\YAZ\YAZ Home page.url" \
68 "InternetShortcut" "URL" "http://www.indexdata.dk/yaz/"
69 CreateShortCut "$SMPROGRAMS\YAZ\Uninstall YAZ.lnk" \
76 SetOutPath $INSTDIR\ztest
77 File ..\ztest\dummy-records
78 File ..\ztest\dummy-grs
79 File ..\ztest\dummy-words
80 SetOutPath $INSTDIR\etc
83 File ..\etc\pqf.properties
85 SectionEnd ; end of default section
87 Section "YAZ Runtime" YAZ_Runtime
89 IfFileExists "$INSTDIR\bin\yaz-ztest.exe" 0 Noservice
90 ExecWait '"$INSTDIR\bin\yaz-ztest.exe" -remove'
92 SetOutPath $INSTDIR\bin
96 File ..\bin\libxml2.dll
97 File ..\bin\libxslt.dll
100 SetOutPath $SMPROGRAMS\YAZ
101 CreateShortCut "$SMPROGRAMS\YAZ\YAZ Client.lnk" \
102 "$INSTDIR\bin\yaz-client.exe"
103 SetOutPath $SMPROGRAMS\YAZ\Server
104 CreateShortCut "$SMPROGRAMS\YAZ\Server\Server on console on port 9999.lnk" \
105 "$INSTDIR\bin\yaz-ztest.exe" '-w"$INSTDIR\ztest"'
106 CreateShortCut "$SMPROGRAMS\YAZ\Server\Install Z39.50 service on port 210.lnk" \
107 "$INSTDIR\bin\yaz-ztest.exe" '-installa tcp:@:210'
108 CreateShortCut "$SMPROGRAMS\YAZ\Server\Remove Z39.50 service.lnk" \
109 "$INSTDIR\bin\yaz-ztest.exe" '-remove'
112 Section "YAZ Development" YAZ_Development
114 SetOutPath $INSTDIR\include\yaz
115 File ..\include\yaz\*.h
116 SetOutPath $INSTDIR\lib
119 SetOutPath $INSTDIR\bin
123 Section "YAZ Documentation" YAZ_Documentation
125 SetOutPath $INSTDIR\doc
128 File /r ..\doc\*.html
132 SetOutPath $SMPROGRAMS\YAZ
133 CreateShortCut "$SMPROGRAMS\YAZ\HTML Documentation.lnk" \
134 "$INSTDIR\doc\index.html"
137 Section "YAZ Source" YAZ_Source
141 File /r /x yaz ..\*.h
142 SetOutPath $INSTDIR\util
143 File ..\util\yaz-asncomp
144 SetOutPath $INSTDIR\src
149 File ..\src\codetables.xml
150 SetOutPath $INSTDIR\test
155 SetOutPath $INSTDIR\win
161 ; begin uninstall settings/section
162 UninstallText "This will uninstall YAZ ${VERSION} from your system"
165 ; add delete commands to delete whatever files/registry keys/etc you installed here.
166 Delete "$INSTDIR\uninst.exe"
167 DeleteRegKey HKLM "SOFTWARE\Index Data\YAZ"
168 DeleteRegKey HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\YAZ"
169 ExecWait '"$INSTDIR\bin\yaz-ztest" -remove'
170 RMDir /r $SMPROGRAMS\YAZ
172 IfFileExists $INSTDIR 0 Removed
173 MessageBox MB_OK|MB_ICONEXCLAMATION \
174 "Note: $INSTDIR could not be removed."
178 ;--------------------------------
182 LangString DESC_YAZ_Runtime ${LANG_ENGLISH} "YAZ runtime files needed in order for YAZ to run, such as DLLs."
183 LangString DESC_YAZ_Development ${LANG_ENGLISH} "Header files and import libraries required for developing software using YAZ."
184 LangString DESC_YAZ_Documentation ${LANG_ENGLISH} "YAZ Users' guide and reference in HTML. Describes both YAZ applications and the API."
185 LangString DESC_YAZ_Source ${LANG_ENGLISH} "Source code of YAZ. Required if you need to rebuild YAZ (for debugging purposes)."
187 ;Assign language strings to sections
188 !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
189 !insertmacro MUI_DESCRIPTION_TEXT ${YAZ_Runtime} $(DESC_YAZ_Runtime)
190 !insertmacro MUI_DESCRIPTION_TEXT ${YAZ_Development} $(DESC_YAZ_Development)
191 !insertmacro MUI_DESCRIPTION_TEXT ${YAZ_Documentation} $(DESC_YAZ_Documentation)
192 !insertmacro MUI_DESCRIPTION_TEXT ${YAZ_Source} $(DESC_YAZ_Source)
193 !insertmacro MUI_FUNCTION_DESCRIPTION_END