1
#!Nsis Installer Command Script
3
# Copyright (C) 2008 Red Hat Inc., Richard W.M. Jones
5
# This library is free software; you can redistribute it and/or
6
# modify it under the terms of the GNU Lesser General Public
7
# License as published by the Free Software Foundation; either
8
# version 2 of the License, or (at your option) any later version.
10
# This library is distributed in the hope that it will be useful,
11
# but WITHOUT ANY WARRANTY; without even the implied warranty of
12
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13
# Lesser General Public License for more details.
15
# You should have received a copy of the GNU Lesser General Public
16
# License along with this library; if not, write to the Free Software
17
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19
# To build the installer:
21
# ./configure --with-nsis=/c/Progra~1/NSIS
26
Name "OCaml Libvirt ${VERSION}"
28
# This is where we will write the installer to, set by Makefile.
31
# Target directory, or use value from the registry.
32
InstallDir "c:\${PACKAGE}"
33
InstallDirRegKey HKLM SOFTWARE\OCAML-LIBVIRT "Install_Dir"
37
ShowUninstDetails hide
39
# BZip2-compressed files are smaller but use more memory at runtime.
42
# Include an XP manifest.
45
# Pages in the installer wizard.
51
# Title, data for license page.
52
LicenseText "Continue"
53
LicenseData "winlicense.rtf"
55
# Title for components page.
56
ComponentText "This will install OCaml libvirt bindings, dependent libraries and programs on your computer. Select which optional components you want installed."
58
# Title for the install directory page.
59
DirText "Please select the installation folder."
62
Section "Libvirt and its libraries (required)"
67
File "@LIBVIRT_DLL_PATH@\libvirt-0.dll"
68
File "@LIBXDR_DLL_PATH@\libxdr.dll"
69
File "@LIBXML2_DLL_PATH@\libxml2-2.dll"
70
File "@GNUTLS_DLL_PATH@\libgcrypt-??.dll"
71
File "@GNUTLS_DLL_PATH@\libgnutls-??.dll"
72
File "@GNUTLS_DLL_PATH@\libgpg-error-?.dll"
73
File "@GNUTLS_DLL_PATH@\libtasn1-?.dll"
74
File "@GTK_DLL_PATH@\*.dll"
76
SetOutPath $INSTDIR\lib
77
File /r "@GTK_PATH@\lib\gtk-2.0"
78
File /r "@GTK_PATH@\lib\pango"
81
File /r "@GTK_PATH@\etc"
86
Section "Programs (recommended)"
88
File "/oname=mlvirsh.exe" "mlvirsh\mlvirsh.opt"
89
File "/oname=virt-ctrl.exe" "virt-ctrl\virt-ctrl.opt"
92
Section "OCaml Libvirt bindings (for developers only)"
93
# XXX Need to find out where Objective CAML is installed.
96
Section "Start Menu Shortcuts"
97
CreateDirectory "$SMPROGRAMS\${PACKAGE}"
98
CreateShortCut "$SMPROGRAMS\${PACKAGE}\Uninstall.lnk" "$INSTDIR\Uninstall ${PACKAGE}.exe" "" "$INSTDIR\Uninstall ${PACKAGE}.exe" 0
99
CreateShortCut "$SMPROGRAMS\${PACKAGE}\Virt Shell.lnk" "$INSTDIR\mlvirsh.exe" "" "$INSTDIR\mlvirsh.exe" 0
100
CreateShortCut "$SMPROGRAMS\${PACKAGE}\Virt Control.lnk" "$INSTDIR\virt-ctrl.exe" "" "$INSTDIR\virt-ctrl.exe" 0
103
Section "Desktop Icons"
104
CreateShortCut "$DESKTOP\Virt Shell.lnk" "$INSTDIR\mlvirsh.exe" "" "$INSTDIR\mlvirsh.exe" 0
105
CreateShortCut "$DESKTOP\Virt Control.lnk" "$INSTDIR\virt-ctrl.exe" "" "$INSTDIR\virt-ctrl.exe" 0
110
Delete /rebootok "$DESKTOP\Virt Shell.lnk"
111
Delete /rebootok "$DESKTOP\Virt Control.lnk"
114
Delete /rebootok "$SMPROGRAMS\${PACKAGE}\Virt Shell.lnk"
115
Delete /rebootok "$SMPROGRAMS\${PACKAGE}\Virt Control.lnk"
116
Delete /rebootok "$SMPROGRAMS\${PACKAGE}\Uninstall.lnk"
117
RMDir "$SMPROGRAMS\${PACKAGE}"
119
# Files in installation directory.
120
RMDir /r "$INSTDIR\etc"
121
RMDir /r "$INSTDIR\lib"
122
Delete /rebootok "$INSTDIR\*.exe"
123
Delete /rebootok "$INSTDIR\*.dll"
128
# Write an uninstaller into the installation directory.
130
WriteUninstaller "$INSTDIR\Uninstall ${PACKAGE}.exe"