1 ; This file is part of Pazpar2.
2 ; Copyright (C) 2006-2009 Index Data
6 ; Microsoft runtime CRT
7 ; Uncomment exactly ONE section of the three 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"
26 Caption "Index Data Pazpar2 ${VERSION} Setup"
27 OutFile "pazpar2_${VERSION}.exe"
29 LicenseText "You must read the following license before installing:"
30 LicenseData license.txt
32 ComponentText "This will install Pazpar2 on your computer:"
33 InstType "Full (w/ Source)"
34 InstType "Lite (w/o Source)"
36 InstallDir "$PROGRAMFILES\Pazpar2"
37 InstallDirRegKey HKLM "SOFTWARE\Index Data\Pazpar2" ""
40 ;----------------------------
44 !insertmacro MUI_PAGE_LICENSE "license.txt"
45 !insertmacro MUI_PAGE_COMPONENTS
46 !insertmacro MUI_PAGE_DIRECTORY
47 !insertmacro MUI_PAGE_INSTFILES
49 !insertmacro MUI_UNPAGE_CONFIRM
50 !insertmacro MUI_UNPAGE_INSTFILES
55 ; UninstPage uninstConfirm
56 ; UninstPage instfiles
58 ;--------------------------------
61 !insertmacro MUI_LANGUAGE "English"
63 ;--------------------------------
65 Section "" ; (default section)
67 ; add files / whatever that need to be installed here.
68 WriteRegStr HKLM "SOFTWARE\Index Data\Pazpar2" "" "$INSTDIR"
69 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Pazpar2" "DisplayName" "Pazpar2 ${VERSION} (remove only)"
70 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Pazpar2" "UninstallString" '"$INSTDIR\uninst.exe"'
71 ; write out uninstaller
72 WriteUninstaller "$INSTDIR\uninst.exe"
73 SetOutPath $SMPROGRAMS\Pazpar2
74 CreateShortCut "$SMPROGRAMS\Pazpar2\Pazpar2 Program Directory.lnk" \
76 WriteINIStr "$SMPROGRAMS\Pazpar2\Pazpar2 Home page.url" \
77 "InternetShortcut" "URL" "http://www.indexdata.dk/pazpar2/"
78 CreateShortCut "$SMPROGRAMS\Pazpar2\Uninstall Pazpar2.lnk" \
84 SetOutPath $INSTDIR\etc
88 File /oname=pazpar2.cfg ..\etc\pazpar2.cfg.dist
89 SetOutPath $INSTDIR\log
91 SectionEnd ; end of default section
93 Section "Pazpar2 Runtime" Pazpar2_Runtime
95 IfFileExists "$INSTDIR\bin\pazpar2.exe" 0 Noservice
96 ExecWait '"$INSTDIR\bin\pazpar2.exe" -remove'
98 SetOutPath $INSTDIR\bin
99 ; File "${VS_RUNTIME_DLL}"
100 ; File "${VS_RUNTIME_MANIFEST}"
103 SetOutPath $SMPROGRAMS\Pazpar2
104 SetOutPath $SMPROGRAMS\Pazpar2\Server
105 CreateShortCut "$SMPROGRAMS\Pazpar2\Server\Server on console.lnk" \
106 "$INSTDIR\bin\pazpar2.exe" '-f"$INSTDIR\etc\pazpar2.cfg"'
107 CreateShortCut "$SMPROGRAMS\Pazpar2\Server\Install Pazpar2 service.lnk" \
108 "$INSTDIR\bin\pazpar2.exe" '-install -l"$INSTDIR\log\pazpar2.log" -f"$INSTDIR\etc\pazpar2.cfg"'
109 CreateShortCut "$SMPROGRAMS\Pazpar2\Server\Remove Pazpar2 service.lnk" \
110 "$INSTDIR\bin\pazpar2.exe" '-remove'
113 Section "Pazpar2 Documentation" Pazpar2_Documentation
115 SetOutPath $INSTDIR\doc
118 File /r ..\doc\*.html
122 SetOutPath $SMPROGRAMS\Pazpar2
123 CreateShortCut "$SMPROGRAMS\Pazpar2\HTML Documentation.lnk" \
124 "$INSTDIR\doc\index.html"
127 Section "Pazpar2 Source" Pazpar2_Source
132 SetOutPath $INSTDIR\win
137 ; begin uninstall settings/section
138 UninstallText "This will uninstall Pazpar2 ${VERSION} from your system"
141 ; add delete commands to delete whatever files/registry keys/etc you installed here.
142 Delete "$INSTDIR\uninst.exe"
143 DeleteRegKey HKLM "SOFTWARE\Index Data\Pazpar2"
144 DeleteRegKey HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Pazpar2"
145 ExecWait '"$INSTDIR\bin\pazpar2" -remove'
146 RMDir /r $SMPROGRAMS\Pazpar2
148 IfFileExists $INSTDIR 0 Removed
149 MessageBox MB_OK|MB_ICONEXCLAMATION \
150 "Note: $INSTDIR could not be removed."
154 ;--------------------------------
158 LangString DESC_Pazpar2_Runtime ${LANG_ENGLISH} "Pazpar2 runtime files needed in order for it to run, such as DLLs."
159 LangString DESC_Pazpar2_Documentation ${LANG_ENGLISH} "Pazpar2 Users' guide and reference in HTML."
160 LangString DESC_Pazpar2_Source ${LANG_ENGLISH} "Source code of Pazpar2. Required if you need to rebuild Pazpar2 (for debugging purposes)."
162 ;Assign language strings to sections
163 !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
164 !insertmacro MUI_DESCRIPTION_TEXT ${Pazpar2_Runtime} $(DESC_Pazpar2_Runtime)
165 !insertmacro MUI_DESCRIPTION_TEXT ${Pazpar2_Documentation} $(DESC_Pazpar2_Documentation)
166 !insertmacro MUI_DESCRIPTION_TEXT ${Pazpar2_Source} $(DESC_Pazpar2_Source)
167 !insertmacro MUI_FUNCTION_DESCRIPTION_END