1 #!Nsis Installer Command Script
\r
2 # Copyright (C) 2008 Red Hat Inc., Richard W.M. Jones
\r
4 # This library is free software; you can redistribute it and/or
\r
5 # modify it under the terms of the GNU Lesser General Public
\r
6 # License as published by the Free Software Foundation; either
\r
7 # version 2 of the License, or (at your option) any later version.
\r
9 # This library is distributed in the hope that it will be useful,
\r
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
\r
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
\r
12 # Lesser General Public License for more details.
\r
14 # You should have received a copy of the GNU Lesser General Public
\r
15 # License along with this library; if not, write to the Free Software
\r
16 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
\r
18 # To build the installer:
\r
20 # ./configure --with-nsis=/c/Progra~1/NSIS
\r
25 Name "OCaml Libvirt ${VERSION}"
\r
27 # This is where we will write the installer to, set by Makefile.
\r
28 OutFile "${OUTFILE}"
\r
30 # Target directory, or use value from the registry.
\r
31 InstallDir "c:\${PACKAGE}"
\r
32 InstallDirRegKey HKLM SOFTWARE\OCAML-LIBVIRT "Install_Dir"
\r
35 ShowInstDetails hide
\r
36 ShowUninstDetails hide
\r
38 # BZip2-compressed files are smaller but use more memory at runtime.
\r
41 # Include an XP manifest.
\r
44 # Pages in the installer wizard.
\r
50 # Title, data for license page.
\r
51 LicenseText "Continue"
\r
52 LicenseData "winlicense.rtf"
\r
54 # Title for components page.
\r
55 ComponentText "This will install OCaml libvirt bindings, dependent libraries and programs on your computer. Select which optional components you want installed."
\r
57 # Title for the install directory page.
\r
58 DirText "Please select the installation folder."
\r
60 # Installer sections.
\r
61 Section "Libvirt and its libraries (required)"
\r
62 # Make this required.
\r
66 # XXX Get these paths automatically.
\r
67 File "c:\msys\1.0\local\bin\libvirt-?.dll"
\r
68 File "c:\msys\1.0\local\bin\libxdr.dll"
\r
69 File "c:\msys\1.0\local\bin\libxml2-?.dll"
\r
70 File "c:\gnutls\bin\libgcrypt-??.dll"
\r
71 File "c:\gnutls\bin\libgnutls-??.dll"
\r
72 File "c:\gnutls\bin\libgpg-error-?.dll"
\r
73 File "c:\gnutls\bin\libtasn1-?.dll"
\r
76 Section "Programs (recommended)"
\r
78 File "/oname=mlvirsh.exe" "mlvirsh\mlvirsh.opt"
\r
81 Section "OCaml Libvirt bindings (for developers only)"
\r
82 # XXX Need to find out where Objective CAML is installed.
\r
85 Section "Start Menu Shortcuts"
\r
86 CreateDirectory "$SMPROGRAMS\${PACKAGE}"
\r
87 CreateShortCut "$SMPROGRAMS\${PACKAGE}\Uninstall.lnk" "$INSTDIR\Uninstall ${PACKAGE}.exe" "" "$INSTDIR\Uninstall ${PACKAGE}.exe" 0
\r
88 CreateShortCut "$SMPROGRAMS\${PACKAGE}\Virt Shell.lnk" "$INSTDIR\mlvirsh.exe" "" "$INSTDIR\mlvirsh.exe" 0
\r
91 Section "Desktop Icons"
\r
92 CreateShortCut "$DESKTOP\Virt Shell.lnk" "$INSTDIR\mlvirsh.exe" "" "$INSTDIR\mlvirsh.exe" 0
\r
97 Delete /rebootok "$DESKTOP\Virt Shell.lnk"
\r
100 Delete /rebootok "$SMPROGRAMS\${PACKAGE}\Virt Shell.lnk"
\r
101 Delete /rebootok "$SMPROGRAMS\${PACKAGE}\Uninstall.lnk"
\r
102 RMDir "$SMPROGRAMS\${PACKAGE}"
\r
104 # Files in installation directory.
\r
105 Delete /rebootok "$INSTDIR\*.exe"
\r
106 Delete /rebootok "$INSTDIR\*.dll"
\r
111 # Write an uninstaller into the installation directory.
\r
113 WriteUninstaller "$INSTDIR\Uninstall ${PACKAGE}.exe"
\r