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