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
87 File /oname=pazpar2.cfg ..\etc\pazpar2.cfg.dist
88 SetOutPath $INSTDIR\log
90 SectionEnd ; end of default section
92 Section "Pazpar2 Runtime" Pazpar2_Runtime
94 IfFileExists "$INSTDIR\bin\pazpar2.exe" 0 Noservice
95 ExecWait '"$INSTDIR\bin\pazpar2.exe" -remove'
97 SetOutPath $INSTDIR\bin
98 ; File "${VS_RUNTIME_DLL}"
99 ; File "${VS_RUNTIME_MANIFEST}"
102 SetOutPath $SMPROGRAMS\Pazpar2
103 SetOutPath $SMPROGRAMS\Pazpar2\Server
104 CreateShortCut "$SMPROGRAMS\Pazpar2\Server\Server on console.lnk" \
105 "$INSTDIR\bin\pazpar2.exe" '-f"$INSTDIR\etc\pazpar2.cfg"'
106 CreateShortCut "$SMPROGRAMS\Pazpar2\Server\Install Pazpar2 service.lnk" \
107 "$INSTDIR\bin\pazpar2.exe" '-install -l"$INSTDIR\log\pazpar2.log" -f"$INSTDIR\etc\pazpar2.cfg"'
108 CreateShortCut "$SMPROGRAMS\Pazpar2\Server\Remove Pazpar2 service.lnk" \
109 "$INSTDIR\bin\pazpar2.exe" '-remove'
112 Section "Pazpar2 Documentation" Pazpar2_Documentation
114 SetOutPath $INSTDIR\doc
117 File /r ..\doc\*.html
121 SetOutPath $SMPROGRAMS\Pazpar2
122 CreateShortCut "$SMPROGRAMS\Pazpar2\HTML Documentation.lnk" \
123 "$INSTDIR\doc\index.html"
126 Section "Pazpar2 Source" Pazpar2_Source
131 SetOutPath $INSTDIR\win
136 ; begin uninstall settings/section
137 UninstallText "This will uninstall Pazpar2 ${VERSION} from your system"
140 ; add delete commands to delete whatever files/registry keys/etc you installed here.
141 Delete "$INSTDIR\uninst.exe"
142 DeleteRegKey HKLM "SOFTWARE\Index Data\Pazpar2"
143 DeleteRegKey HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Pazpar2"
144 ExecWait '"$INSTDIR\bin\pazpar2" -remove'
145 RMDir /r $SMPROGRAMS\Pazpar2
147 IfFileExists $INSTDIR 0 Removed
148 MessageBox MB_OK|MB_ICONEXCLAMATION \
149 "Note: $INSTDIR could not be removed."
153 ;--------------------------------
157 LangString DESC_Pazpar2_Runtime ${LANG_ENGLISH} "Pazpar2 runtime files needed in order for it to run, such as DLLs."
158 LangString DESC_Pazpar2_Documentation ${LANG_ENGLISH} "Pazpar2 Users' guide and reference in HTML."
159 LangString DESC_Pazpar2_Source ${LANG_ENGLISH} "Source code of Pazpar2. Required if you need to rebuild Pazpar2 (for debugging purposes)."
161 ;Assign language strings to sections
162 !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
163 !insertmacro MUI_DESCRIPTION_TEXT ${Pazpar2_Runtime} $(DESC_Pazpar2_Runtime)
164 !insertmacro MUI_DESCRIPTION_TEXT ${Pazpar2_Documentation} $(DESC_Pazpar2_Documentation)
165 !insertmacro MUI_DESCRIPTION_TEXT ${Pazpar2_Source} $(DESC_Pazpar2_Source)
166 !insertmacro MUI_FUNCTION_DESCRIPTION_END