Bundle Gtk DLLs and support files in the Windows installer.
[virt-top.git] / wininstaller.nsis.in
diff --git a/wininstaller.nsis.in b/wininstaller.nsis.in
new file mode 100755 (executable)
index 0000000..f348540
--- /dev/null
@@ -0,0 +1,127 @@
+#!Nsis Installer Command Script\r
+# @configure_input@\r
+# Copyright (C) 2008 Red Hat Inc., Richard W.M. Jones\r
+#\r
+# This library is free software; you can redistribute it and/or\r
+# modify it under the terms of the GNU Lesser General Public\r
+# License as published by the Free Software Foundation; either\r
+# version 2 of the License, or (at your option) any later version.\r
+#\r
+# This library is distributed in the hope that it will be useful,\r
+# but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
+# Lesser General Public License for more details.\r
+#\r
+# You should have received a copy of the GNU Lesser General Public\r
+# License along with this library; if not, write to the Free Software\r
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA\r
+\r
+# To build the installer:\r
+#\r
+# ./configure --with-nsis=/c/Progra~1/NSIS\r
+# make all opt\r
+# make wininstaller\r
+\r
+# Installer name.\r
+Name "OCaml Libvirt ${VERSION}"\r
+\r
+# This is where we will write the installer to, set by Makefile.\r
+OutFile "${OUTFILE}"\r
+\r
+# Target directory, or use value from the registry.\r
+InstallDir "c:\${PACKAGE}"\r
+InstallDirRegKey HKLM SOFTWARE\OCAML-LIBVIRT "Install_Dir"\r
+\r
+# Hide details.\r
+ShowInstDetails hide\r
+ShowUninstDetails hide\r
+\r
+# BZip2-compressed files are smaller but use more memory at runtime.\r
+SetCompressor bzip2\r
+\r
+# Include an XP manifest.\r
+XPStyle on\r
+\r
+# Pages in the installer wizard.\r
+Page license\r
+Page components\r
+Page directory\r
+Page instfiles\r
+\r
+# Title, data for license page.\r
+LicenseText "Continue"\r
+LicenseData "winlicense.rtf"\r
+\r
+# Title for components page.\r
+ComponentText "This will install OCaml libvirt bindings, dependent libraries and programs on your computer. Select which optional components you want installed."\r
+\r
+# Title for the install directory page.\r
+DirText "Please select the installation folder."\r
+\r
+# Installer sections.\r
+Section "Libvirt and its libraries (required)"\r
+       # Make this required.\r
+       SectionIn RO\r
+\r
+       SetOutPath $INSTDIR\r
+       File "@LIBVIRT_DLL_PATH@\libvirt-0.dll"\r
+       File "@LIBXDR_DLL_PATH@\libxdr.dll"\r
+       File "@LIBXML2_DLL_PATH@\libxml2-2.dll"\r
+       File "@GNUTLS_DLL_PATH@\libgcrypt-??.dll"\r
+       File "@GNUTLS_DLL_PATH@\libgnutls-??.dll"\r
+       File "@GNUTLS_DLL_PATH@\libgpg-error-?.dll"\r
+       File "@GNUTLS_DLL_PATH@\libtasn1-?.dll"\r
+       File "@GTK_DLL_PATH@\*.dll"\r
+\r
+       SetOutPath $INSTDIR\lib\r
+       File /r "@GTK_PATH@\lib\gtk-2.0"\r
+       File /r "@GTK_PATH@\lib\pango"\r
+\r
+       SetOutPath $INSTDIR\r
+       File /r "@GTK_PATH@\etc"\r
+\r
+       SetOutPath $INSTDIR\r
+SectionEnd\r
+\r
+Section "Programs (recommended)"\r
+       SetOutPath $INSTDIR\r
+       File "/oname=mlvirsh.exe" "mlvirsh\mlvirsh.opt"\r
+       #File "/oname=mlvirtmanager.exe" "mlvirsh\mlvirtmanager.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
+       CreateShortCut "$SMPROGRAMS\${PACKAGE}\Virt Shell.lnk" "$INSTDIR\mlvirsh.exe" "" "$INSTDIR\mlvirsh.exe" 0\r
+SectionEnd\r
+\r
+Section "Desktop Icons"\r
+       CreateShortCut "$DESKTOP\Virt Shell.lnk" "$INSTDIR\mlvirsh.exe" "" "$INSTDIR\mlvirsh.exe" 0\r
+SectionEnd\r
+\r
+Section "Uninstall"\r
+       # Desktop icons\r
+       Delete /rebootok "$DESKTOP\Virt Shell.lnk"\r
+\r
+       # Menu shortcuts\r
+       Delete /rebootok "$SMPROGRAMS\${PACKAGE}\Virt Shell.lnk"\r
+       Delete /rebootok "$SMPROGRAMS\${PACKAGE}\Uninstall.lnk"\r
+       RMDir "$SMPROGRAMS\${PACKAGE}"\r
+\r
+       # Files in installation directory.\r
+       RMDir /r "$INSTDIR\etc"\r
+       RMDir /r "$INSTDIR\lib"\r
+       Delete /rebootok "$INSTDIR\*.exe"\r
+       Delete /rebootok "$INSTDIR\*.dll"\r
+\r
+       RMDir "$INSTDIR"\r
+SectionEnd\r
+\r
+# Write an uninstaller into the installation directory.\r
+Section -post\r
+       WriteUninstaller "$INSTDIR\Uninstall ${PACKAGE}.exe"\r
+SectionEnd\r