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