1 ; This file is part of Pazpar2.
2 ; Copyright (C) Index Data
3 ; See the file LICENSE for details.
7 ; Microsoft runtime CRT
8 ; Uncomment exactly ONE of the sections below
10 ;!define VS_RUNTIME_DLL ""
11 ;!define VS_RUNTIME_MANIFEST ""
14 ; !define VS_RUNTIME_DLL "c:\Program Files\Microsoft Visual Studio .NET 2003\SDK\v1.1\Bin\msvcr71.dll"
15 ;!define VS_RUNTIME_MANIFEST ""
18 ;!define VS_RUNTIME_DLL "c:\Program Files\Microsoft Visual Studio 8\VC\redist\x86\Microsoft.VC80.CRT\msvcr80.dll"
19 ;!define VS_RUNTIME_MANIFEST "c:\Program Files\Microsoft Visual Studio 8\VC\redist\x86\Microsoft.VC80.CRT\Microsoft.VC80.CRT.manifest"
22 !define VS_RUNTIME_DLL "c:\Program Files\Microsoft Visual Studio 9.0\VC\redist\x86\Microsoft.VC90.CRT\msvcr90.dll"
23 !define VS_RUNTIME_MANIFEST "c:\Program Files\Microsoft Visual Studio 9.0\VC\redist\x86\Microsoft.VC90.CRT\Microsoft.VC90.CRT.manifest"
31 Caption "Index Data Pazpar2 ${VERSION} Setup"
32 OutFile "pazpar2_${VERSION}.exe"
34 LicenseText "You must read the following license before installing:"
35 LicenseData license.txt
37 ComponentText "This will install Pazpar2 on your computer:"
38 InstType "Full (w/ Source)"
39 InstType "Lite (w/o Source)"
41 InstallDir "$PROGRAMFILES\Pazpar2"
42 InstallDirRegKey HKLM "SOFTWARE\Index Data\Pazpar2" ""
45 ;----------------------------
49 !insertmacro MUI_PAGE_LICENSE "license.txt"
50 !insertmacro MUI_PAGE_COMPONENTS
51 !insertmacro MUI_PAGE_DIRECTORY
52 !insertmacro MUI_PAGE_INSTFILES
54 !insertmacro MUI_UNPAGE_CONFIRM
55 !insertmacro MUI_UNPAGE_INSTFILES
60 ; UninstPage uninstConfirm
61 ; UninstPage instfiles
63 ;--------------------------------
66 !insertmacro MUI_LANGUAGE "English"
68 ;--------------------------------
70 Section "" ; (default section)
72 ; add files / whatever that need to be installed here.
73 WriteRegStr HKLM "SOFTWARE\Index Data\Pazpar2" "" "$INSTDIR"
74 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Pazpar2" "DisplayName" "Pazpar2 ${VERSION} (remove only)"
75 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Pazpar2" "UninstallString" '"$INSTDIR\uninst.exe"'
76 ; write out uninstaller
77 WriteUninstaller "$INSTDIR\uninst.exe"
78 SetOutPath $SMPROGRAMS\Pazpar2
79 CreateShortCut "$SMPROGRAMS\Pazpar2\Pazpar2 Program Directory.lnk" \
81 WriteINIStr "$SMPROGRAMS\Pazpar2\Pazpar2 Home page.url" \
82 "InternetShortcut" "URL" "http://www.indexdata.dk/pazpar2/"
83 CreateShortCut "$SMPROGRAMS\Pazpar2\Uninstall Pazpar2.lnk" \
89 SetOutPath $INSTDIR\etc
93 File /oname=pazpar2.cfg ..\etc\pazpar2.cfg.dist
94 SetOutPath $INSTDIR\log
96 SectionEnd ; end of default section
98 Section "Pazpar2 Runtime" Pazpar2_Runtime
100 IfFileExists "$INSTDIR\bin\pazpar2.exe" 0 Noservice
101 ExecWait '"$INSTDIR\bin\pazpar2.exe" -remove'
103 SetOutPath $INSTDIR\bin
104 ; File "${VS_RUNTIME_DLL}"
105 ; File "${VS_RUNTIME_MANIFEST}"
108 SetOutPath $SMPROGRAMS\Pazpar2
109 SetOutPath $SMPROGRAMS\Pazpar2\Server
110 CreateShortCut "$SMPROGRAMS\Pazpar2\Server\Server on console.lnk" \
111 "$INSTDIR\bin\pazpar2.exe" '-f"$INSTDIR\etc\pazpar2.cfg"'
112 CreateShortCut "$SMPROGRAMS\Pazpar2\Server\Install Pazpar2 service.lnk" \
113 "$INSTDIR\bin\pazpar2.exe" '-install -l"$INSTDIR\log\pazpar2.log" -f"$INSTDIR\etc\pazpar2.cfg"'
114 CreateShortCut "$SMPROGRAMS\Pazpar2\Server\Remove Pazpar2 service.lnk" \
115 "$INSTDIR\bin\pazpar2.exe" '-remove'
118 Section "Pazpar2 Documentation" Pazpar2_Documentation
120 SetOutPath $INSTDIR\doc
123 File /r ..\doc\*.html
127 SetOutPath $SMPROGRAMS\Pazpar2
128 CreateShortCut "$SMPROGRAMS\Pazpar2\HTML Documentation.lnk" \
129 "$INSTDIR\doc\index.html"
132 Section "Pazpar2 Source" Pazpar2_Source
137 SetOutPath $INSTDIR\win
142 ; begin uninstall settings/section
143 UninstallText "This will uninstall Pazpar2 ${VERSION} from your system"
146 ; add delete commands to delete whatever files/registry keys/etc you installed here.
147 Delete "$INSTDIR\uninst.exe"
148 DeleteRegKey HKLM "SOFTWARE\Index Data\Pazpar2"
149 DeleteRegKey HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Pazpar2"
150 ExecWait '"$INSTDIR\bin\pazpar2" -remove'
151 RMDir /r $SMPROGRAMS\Pazpar2
153 IfFileExists $INSTDIR 0 Removed
154 MessageBox MB_OK|MB_ICONEXCLAMATION \
155 "Note: $INSTDIR could not be removed."
159 ;--------------------------------
163 LangString DESC_Pazpar2_Runtime ${LANG_ENGLISH} "Pazpar2 runtime files needed in order for it to run, such as DLLs."
164 LangString DESC_Pazpar2_Documentation ${LANG_ENGLISH} "Pazpar2 Users' guide and reference in HTML."
165 LangString DESC_Pazpar2_Source ${LANG_ENGLISH} "Source code of Pazpar2. Required if you need to rebuild Pazpar2 (for debugging purposes)."
167 ;Assign language strings to sections
168 !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
169 !insertmacro MUI_DESCRIPTION_TEXT ${Pazpar2_Runtime} $(DESC_Pazpar2_Runtime)
170 !insertmacro MUI_DESCRIPTION_TEXT ${Pazpar2_Documentation} $(DESC_Pazpar2_Documentation)
171 !insertmacro MUI_DESCRIPTION_TEXT ${Pazpar2_Source} $(DESC_Pazpar2_Source)
172 !insertmacro MUI_FUNCTION_DESCRIPTION_END