1 ; $Id: yaz.nsi,v 1.85 2006-06-02 13:31:21 adam Exp $
3 !define VERSION "2.1.20"
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
91 File ..\bin\libxslt.dll
94 SetOutPath $SMPROGRAMS\YAZ
95 CreateShortCut "$SMPROGRAMS\YAZ\YAZ Client.lnk" \
96 "$INSTDIR\bin\yaz-client.exe"
97 SetOutPath $SMPROGRAMS\YAZ\Server
98 CreateShortCut "$SMPROGRAMS\YAZ\Server\Server on console on port 9999.lnk" \
99 "$INSTDIR\bin\yaz-ztest.exe" '-w"$INSTDIR\ztest"'
100 CreateShortCut "$SMPROGRAMS\YAZ\Server\Install Z39.50 service on port 210.lnk" \
101 "$INSTDIR\bin\yaz-ztest.exe" '-installa tcp:@:210'
102 CreateShortCut "$SMPROGRAMS\YAZ\Server\Remove Z39.50 service.lnk" \
103 "$INSTDIR\bin\yaz-ztest.exe" '-remove'
106 Section "YAZ Development" YAZ_Development
108 SetOutPath $INSTDIR\include\yaz
109 File ..\include\yaz\*.h
110 SetOutPath $INSTDIR\lib
113 SetOutPath $INSTDIR\bin
117 Section "YAZ Documentation" YAZ_Documentation
119 SetOutPath $INSTDIR\doc
122 File /r ..\doc\*.html
126 SetOutPath $SMPROGRAMS\YAZ
127 CreateShortCut "$SMPROGRAMS\YAZ\HTML Documentation.lnk" \
128 "$INSTDIR\doc\index.html"
131 Section "YAZ Source" YAZ_Source
135 File /r /x yaz ..\*.h
136 SetOutPath $INSTDIR\util
137 File ..\util\yaz-asncomp
138 SetOutPath $INSTDIR\src
143 File ..\src\codetables.xml
144 SetOutPath $INSTDIR\test
149 SetOutPath $INSTDIR\win
155 ; begin uninstall settings/section
156 UninstallText "This will uninstall YAZ ${VERSION} from your system"
159 ; add delete commands to delete whatever files/registry keys/etc you installed here.
160 Delete "$INSTDIR\uninst.exe"
161 DeleteRegKey HKLM "SOFTWARE\Index Data\YAZ"
162 DeleteRegKey HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\YAZ"
163 ExecWait '"$INSTDIR\bin\yaz-ztest" -remove'
164 RMDir /r $SMPROGRAMS\YAZ
166 IfFileExists $INSTDIR 0 Removed
167 MessageBox MB_OK|MB_ICONEXCLAMATION \
168 "Note: $INSTDIR could not be removed."
172 ;--------------------------------
176 LangString DESC_YAZ_Runtime ${LANG_ENGLISH} "YAZ runtime files needed in order for YAZ to run, such as DLLs."
177 LangString DESC_YAZ_Development ${LANG_ENGLISH} "Header files and import libraries required for developing software using YAZ."
178 LangString DESC_YAZ_Documentation ${LANG_ENGLISH} "YAZ Users' guide and reference in HTML. Describes both YAZ applications and the API."
179 LangString DESC_YAZ_Source ${LANG_ENGLISH} "Source code of YAZ. Required if you need to rebuild YAZ (for debugging purposes)."
181 ;Assign language strings to sections
182 !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
183 !insertmacro MUI_DESCRIPTION_TEXT ${YAZ_Runtime} $(DESC_YAZ_Runtime)
184 !insertmacro MUI_DESCRIPTION_TEXT ${YAZ_Development} $(DESC_YAZ_Development)
185 !insertmacro MUI_DESCRIPTION_TEXT ${YAZ_Documentation} $(DESC_YAZ_Documentation)
186 !insertmacro MUI_DESCRIPTION_TEXT ${YAZ_Source} $(DESC_YAZ_Source)
187 !insertmacro MUI_FUNCTION_DESCRIPTION_END