1 ; $Id: yaz.nsi,v 1.123 2007-11-15 08:33:15 adam Exp $
3 !define VERSION "3.0.17"
5 ; Microsoft runtime CRT
6 ; Uncomment exactly ONE section of the three below
8 !define VS_RUNTIME_DLL ""
9 !define VS_RUNTIME_MANIFEST ""
12 ; !define VS_RUNTIME_DLL "c:\Program Files\Microsoft Visual Studio .NET 2003\SDK\v1.1\Bin\msvcr71.dll"
13 ;!define VS_RUNTIME_MANIFEST ""
16 ;!define VS_RUNTIME_DLL "c:\Program Files\Microsoft Visual Studio 8\VC\redist\x86\Microsoft.VC80.CRT\msvcr80.dll"
17 ;!define VS_RUNTIME_MANIFEST "c:\Program Files\Microsoft Visual Studio 8\VC\redist\x86\Microsoft.VC80.CRT\Microsoft.VC80.CRT.manifest"
25 Caption "Index Data YAZ ${VERSION} Setup"
26 OutFile "yaz_${VERSION}.exe"
28 LicenseText "You must read the following license before installing:"
29 LicenseData license.txt
31 ComponentText "This will install the YAZ Toolkit on your computer:"
32 InstType "Full (w/ Source)"
33 InstType "Lite (w/o Source)"
35 InstallDir "$PROGRAMFILES\YAZ"
36 InstallDirRegKey HKLM "SOFTWARE\Index Data\YAZ" ""
39 ;----------------------------
43 !insertmacro MUI_PAGE_LICENSE "license.txt"
44 !insertmacro MUI_PAGE_COMPONENTS
45 !insertmacro MUI_PAGE_DIRECTORY
46 !insertmacro MUI_PAGE_INSTFILES
48 !insertmacro MUI_UNPAGE_CONFIRM
49 !insertmacro MUI_UNPAGE_INSTFILES
54 ; UninstPage uninstConfirm
55 ; UninstPage instfiles
57 ;--------------------------------
60 !insertmacro MUI_LANGUAGE "English"
62 ;--------------------------------
64 Section "" ; (default section)
66 ; add files / whatever that need to be installed here.
67 WriteRegStr HKLM "SOFTWARE\Index Data\YAZ" "" "$INSTDIR"
68 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\YAZ" "DisplayName" "YAZ ${VERSION} (remove only)"
69 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\YAZ" "UninstallString" '"$INSTDIR\uninst.exe"'
70 ; write out uninstaller
71 WriteUninstaller "$INSTDIR\uninst.exe"
72 SetOutPath $SMPROGRAMS\YAZ
73 CreateShortCut "$SMPROGRAMS\YAZ\YAZ Program Directory.lnk" \
75 WriteINIStr "$SMPROGRAMS\YAZ\YAZ Home page.url" \
76 "InternetShortcut" "URL" "http://www.indexdata.dk/yaz/"
77 CreateShortCut "$SMPROGRAMS\YAZ\Uninstall YAZ.lnk" \
84 SetOutPath $INSTDIR\ztest
85 File ..\ztest\dummy-records
86 File ..\ztest\dummy-grs
87 File ..\ztest\dummy-words
88 SetOutPath $INSTDIR\etc
91 File ..\etc\pqf.properties
93 SectionEnd ; end of default section
95 Section "YAZ Runtime" YAZ_Runtime
97 IfFileExists "$INSTDIR\bin\yaz-ztest.exe" 0 Noservice
98 ExecWait '"$INSTDIR\bin\yaz-ztest.exe" -remove'
100 SetOutPath $INSTDIR\bin
101 File "${VS_RUNTIME_DLL}"
102 File "${VS_RUNTIME_MANIFEST}"
103 File ..\bin\iconv.dll
104 File ..\bin\zlib1.dll
105 File ..\bin\libxml2.dll
106 File ..\bin\libxslt.dll
109 SetOutPath $SMPROGRAMS\YAZ
110 CreateShortCut "$SMPROGRAMS\YAZ\YAZ Client.lnk" \
111 "$INSTDIR\bin\yaz-client.exe"
112 SetOutPath $SMPROGRAMS\YAZ\Server
113 CreateShortCut "$SMPROGRAMS\YAZ\Server\Server on console on port 9999.lnk" \
114 "$INSTDIR\bin\yaz-ztest.exe" '-w"$INSTDIR\ztest"'
115 CreateShortCut "$SMPROGRAMS\YAZ\Server\Install Z39.50 service on port 210.lnk" \
116 "$INSTDIR\bin\yaz-ztest.exe" '-installa tcp:@:210'
117 CreateShortCut "$SMPROGRAMS\YAZ\Server\Remove Z39.50 service.lnk" \
118 "$INSTDIR\bin\yaz-ztest.exe" '-remove'
121 Section "YAZ Development" YAZ_Development
123 SetOutPath $INSTDIR\include\yaz
124 File ..\include\yaz\*.h
125 SetOutPath $INSTDIR\lib
129 Section "YAZ Documentation" YAZ_Documentation
131 SetOutPath $INSTDIR\doc
134 File /r ..\doc\*.html
138 SetOutPath $SMPROGRAMS\YAZ
139 CreateShortCut "$SMPROGRAMS\YAZ\HTML Documentation.lnk" \
140 "$INSTDIR\doc\index.html"
143 Section "YAZ Source" YAZ_Source
147 File /r /x yaz ..\*.h
148 SetOutPath $INSTDIR\util
149 File ..\util\yaz-asncomp
150 SetOutPath $INSTDIR\src
155 File ..\src\codetables.xml
156 SetOutPath $INSTDIR\test
161 SetOutPath $INSTDIR\win
167 ; begin uninstall settings/section
168 UninstallText "This will uninstall YAZ ${VERSION} from your system"
171 ; add delete commands to delete whatever files/registry keys/etc you installed here.
172 Delete "$INSTDIR\uninst.exe"
173 DeleteRegKey HKLM "SOFTWARE\Index Data\YAZ"
174 DeleteRegKey HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\YAZ"
175 ExecWait '"$INSTDIR\bin\yaz-ztest" -remove'
176 RMDir /r $SMPROGRAMS\YAZ
178 IfFileExists $INSTDIR 0 Removed
179 MessageBox MB_OK|MB_ICONEXCLAMATION \
180 "Note: $INSTDIR could not be removed."
184 ;--------------------------------
188 LangString DESC_YAZ_Runtime ${LANG_ENGLISH} "YAZ runtime files needed in order for YAZ to run, such as DLLs."
189 LangString DESC_YAZ_Development ${LANG_ENGLISH} "Header files and import libraries required for developing software using YAZ."
190 LangString DESC_YAZ_Documentation ${LANG_ENGLISH} "YAZ Users' guide and reference in HTML. Describes both YAZ applications and the API."
191 LangString DESC_YAZ_Source ${LANG_ENGLISH} "Source code of YAZ. Required if you need to rebuild YAZ (for debugging purposes)."
193 ;Assign language strings to sections
194 !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
195 !insertmacro MUI_DESCRIPTION_TEXT ${YAZ_Runtime} $(DESC_YAZ_Runtime)
196 !insertmacro MUI_DESCRIPTION_TEXT ${YAZ_Development} $(DESC_YAZ_Development)
197 !insertmacro MUI_DESCRIPTION_TEXT ${YAZ_Documentation} $(DESC_YAZ_Documentation)
198 !insertmacro MUI_DESCRIPTION_TEXT ${YAZ_Source} $(DESC_YAZ_Source)
199 !insertmacro MUI_FUNCTION_DESCRIPTION_END