1 ; This file is part of Pazpar2.
2 ; Copyright (C) 2006-2011 Index Data
6 ; Microsoft runtime CRT
7 ; Uncomment exactly ONE of the sections below
9 ;!define VS_RUNTIME_DLL ""
10 ;!define VS_RUNTIME_MANIFEST ""
13 ; !define VS_RUNTIME_DLL "c:\Program Files\Microsoft Visual Studio .NET 2003\SDK\v1.1\Bin\msvcr71.dll"
14 ;!define VS_RUNTIME_MANIFEST ""
17 ;!define VS_RUNTIME_DLL "c:\Program Files\Microsoft Visual Studio 8\VC\redist\x86\Microsoft.VC80.CRT\msvcr80.dll"
18 ;!define VS_RUNTIME_MANIFEST "c:\Program Files\Microsoft Visual Studio 8\VC\redist\x86\Microsoft.VC80.CRT\Microsoft.VC80.CRT.manifest"
21 !define VS_RUNTIME_DLL "c:\Program Files\Microsoft Visual Studio 9.0\VC\redist\x86\Microsoft.VC90.CRT\msvcr90.dll"
22 !define VS_RUNTIME_MANIFEST "c:\Program Files\Microsoft Visual Studio 9.0\VC\redist\x86\Microsoft.VC90.CRT\Microsoft.VC90.CRT.manifest"
30 Caption "Index Data Pazpar2 ${VERSION} Setup"
31 OutFile "pazpar2_${VERSION}.exe"
33 LicenseText "You must read the following license before installing:"
34 LicenseData license.txt
36 ComponentText "This will install Pazpar2 on your computer:"
37 InstType "Full (w/ Source)"
38 InstType "Lite (w/o Source)"
40 InstallDir "$PROGRAMFILES\Pazpar2"
41 InstallDirRegKey HKLM "SOFTWARE\Index Data\Pazpar2" ""
44 ;----------------------------
48 !insertmacro MUI_PAGE_LICENSE "license.txt"
49 !insertmacro MUI_PAGE_COMPONENTS
50 !insertmacro MUI_PAGE_DIRECTORY
51 !insertmacro MUI_PAGE_INSTFILES
53 !insertmacro MUI_UNPAGE_CONFIRM
54 !insertmacro MUI_UNPAGE_INSTFILES
59 ; UninstPage uninstConfirm
60 ; UninstPage instfiles
62 ;--------------------------------
65 !insertmacro MUI_LANGUAGE "English"
67 ;--------------------------------
69 Section "" ; (default section)
71 ; add files / whatever that need to be installed here.
72 WriteRegStr HKLM "SOFTWARE\Index Data\Pazpar2" "" "$INSTDIR"
73 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Pazpar2" "DisplayName" "Pazpar2 ${VERSION} (remove only)"
74 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Pazpar2" "UninstallString" '"$INSTDIR\uninst.exe"'
75 ; write out uninstaller
76 WriteUninstaller "$INSTDIR\uninst.exe"
77 SetOutPath $SMPROGRAMS\Pazpar2
78 CreateShortCut "$SMPROGRAMS\Pazpar2\Pazpar2 Program Directory.lnk" \
80 WriteINIStr "$SMPROGRAMS\Pazpar2\Pazpar2 Home page.url" \
81 "InternetShortcut" "URL" "http://www.indexdata.dk/pazpar2/"
82 CreateShortCut "$SMPROGRAMS\Pazpar2\Uninstall Pazpar2.lnk" \
88 SetOutPath $INSTDIR\etc
92 File /oname=pazpar2.cfg ..\etc\pazpar2.cfg.dist
93 SetOutPath $INSTDIR\log
95 SectionEnd ; end of default section
97 Section "Pazpar2 Runtime" Pazpar2_Runtime
99 IfFileExists "$INSTDIR\bin\pazpar2.exe" 0 Noservice
100 ExecWait '"$INSTDIR\bin\pazpar2.exe" -remove'
102 SetOutPath $INSTDIR\bin
103 ; File "${VS_RUNTIME_DLL}"
104 ; File "${VS_RUNTIME_MANIFEST}"
107 SetOutPath $SMPROGRAMS\Pazpar2
108 SetOutPath $SMPROGRAMS\Pazpar2\Server
109 CreateShortCut "$SMPROGRAMS\Pazpar2\Server\Server on console.lnk" \
110 "$INSTDIR\bin\pazpar2.exe" '-f"$INSTDIR\etc\pazpar2.cfg"'
111 CreateShortCut "$SMPROGRAMS\Pazpar2\Server\Install Pazpar2 service.lnk" \
112 "$INSTDIR\bin\pazpar2.exe" '-install -l"$INSTDIR\log\pazpar2.log" -f"$INSTDIR\etc\pazpar2.cfg"'
113 CreateShortCut "$SMPROGRAMS\Pazpar2\Server\Remove Pazpar2 service.lnk" \
114 "$INSTDIR\bin\pazpar2.exe" '-remove'
117 Section "Pazpar2 Documentation" Pazpar2_Documentation
119 SetOutPath $INSTDIR\doc
122 File /r ..\doc\*.html
126 SetOutPath $SMPROGRAMS\Pazpar2
127 CreateShortCut "$SMPROGRAMS\Pazpar2\HTML Documentation.lnk" \
128 "$INSTDIR\doc\index.html"
131 Section "Pazpar2 Source" Pazpar2_Source
136 SetOutPath $INSTDIR\win
141 ; begin uninstall settings/section
142 UninstallText "This will uninstall Pazpar2 ${VERSION} from your system"
145 ; add delete commands to delete whatever files/registry keys/etc you installed here.
146 Delete "$INSTDIR\uninst.exe"
147 DeleteRegKey HKLM "SOFTWARE\Index Data\Pazpar2"
148 DeleteRegKey HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Pazpar2"
149 ExecWait '"$INSTDIR\bin\pazpar2" -remove'
150 RMDir /r $SMPROGRAMS\Pazpar2
152 IfFileExists $INSTDIR 0 Removed
153 MessageBox MB_OK|MB_ICONEXCLAMATION \
154 "Note: $INSTDIR could not be removed."
158 ;--------------------------------
162 LangString DESC_Pazpar2_Runtime ${LANG_ENGLISH} "Pazpar2 runtime files needed in order for it to run, such as DLLs."
163 LangString DESC_Pazpar2_Documentation ${LANG_ENGLISH} "Pazpar2 Users' guide and reference in HTML."
164 LangString DESC_Pazpar2_Source ${LANG_ENGLISH} "Source code of Pazpar2. Required if you need to rebuild Pazpar2 (for debugging purposes)."
166 ;Assign language strings to sections
167 !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
168 !insertmacro MUI_DESCRIPTION_TEXT ${Pazpar2_Runtime} $(DESC_Pazpar2_Runtime)
169 !insertmacro MUI_DESCRIPTION_TEXT ${Pazpar2_Documentation} $(DESC_Pazpar2_Documentation)
170 !insertmacro MUI_DESCRIPTION_TEXT ${Pazpar2_Source} $(DESC_Pazpar2_Source)
171 !insertmacro MUI_FUNCTION_DESCRIPTION_END