Commit 3e7f9945 authored by Richard W.M. Jones's avatar Richard W.M. Jones

Remove obsolete: mlvirsh, gettext support, Windows installer.

parent cb02dae3
......@@ -28,16 +28,10 @@ core.*
libvirt/libvirt_version.ml
examples/list_domains
examples/node_info
mlvirsh/mlvirsh
virt-ctrl/virt-ctrl
virt-top/virt-top
virt-df/virt-df
wininstaller.nsis
*.orig
mlvirsh/mlvirsh_gettext.ml
virt-ctrl/virt_ctrl_gettext.ml
virt-df/virt_df_gettext.ml
virt-top/virt_top_gettext.ml
po/*.mo
po/*.po.bak
virt-df/virt_df_lvm2_lexer.ml
......
.gitignore
aclocal.m4
ChangeLog
config.guess
......@@ -27,17 +28,5 @@ Makefile.in
Make.rules.in
MANIFEST
META.in
mlvirsh/.depend
mlvirsh/Makefile.in
mlvirsh/mlvirsh.ml
po/ja.po
po/LINGUAS
po/Makefile.in
po/pl.po
po/POTFILES
po/pt_BR.po
po/virt-top.pot
README
TODO.libvirt
wininstaller.nsis.in
winlicense.rtf
......@@ -25,7 +25,7 @@ MAKENSIS = @MAKENSIS@
OCAMLDOC = @OCAMLDOC@
OCAMLDOCFLAGS := -html -sort
SUBDIRS = libvirt mlvirsh examples
SUBDIRS = libvirt examples
all opt depend install-opt install-byte:
for d in $(SUBDIRS); do \
......@@ -39,7 +39,6 @@ clean:
done
rm -f examples/list_domains
rm -f examples/node_info
rm -f mlvirsh/mlvirsh
distclean: clean
rm -f config.h config.log config.status configure
......@@ -50,9 +49,6 @@ distclean: clean
rm -f Make.rules
rm -f libvirt/Makefile
rm -f examples/Makefile
rm -f mlvirsh/Makefile
rm -f mlvirsh/mlvirsh_gettext.ml
rm -f po/Makefile
# Developer documentation (in html/ subdirectory).
......
......@@ -21,67 +21,6 @@ Building
make doc # Build HTML documentation in html/ subdirectory.
Then have a look at the program 'mlvirsh.opt'.
Note: If you want to run the programs without first installing, you
may need to set your $LD_LIBRARY_PATH environment variable so it
contains the build directory. eg:
LD_LIBRARY_PATH=libvirt/ mlvirsh/mlvirsh.opt
Windows
----------------------------------------------------------------------
I have built libvirt (the bindings), examples, mlvirsh and virt-ctrl
on Windows using the MinGW port of OCaml. It's quite likely that it
will also work under VC++, but I have not tested this.
You should make sure that your $PATH (environment variable) contains
the names of the directories containing all required DLLs, in
particular you will require:
libvirt-*.dll (from libvirt)
libgnutls-*.dll (from GnuTLS)
libgcrypt-*.dll
libgpg-error-*.dll
libtasn1-*.dll
libxdr.dll (from libxdr)
libxml2-*.dll (from libxml2)
and, a multitude of DLLs from GTK if you want to run virt-ctrl
You can use a tool such as Dependency Walker to find/check the
locations of dependent libraries.
To build the Windows installer, you will need NSIS. Then do:
./configure --with-nsis=/c/Progra~1/NSIS
make all opt
make wininstaller
This should build a Windows binary installer called
ocaml-libvirt-$VERSION.exe which includes the bindings, all required
DLLs and all programs that can be built under Windows.
mlvirsh
----------------------------------------------------------------------
'mlvirsh' is an almost complete reimplementation of virsh, which is
mostly command compatible (there are a very few commands missing, and
some commands have a slightly different syntax, but broadly speaking
they are equivalent programs except that one is written in C and the
other in OCaml).
At the time of writing:
wc -c wc -l
virsh 126,056 4,641
mlvirsh 19,427 598
% size 15% 13%
Programming
----------------------------------------------------------------------
......@@ -98,9 +37,6 @@ License
The library is distributed under the GNU LGPL, version 2 or above,
with the OCaml linking exception. Please see COPYING.LIB for details.
The standalone program 'mlvirsh' is distributed under the GNU GPL,
version 2 or above. Please see COPYING for details.
Examples are public domain.
......@@ -109,4 +45,3 @@ Subdirectories
libvirt/ The OCaml bindings.
examples/ Some example programs using the bindings.
mlvirsh/ 'mlvirsh' command line tool.
......@@ -77,9 +77,6 @@
/* Define to 1 if you have the `virDomainSetSchedulerParameters' function. */
#undef HAVE_VIRDOMAINSETSCHEDULERPARAMETERS
/* Define to 1 if the system has the type `virJobPtr'. */
#undef HAVE_VIRJOBPTR
/* Define to 1 if you have the `virNodeGetCellsFreeMemory' function. */
#undef HAVE_VIRNODEGETCELLSFREEMEMORY
......
......@@ -148,14 +148,6 @@ if test "x$pkg_unix" != "xyes"; then
AC_MSG_ERROR([Cannot find required OCaml package 'unix'])
fi
dnl Check for optional OCaml packages.
AC_CHECK_OCAML_PKG(gettext)
AC_SUBST(pkg_gettext)
dnl Check for recommended ocaml-gettext tool.
AC_CHECK_PROG(OCAML_GETTEXT,ocaml-gettext,ocaml-gettext)
dnl Check for optional NSIS (for building a Windows installer).
dnl XXX This probably doesn't work at the moment XXX
AC_ARG_WITH([nsis],
......@@ -246,42 +238,6 @@ AC_SUBST(GNUTLS_DLL_PATH)
AC_SUBST(GTK_DLL_PATH)
AC_SUBST(GTK_PATH)
dnl Write gettext modules for the programs.
dnl http://www.le-gall.net/sylvain+violaine/documentation/ocaml-gettext/html/reference-manual/ch03s04.html
for d in mlvirsh; do
f=`echo $d | tr - _`_gettext.ml
AC_MSG_NOTICE([creating $d/$f])
rm -f $d/$f
echo "(* This file is generated automatically by ./configure. *)" > $d/$f
if test "x$pkg_gettext" != "xno"; then
# Gettext module is available, so use it.
cat <<EOT >>$d/$f
module Gettext = Gettext.Program (
struct
let textdomain = "$d"
let codeset = None
let dir = None
let dependencies = [[]]
end
) (GettextStub.Native)
EOT
else
# No gettext module is available, so fake the translation functions.
cat <<EOT >>$d/$f
module Gettext = struct
external s_ : string -> string = "%identity"
external f_ : ('a -> 'b, 'c, 'd) format -> ('a -> 'b, 'c, 'd) format
= "%identity"
let sn_ : string -> string -> int -> string
= fun s p n -> if n = 1 then s else p
let fn_ : ('a -> 'b, 'c, 'd) format -> ('a -> 'b, 'c, 'd) format -> int
-> ('a -> 'b, 'c, 'd) format
= fun s p n -> if n = 1 then s else p
end
EOT
fi
done
dnl Summary.
echo "------------------------------------------------------------"
echo "Thanks for downloading" $PACKAGE_STRING
......@@ -293,10 +249,8 @@ AC_CONFIG_FILES([META
libvirt/libvirt_version.ml
Makefile
Make.rules
po/Makefile
libvirt/Makefile
examples/Makefile
mlvirsh/Makefile
])
if test "x$MAKENSIS" != "x"; then
AC_CONFIG_FILES([wininstaller.nsis])
......
......@@ -239,7 +239,6 @@ type conn_t =
| Read_only of Libvirt.ro Libvirt.Connect.t
| Read_write of Libvirt.rw Libvirt.Connect.t
]}
See also the source of [mlvirsh].
*)
(** {3 Forward definitions}
......
mlvirsh.cmo: mlvirsh_gettext.cmo ../libvirt/libvirt.cmi
mlvirsh.cmx: mlvirsh_gettext.cmx ../libvirt/libvirt.cmx
mlvirsh_gettext.cmo:
mlvirsh_gettext.cmx:
# mlvirsh
# Copyright (C) 2007 Red Hat Inc., Richard W.M. Jones
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
INSTALL := @INSTALL@
prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = @bindir@
pkg_gettext = @pkg_gettext@
OCAMLFIND = @OCAMLFIND@
ifneq ($(OCAMLFIND),)
OCAMLCPACKAGES := -package unix -I ../libvirt
OCAMLCFLAGS := -g
OCAMLCLIBS := -linkpkg
OCAMLOPTPACKAGES := $(OCAMLCPACKAGES)
OCAMLOPTFLAGS :=
OCAMLOPTLIBS := $(OCAMLCLIBS)
else
OCAMLCINCS := -I ../libvirt
OCAMLCFLAGS := -g
OCAMLCLIBS := unix.cma
OCAMLOPTINCS := $(OCAMLCINCS)
OCAMLOPTFLAGS :=
OCAMLOPTLIBS := unix.cmxa
endif
ifneq ($(pkg_gettext),no)
ifneq ($(OCAMLFIND),)
OCAMLCPACKAGES += -package gettext-stub
OCAMLOPTPACKAGES += -package gettext-stub
else
OCAMLCINCS += -I gettext -I gettext-stub
OCAMLOPTINCS += -I gettext -I gettext-stub
endif
endif
OBJS := mlvirsh_gettext.cmo mlvirsh.cmo
XOBJS := $(OBJS:.cmo=.cmx)
export LIBRARY_PATH=../libvirt
export LD_LIBRARY_PATH=../libvirt
BYTE_TARGETS := mlvirsh
OPT_TARGETS := mlvirsh.opt
all: $(BYTE_TARGETS)
opt: $(OPT_TARGETS)
ifneq ($(OCAMLFIND),)
mlvirsh: $(OBJS)
$(OCAMLFIND) ocamlc $(OCAMLCPACKAGES) $(OCAMLCFLAGS) $(OCAMLCLIBS) \
../libvirt/mllibvirt.cma -o $@ $^
mlvirsh.opt: $(XOBJS)
$(OCAMLFIND) ocamlopt \
$(OCAMLOPTPACKAGES) $(OCAMLOPTFLAGS) $(OCAMLOPTLIBS) \
../libvirt/mllibvirt.cmxa -o $@ $^
else
mlvirsh: $(OBJS)
$(OCAMLC) $(OCAMLCINCS) $(OCAMLCFLAGS) $(OCAMLCLIBS) \
../libvirt/mllibvirt.cma -o $@ $^
mlvirsh.opt: $(XOBJS)
$(OCAMLOPT) \
$(OCAMLOPTINCS) $(OCAMLOPTFLAGS) $(OCAMLOPTLIBS) \
../libvirt/mllibvirt.cmxa -o $@ $^
endif
install-opt:
if [ -x mlvirsh.opt ]; then \
mkdir -p $(DESTDIR)$(bindir); \
$(INSTALL) -m 0755 mlvirsh.opt $(DESTDIR)$(bindir)/mlvirsh; \
fi
install-byte:
if [ -x mlvirsh ]; then \
mkdir -p $(DESTDIR)$(bindir); \
$(INSTALL) -m 0755 mlvirsh $(DESTDIR)$(bindir)/mlvirsh; \
fi
include ../Make.rules
This diff is collapsed.
# Makefile for po subdirectory.
# @configure_input@
#
# Copyright (C) 2007-2008 Red Hat Inc.
# Written by Richard W.M. Jones <rjones@redhat.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
OCAML_GETTEXT_PACKAGE = virt-top
LINGUAS = $(shell cat LINGUAS)
SOURCES = POTFILES
OCAML_GETTEXT = @OCAML_GETTEXT@
OCAML_GETTEXT_EXTRACT_OPTIONS =
OCAML_GETTEXT_COMPILE_OPTIONS =
OCAML_GETTEXT_INSTALL_OPTIONS =
OCAML_GETTEXT_MERGE_OPTIONS =
PODIR = @prefix@/share/locale
POFILES = $(addsuffix .po,$(LINGUAS))
MOFILES = $(addsuffix .mo,$(LINGUAS))
POTFILE = $(OCAML_GETTEXT_PACKAGE).pot
all: $(MOFILES) $(POTFILE)
install: install-po
uninstall: uninstall-po
clean:: clean-po
%.mo: %.po
$(OCAML_GETTEXT) --action compile $(OCAML_GETTEXT_COMPILE_OPTIONS) \
--compile-output $@ $^
%.pot: $(SOURCES) $(shell cat $(SOURCES))
$(OCAML_GETTEXT) --action extract $(OCAML_GETTEXT_EXTRACT_OPTIONS) \
--extract-pot $@ $<
# Also includes a fix for incorrectly escaped multi-byte sequences.
%.po: $(POTFILE)
$(OCAML_GETTEXT) --action merge $(OCAML_GETTEXT_MERGE_OPTIONS) \
--merge-pot $(POTFILE) $@
mv $@ $@.orig
perl -wpe 's/\\(\d{3})/pack "C*", $$1/ge' < $@.orig > $@
$(BUILDPO):
mkdir -p $(BUILDPO)
.PRECIOUS: $(POTFILE)
install-po: $(MOFILES)
$(OCAML_GETTEXT) --action install $(OCAML_GETTEXT_INSTALL_OPTIONS) \
--install-textdomain $(OCAML_GETTEXT_PACKAGE) \
--install-destdir $(PODIR) $(MOFILES)
uninstall-po:
$(OCAML_GETTEXT) --action uninstall $(OCAML_GETTEXT_INSTALL_OPTIONS) \
--uninstall-textdomain $(OCAML_GETTEXT_PACKAGE) \
--uninstall-orgdir $(PODIR) $(MOFILES)
clean-po:
-$(OCAML_GETTEXT) --action uninstall $(OCAML_GETTEXT_INSTALL_OPTIONS) \
--uninstall-textdomain $(OCAML_GETTEXT_PACKAGE) \
--uninstall-orgdir $(BUILDPO) $(MOFILES)
-$(RM) $(MOFILES)
../mlvirsh/mlvirsh.ml
../virt-ctrl/mingw-gcc-wrapper.ml
../virt-ctrl/vc_connection_dlg.ml
../virt-ctrl/vc_connections.ml
../virt-ctrl/vc_dbus.ml
../virt-ctrl/vc_domain_ops.ml
../virt-ctrl/vc_helpers.ml
../virt-ctrl/vc_icons.ml
../virt-ctrl/vc_mainwindow.ml
../virt-ctrl/virt_ctrl.ml
../virt-df/virt_df_ext2.ml
../virt-df/virt_df_linux_swap.ml
../virt-df/virt_df_lvm2.ml
../virt-df/virt_df_main.ml
../virt-df/virt_df.ml
../virt-top/virt_top_calendar1.ml
../virt-top/virt_top_calendar2.ml
../virt-top/virt_top_csv.ml
../virt-top/virt_top_main.ml
../virt-top/virt_top.ml
../virt-top/virt_top_utils.ml
../virt-top/virt_top_xml.ml
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
#!Nsis Installer Command Script
# @configure_input@
# Copyright (C) 2008 Red Hat Inc., Richard W.M. Jones
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
# To build the installer:
#
# ./configure --with-nsis=/c/Progra~1/NSIS
# make all opt
# make wininstaller
# Installer name.
Name "OCaml Libvirt ${VERSION}"
# This is where we will write the installer to, set by Makefile.
OutFile "${OUTFILE}"
# Target directory, or use value from the registry.
InstallDir "c:\${PACKAGE}"
InstallDirRegKey HKLM SOFTWARE\OCAML-LIBVIRT "Install_Dir"
# Hide details.
ShowInstDetails hide
ShowUninstDetails hide
# BZip2-compressed files are smaller but use more memory at runtime.
SetCompressor bzip2
# Include an XP manifest.
XPStyle on
# Pages in the installer wizard.
Page license
Page components
Page directory
Page instfiles
# Title, data for license page.
LicenseText "Continue"
LicenseData "winlicense.rtf"
# Title for components page.
ComponentText "This will install OCaml libvirt bindings, dependent libraries and programs on your computer. Select which optional components you want installed."
# Title for the install directory page.
DirText "Please select the installation folder."
# Installer sections.
Section "Libvirt and its libraries (required)"
# Make this required.
SectionIn RO
SetOutPath $INSTDIR
File "@LIBVIRT_DLL_PATH@\libvirt-0.dll"
File "@LIBXDR_DLL_PATH@\libxdr.dll"
File "@LIBXML2_DLL_PATH@\libxml2-2.dll"
File "@GNUTLS_DLL_PATH@\libgcrypt-??.dll"
File "@GNUTLS_DLL_PATH@\libgnutls-??.dll"
File "@GNUTLS_DLL_PATH@\libgpg-error-?.dll"
File "@GNUTLS_DLL_PATH@\libtasn1-?.dll"
File "@GTK_DLL_PATH@\*.dll"
SetOutPath $INSTDIR\lib
File /r "@GTK_PATH@\lib\gtk-2.0"
File /r "@GTK_PATH@\lib\pango"
SetOutPath $INSTDIR
File /r "@GTK_PATH@\etc"
SetOutPath $INSTDIR
SectionEnd
Section "Programs (recommended)"
SetOutPath $INSTDIR
File "/oname=mlvirsh.exe" "mlvirsh\mlvirsh.opt"
File "/oname=virt-ctrl.exe" "virt-ctrl\virt-ctrl.opt"
SectionEnd
Section "OCaml Libvirt bindings (for developers only)"
# XXX Need to find out where Objective CAML is installed.
SectionEnd
Section "Start Menu Shortcuts"
CreateDirectory "$SMPROGRAMS\${PACKAGE}"
CreateShortCut "$SMPROGRAMS\${PACKAGE}\Uninstall.lnk" "$INSTDIR\Uninstall ${PACKAGE}.exe" "" "$INSTDIR\Uninstall ${PACKAGE}.exe" 0
CreateShortCut "$SMPROGRAMS\${PACKAGE}\Virt Shell.lnk" "$INSTDIR\mlvirsh.exe" "" "$INSTDIR\mlvirsh.exe" 0
CreateShortCut "$SMPROGRAMS\${PACKAGE}\Virt Control.lnk" "$INSTDIR\virt-ctrl.exe" "" "$INSTDIR\virt-ctrl.exe" 0
SectionEnd
Section "Desktop Icons"
CreateShortCut "$DESKTOP\Virt Shell.lnk" "$INSTDIR\mlvirsh.exe" "" "$INSTDIR\mlvirsh.exe" 0
CreateShortCut "$DESKTOP\Virt Control.lnk" "$INSTDIR\virt-ctrl.exe" "" "$INSTDIR\virt-ctrl.exe" 0
SectionEnd
Section "Uninstall"
# Desktop icons
Delete /rebootok "$DESKTOP\Virt Shell.lnk"
Delete /rebootok "$DESKTOP\Virt Control.lnk"
# Menu shortcuts
Delete /rebootok "$SMPROGRAMS\${PACKAGE}\Virt Shell.lnk"
Delete /rebootok "$SMPROGRAMS\${PACKAGE}\Virt Control.lnk"
Delete /rebootok "$SMPROGRAMS\${PACKAGE}\Uninstall.lnk"
RMDir "$SMPROGRAMS\${PACKAGE}"
# Files in installation directory.
RMDir /r "$INSTDIR\etc"
RMDir /r "$INSTDIR\lib"
Delete /rebootok "$INSTDIR\*.exe"
Delete /rebootok "$INSTDIR\*.dll"
RMDir "$INSTDIR"
SectionEnd
# Write an uninstaller into the installation directory.
Section -post
WriteUninstaller "$INSTDIR\Uninstall ${PACKAGE}.exe"
SectionEnd
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment