Include required libraries in the Windows installer.
[virt-top.git] / wininstaller.nsis
1 #!Nsis Installer Command Script\r
2 # Copyright (C) 2008 Red Hat Inc., Richard W.M. Jones\r
3 #\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
8 #\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
13 #\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
17 \r
18 # To build the installer:\r
19 #\r
20 # ./configure --with-nsis=/c/Progra~1/NSIS\r
21 # make all opt\r
22 # make wininstaller\r
23 \r
24 # Installer name.\r
25 Name "OCaml Libvirt ${VERSION}"\r
26 \r
27 # This is where we will write the installer to, set by Makefile.\r
28 OutFile "${OUTFILE}"\r
29 \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
33 \r
34 # Hide details.\r
35 ShowInstDetails hide\r
36 ShowUninstDetails hide\r
37 \r
38 # BZip2-compressed files are smaller but use more memory at runtime.\r
39 SetCompressor bzip2\r
40 \r
41 # Include an XP manifest.\r
42 XPStyle on\r
43 \r
44 # Pages in the installer wizard.\r
45 Page license\r
46 Page components\r
47 Page directory\r
48 Page instfiles\r
49 \r
50 # Title, data for license page.\r
51 LicenseText "Continue"\r
52 LicenseData "winlicense.rtf"\r
53 \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
56 \r
57 # Title for the install directory page.\r
58 DirText "Please select the installation folder."\r
59 \r
60 # Installer sections.\r
61 Section "Libvirt and its libraries (required)"\r
62         # Make this required.\r
63         SectionIn RO\r
64 \r
65         SetOutPath $INSTDIR\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
74 SectionEnd\r
75 \r
76 Section "Programs (recommended)"\r
77         SetOutPath $INSTDIR\r
78         File "/oname=mlvirsh.exe" "mlvirsh\mlvirsh.opt"\r
79 SectionEnd\r
80 \r
81 Section "OCaml Libvirt bindings (for developers only)"\r
82         # XXX Need to find out where Objective CAML is installed.\r
83 SectionEnd\r
84 \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
89 SectionEnd\r
90 \r
91 Section "Desktop Icons"\r
92         CreateShortCut "$DESKTOP\Virt Shell.lnk" "$INSTDIR\mlvirsh.exe" "" "$INSTDIR\mlvirsh.exe" 0\r
93 SectionEnd\r
94 \r
95 Section "Uninstall"\r
96         # Desktop icons\r
97         Delete /rebootok "$DESKTOP\Virt Shell.lnk"\r
98 \r
99         # Menu shortcuts\r
100         Delete /rebootok "$SMPROGRAMS\${PACKAGE}\Virt Shell.lnk"\r
101         Delete /rebootok "$SMPROGRAMS\${PACKAGE}\Uninstall.lnk"\r
102         RMDir "$SMPROGRAMS\${PACKAGE}"\r
103 \r
104         # Files in installation directory.\r
105         Delete /rebootok "$INSTDIR\*.exe"\r
106         Delete /rebootok "$INSTDIR\*.dll"\r
107 \r
108         RMDir "$INSTDIR"\r
109 SectionEnd\r
110 \r
111 # Write an uninstaller into the installation directory.\r
112 Section -post\r
113         WriteUninstaller "$INSTDIR\Uninstall ${PACKAGE}.exe"\r
114 SectionEnd\r