1 ; $Id: yaz.nsi,v 1.48 2004-05-14 08:19:16 adam Exp $
3 !define VERSION "2.0.21"
8 Caption "Index Data YAZ ${VERSION} Setup"
9 OutFile "yaz_${VERSION}.exe"
11 LicenseText "You must read the following license before installing:"
12 LicenseData license.txt
14 ComponentText "This will install the YAZ Toolkit on your computer:"
15 InstType "Full (w/ Source)"
16 InstType "Lite (w/o Source)"
18 InstallDir "$PROGRAMFILES\YAZ"
19 InstallDirRegKey HKLM "SOFTWARE\Index Data\YAZ" ""
22 ;----------------------------
26 !insertmacro MUI_PAGE_LICENSE "license.txt"
27 !insertmacro MUI_PAGE_COMPONENTS
28 !insertmacro MUI_PAGE_DIRECTORY
29 !insertmacro MUI_PAGE_INSTFILES
31 !insertmacro MUI_UNPAGE_CONFIRM
32 !insertmacro MUI_UNPAGE_INSTFILES
37 ; UninstPage uninstConfirm
38 ; UninstPage instfiles
40 ;--------------------------------
43 !insertmacro MUI_LANGUAGE "English"
45 ;--------------------------------
47 Section "" ; (default section)
49 ; add files / whatever that need to be installed here.
50 WriteRegStr HKLM "SOFTWARE\Index Data\YAZ" "" "$INSTDIR"
51 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\YAZ" "DisplayName" "YAZ ${VERSION} (remove only)"
52 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\YAZ" "UninstallString" '"$INSTDIR\uninst.exe"'
53 ; write out uninstaller
54 WriteUninstaller "$INSTDIR\uninst.exe"
55 SetOutPath $SMPROGRAMS\YAZ
56 CreateShortCut "$SMPROGRAMS\YAZ\YAZ Program Directory.lnk" \
58 WriteINIStr "$SMPROGRAMS\YAZ\YAZ Home page.url" \
59 "InternetShortcut" "URL" "http://www.indexdata.dk/yaz/"
60 CreateShortCut "$SMPROGRAMS\YAZ\Uninstall YAZ.lnk" \
67 SetOutPath $INSTDIR\ztest
68 File ..\ztest\dummy-records
69 File ..\ztest\dummy-grs
70 File ..\ztest\dummy-words
71 SetOutPath $INSTDIR\etc
74 File ..\etc\pqf.properties
76 SectionEnd ; end of default section
78 Section "YAZ Runtime" YAZ_Runtime
80 IfFileExists "$INSTDIR\bin\yaz-ztest.exe" 0 Noservice
81 ExecWait '"$INSTDIR\bin\yaz-ztest.exe" -remove'
83 SetOutPath $INSTDIR\bin
86 SetOutPath $SMPROGRAMS\YAZ
87 CreateShortCut "$SMPROGRAMS\YAZ\YAZ Client.lnk" \
88 "$INSTDIR\bin\yaz-client.exe"
89 SetOutPath $SMPROGRAMS\YAZ\Server
90 CreateShortCut "$SMPROGRAMS\YAZ\Server\Server on console on port 9999.lnk" \
91 "$INSTDIR\bin\yaz-ztest.exe" '-w"$INSTDIR\ztest"'
92 CreateShortCut "$SMPROGRAMS\YAZ\Server\Install Z39.50 service on port 210.lnk" \
93 "$INSTDIR\bin\yaz-ztest.exe" '-installa tcp:@:210'
94 CreateShortCut "$SMPROGRAMS\YAZ\Server\Remove Z39.50 service.lnk" \
95 "$INSTDIR\bin\yaz-ztest.exe" '-remove'
98 Section "YAZ Development" YAZ_Development
100 SetOutPath $INSTDIR\include\yaz
101 File ..\include\yaz\*.h
102 SetOutPath $INSTDIR\lib
106 Section "YAZ Documentation" YAZ_Documentation
108 SetOutPath $INSTDIR\doc
117 SetOutPath $SMPROGRAMS\YAZ
118 CreateShortCut "$SMPROGRAMS\YAZ\HTML Documentation.lnk" \
119 "$INSTDIR\doc\yaz.html"
120 CreateShortCut "$SMPROGRAMS\YAZ\PDF Documentaion.lnk" \
121 "$INSTDIR\doc\yaz.pdf"
124 Section "YAZ Source" YAZ_Source
126 SetOutPath $INSTDIR\util
128 File ..\util\yaz-asncomp
129 SetOutPath $INSTDIR\src
135 File ..\src\charconv.sgm
136 File ..\src\codetables.xml
137 SetOutPath $INSTDIR\zoom
139 SetOutPath $INSTDIR\ztest
141 SetOutPath $INSTDIR\client
144 SetOutPath $INSTDIR\win
151 ; begin uninstall settings/section
152 UninstallText "This will uninstall YAZ ${VERSION} from your system"
155 ; add delete commands to delete whatever files/registry keys/etc you installed here.
156 Delete "$INSTDIR\uninst.exe"
157 DeleteRegKey HKLM "SOFTWARE\Index Data\YAZ"
158 DeleteRegKey HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\YAZ"
159 ExecWait '"$INSTDIR\bin\yaz-ztest" -remove'
160 RMDir /r $SMPROGRAMS\YAZ
162 IfFileExists $INSTDIR 0 Removed
163 MessageBox MB_OK|MB_ICONEXCLAMATION \
164 "Note: $INSTDIR could not be removed."
168 ;--------------------------------
172 LangString DESC_YAZ_Runtime ${LANG_ENGLISH} "YAZ runtime files needed in order for YAZ to run, such as DLLs."
173 LangString DESC_YAZ_Development ${LANG_ENGLISH} "Header files and import libraries required for developing software using YAZ."
174 LangString DESC_YAZ_Documentation ${LANG_ENGLISH} "YAZ Users' guide and reference in HTML and PDF. Describes both YAZ applications and the API."
175 LangString DESC_YAZ_Source ${LANG_ENGLISH} "Source code of YAZ. Required if you need to rebuild YAZ (for debugging purposes)."
177 ;Assign language strings to sections
178 !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
179 !insertmacro MUI_DESCRIPTION_TEXT ${YAZ_Runtime} $(DESC_YAZ_Runtime)
180 !insertmacro MUI_DESCRIPTION_TEXT ${YAZ_Development} $(DESC_YAZ_Development)
181 !insertmacro MUI_DESCRIPTION_TEXT ${YAZ_Documentation} $(DESC_YAZ_Documentation)
182 !insertmacro MUI_DESCRIPTION_TEXT ${YAZ_Source} $(DESC_YAZ_Source)
183 !insertmacro MUI_FUNCTION_DESCRIPTION_END