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 section.
\r
61 Section "OCaml Libvirt bindings (required)"
\r
65 Section "Libraries (required)"
\r
69 Section "Programs (recommended)"
\r
71 File "/oname=mlvirsh.exe" "mlvirsh\mlvirsh.opt"
\r
74 Section "Start Menu Shortcuts"
\r
75 CreateDirectory "$SMPROGRAMS\${PACKAGE}"
\r
76 CreateShortCut "$SMPROGRAMS\${PACKAGE}\Uninstall.lnk" "$INSTDIR\Uninstall ${PACKAGE}.exe" "" "$INSTDIR\Uninstall ${PACKAGE}.exe" 0
\r
77 CreateShortCut "$SMPROGRAMS\${PACKAGE}\Virt Shell.lnk" "$INSTDIR\mlvirsh.exe" "" "$INSTDIR\mlvirsh.exe" 0
\r
80 Section "Desktop Icons"
\r
81 CreateShortCut "$DESKTOP\Virt Shell.lnk" "$INSTDIR\mlvirsh.exe" "" "$INSTDIR\mlvirsh.exe" 0
\r
86 Delete /rebootok "$DESKTOP\Virt Shell.lnk"
\r
89 Delete /rebootok "$SMPROGRAMS\${PACKAGE}\Virt Shell.lnk"
\r
90 Delete /rebootok "$SMPROGRAMS\${PACKAGE}\Uninstall.lnk"
\r
91 RMDir "$SMPROGRAMS\${PACKAGE}"
\r
93 # Files in installation directory.
\r
94 Delete /rebootok "$INSTDIR\mlvirsh.exe"
\r
95 Delete /rebootok "$INSTDIR\Uninstall ${PACKAGE}.exe"
\r
100 # Write an uninstaller into the installation directory.
\r
102 WriteUninstaller "$INSTDIR\Uninstall ${PACKAGE}.exe"
\r