Commit 97fabc0a authored by Eskil Heyn Olsen's avatar Eskil Heyn Olsen
Browse files

Added the first pieces if the GUI installer. Since we don't want it to be

	* nautilus-installer/Makefile:
	* nautilus-installer/Makefile.am:
	* nautilus-installer/Makefile.in:
	* nautilus-installer/nautilus-installer.c:
	* nautilus-installer/nautilus-installer.glade:
	* nautilus-installer/src/HACKING:
	* nautilus-installer/src/Makefile:
	* nautilus-installer/src/Makefile.in:
	* nautilus-installer/src/callbacks.c: (druid_cancel),
	(begin_install), (druid_finish), (prep_install):
	* nautilus-installer/src/installer.c: (eazel_install_progress),
	(eazel_download_progress), (installer):
	* nautilus-installer/src/installer.h:
	* nautilus-installer/src/interface.c: (create_window):
	* nautilus-installer/src/interface.h:
	* nautilus-installer/src/main.c: (main):
	Added the first pieces if the GUI installer. Since we don't want
	it to be part of the built, I've committed the generated makefiles
	as well. This also means you should be able to build it straigt
	from cvs. It already has base functionality, and is almost 70% done.
parent e8297d1c
2000-05-26 Eskil Heyn Olsen <set EMAIL_ADDRESS environment variable>
2000-05-26 Eskil Heyn Olsen <eskil@eazel.com>
* nautilus-installer/Makefile:
* nautilus-installer/Makefile.am:
* nautilus-installer/Makefile.in:
* nautilus-installer/nautilus-installer.c:
* nautilus-installer/nautilus-installer.glade:
* nautilus-installer/src/HACKING:
* nautilus-installer/src/Makefile:
* nautilus-installer/src/Makefile.in:
* nautilus-installer/src/callbacks.c: (druid_cancel),
(begin_install), (druid_finish), (prep_install):
* nautilus-installer/src/installer.c: (eazel_install_progress),
(eazel_download_progress), (installer):
* nautilus-installer/src/installer.h:
* nautilus-installer/src/interface.c: (create_window):
* nautilus-installer/src/interface.h:
* nautilus-installer/src/main.c: (main):
Added the first pieces if the GUI installer. Since we don't want
it to be part of the built, I've committed the generated makefiles
as well. This also means you should be able to build it straigt
from cvs. It already has base functionality, and is almost 70% done.
2000-05-26 Eskil Heyn Olsen <eskil@eazel.com>
* components/services/install/command-line/Makefile.am:
* components/services/install/command-line/eazel-alt-install.c:
(set_parameters_from_command_line), (eazel_install_progress),
(eazel_download_progress), (main):
Don't build eazel-install, only eazel-alt-install, which
uses the EazelInstall object.
* components/services/install/lib/eazel-install-object.c:
(impl_Eazel_Install_new_packages), (eazel_install_get_epv),
(eazel_install_destroy), (eazel_install_set_arg),
......@@ -14,6 +40,13 @@
(fetch_remote_package_list), (eazel_install_emit_install_progress),
(eazel_install_emit_download_progress),
(eazel_install_new_packages):
Implemented a GTK+ object for libinstall. It has the basic
functionality needed for the May 31st gui installer. This means it
can be instantiated, the install and transferoptions be set and it
can do the download of the packagelist, and download and install
the files mentioned there. Needs upgrade & uninstall, plus a lot
of errorchecking and memleaks (bug#982). This halfway completed bug#980.
* components/services/install/lib/eazel-install-private.h:
* components/services/install/lib/eazel-install-protocols.c:
(http_fetch_remote_file):
......@@ -25,7 +58,12 @@
(uninstall_packages), (rpm_show_progress), (do_rpm_install),
(rpm_install):
* components/services/install/lib/eazel-install-rpm-glue.h:
Did a lot of hacking and slashing to pass the EazelInstall object
downwards so progress signals can be emitted. Also a lot of
errorhandling was fixed so it doesn't just g_assert or such.
But a lot more of that is needed (bug#1014) and some major
slashing so the EazelInstall passing isn't so ugly (bug#980).
2000-05-26 Darin Adler <darin@eazel.com>
A little more desktop window work.
......
CC=gcc
TRILOBITE_CFLAGS=-I../components/services/trilobite/libtrilobite
EAZEL_CFLAGS=-I../components/services/install/lib
EAZEL_LIBS=../components/services/install/lib/libinstall.a
GNET_CFLAGS=`gnet-config --cflags`
GNET_LIBS=/gnome/lib/libgnet.a
GHTTP_CFLAGS=`ghttp-config --cflags`
GHTTP_LIBS=/gnome/lib/libghttp.a
RPM_CFLAGS=-I/usr/include/rpm
RPM_LIBS=/usr/lib/librpm.a
XML_CFLAGS=`xml-config --cflags`
XML_LIBS=/gnome/lib/libxml.a
SHAREDIR=/gnome/share/eazel
all: nautilus-installer
nautilus-installer: nautilus-installer.o
$(CC) -static -g -O2 -o nautilus-installer nautilus-installer.o -L/gnome/lib $(EAZEL_LIBS) $(RPM_LIBS) $(GNET_LIBS) $(GHTTP_LIBS) $(XML_LIBS) `/gnome/bin/gnome-config --libs gnomeui` -lz -lbz2
nautilus-installer.o: nautilus-installer.c
$(CC) -Wall -g -c -o nautilus-installer.o nautilus-installer.c -I. -I.. $(EAZEL_CFLAGS) $(TRILOBITE_CFLAGS) `/gnome/bin/gnome-config --cflags gnomeui`
clean:
rm -f nautilus-installer *.o
## Process this file with automake to produce Makefile.in
SUBDIRS = src
install-data-local:
@$(NORMAL_INSTALL)
if test -d $(srcdir)/pixmaps; then \
$(mkinstalldirs) $(DESTDIR)@PACKAGE_PIXMAPS_DIR@; \
for pixmap in $(srcdir)/pixmaps/*; do \
if test -f $$pixmap; then \
$(INSTALL_DATA) $$pixmap $(DESTDIR)@PACKAGE_PIXMAPS_DIR@; \
fi \
done \
fi
dist-hook:
if test -d pixmaps; then \
mkdir $(distdir)/pixmaps; \
for pixmap in pixmaps/*; do \
if test -f $$pixmap; then \
cp -p $$pixmap $(distdir)/pixmaps; \
fi \
done \
fi
# Makefile.in generated automatically by automake 1.4 from Makefile.am
# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
SHELL = @SHELL@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = @bindir@
sbindir = @sbindir@
libexecdir = @libexecdir@
datadir = @datadir@
sysconfdir = @sysconfdir@
sharedstatedir = @sharedstatedir@
localstatedir = @localstatedir@
libdir = @libdir@
infodir = @infodir@
mandir = @mandir@
includedir = @includedir@
oldincludedir = /usr/include
DESTDIR =
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = ..
ACLOCAL = @ACLOCAL@
AUTOCONF = @AUTOCONF@
AUTOMAKE = @AUTOMAKE@
AUTOHEADER = @AUTOHEADER@
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
INSTALL_DATA = @INSTALL_DATA@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
transform = @program_transform_name@
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
host_alias = @host_alias@
host_triplet = @host@
AS = @AS@
BONOBO_CFLAGS = @BONOBO_CFLAGS@
BONOBO_LIBS = @BONOBO_LIBS@
CATALOGS = @CATALOGS@
CATOBJEXT = @CATOBJEXT@
CC = @CC@
CPP = @CPP@
DATADIRNAME = @DATADIRNAME@
DLLTOOL = @DLLTOOL@
EAZEL_SERVICES = @EAZEL_SERVICES@
GCONF_CFLAGS = @GCONF_CFLAGS@
GCONF_CONFIG = @GCONF_CONFIG@
GCONF_LIBS = @GCONF_LIBS@
GDK_PIXBUF_CFLAGS = @GDK_PIXBUF_CFLAGS@
GDK_PIXBUF_CONFIG = @GDK_PIXBUF_CONFIG@
GDK_PIXBUF_LIBS = @GDK_PIXBUF_LIBS@
GENCAT = @GENCAT@
GHTTP_CFLAGS = @GHTTP_CFLAGS@
GHTTP_CONFIG = @GHTTP_CONFIG@
GHTTP_LIBS = @GHTTP_LIBS@
GLIB_CFLAGS = @GLIB_CFLAGS@
GLIB_CONFIG = @GLIB_CONFIG@
GLIB_LIBS = @GLIB_LIBS@
GMOFILES = @GMOFILES@
GMSGFMT = @GMSGFMT@
GNET_CFLAGS = @GNET_CFLAGS@
GNET_CONFIG = @GNET_CONFIG@
GNET_LIBS = @GNET_LIBS@
GNOMECANVASPIXBUF_INCLUDEDIR = @GNOMECANVASPIXBUF_INCLUDEDIR@
GNOMECANVASPIXBUF_LIBS = @GNOMECANVASPIXBUF_LIBS@
GNOMEUI_CFLAGS = @GNOMEUI_CFLAGS@
GNOMEUI_LIBS = @GNOMEUI_LIBS@
GNOME_CFLAGS = @GNOME_CFLAGS@
GNOME_CONFIG = @GNOME_CONFIG@
GNOME_LIBS = @GNOME_LIBS@
GNORBA_CFLAGS = @GNORBA_CFLAGS@
GNORBA_LIBS = @GNORBA_LIBS@
GTKHTML_CFLAGS = @GTKHTML_CFLAGS@
GTKHTML_LIBS = @GTKHTML_LIBS@
GTK_CFLAGS = @GTK_CFLAGS@
GTK_LIBS = @GTK_LIBS@
GT_NO = @GT_NO@
GT_YES = @GT_YES@
INCLUDE_LOCALE_H = @INCLUDE_LOCALE_H@
INSTOBJEXT = @INSTOBJEXT@
INTLDEPS = @INTLDEPS@
INTLLIBS = @INTLLIBS@
INTLOBJS = @INTLOBJS@
LD = @LD@
LIBPNG = @LIBPNG@
LIBTOOL = @LIBTOOL@
LIBWWW_CFLAGS = @LIBWWW_CFLAGS@
LIBWWW_CONFIG = @LIBWWW_CONFIG@
LIBWWW_LIBS = @LIBWWW_LIBS@
LN_S = @LN_S@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MKINSTALLDIRS = @MKINSTALLDIRS@
MOZILLA_COMPONENT_CFLAGS = @MOZILLA_COMPONENT_CFLAGS@
MOZILLA_COMPONENT_LDFLAGS = @MOZILLA_COMPONENT_LDFLAGS@
MOZILLA_COMPONENT_LIBS = @MOZILLA_COMPONENT_LIBS@
NM = @NM@
OAF_CFLAGS = @OAF_CFLAGS@
OAF_CONFIG = @OAF_CONFIG@
OAF_LIBS = @OAF_LIBS@
OBJDUMP = @OBJDUMP@
PACKAGE = @PACKAGE@
PAM_LIBS = @PAM_LIBS@
POFILES = @POFILES@
POSUB = @POSUB@
RANLIB = @RANLIB@
RPM_LIBS = @RPM_LIBS@
USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
USE_NLS = @USE_NLS@
VERSION = @VERSION@
VFS_CFLAGS = @VFS_CFLAGS@
VFS_LIBS = @VFS_LIBS@
WERROR = @WERROR@
XML_CFLAGS = @XML_CFLAGS@
XML_CONFIG = @XML_CONFIG@
XML_LIBS = @XML_LIBS@
ZVT_LIBS = @ZVT_LIBS@
Z_LIBS = @Z_LIBS@
gnomelocaledir = @gnomelocaledir@
l = @l@
SUBDIRS = src
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = ../config.h
CONFIG_CLEAN_FILES =
DIST_COMMON = Makefile.am Makefile.in
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
TAR = gtar
GZIP_ENV = --best
all: all-redirect
.SUFFIXES:
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
cd $(top_srcdir) && $(AUTOMAKE) --gnu nautilus-installer/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES)
cd $(top_builddir) \
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
# This directory's subdirectories are mostly independent; you can cd
# into them and run `make' without going through this Makefile.
# To change the values of `make' variables: instead of editing Makefiles,
# (1) if the variable is set in `config.status', edit `config.status'
# (which will cause the Makefiles to be regenerated when you run `make');
# (2) otherwise, pass the desired values on the `make' command line.
@SET_MAKE@
all-recursive install-data-recursive install-exec-recursive \
installdirs-recursive install-recursive uninstall-recursive \
check-recursive installcheck-recursive info-recursive dvi-recursive:
@set fnord $(MAKEFLAGS); amf=$$2; \
dot_seen=no; \
target=`echo $@ | sed s/-recursive//`; \
list='$(SUBDIRS)'; for subdir in $$list; do \
echo "Making $$target in $$subdir"; \
if test "$$subdir" = "."; then \
dot_seen=yes; \
local_target="$$target-am"; \
else \
local_target="$$target"; \
fi; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
done; \
if test "$$dot_seen" = "no"; then \
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
fi; test -z "$$fail"
mostlyclean-recursive clean-recursive distclean-recursive \
maintainer-clean-recursive:
@set fnord $(MAKEFLAGS); amf=$$2; \
dot_seen=no; \
rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \
rev="$$subdir $$rev"; \
test "$$subdir" = "." && dot_seen=yes; \
done; \
test "$$dot_seen" = "no" && rev=". $$rev"; \
target=`echo $@ | sed s/-recursive//`; \
for subdir in $$rev; do \
echo "Making $$target in $$subdir"; \
if test "$$subdir" = "."; then \
local_target="$$target-am"; \
else \
local_target="$$target"; \
fi; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
done && test -z "$$fail"
tags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
done
tags: TAGS
ID: $(HEADERS) $(SOURCES) $(LISP)
list='$(SOURCES) $(HEADERS)'; \
unique=`for i in $$list; do echo $$i; done | \
awk ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
here=`pwd` && cd $(srcdir) \
&& mkid -f$$here/ID $$unique $(LISP)
TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
tags=; \
here=`pwd`; \
list='$(SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \
fi; \
done; \
list='$(SOURCES) $(HEADERS)'; \
unique=`for i in $$list; do echo $$i; done | \
awk ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
|| (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS)
mostlyclean-tags:
clean-tags:
distclean-tags:
-rm -f TAGS ID
maintainer-clean-tags:
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
subdir = nautilus-installer
distdir: $(DISTFILES)
here=`cd $(top_builddir) && pwd`; \
top_distdir=`cd $(top_distdir) && pwd`; \
distdir=`cd $(distdir) && pwd`; \
cd $(top_srcdir) \
&& $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu nautilus-installer/Makefile
@for file in $(DISTFILES); do \
d=$(srcdir); \
if test -d $$d/$$file; then \
cp -pr $$/$$file $(distdir)/$$file; \
else \
test -f $(distdir)/$$file \
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|| cp -p $$d/$$file $(distdir)/$$file || :; \
fi; \
done
for subdir in $(SUBDIRS); do \
if test "$$subdir" = .; then :; else \
test -d $(distdir)/$$subdir \
|| mkdir $(distdir)/$$subdir \
|| exit 1; \
chmod 777 $(distdir)/$$subdir; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir=../$(top_distdir) distdir=../$(distdir)/$$subdir distdir) \
|| exit 1; \
fi; \
done
$(MAKE) $(AM_MAKEFLAGS) top_distdir="$(top_distdir)" distdir="$(distdir)" dist-hook
info-am:
info: info-recursive
dvi-am:
dvi: dvi-recursive
check-am: all-am
check: check-recursive
installcheck-am:
installcheck: installcheck-recursive
install-exec-am:
install-exec: install-exec-recursive
install-data-am: install-data-local
install-data: install-data-recursive
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
install: install-recursive
uninstall-am:
uninstall: uninstall-recursive
all-am: Makefile
all-redirect: all-recursive
install-strip:
$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
installdirs: installdirs-recursive
installdirs-am:
mostlyclean-generic:
clean-generic:
distclean-generic:
-rm -f Makefile $(CONFIG_CLEAN_FILES)
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
maintainer-clean-generic:
mostlyclean-am: mostlyclean-tags mostlyclean-generic
mostlyclean: mostlyclean-recursive
clean-am: clean-tags clean-generic mostlyclean-am
clean: clean-recursive
distclean-am: distclean-tags distclean-generic clean-am
-rm -f libtool
distclean: distclean-recursive
maintainer-clean-am: maintainer-clean-tags maintainer-clean-generic \
distclean-am
@echo "This command is intended for maintainers to use;"
@echo "it deletes files that may require special tools to rebuild."
maintainer-clean: maintainer-clean-recursive
.PHONY: install-data-recursive uninstall-data-recursive \
install-exec-recursive uninstall-exec-recursive installdirs-recursive \
uninstalldirs-recursive all-recursive check-recursive \
installcheck-recursive info-recursive dvi-recursive \
mostlyclean-recursive distclean-recursive clean-recursive \
maintainer-clean-recursive tags tags-recursive mostlyclean-tags \
distclean-tags clean-tags maintainer-clean-tags distdir info-am info \
dvi-am dvi check check-am installcheck-am installcheck install-exec-am \
install-exec install-data-local install-data-am install-data install-am \
install uninstall-am uninstall all-redirect all-am all installdirs-am \
installdirs mostlyclean-generic distclean-generic clean-generic \
maintainer-clean-generic clean mostlyclean distclean maintainer-clean
install-data-local:
@$(NORMAL_INSTALL)
if test -d $(srcdir)/pixmaps; then \
$(mkinstalldirs) $(DESTDIR)@PACKAGE_PIXMAPS_DIR@; \
for pixmap in $(srcdir)/pixmaps/*; do \
if test -f $$pixmap; then \
$(INSTALL_DATA) $$pixmap $(DESTDIR)@PACKAGE_PIXMAPS_DIR@; \
fi \
done \
fi
dist-hook:
if test -d pixmaps; then \
mkdir $(distdir)/pixmaps; \
for pixmap in pixmaps/*; do \
if test -f $$pixmap; then \
cp -p $$pixmap $(distdir)/pixmaps; \
fi \
done \
fi
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
/*
* Copyright (C) 2000 Eazel, Inc
*
* 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.
*
* Authors: J Shane Culpepper <pepper@eazel.com>
*
*/
/* nautilus-installer - A very simple bootstrap installer for nautilus and
* its dependancies.
*/
#include "eazel-install-types.h"
#include "eazel-install-protocols.h"
#include "eazel-install-rpm-glue.h"
#include "eazel-install-xml-package-list.h"
#include "eazel-install-metadata.h"
#include "helixcode-utils.h"
#include <config.h>
#include <popt-gnome.h>
/* Here are the values to change if the internal server changes location or
* storage locations. You can also change these if you want to play with the
* installer locally.
*/
#define REMOTE_SERVER_NAME "vorlon.eazel.com"
#define REMOTE_PKG_LIST_PATH "/package-list.xml"
#define REMOTE_RPM_DIR "/RPMS"
#define PATH_TO_RPMRC "/usr/lib/rpm/rpmrc"
#define LOCAL_PKG_LIST_PATH "/tmp/package-list.xml"
#define DEFAULT_TMP_DIR "/tmp/eazel-install"
/* Forward Function Declarations */
/* The following 3 functions are a stupid copy of a few functions from
* components/services/trilobite/libtrilobite. These should be statically
* in at some point.
*/
char* xml_get_value (xmlNode* node, const char* name);
gboolean check_for_root_user (void);
gboolean check_for_redhat (void);
static void show_usage (int exitcode, char* error);
static void show_license (int exitcode, char* error);
static TransferOptions* init_default_topts (void);
static InstallOptions* init_default_iopts (void);
static void create_temporary_directory (const char* tmpdir);
static void fetch_remote_package_list (const char* pkg_list,
TransferOptions* topts);
/* Show options available for the bootstrap installer */
static void
show_usage (int exitcode, char* error) {
fprintf (stderr, "Usage: nautilus-installer [options]\n"
"Valid options are:\n"
" --help : show help\n"
" --License : show license\n"
" --test : dry run - don't actually install\n"
" --force : force package to install/uninstall\n"
" --tmpdir <dir> : temporary directory to store rpms\n"
"\nExample: nautilus-installer --force --tmpdir /tmp\n\n");
if (error) {
fprintf (stderr, "%s\n", error);
}
exit (exitcode);
} /* end usage */
/* Print the GPL license if --license option is given */
static void
show_license (int exitcode, char* error) {
fprintf (stderr, "nautilus-installer: a bootstrap installer for nautilus and its dependancies\n\n"
"Copyright (C) 2000 Eazel, Inc.\n\n"
"This program is free software; you can redistribute it and/or\n"
"modify it under the terms of the GNU General Public License as\n"
"published by the Free Software Foundation; either version 2 of the\n"
"License, or (at your option) any later version.\n\n"
"This program is distributed in the hope that it will be useful,\n"
"but WITHOUT ANY WARRANTY; without even the implied warranty of\n"
"MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n"
"General Public License for more details.\n\n"
"You should have received a copy of the GNU General Public License\n"
"along with this program; if not, write to the Free Software\n"
"Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.\n\n");
if (error) {
fprintf(stderr, "%s\n", error);
}
exit(exitcode);
} /* end show_license */
/* The following 3 functions are a stupid copy of a few functions from
* components/services/trilobite/libtrilobite. These should be statically
* in at some point.
*/
char*
xml_get_value (xmlNode* node, const char* name)
{
char* ret;
xmlNode *child;