Include required libraries in the Windows installer.
[virt-top.git] / wininstaller.nsis
index e3c8fd9..0ffba5c 100755 (executable)
@@ -57,13 +57,20 @@ ComponentText "This will install OCaml libvirt bindings, dependent libraries and
 # Title for the install directory page.\r
 DirText "Please select the installation folder."\r
 \r
-# Installer section.\r
-Section "OCaml Libvirt bindings (required)"\r
+# Installer sections.\r
+Section "Libvirt and its libraries (required)"\r
+       # Make this required.\r
        SectionIn RO\r
-SectionEnd\r
 \r
-Section "Libraries (required)"\r
-       SectionIn RO\r
+       SetOutPath $INSTDIR\r
+       # XXX Get these paths automatically.\r
+       File "c:\msys\1.0\local\bin\libvirt-?.dll"\r
+       File "c:\msys\1.0\local\bin\libxdr.dll"\r
+       File "c:\msys\1.0\local\bin\libxml2-?.dll"\r
+       File "c:\gnutls\bin\libgcrypt-??.dll"\r
+       File "c:\gnutls\bin\libgnutls-??.dll"\r
+       File "c:\gnutls\bin\libgpg-error-?.dll"\r
+       File "c:\gnutls\bin\libtasn1-?.dll"\r
 SectionEnd\r
 \r
 Section "Programs (recommended)"\r
@@ -71,6 +78,10 @@ Section "Programs (recommended)"
        File "/oname=mlvirsh.exe" "mlvirsh\mlvirsh.opt"\r
 SectionEnd\r
 \r
+Section "OCaml Libvirt bindings (for developers only)"\r
+       # XXX Need to find out where Objective CAML is installed.\r
+SectionEnd\r
+\r
 Section "Start Menu Shortcuts"\r
        CreateDirectory "$SMPROGRAMS\${PACKAGE}"\r
        CreateShortCut "$SMPROGRAMS\${PACKAGE}\Uninstall.lnk" "$INSTDIR\Uninstall ${PACKAGE}.exe" "" "$INSTDIR\Uninstall ${PACKAGE}.exe" 0\r
@@ -91,8 +102,8 @@ Section "Uninstall"
        RMDir "$SMPROGRAMS\${PACKAGE}"\r
 \r
        # Files in installation directory.\r
-       Delete /rebootok "$INSTDIR\mlvirsh.exe"\r
-       Delete /rebootok "$INSTDIR\Uninstall ${PACKAGE}.exe"\r
+       Delete /rebootok "$INSTDIR\*.exe"\r
+       Delete /rebootok "$INSTDIR\*.dll"\r
 \r
        RMDir "$INSTDIR"\r
 SectionEnd\r