Removed KlamArkollon and related legacy build script.

Signed-off-by: Mavridis Philippe <mavridisf@gmail.com>
pull/24/head
Mavridis Philippe 4 years ago
parent 3a5cf41986
commit 8ce8d981f0
No known key found for this signature in database
GPG Key ID: F8D2D7E2F989A494

@ -1,44 +0,0 @@
export CVS_RSH=ssh
export VN=0.46
export VER=klamav-$VN
export TAG=v0_46
cd ..
TOPDIR=$PWD
cd Releases
INSTALLDIR=$PWD
mkdir -p "$VER/First Install/klamav"
mkdir -p "$VER/First Install/$VER-installer"
mkdir -p "$VER/First Install/$VER-source"
mkdir -p "$VER/Source Update"
#create installer package
cd "$VER/First Install/klamav"
cvs -z3 -d:ext:hoganrobert@klamav.cvs.sourceforge.net:/cvsroot/klamav export -r $TAG klamav
mv klamav $VER
cd $VER
make -f Makefile.cvs
rm -rf autom4te.cache
cd ..
cp -R "$TOPDIR"/InstallStuff/* .
cp -R "$TOPDIR"/dazuko* .
cp -R "$TOPDIR"/arkollon* .
cd ..
makeself "$PWD"/klamav DoubleClickOrExecuteMeToInstallKlamaAV-$VN "KlamAV" ./install.sh
cp DoubleClickOrExecuteMeToInstallKlamaAV-$VN $VER-installer/
cp "$INSTALLDIR"/INSTALL $VER-installer
tar zcvf $VER-installer.tar.gz $VER-installer
#create source package
cd "$INSTALLDIR"
cd "$VER/First Install/$VER-source"
cp -R "$TOPDIR"/dazuko* .
cp -R ../klamav/$VER .
cp "$INSTALLDIR"/README .
cd ..
tar zcvf $VER-source.tar.gz $VER-source
#create source update package
cd "$INSTALLDIR"
cp -R ""$INSTALLDIR"/$VER/First Install/$VER-source/$VER" ""$INSTALLDIR"/$VER/Source Update/"
cd ""$VER"/Source Update"
tar jcvf $VER.tar.bz2 $VER

@ -9,7 +9,7 @@ endif
# of the other Makefile.am variables
bin_PROGRAMS = klamav
SUBDIRS=icons about action arkollon $(SQLITE_SUBDIR) klammail .
SUBDIRS=icons about action $(SQLITE_SUBDIR) klammail .
# set the include path for X, qt and KDE
INCLUDES = $(all_includes)

@ -1,33 +0,0 @@
bin_PROGRAMS = klamarkollon
klamarkollon_SOURCES = klamarkollon.cpp \
wizard.cpp \
rcparser.cpp \
uninstallwizard.cpp \
headerlistitem.cpp \
logdialog.ui \
wizardbase.ui
noinst_HEADERS = data.h \
headerlistitem.h \
rcparser.h \
uninstallwizard.h \
wizard.h \
logdialog.h \
wizardbase.h
# set the include path found by configure
INCLUDES= $(all_includes)
# the library search path.
klamarkollon_LDFLAGS = $(all_libraries)
klamarkollon_LDADD = $(LIB_QT) $(LIB_KFILE)
# let automoc handle all of the meta source files (moc)
METASOURCES = AUTO
klamarkollon.o : wizardbase.h logdialog.h
wizard.o : wizardbase.h logdialog.h
uninstallwizard.o : wizardbase.h logdialog.h

@ -1,835 +0,0 @@
# Makefile.in generated by automake 1.9.6 from Makefile.am.
# KDE tags expanded automatically by am_edit - $Revision: 1.3 $
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005 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.
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = ../..
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = @INSTALL@
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
target_triplet = @target@
bin_PROGRAMS = klamarkollon$(EXEEXT)
subdir = src/arkollon
DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
$(top_srcdir)/configure.in
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/admin/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
am__installdirs = "$(DESTDIR)$(bindir)"
binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
PROGRAMS = $(bin_PROGRAMS)
am_klamarkollon_OBJECTS = klamarkollon.$(OBJEXT) wizard.$(OBJEXT) \
rcparser.$(OBJEXT) uninstallwizard.$(OBJEXT) \
headerlistitem.$(OBJEXT)
#>- klamarkollon_OBJECTS = $(am_klamarkollon_OBJECTS)
#>+ 6
klamarkollon_final_OBJECTS = klamarkollon.all_cpp.o
klamarkollon_nofinal_OBJECTS = klamarkollon.$(OBJEXT) wizard.$(OBJEXT) \
rcparser.$(OBJEXT) uninstallwizard.$(OBJEXT) \
headerlistitem.$(OBJEXT) logdialog.$(OBJEXT) wizardbase.$(OBJEXT)
@KDE_USE_FINAL_FALSE@klamarkollon_OBJECTS = $(klamarkollon_nofinal_OBJECTS)
@KDE_USE_FINAL_TRUE@klamarkollon_OBJECTS = $(klamarkollon_final_OBJECTS)
am__DEPENDENCIES_1 =
klamarkollon_DEPENDENCIES = $(am__DEPENDENCIES_1) \
$(am__DEPENDENCIES_1)
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
depcomp = $(SHELL) $(top_srcdir)/admin/depcomp
am__depfiles_maybe = depfiles
#>- CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
#>- $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
#>+ 2
CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) $(KDE_CXXFLAGS)
#>- LTCXXCOMPILE = $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) \
#>- $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
#>- $(AM_CXXFLAGS) $(CXXFLAGS)
#>+ 3
LTCXXCOMPILE = $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) \
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
$(AM_CXXFLAGS) $(CXXFLAGS) $(KDE_CXXFLAGS)
CXXLD = $(CXX)
#>- CXXLINK = $(LIBTOOL) --tag=CXX --mode=link $(CXXLD) $(AM_CXXFLAGS) \
#>- $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
#>+ 2
CXXLINK = $(LIBTOOL) --tag=CXX --mode=link $(CXXLD) $(AM_CXXFLAGS) \
$(CXXFLAGS) $(KDE_CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
SOURCES = $(klamarkollon_SOURCES)
DIST_SOURCES = $(klamarkollon_SOURCES)
HEADERS = $(noinst_HEADERS)
ETAGS = etags
CTAGS = ctags
#>- DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
#>+ 1
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) $(KDE_DIST)
ACLOCAL = @ACLOCAL@
AMDEP_FALSE = @AMDEP_FALSE@
AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
AR = @AR@
ARTSCCONFIG = @ARTSCCONFIG@
AUTOCONF = @AUTOCONF@
AUTODIRS = @AUTODIRS@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CONF_FILES = @CONF_FILES@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DCOPIDL = @DCOPIDL@
DCOPIDL2CPP = @DCOPIDL2CPP@
DCOPIDLNG = @DCOPIDLNG@
DCOP_DEPENDENCIES = @DCOP_DEPENDENCIES@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
ECHO = @ECHO@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
ENABLE_PERMISSIVE_FLAG = @ENABLE_PERMISSIVE_FLAG@
EXEEXT = @EXEEXT@
F77 = @F77@
FFLAGS = @FFLAGS@
FRAMEWORK_COREAUDIO = @FRAMEWORK_COREAUDIO@
GMSGFMT = @GMSGFMT@
GREP = @GREP@
HAVE_GCC_VISIBILITY = @HAVE_GCC_VISIBILITY@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
KCFG_DEPENDENCIES = @KCFG_DEPENDENCIES@
KCONFIG_COMPILER = @KCONFIG_COMPILER@
KDECONFIG = @KDECONFIG@
KDE_CHECK_PLUGIN = @KDE_CHECK_PLUGIN@
KDE_EXTRA_RPATH = @KDE_EXTRA_RPATH@
KDE_INCLUDES = @KDE_INCLUDES@
KDE_LDFLAGS = @KDE_LDFLAGS@
KDE_MT_LDFLAGS = @KDE_MT_LDFLAGS@
KDE_MT_LIBS = @KDE_MT_LIBS@
KDE_NO_UNDEFINED = @KDE_NO_UNDEFINED@
KDE_PLUGIN = @KDE_PLUGIN@
KDE_RPATH = @KDE_RPATH@
KDE_USE_CLOSURE_FALSE = @KDE_USE_CLOSURE_FALSE@
KDE_USE_CLOSURE_TRUE = @KDE_USE_CLOSURE_TRUE@
KDE_USE_FINAL_FALSE = @KDE_USE_FINAL_FALSE@
KDE_USE_FINAL_TRUE = @KDE_USE_FINAL_TRUE@
KDE_USE_FPIE = @KDE_USE_FPIE@
KDE_USE_NMCHECK_FALSE = @KDE_USE_NMCHECK_FALSE@
KDE_USE_NMCHECK_TRUE = @KDE_USE_NMCHECK_TRUE@
KDE_USE_PIE = @KDE_USE_PIE@
KDE_XSL_STYLESHEET = @KDE_XSL_STYLESHEET@
LDFLAGS = @LDFLAGS@
LDFLAGS_AS_NEEDED = @LDFLAGS_AS_NEEDED@
LDFLAGS_NEW_DTAGS = @LDFLAGS_NEW_DTAGS@
LIBCOMPAT = @LIBCOMPAT@
LIBCRYPT = @LIBCRYPT@
LIBDL = @LIBDL@
LIBJPEG = @LIBJPEG@
LIBOBJS = @LIBOBJS@
LIBPNG = @LIBPNG@
LIBPTHREAD = @LIBPTHREAD@
LIBRESOLV = @LIBRESOLV@
LIBS = @LIBS@
LIBSM = @LIBSM@
LIBSOCKET = @LIBSOCKET@
LIBTOOL = @LIBTOOL@
LIBUCB = @LIBUCB@
LIBUTIL = @LIBUTIL@
LIBZ = @LIBZ@
LIB_CLAM = @LIB_CLAM@
LIB_KAB = @LIB_KAB@
LIB_KABC = @LIB_KABC@
LIB_TDECORE = @LIB_TDECORE@
LIB_KDED = @LIB_KDED@
LIB_TDEPIM = @LIB_TDEPIM@
LIB_TDEPRINT = @LIB_TDEPRINT@
LIB_TDEUI = @LIB_TDEUI@
LIB_TDEDNSSD = @LIB_TDEDNSSD@
LIB_KFILE = @LIB_KFILE@
LIB_KFM = @LIB_KFM@
LIB_TDEHTML = @LIB_TDEHTML@
LIB_TDEIMPROXY = @LIB_TDEIMPROXY@
LIB_TDEIO = @LIB_TDEIO@
LIB_KJS = @LIB_KJS@
LIB_KNEWSTUFF = @LIB_KNEWSTUFF@
LIB_TDEPARTS = @LIB_TDEPARTS@
LIB_TDESPELL = @LIB_TDESPELL@
LIB_TDESYCOCA = @LIB_TDESYCOCA@
LIB_TDEUNITTEST = @LIB_TDEUNITTEST@
LIB_TDEUTILS = @LIB_TDEUTILS@
LIB_POLL = @LIB_POLL@
LIB_QPE = @LIB_QPE@
LIB_QT = @LIB_QT@
LIB_SMB = @LIB_SMB@
LIB_SQLITE = @LIB_SQLITE@
LIB_X11 = @LIB_X11@
LIB_XEXT = @LIB_XEXT@
LIB_XRENDER = @LIB_XRENDER@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
MAKETDEWIDGETS = @MAKETDEWIDGETS@
MCOPIDL = @MCOPIDL@
MEINPROC = @MEINPROC@
MOC = @MOC@
MSGFMT = @MSGFMT@
NOOPT_CFLAGS = @NOOPT_CFLAGS@
NOOPT_CXXFLAGS = @NOOPT_CXXFLAGS@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PERL = @PERL@
PKGCONFIGFOUND = @PKGCONFIGFOUND@
PKG_CONFIG = @PKG_CONFIG@
QTE_NORTTI = @QTE_NORTTI@
QT_INCLUDES = @QT_INCLUDES@
QT_LDFLAGS = @QT_LDFLAGS@
RANLIB = @RANLIB@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
SQLITE_CFLAGS = @SQLITE_CFLAGS@
SQLITE_LIBS = @SQLITE_LIBS@
STRIP = @STRIP@
TOPSUBDIRS = @TOPSUBDIRS@
UIC = @UIC@
UIC_TR = @UIC_TR@
USER_INCLUDES = @USER_INCLUDES@
USER_LDFLAGS = @USER_LDFLAGS@
USE_EXCEPTIONS = @USE_EXCEPTIONS@
USE_RTTI = @USE_RTTI@
USE_THREADS = @USE_THREADS@
VERSION = @VERSION@
WOVERLOADED_VIRTUAL = @WOVERLOADED_VIRTUAL@
XGETTEXT = @XGETTEXT@
XMKMF = @XMKMF@
XMLLINT = @XMLLINT@
X_EXTRA_LIBS = @X_EXTRA_LIBS@
X_INCLUDES = @X_INCLUDES@
X_LDFLAGS = @X_LDFLAGS@
X_PRE_LIBS = @X_PRE_LIBS@
X_RPATH = @X_RPATH@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@
all_includes = @all_includes@
all_libraries = @all_libraries@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = @htmldir@
include_ARTS_FALSE = @include_ARTS_FALSE@
include_ARTS_TRUE = @include_ARTS_TRUE@
include_x11_FALSE = @include_x11_FALSE@
include_x11_TRUE = @include_x11_TRUE@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
kde_appsdir = @kde_appsdir@
kde_bindir = @kde_bindir@
kde_confdir = @kde_confdir@
kde_datadir = @kde_datadir@
kde_htmldir = @kde_htmldir@
kde_icondir = @kde_icondir@
kde_includes = @kde_includes@
kde_kcfgdir = @kde_kcfgdir@
kde_libraries = @kde_libraries@
kde_libs_htmldir = @kde_libs_htmldir@
kde_libs_prefix = @kde_libs_prefix@
kde_locale = @kde_locale@
kde_mimedir = @kde_mimedir@
kde_moduledir = @kde_moduledir@
kde_qtver = @kde_qtver@
kde_servicesdir = @kde_servicesdir@
kde_servicetypesdir = @kde_servicetypesdir@
kde_sounddir = @kde_sounddir@
kde_styledir = @kde_styledir@
kde_templatesdir = @kde_templatesdir@
kde_wallpaperdir = @kde_wallpaperdir@
kde_widgetdir = @kde_widgetdir@
tdeinitdir = @tdeinitdir@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
qt_includes = @qt_includes@
qt_libraries = @qt_libraries@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
target = @target@
target_alias = @target_alias@
target_cpu = @target_cpu@
target_os = @target_os@
target_vendor = @target_vendor@
unsermake_enable_pch_FALSE = @unsermake_enable_pch_FALSE@
unsermake_enable_pch_TRUE = @unsermake_enable_pch_TRUE@
with_included_sqlite_FALSE = @with_included_sqlite_FALSE@
with_included_sqlite_TRUE = @with_included_sqlite_TRUE@
x_includes = @x_includes@
x_libraries = @x_libraries@
xdg_appsdir = @xdg_appsdir@
xdg_directorydir = @xdg_directorydir@
xdg_menudir = @xdg_menudir@
#>- klamarkollon_SOURCES = klamarkollon.cpp \
#>- wizard.cpp \
#>- rcparser.cpp \
#>- uninstallwizard.cpp \
#>- headerlistitem.cpp \
#>- logdialog.ui \
#>- wizardbase.ui
#>+ 7
klamarkollon_SOURCES=klamarkollon.cpp \
wizard.cpp \
rcparser.cpp \
uninstallwizard.cpp \
headerlistitem.cpp \
\
logdialog.cpp wizardbase.cpp
noinst_HEADERS = data.h \
headerlistitem.h \
rcparser.h \
uninstallwizard.h \
wizard.h \
logdialog.h \
wizardbase.h
# set the include path found by configure
INCLUDES = $(all_includes)
# the library search path.
klamarkollon_LDFLAGS = $(all_libraries)
klamarkollon_LDADD = $(LIB_QT) $(LIB_KFILE)
# let automoc handle all of the meta source files (moc)
#>- METASOURCES = AUTO
#>- all: all-am
#>+ 1
all: docs-am all-am
.SUFFIXES:
.SUFFIXES: .cpp .lo .o .obj
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
#>- @for dep in $?; do \
#>- case '$(am__configure_deps)' in \
#>- *$$dep*) \
#>- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
#>- && exit 0; \
#>- exit 1;; \
#>- esac; \
#>- done; \
#>- echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/arkollon/Makefile'; \
#>- cd $(top_srcdir) && \
#>- $(AUTOMAKE) --gnu src/arkollon/Makefile
#>+ 12
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
&& exit 0; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/arkollon/Makefile'; \
cd $(top_srcdir) && \
$(AUTOMAKE) --gnu src/arkollon/Makefile
cd $(top_srcdir) && perl admin/am_edit src/arkollon/Makefile.in
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
install-binPROGRAMS: $(bin_PROGRAMS)
@$(NORMAL_INSTALL)
test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)"
@list='$(bin_PROGRAMS)'; for p in $$list; do \
p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
if test -f $$p \
|| test -f $$p1 \
; then \
f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \
$(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \
else :; fi; \
done
uninstall-binPROGRAMS:
@$(NORMAL_UNINSTALL)
@list='$(bin_PROGRAMS)'; for p in $$list; do \
f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \
rm -f "$(DESTDIR)$(bindir)/$$f"; \
done
clean-binPROGRAMS:
@list='$(bin_PROGRAMS)'; for p in $$list; do \
f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
echo " rm -f $$p $$f"; \
rm -f $$p $$f ; \
done
klamarkollon$(EXEEXT): $(klamarkollon_OBJECTS) $(klamarkollon_DEPENDENCIES)
@rm -f klamarkollon$(EXEEXT)
$(CXXLINK) $(klamarkollon_LDFLAGS) $(klamarkollon_OBJECTS) $(klamarkollon_LDADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
distclean-compile:
-rm -f *.tab.c
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/headerlistitem.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/klamarkollon.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rcparser.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/uninstallwizard.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wizard.Po@am__quote@
.cpp.o:
@am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $<
.cpp.obj:
@am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
.cpp.lo:
@am__fastdepCXX_TRUE@ if $(LTCXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $<
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
distclean-libtool:
-rm -f libtool
uninstall-info-am:
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
mkid -fID $$unique
tags: TAGS
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$tags $$unique; \
fi
ctags: CTAGS
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$tags $$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& cd $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) $$here
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
list='$(DISTFILES)'; for file in $$list; do \
case $$file in \
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
esac; \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
dir="/$$dir"; \
$(mkdir_p) "$(distdir)$$dir"; \
else \
dir=''; \
fi; \
if test -d $$d/$$file; then \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
fi; \
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
else \
test -f $(distdir)/$$file \
|| cp -p $$d/$$file $(distdir)/$$file \
|| exit 1; \
fi; \
done
check-am: all-am
check: check-am
all-am: Makefile $(PROGRAMS) $(HEADERS)
installdirs:
for dir in "$(DESTDIR)$(bindir)"; do \
test -z "$$dir" || $(mkdir_p) "$$dir"; \
done
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
#>- clean: clean-am
#>+ 1
clean: kde-rpo-clean clean-am
#>- clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am
#>+ 1
clean-am: clean-metasources clean-ui clean-bcheck clean-final clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am
distclean: distclean-am
-rm -rf ./$(DEPDIR)
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-libtool distclean-tags
dvi: dvi-am
dvi-am:
html: html-am
info: info-am
info-am:
install-data-am:
install-exec-am: install-binPROGRAMS
install-info: install-info-am
install-man:
installcheck-am:
maintainer-clean: maintainer-clean-am
-rm -rf ./$(DEPDIR)
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-compile mostlyclean-generic \
mostlyclean-libtool
pdf: pdf-am
pdf-am:
ps: ps-am
ps-am:
uninstall-am: uninstall-binPROGRAMS uninstall-info-am
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
clean-generic clean-libtool ctags distclean distclean-compile \
distclean-generic distclean-libtool distclean-tags distdir dvi \
dvi-am html html-am info info-am install install-am \
install-binPROGRAMS install-data install-data-am install-exec \
install-exec-am install-info install-info-am install-man \
install-strip installcheck installcheck-am installdirs \
maintainer-clean maintainer-clean-generic mostlyclean \
mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
pdf pdf-am ps ps-am tags uninstall uninstall-am \
uninstall-binPROGRAMS uninstall-info-am
klamarkollon.o : wizardbase.h logdialog.h
wizard.o : wizardbase.h logdialog.h
uninstallwizard.o : wizardbase.h logdialog.h
# 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:
#>+ 3
wizard.moc: $(srcdir)/wizard.h
$(MOC) $(srcdir)/wizard.h -o wizard.moc
#>+ 2
mocs: wizard.moc
#>+ 3
uninstallwizard.moc: $(srcdir)/uninstallwizard.h
$(MOC) $(srcdir)/uninstallwizard.h -o uninstallwizard.moc
#>+ 2
mocs: uninstallwizard.moc
#>+ 3
clean-metasources:
-rm -f wizard.moc uninstallwizard.moc
#>+ 2
KDE_DIST=wizardbase.ui.h logdialog.ui wizardbase.ui Makefile.in Makefile.am
#>+ 5
clean-ui:
-rm -f \
logdialog.cpp logdialog.h logdialog.moc \
wizardbase.cpp wizardbase.h wizardbase.moc
#>+ 2
docs-am:
#>+ 15
force-reedit:
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
&& exit 0; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/arkollon/Makefile'; \
cd $(top_srcdir) && \
$(AUTOMAKE) --gnu src/arkollon/Makefile
cd $(top_srcdir) && perl admin/am_edit src/arkollon/Makefile.in
#>+ 21
clean-bcheck:
rm -f *.bchecktest.cc *.bchecktest.cc.class a.out
bcheck: bcheck-am
bcheck-am:
@for i in ; do \
if test $(srcdir)/$$i -nt $$i.bchecktest.cc; then \
echo "int main() {return 0;}" > $$i.bchecktest.cc ; \
echo "#include \"$$i\"" >> $$i.bchecktest.cc ; \
echo "$$i"; \
if ! $(CXXCOMPILE) --dump-class-hierarchy -c $$i.bchecktest.cc; then \
rm -f $$i.bchecktest.cc; exit 1; \
fi ; \
echo "" >> $$i.bchecktest.cc.class; \
perl $(top_srcdir)/admin/bcheck.pl $$i.bchecktest.cc.class || { rm -f $$i.bchecktest.cc; exit 1; }; \
rm -f a.out; \
fi ; \
done
#>+ 11
klamarkollon.all_cpp.cpp: $(srcdir)/Makefile.in $(srcdir)/klamarkollon.cpp wizardbase.h logdialog.h $(srcdir)/wizard.cpp wizardbase.h logdialog.h $(srcdir)/rcparser.cpp $(srcdir)/uninstallwizard.cpp wizardbase.h logdialog.h $(srcdir)/headerlistitem.cpp logdialog.cpp wizardbase.cpp wizard.moc wizardbase.moc logdialog.moc uninstallwizard.moc
@echo 'creating klamarkollon.all_cpp.cpp ...'; \
rm -f klamarkollon.all_cpp.files klamarkollon.all_cpp.final; \
echo "#define KDE_USE_FINAL 1" >> klamarkollon.all_cpp.final; \
for file in klamarkollon.cpp wizard.cpp rcparser.cpp uninstallwizard.cpp headerlistitem.cpp logdialog.cpp wizardbase.cpp ; do \
echo "#include \"$$file\"" >> klamarkollon.all_cpp.files; \
test ! -f $(srcdir)/$$file || egrep '^#pragma +implementation' $(srcdir)/$$file >> klamarkollon.all_cpp.final; \
done; \
cat klamarkollon.all_cpp.final klamarkollon.all_cpp.files > klamarkollon.all_cpp.cpp; \
rm -f klamarkollon.all_cpp.final klamarkollon.all_cpp.files
#>+ 3
clean-final:
-rm -f klamarkollon.all_cpp.cpp
#>+ 3
final:
$(MAKE) klamarkollon_OBJECTS="$(klamarkollon_final_OBJECTS)" all-am
#>+ 3
final-install:
$(MAKE) klamarkollon_OBJECTS="$(klamarkollon_final_OBJECTS)" install-am
#>+ 3
no-final:
$(MAKE) klamarkollon_OBJECTS="$(klamarkollon_nofinal_OBJECTS)" all-am
#>+ 3
no-final-install:
$(MAKE) klamarkollon_OBJECTS="$(klamarkollon_nofinal_OBJECTS)" install-am
#>+ 3
kde-rpo-clean:
-rm -f *.rpo
#>+ 12
nmcheck:
uninstallwizard.o: uninstallwizard.moc
wizard.o: wizard.moc
nmcheck-am: nmcheck
$(srcdir)/uninstallwizard.cpp: logdialog.h wizardbase.h
wizard.lo: wizard.moc
$(srcdir)/rcparser.cpp: logdialog.h wizardbase.h
uninstallwizard.lo: uninstallwizard.moc
$(srcdir)/headerlistitem.cpp: logdialog.h wizardbase.h
$(srcdir)/klamarkollon.cpp: logdialog.h wizardbase.h
$(srcdir)/wizard.cpp: logdialog.h wizardbase.h
#>+ 30
wizardbase.cpp: $(srcdir)/wizardbase.ui wizardbase.h wizardbase.moc
rm -f wizardbase.cpp
echo '#include <kdialog.h>' > wizardbase.cpp
echo '#include <tdelocale.h>' >> wizardbase.cpp
$(UIC) -tr ${UIC_TR} -i wizardbase.h $(srcdir)/wizardbase.ui > wizardbase.cpp.temp ; ret=$$?; \
$(PERL) -pe "s,${UIC_TR}( \"\" ),QString::null,g" wizardbase.cpp.temp | $(PERL) -pe "s,${UIC_TR}( \"\"\, \"\" ),QString::null,g" | $(PERL) -pe "s,image([0-9][0-9]*)_data,img\$$1_wizardbase,g" | $(PERL) -pe "s,: QWizard\(,: KWizard(,g" >> wizardbase.cpp ;\
rm -f wizardbase.cpp.temp ;\
if test "$$ret" = 0; then echo '#include "wizardbase.moc"' >> wizardbase.cpp; else rm -f wizardbase.cpp ; exit $$ret ; fi
wizardbase.h: $(srcdir)/wizardbase.ui
rm -rf wizardbase.h;
$(UIC) $(srcdir)/wizardbase.ui | $(PERL) -pi -e "s,public QWizard,public KWizard,g; s,#include <tqwizard.h>,#include <kwizard.h>,g" >> wizardbase.h ;
wizardbase.moc: wizardbase.h
$(MOC) wizardbase.h -o wizardbase.moc
logdialog.cpp: $(srcdir)/logdialog.ui logdialog.h logdialog.moc
rm -f logdialog.cpp
echo '#include <kdialog.h>' > logdialog.cpp
echo '#include <tdelocale.h>' >> logdialog.cpp
$(UIC) -tr ${UIC_TR} -i logdialog.h $(srcdir)/logdialog.ui > logdialog.cpp.temp ; ret=$$?; \
$(PERL) -pe "s,${UIC_TR}( \"\" ),QString::null,g" logdialog.cpp.temp | $(PERL) -pe "s,${UIC_TR}( \"\"\, \"\" ),QString::null,g" | $(PERL) -pe "s,image([0-9][0-9]*)_data,img\$$1_logdialog,g" | $(PERL) -pe "s,: QWizard\(,: KWizard(,g" >> logdialog.cpp ;\
rm -f logdialog.cpp.temp ;\
if test "$$ret" = 0; then echo '#include "logdialog.moc"' >> logdialog.cpp; else rm -f logdialog.cpp ; exit $$ret ; fi
logdialog.h: $(srcdir)/logdialog.ui
rm -rf logdialog.h;
$(UIC) $(srcdir)/logdialog.ui | $(PERL) -pi -e "s,public QWizard,public KWizard,g; s,#include <tqwizard.h>,#include <kwizard.h>,g" >> logdialog.h ;
logdialog.moc: logdialog.h
$(MOC) logdialog.h -o logdialog.moc

File diff suppressed because it is too large Load Diff

@ -1,126 +0,0 @@
/***************************************************************************
* Copyright (C) 2004 by David Sansome *
* me@davidsansome.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. *
***************************************************************************/
#include "headerlistitem.h"
#include <tqfontmetrics.h>
#include <tqpainter.h>
#include <tqapplication.h>
#include "uninstallwizard.h"
#include "wizard.h"
HeaderListItem::HeaderListItem(TQListView* parent)
: TQListViewItem(parent)
{
}
int HeaderListItem::compare(TQListViewItem* i, int col, bool ascending) const
{
switch (i->rtti())
{
case 1001: // Component
{
ComponentListItem* item = (ComponentListItem*) i;
if (section > item->section)
return 1;
return -1;
}
case 1003: // App
{
AppListItem* item = (AppListItem*) i;
if (section > item->section)
return 1;
return -1;
}
case 1002: // Header
{
HeaderListItem* item = (HeaderListItem*) i;
if (section > item->section)
return 1;
if (section < item->section)
return -1;
return 0;
}
}
return 0;
}
void HeaderListItem::paintCell(TQPainter* p, const TQColorGroup& cg, int column, int width, int align)
{
p->fillRect(0, 0, width, height(), cg.base());
TQFont boldFont = p->font();
boldFont.setBold(true);
p->setFont(boldFont);
p->drawText(listView()->itemMargin(), listView()->itemMargin(), width, TQFontMetrics(boldFont).height(), TQt::AlignLeft, text(0));
int textWidth = TQFontMetrics(boldFont).width(text(0));
p->fillRect(0, height() - 4 - listView()->itemMargin(), textWidth-10, 4, cg.highlight());
TQColor ca = cg.highlight();
TQColor cb = cg.base();
// Taken from KPixmapEffect::gradient
int rDiff, gDiff, bDiff;
int rca, gca, bca /*, rcb, gcb, bcb*/;
register int x, y;
rDiff = (/*rcb = */ cb.red()) - (rca = ca.red());
gDiff = (/*gcb = */ cb.green()) - (gca = ca.green());
bDiff = (/*bcb = */ cb.blue()) - (bca = ca.blue());
register int rl = rca << 16;
register int gl = gca << 16;
register int bl = bca << 16;
int rcdelta = ((1<<16) / 20) * rDiff;
int gcdelta = ((1<<16) / 20) * gDiff;
int bcdelta = ((1<<16) / 20) * bDiff;
for( int x = textWidth-10; x < textWidth+10; x++)
{
rl += rcdelta;
gl += gcdelta;
bl += bcdelta;
p->setPen(TQColor(rl>>16, gl>>16, bl>>16));
p->drawLine(x, height() - 4 - listView()->itemMargin(), x, height() - listView()->itemMargin() - 1);
}
}
void HeaderListItem::paintFocus(TQPainter* p, const TQColorGroup& cg, const TQRect& r)
{
}
int HeaderListItem::width(const TQFontMetrics& fm, const TQListView* lv, int c) const
{
TQFont boldFont = tqApp->font();
boldFont.setBold(true);
TQFontMetrics metrics(boldFont);
return metrics.width(text(0)) + lv->itemMargin() + 10;
}
void HeaderListItem::setup()
{
setHeight(tqApp->fontMetrics().height() + listView()->itemMargin()*3 + 4);
}

@ -1,39 +0,0 @@
/***************************************************************************
* Copyright (C) 2004 by David Sansome *
* me@davidsansome.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. *
***************************************************************************/
#ifndef HEADERLISTITEM_H
#define HEADERLISTITEM_H
#include <tqlistview.h>
class HeaderListItem : public TQListViewItem
{
public:
HeaderListItem(TQListView* parent);
int compare(TQListViewItem* i, int col, bool ascending) const;
void paintCell(TQPainter* p, const TQColorGroup& cg, int column, int width, int align);
void paintFocus(TQPainter* p, const TQColorGroup& cg, const TQRect& r);
void setup();
int width(const TQFontMetrics& fm, const TQListView* lv, int c) const;
int rtti() const { return 1002; }
int section;
};
#endif

@ -1,74 +0,0 @@
/***************************************************************************
* Copyright (C) 2004 by David Sansome *
* me@davidsansome.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. *
***************************************************************************/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/types.h>
#include <tqapplication.h>
#include "wizard.h"
#include "uninstallwizard.h"
int main(int argc, char *argv[])
{
TQApplication app(argc, argv);
// Check if we're root
if (getuid() != 0)
{
TQString command = "tdesu -i klamav -n -c \"";
for (int i=0 ; i<app.argc() ; i++)
{
if (TQString(app.argv()[i]).contains(" "))
command += "\\\"" + TQString(app.argv()[i]) + "\\\" ";
else
command += TQString(app.argv()[i]) + " ";
}
command += "\"";
return system(command.latin1());
}
WizardBase* wizard = NULL;
for ( int i = 1; i < app.argc(); i++ )
{
if (TQString(app.argv()[i]) == "--help")
{
printf("Arkollon is a utility to aid installation and removal of packages from source.\n");
printf("Usage: arkollon DIRECTORY Installs a source package from DIRECTORY\n");
printf(" arkollon --uninstall Starts the uninstaller\n");
return 0;
}
if (TQString(app.argv()[i]) == "--uninstall")
wizard = new UninstallWizard(NULL);
}
if (!wizard)
wizard = new Wizard(NULL);
app.setMainWidget(wizard);
return app.exec();
}

@ -1,91 +0,0 @@
<!DOCTYPE UI><UI version="3.1" stdsetdef="1">
<class>LogDialog</class>
<widget class="TQDialog">
<property name="name">
<cstring>LogDialog</cstring>
</property>
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>572</width>
<height>350</height>
</rect>
</property>
<property name="caption">
<string>Installation log</string>
</property>
<property name="sizeGripEnabled">
<bool>true</bool>
</property>
<vbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="TQTextEdit">
<property name="name">
<cstring>logBox</cstring>
</property>
<property name="textFormat">
<enum>PlainText</enum>
</property>
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
<widget class="TQLayoutWidget">
<property name="name">
<cstring>layout8</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
<spacer>
<property name="name">
<cstring>Horizontal Spacing2</cstring>
</property>
<property name="orientation">
<enum>Horizontal</enum>
</property>
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="sizeHint">
<size>
<width>210</width>
<height>20</height>
</size>
</property>
</spacer>
<widget class="TQPushButton">
<property name="name">
<cstring>buttonOk</cstring>
</property>
<property name="text">
<string>Close</string>
</property>
<property name="accel">
<string></string>
</property>
<property name="autoDefault">
<bool>true</bool>
</property>
<property name="default">
<bool>true</bool>
</property>
</widget>
</hbox>
</widget>
</vbox>
</widget>
<connections>
<connection>
<sender>buttonOk</sender>
<signal>clicked()</signal>
<receiver>LogDialog</receiver>
<slot>accept()</slot>
</connection>
</connections>
<layoutdefaults spacing="6" margin="11"/>
</UI>

@ -1,146 +0,0 @@
/***************************************************************************
* Copyright (C) 2004 by David Sansome *
* me@davidsansome.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. *
***************************************************************************/
#include "rcparser.h"
#include <tqregexp.h>
#include <tqfile.h>
#include <tqtextstream.h>
RcParser::RcParser()
{
}
RcParser::~RcParser()
{
}
void RcParser::addSearchDir(TQString dir)
{
dirs.append(dir);
}
bool RcParser::openFile(TQString name)
{
// Check if it exists
fileName = "";
for ( TQStringList::Iterator it = dirs.begin(); it != dirs.end(); ++it )
{
if (TQFile::exists((*it) + "/" + name))
{
fileName = (*it) + "/" + name;
break;
}
}
if (fileName.isEmpty())
return false;
// Clear the current data
sections.clear();
// Read the file's contents
TQFile file(fileName);
file.open(IO_ReadOnly);
TQTextStream stream(&file);
TQRegExp sectionRegExp("^\\[([^\\]]*)\\]$");
TQRegExp pairRegExp("^([^=\\s]*)([=\\s]*)(.*)$");
currentSection = "RcParserDefaultSection";
while (!stream.atEnd())
{
TQString line = stream.readLine();
if (line.left(1) == "#") // Comment
continue;
line = line.stripWhiteSpace();
if (sectionRegExp.search(line) != -1)
{
currentSection = sectionRegExp.cap(1);
//printf("Found section \"%s\"\n", currentSection.latin1());
continue;
}
if (pairRegExp.search(line) != -1)
{
TQString key = pairRegExp.cap(1);
TQString value = pairRegExp.cap(3);
sections[currentSection][key] = value;
//printf("Found pair \"%s\" = \"%s\"\n", key.latin1(), value.latin1());
continue;
}
// Parse error, ignore the line
}
currentSection = "RcParserDefaultSection";
return true;
}
void RcParser::setSection(TQString section)
{
currentSection = section;
}
TQStringList RcParser::sectionList()
{
return sections.keys();
}
TQString RcParser::readString(TQString key, TQString def)
{
TQString ret = sections[currentSection][key];
if (ret.isEmpty())
return def;
return ret;
}
int RcParser::readInt(TQString key, int def)
{
bool ok;
int ret = sections[currentSection][key].toInt(&ok);
if (!ok)
return def;
return ret;
}
bool RcParser::readBool(TQString key, bool def)
{
bool ret = def;
if (sections[currentSection][key].lower() == "true")
ret = true;
if (sections[currentSection][key].lower() == "false")
ret = false;
if (sections[currentSection][key] == "1")
ret = true;
if (sections[currentSection][key] == "0")
ret = false;
return ret;
}
TQStringList RcParser::readList(TQString key)
{
return TQStringList::split(",", sections[currentSection][key]);
}

@ -1,50 +0,0 @@
/***************************************************************************
* Copyright (C) 2004 by David Sansome *
* me@davidsansome.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. *
***************************************************************************/
#ifndef RCPARSER_H
#define RCPARSER_H
#include <tqstringlist.h>
#include <tqmap.h>
class RcParser
{
public:
RcParser();
~RcParser();
void addSearchDir(TQString dir);
bool openFile(TQString name);
TQStringList sectionList();
void setSection(TQString section);
TQString readString(TQString key, TQString def=TQString::null);
int readInt(TQString key, int def=0);
bool readBool(TQString key, bool def=false);
TQStringList readList(TQString key);
private:
TQStringList dirs;
TQString fileName;
TQString currentSection;
TQMap< TQString, TQMap< TQString, TQString> > sections;
};
#endif

@ -1,322 +0,0 @@
/***************************************************************************
* Copyright (C) 2004 by David Sansome *
* me@davidsansome.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. *
***************************************************************************/
#include "uninstallwizard.h"
#include "headerlistitem.h"
#include "data.h"
#include <tqregexp.h>
#include <tqwidgetstack.h>
#include <tqfile.h>
#include <tqtextstream.h>
#include <tqheader.h>
#include <tqlistbox.h>
#include <tqmessagebox.h>
#include <tqpushbutton.h>
#include <tqlineedit.h>
#include <tqtextedit.h>
#include <tqlabel.h>
AppListItem::AppListItem(TQString nN, TQString n, TQListView* parent)
: TQCheckListItem(parent, "", TQCheckListItem::CheckBox)
{
niceName = nN;
name = n;
section = 2;
setText(0, niceName);
}
int AppListItem::compare(TQListViewItem* i, int col, bool ascending) const
{
switch (i->rtti())
{
case 1003: // App
{
AppListItem* item = (AppListItem*) i;
if (section < item->section)
return -1;
if (section > item->section)
return 1;
return TQListViewItem::compare(i, col, ascending);
}
break;
case 1002: // Header
{
HeaderListItem* item = (HeaderListItem*) i;
if (section < item->section)
return -1;
return 1;
}
break;
}
return 0;
}
UninstallWizard::UninstallWizard(TQWidget* parent, const char* name, bool modal, WFlags fl)
: WizardBase(parent,name, modal,fl)
{
mainStack->raiseWidget(1);
setCaption("Uninstall Software");
titleLabel->setText("<b>Uninstall Software</b>");
componentInfo->setMaximumSize(32767,70);
logDialog = new LogDialog(this);
logDialog->hide();
appList->header()->hide();
globalHeader = NULL;
icon.convertFromImage(qembed_findImage("misc"));
externalProcess = new TQProcess(this);
connect(externalProcess, SIGNAL(processExited()), SLOT(processExited()));
connect(externalProcess, SIGNAL(readyReadStdout()), SLOT(readyReadStdout()));
connect(externalProcess, SIGNAL(readyReadStderr()), SLOT(readyReadStderr()));
TQFile uninstallScript("/tmp/arkollon-uninstall.sh");
if (uninstallScript.exists())
uninstallScript.remove();
uninstallScript.open(IO_WriteOnly);
TQDataStream stream(&uninstallScript);
stream.writeRawBytes((const char*)uninstaller_sh_data, uninstaller_sh_len);
uninstallScript.close();
currentStage = ListingPackages;
externalProcess->addArgument("/bin/sh");
externalProcess->addArgument("/tmp/arkollon-uninstall.sh");
externalProcess->addArgument("--list");
externalProcess->start();
}
UninstallWizard::~UninstallWizard()
{
TQFile uninstallScript("/tmp/arkollon-uninstall.sh");
if (uninstallScript.exists())
uninstallScript.remove();
}
void UninstallWizard::logPressed()
{
logDialog->show();
}
void UninstallWizard::cancelPressed()
{
reject();
}
void UninstallWizard::previousPressed()
{
int currentId = uninstallStack->id(uninstallStack->visibleWidget());
if (currentId == 0)
return;
uninstallStack->raiseWidget(--currentId);
if (currentId == 0)
previousButton->setEnabled(false);
nextButton->setEnabled(true);
}
void UninstallWizard::nextPressed()
{
int currentId = uninstallStack->id(uninstallStack->visibleWidget());
if (currentId == 2)
{
accept();
return;
}
if (currentId == 0)
{
bool checked = false;
TQStringList argList;
argList.append("/bin/sh");
argList.append("/tmp/arkollon-uninstall.sh");
for ( TQListViewItem * myChild = appList->firstChild() ; myChild != NULL ; myChild = myChild->nextSibling())
{
if (myChild->rtti() != 1003)
continue;
AppListItem* app = (AppListItem*) myChild;
if (!app->isOn())
continue;
argList.append("--files");
argList.append(app->name);
checked = true;
}
if (!checked)
{
TQMessageBox::warning(this, "Error", "You need to select at least one package to remove", TQMessageBox::Ok, TQMessageBox::NoButton, TQMessageBox::NoButton);
return;
}
fileList->clear();
currentStage = ListingFiles;
externalProcess->setArguments(argList);
externalProcess->start();
nextButton->setEnabled(false); // Set true again when the process is done
}
uninstallStack->raiseWidget(++currentId);
if (currentId == 2)
removeUserPackages();
else
previousButton->setEnabled(true);
}
void UninstallWizard::processExited()
{
switch (currentStage)
{
case ListingPackages:
if (appList->childCount() <= 0)
{
TQMessageBox::warning(NULL, "Warning", "There are no packages installed", TQMessageBox::Ok, TQMessageBox::NoButton, TQMessageBox::NoButton);
reject();
return;
}
show();
break;
case ListingFiles:
nextButton->setEnabled(true);
fileList->sort();
break;
case RemovingGlobal:
finished();
break;
}
}
void UninstallWizard::readyReadStdout()
{
switch (currentStage)
{
case ListingPackages:
{
while (externalProcess->canReadLineStdout())
{
TQString line = externalProcess->readLineStdout();
if (line.isEmpty())
continue;
// See if it already exists
bool exists = false;
for ( TQListViewItem * myChild = appList->firstChild() ; myChild != NULL ; myChild = myChild->nextSibling())
{
if (myChild->rtti() != 1003)
continue;
AppListItem* app = (AppListItem*) myChild;
if (app->name.lower() == line.lower())
{
exists = true;
break;
}
}
if (exists)
continue;
TQString niceName = line.left(line.findRev(':'));
niceName = niceName.left(1).upper() + niceName.right(niceName.length()-1);
new AppListItem(niceName, line, appList);
if (globalHeader == NULL)
{
globalHeader = new HeaderListItem(appList);
globalHeader->setText(0, "Applications available to all users");
globalHeader->section = 1;
}
}
break;
}
case ListingFiles:
{
while (externalProcess->canReadLineStdout())
{
TQString line = externalProcess->readLineStdout();
if (line.isEmpty())
continue;
fileList->insertItem(icon, line.left(line.find(" ")));
}
break;
}
case RemovingGlobal:
while (externalProcess->canReadLineStdout())
{
TQString line = externalProcess->readLineStdout();
if (line.isEmpty())
continue;
line.replace(TQRegExp("\\033[^m]*m"), "");
logDialog->logBox->append(line);
}
break;
}
}
void UninstallWizard::readyReadStderr()
{
while (externalProcess->canReadLineStdout())
{
TQString line = externalProcess->readLineStdout();
if (line.isEmpty())
continue;
line.replace(TQRegExp("\\033[^m]*m"), "");
logDialog->logBox->append(line);
}
}
void UninstallWizard::removeUserPackages()
{
nextButton->setEnabled(false); // Set true again when the process is done
previousButton->setEnabled(false);
// Find out which packages belong to the user, and uninstall them
TQStringList argList;
argList.append("/bin/sh");
argList.append("/tmp/arkollon-uninstall.sh");
for ( TQListViewItem * myChild = appList->firstChild() ; myChild != NULL ; myChild = myChild->nextSibling())
{
if (myChild->rtti() != 1003)
continue;
AppListItem* app = (AppListItem*) myChild;
if (!app->isOn())
continue;
argList.append("--remove");
argList.append(app->name);
}
currentStage = RemovingGlobal;
externalProcess->setArguments(argList);
externalProcess->start();
}
void UninstallWizard::finished()
{
pleaseWaitLabel2->setText("Removal of packages complete!");
nextButton->setText("Finish");
nextButton->setEnabled(true);
}
#include "uninstallwizard.moc"

@ -1,87 +0,0 @@
/***************************************************************************
* Copyright (C) 2004 by David Sansome *
* me@davidsansome.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. *
***************************************************************************/
#ifndef UNINSTALLWIZARD_H
#define UNINSTALLWIZARD_H
#include "wizardbase.h"
#include "logdialog.h"
#include "headerlistitem.h"
#include <tqlistview.h>
#include <tqprocess.h>
#include <tqpixmap.h>
class AppListItem : public TQCheckListItem
{
public:
AppListItem(TQString nN, TQString n, TQListView* lv);
int compare(TQListViewItem* i, int col, bool ascending) const;
int rtti() const { return 1003; }
TQString niceName;
TQString name;
int section;
};
class UninstallWizard : public WizardBase
{
Q_OBJECT
public:
UninstallWizard(TQWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
~UninstallWizard();
public slots:
virtual void logPressed();
virtual void cancelPressed();
virtual void previousPressed();
virtual void nextPressed();
void processExited();
void readyReadStdout();
void readyReadStderr();
private:
void checkPassword();
void removeUserPackages();
void removeGlobalPackages();
void finished();
private:
enum
{
ListingPackages,
ListingFiles,
RemovingGlobal
} currentStage;
LogDialog* logDialog;
TQProcess* externalProcess;
HeaderListItem* globalHeader;
TQPixmap icon;
};
#endif

@ -1,917 +0,0 @@
/***************************************************************************
* Copyright (C) 2004 by David Sansome *
* me@davidsansome.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. *
***************************************************************************/
#include "wizard.h"
#include <tqfiledialog.h>
#include <tqwidgetstack.h>
#include <tqpushbutton.h>
#include <tqpainter.h>
#include <tqheader.h>
#include <tqapplication.h>
#include <tqmessagebox.h>
#include <tqprogressbar.h>
#include <tqradiobutton.h>
#include <tqtextedit.h>
#include <tqlineedit.h>
#include <tqpopupmenu.h>
#include <tqhbox.h>
#include <tqfileinfo.h>
#include <tqlabel.h>
#include <tqfontmetrics.h>
#include <tqcheckbox.h>
#include "data.h"
#include "rcparser.h"
#include "headerlistitem.h"
ComponentListItem::ComponentListItem(struct Component c, TQListView* parent)
: TQCheckListItem(parent, "", TQCheckListItem::CheckBox)
{
component = c;
setText(0, c.niceName);
setOn(true);
if (c.gnomeOnly)
section=2;
else if (c.kdeOnly)
section=3;
else if (c.optional)
section=1;
else
section=0;
}
int ComponentListItem::compare(TQListViewItem* i, int col, bool ascending) const
{
switch (i->rtti())
{
case 1001: // Component
{
ComponentListItem* item = (ComponentListItem*) i;
if (section < item->section)
return -1;
if (section > item->section)
return 1;
return TQListViewItem::compare(i, col, ascending);
}
break;
case 1002: // Header
{
HeaderListItem* item = (HeaderListItem*) i;
if (section < item->section)
return -1;
return 1;
}
break;
}
return 0;
}
Wizard::Wizard(TQWidget *parent, const char *name)
: WizardBase(parent, name, false, WDestructiveClose)
{
componentInfo->setMaximumSize(32767,70);
componentList->header()->hide();
//progressLabel2->setMaximumSize(32767, progressLabel2->fontMetrics().height()*2);
externalProcess = new TQProcess(this);
connect(externalProcess, SIGNAL(processExited()), SLOT(processExited()));
connect(externalProcess, SIGNAL(readyReadStdout()), SLOT(readyReadStdout()));
connect(externalProcess, SIGNAL(readyReadStderr()), SLOT(readyReadStderr()));
logDialog = new LogDialog(this);
logDialog->hide();
previousButton->hide();
createActionFormats();
kdeDirProcess = new TQProcess(this);
connect(kdeDirProcess, SIGNAL(readyReadStdout()), SLOT(kdeDirReady()));
connect(kdeDirProcess, SIGNAL(processExited()), SLOT(getInstalledComponents()));
kdeDirProcess->addArgument("tde-config");
kdeDirProcess->addArgument("--prefix");
if (!kdeDirProcess->start())
getInstalledComponents();
}
void Wizard::createActionFormats()
{
// Taken from KDevelop
actionFormats.clear();
actionFormats.append(ActionFormat( tr("compiling"), "g++", "g\\+\\+\\S* (?:\\S* )*-c (?:\\S* )*`[^`]*`(?:[^/\\s;]*/)*([^/\\s;]+)", 1 ));
actionFormats.append(ActionFormat( tr("compiling"), "g++", "g\\+\\+\\S* (?:\\S* )*-c (?:\\S* )*(?:[^/]*/)*([^/\\s;]*)", 1 ));
actionFormats.append(ActionFormat( tr("compiling"), "gcc", "gcc\\S* (?:\\S* )*-c (?:\\S* )*`[^`]*`(?:[^/\\s;]*/)*([^/\\s;]+)", 1 ));
actionFormats.append(ActionFormat( tr("compiling"), "gcc", "gcc\\S* (?:\\S* )*-c (?:\\S* )*(?:[^/]*/)*([^/\\s;]*)", 1 ));
actionFormats.append(ActionFormat( tr("compiling"), "distcc", "distcc (?:\\S* )*-c (?:\\S* )*`[^`]*`(?:[^/\\s;]*/)*([^/\\s;]+)", 1 ));
actionFormats.append(ActionFormat( tr("compiling"), "distcc", "distcc (?:\\S* )*-c (?:\\S* )*(?:[^/]*/)*([^/\\s;]*)", 1 ));
actionFormats.append(ActionFormat( tr("compiling"), "unknown", "^compiling (.*)", 1 ));
actionFormats.append(ActionFormat( tr("generating"), "moc", "/moc\\b.*\\s-o\\s([^\\s;]+)", 1 ));
actionFormats.append(ActionFormat( tr("generating"), "uic", "/uic\\b.*\\s-o\\s([^\\s;]+)", 1 ));
actionFormats.append(ActionFormat( tr("linking"), "libtool", "/+bin/+sh\\s.*libtool.*--mode=link\\s.*\\s-o\\s([^\\s;]+)", 1 ));
actionFormats.append(ActionFormat( tr("linking"), "g++", "g\\+\\+\\S* (?:\\S* )*-o ([^\\s;]+)", 1 ));
actionFormats.append(ActionFormat( tr("linking"), "gcc", "gcc\\S* (?:\\S* )*-o ([^\\s;]+)", 1 ));
actionFormats.append(ActionFormat( tr("creating"), "", "/(?:bin/+sh\\s.*mkinstalldirs).*\\s([^\\s;]+)", 1 ));
actionFormats.append(ActionFormat( tr("installing"), "", "/(?:usr/+bin/+install|bin/+sh\\s.*mkinstalldirs|bin/+sh\\s.*libtool.*--mode=install).*\\s\\'?([^\\s;\\']+)\\'?", 1 ));
actionFormats.append(ActionFormat( tr("generating"), "dcopidl", "dcopidl .* > ([^\\s;]+)", 1 ));
actionFormats.append(ActionFormat( tr("compiling"), "dcopidl2cpp", "dcopidl2cpp (?:\\S* )*([^\\s;]+)", 1 ));
}
void Wizard::kdeDirReady()
{
while (kdeDirProcess->canReadLineStdout())
{
TQString line = kdeDirProcess->readLineStdout();
if (!line.isEmpty())
kdeDir = line;
}
}
void Wizard::getInstalledComponents()
{
TQFile uninstallScript("/tmp/arkollon-uninstall.sh");
if (uninstallScript.exists())
uninstallScript.remove();
uninstallScript.open(IO_WriteOnly);
TQDataStream stream(&uninstallScript);
stream.writeRawBytes((const char*)uninstaller_sh_data, uninstaller_sh_len);
uninstallScript.close();
installedComponentsProcess = new TQProcess(this);
connect(installedComponentsProcess, SIGNAL(readyReadStdout()), SLOT(installedComponentsReady()));
connect(installedComponentsProcess, SIGNAL(processExited()), SLOT(setup()));
installedComponentsProcess->addArgument("/bin/sh");
installedComponentsProcess->addArgument("/tmp/arkollon-uninstall.sh");
installedComponentsProcess->addArgument("--list");
if (!installedComponentsProcess->start())
setup();
}
void Wizard::installedComponentsReady()
{
while (installedComponentsProcess->canReadLineStdout())
{
TQString line = installedComponentsProcess->readLineStdout();
if (line.isEmpty())
continue;
// See if it already exists
if (installedComponents.find(line.lower()) != installedComponents.end())
continue;
installedComponents.append(line.lower());
//printf("Found installed component %s\n", parser.cap(3).latin1());
}
}
void Wizard::setup()
{
TQFile uninstallScript("/tmp/arkollon-uninstall.sh");
if (uninstallScript.exists())
uninstallScript.remove();
if (kdeDir.isEmpty())
kdeDir = "/usr";
// Firstly check if there's an arkollonrc file in the current directory
// If there is, use it.
dir = TQDir::currentDirPath();
if (tqApp->argc() > 1)
{
// The directory specified on the command line overrides the current dir.
TQDir d(tqApp->argv()[1]);
dir = d.absPath();
}
if (TQFile::exists(dir + "/arkollonrc"))
{
setupFromRc();
}
else
{
if (!setupFromDir())
{
TQMessageBox::critical(NULL, "Error", "This directory does not contain any recognised buildsystem", TQMessageBox::Ok, TQMessageBox::NoButton, TQMessageBox::NoButton);
reject();
return;
}
}
show();
}
void Wizard::setupFromRc()
{
RcParser parser;
parser.addSearchDir(dir);
if (!parser.openFile("arkollonrc"))
{
TQMessageBox::critical(NULL, "Error", "The \"arkollonrc\" file in this directory could not be read", TQMessageBox::Ok, TQMessageBox::NoButton, TQMessageBox::NoButton);
reject();
return;
}
parser.setSection("Arkollon");
TQString appName = parser.readString("AppName");
if (appName.isEmpty())
{
TQMessageBox::critical(NULL, "Error", "The \"arkollonrc\" file in this directory contains no application name!", TQMessageBox::Ok, TQMessageBox::NoButton, TQMessageBox::NoButton);
reject();
return;
}
setAppName(appName);
TQString icon32Path = parser.readString("Icon32");
TQString icon16Path = parser.readString("Icon16");
if ((!icon32Path.isEmpty()) && (TQFile::exists(dir + "/" + icon32Path)))
{
TQPixmap icon32(dir + "/" + icon32Path);
appIcon->setPixmap(icon32);
}
if ((!icon16Path.isEmpty()) && (TQFile::exists(dir + "/" + icon16Path)))
{
TQPixmap icon16(dir + "/" + icon16Path);
setIcon(icon16);
}
buildOrder = parser.readList("BuildOrder");
TQStringList compNames = parser.readList("Components");
TQStringList::Iterator it = compNames.begin();
while( it != compNames.end() )
{
parser.setSection(*it);
struct Component c;
c.name = *it;
c.niceName = parser.readString("NiceName");
c.subDir = parser.readString("SubDir");
c.forceDir = sub(parser.readString("ForceDir"));
c.optional = parser.readBool("Optional", false);
c.kdeOnly = parser.readBool("KDEOnly", false);
c.gnomeOnly = parser.readBool("GnomeOnly", false);
c.description = sub(parser.readString("Description"));
c.confOptions = parser.readString("ConfigureOptions");
c.alreadyInstalled = false;
// Load the buildtimes data
if (TQFile::exists(dir + "/" + c.subDir + "/buildtimes"))
{
TQRegExp re("([^,]*,[^,]*),(\\d*)");
TQFile file(dir + "/" + c.subDir + "/buildtimes");
file.open(IO_ReadOnly);
TQTextStream stream(&file);
for (;;)
{
TQString line = stream.readLine();
if (line.isNull())
break;
if (re.search(line) == -1)
continue;
c.buildTimes.insert(re.cap(1), re.cap(2).toInt());
}
}
// Add the header for this component
ComponentListItem* item = new ComponentListItem(c, componentList);
if (!headers.contains(item->section))
{
headers[item->section] = new HeaderListItem(componentList);
((HeaderListItem*)headers[item->section])->section = item->section;
switch(item->section)
{
case 0: headers[item->section]->setText(0, "Required components"); break;
case 1: headers[item->section]->setText(0, "Optional components"); break;
case 2: headers[item->section]->setText(0, "Gnome specific components"); break;
case 3: headers[item->section]->setText(0, "KDE specific components"); break;
}
}
// Check if it's already installed
TQStringList::Iterator it2 = installedComponents.begin();
while( it2 != installedComponents.end() )
{
int dashPos = c.subDir.findRev('-');
if (dashPos < 0)
dashPos = c.subDir.length();
TQString version = c.subDir.left(dashPos) + ":" + c.subDir.right(c.subDir.length() - dashPos - 1);
if (*it2 == version.lower())
{
item->setOn(false);
item->component.alreadyInstalled = true;
}
++it2;
}
++it;
}
parser.setSection("Arkollon");
exec = sub(parser.readString("Exec"));
desktop = sub(parser.readString("Desktop"));
}
bool Wizard::setupFromDir()
{
if ((!TQFile::exists(dir + "/configure")) &&
(!TQFile::exists(dir + "/autogen.sh")) &&
(!TQFile::exists(dir + "/auto-gen.sh")))
{
TQDir myDir(dir + "/" + selectedComponents[currentComponent].subDir);
if (myDir.entryList("*.pro", TQDir::Files).count() <= 0)
return false;
}
// Use the directory name as the appname
TQDir myDir2(dir);
TQString dirName = myDir2.dirName();
setAppName(makeDirNice(dirName));
buildOrder.append(dirName);
struct Component c;
c.name = dirName;
c.niceName = makeDirNice(dirName);
c.optional = false;
c.subDir = "";
c.gnomeOnly = false;
c.kdeOnly = false;
c.description = "<i>No description is associated with this component.</i>";
c.alreadyInstalled = false;
ComponentListItem* item = new ComponentListItem(c, componentList);
HeaderListItem* header = new HeaderListItem(componentList);
header->setText(0, "Required components");
header->section = 0;
TQStringList::Iterator it2 = installedComponents.begin();
while( it2 != installedComponents.end() )
{
int dashPos = dirName.findRev('-');
if (dashPos < 0)
dashPos = dirName.length();
TQString version = dirName.left(dashPos) + ":" + dirName.right(dirName.length() - dashPos - 1);
if (*it2 == version.lower())
item->component.alreadyInstalled = true;
++it2;
}
return true;
}
Wizard::~Wizard()
{
}
void Wizard::componentSelected(TQListViewItem* item)
{
if (item->rtti() != 1001)
return;
ComponentListItem* i = (ComponentListItem*) item;
TQString text = "<p><b>" + item->text(0) + "</b>";
if (i->component.alreadyInstalled)
text += " <i>(Already installed)</i>";
text += "</p><p>";
text += i->component.description;
text += "</p>";
componentInfo->setText(text);
}
TQString Wizard::makeDirNice(TQString name)
{
int dashPos = name.findRev('-');
if (dashPos < 0)
dashPos = name.length();
TQString ret = name.left(dashPos);
ret = ret.left(1).upper() + ret.right(ret.length()-1);
return ret;
}
void Wizard::cancelPressed()
{
if (externalProcess->isRunning())
externalProcess->tryTerminate();
reject();
}
void Wizard::nextPressed()
{
int currentId = installStack->id(installStack->visibleWidget());
if (currentId == 3)
{
TQDir d(kdeDir);
d.mkdir("share/apps/kdesktop/Desktop");
if (shortcutBox->isChecked())
{
TQFile source(dir + "/" + desktop);
TQString destDir = kdeDir + "/share/apps/kdesktop/Desktop";
int slashPos = desktop.findRev('/');
if (slashPos < 0)
slashPos = 0;
TQFile dest(destDir + "/" + desktop.right(desktop.length() - slashPos));
source.open(IO_ReadOnly);
dest.open(IO_WriteOnly | IO_Truncate);
TQDataStream destStream(&dest);
TQByteArray data = source.readAll();
destStream.writeRawBytes(data.data(), data.size());
source.close();
dest.close();
}
if (uninstallBox->isChecked())
{
TQFile source(dir + "/Uninstall KlamAV.desktop");
TQFile dest(kdeDir + "/share/apps/kdesktop/Desktop/Uinstall KlamAV.desktop");
source.open(IO_ReadOnly);
dest.open(IO_WriteOnly | IO_Truncate);
TQDataStream destStream(&dest);
TQByteArray data = source.readAll();
destStream.writeRawBytes(data.data(), data.size());
source.close();
dest.close();
}
accept();
return;
}
if ((currentId == 2) && (exec.isEmpty()))
{
accept();
return;
}
if (currentId == 1)
{
bool itemsSelected = false;
TQListViewItemIterator it( componentList );
while ( it.current() )
{
if (it.current()->rtti() != 1001)
{
++it;
continue;
}
ComponentListItem* item = (ComponentListItem*) it.current();
if (item->isOn())
itemsSelected = true;
++it;
}
if (!itemsSelected)
{
TQMessageBox::warning(this, "Warning", "You need to select at least one component", TQMessageBox::Ok, TQMessageBox::NoButton, TQMessageBox::NoButton);
return;
}
}
installStack->raiseWidget(++currentId);
if (currentId == 2)
{
pleaseWaitLabel->setText("Please wait while the software is compiled and installed");
timeRemaining->setText("Estimated time remaining: <b>Calculating...</b>");
startProcess();
nextButton->setEnabled(false);
previousButton->setEnabled(false);
}
else if (currentId == 3)
{
nextButton->setText("Finish");
}
else
previousButton->setEnabled(true);
}
void Wizard::previousPressed()
{
int currentId = installStack->id(installStack->visibleWidget());
if (currentId == 0)
return;
installStack->raiseWidget(--currentId);
if (currentId == 0)
previousButton->setEnabled(false);
nextButton->setEnabled(true);
}
void Wizard::startProcess()
{
selectedComponents.clear();
totalBTime = 0;
elapsedTime = 0;
elapsedBTime = 0;
for ( TQStringList::Iterator it = buildOrder.begin(); it != buildOrder.end(); ++it )
{
TQListViewItemIterator it2( componentList );
while ( it2.current() )
{
if (it2.current()->rtti() != 1001)
{
++it2;
continue;
}
ComponentListItem* item = (ComponentListItem*) it2.current();
if (item->component.name == *it)
{
if (item->isOn())
{
selectedComponents.append(item->component);
TQMap<TQString, uint>::iterator it3;
for ( it3 = item->component.buildTimes.begin(); it3 != item->component.buildTimes.end(); ++it3 )
totalBTime += it3.data();
}
}
++it2;
}
}
progressBar->setProgress(0);
progressBar->setTotalSteps(totalBTime);
currentComponent = 0;
currentStage = None;
currentIsTQMake = false;
nextStep();
}
void Wizard::nextStep()
{
externalProcess->clearArguments();
switch (currentStage)
{
case None:
{
logLine(selectedComponents[currentComponent].niceName);
progressLabel1->setText("<b>Running autogen for " + selectedComponents[currentComponent].niceName + "</b>");
setProgress2Text("");
//progressLabel2->setCursorPosition(0);
currentStage = Autogen;
TQDir myDir(dir + "/" + selectedComponents[currentComponent].subDir);
if (myDir.entryList("*.pro", TQDir::Files).count() > 0)
{
currentIsTQMake = true;
nextStep();
return;
}
if (TQFile::exists(dir + "/" + selectedComponents[currentComponent].subDir + "/configure"))
{
nextStep();
return;
}
TQString autogenName;
if (TQFile::exists(dir + "/" + selectedComponents[currentComponent].subDir + "/autogen.sh"))
autogenName = "autogen.sh";
else if (TQFile::exists(dir + "/" + selectedComponents[currentComponent].subDir + "/auto-gen.sh"))
autogenName = "auto-gen.sh";
else
{
logLine("No configure, autogen, or qmake scripts found");
errorOccured();
return;
}
externalProcess->addArgument(dir + "/" + selectedComponents[currentComponent].subDir + autogenName);
externalProcess->setWorkingDirectory(dir + "/" + selectedComponents[currentComponent].subDir);
logLine("Running autogen...");
externalProcess->start();
break;
}
case Autogen:
{
//progressBar->setProgress(progressBar->progress() + 1);
currentStage = Configure;
if (currentIsTQMake)
{
progressLabel1->setText("<b>Running qmake for " + selectedComponents[currentComponent].niceName + "</b>");
setProgress2Text("");
//progressLabel2->setCursorPosition(0);
externalProcess->addArgument("qmake");
externalProcess->setWorkingDirectory(dir + "/" + selectedComponents[currentComponent].subDir);
if (!externalProcess->start())
{
logLine("Error: qmake was not found. Try installing the TQt-devel libraries.");
errorOccured();
return;
}
logLine("Running qmake...");
break;
}
if (!selectedComponents[currentComponent].forceDir.isEmpty())
prefix = selectedComponents[currentComponent].forceDir;
else
prefix = "/usr/local";
externalProcess->addArgument("./configure");
//externalProcess->addArgument("--prefix=" + prefix);
if (!selectedComponents[currentComponent].confOptions.isEmpty())
{
TQStringList extraArgs = TQStringList::split(" ", sub(selectedComponents[currentComponent].confOptions));
for ( TQStringList::Iterator it = extraArgs.begin(); it != extraArgs.end(); ++it )
externalProcess->addArgument(*it);
}
externalProcess->setWorkingDirectory(dir + "/" + selectedComponents[currentComponent].subDir);
logLine("Running configure (" + externalProcess->arguments().join(" ") + ")...");
progressLabel1->setText("<b>Configuring " + selectedComponents[currentComponent].niceName + "</b>");
setProgress2Text("");
timer.start();
externalProcess->start();
break;
}
case Configure:
{
updateTime("configure,");
currentStage = Compile;
externalProcess->addArgument("make");
externalProcess->setWorkingDirectory(dir + "/" + selectedComponents[currentComponent].subDir);
logLine("Running make...");
progressLabel1->setText("<b>Compiling " + selectedComponents[currentComponent].niceName + "</b>");
setProgress2Text("");
timer.setHMS(0, 0, 0);
externalProcess->start();
break;
}
case Compile:
{
currentStage = Install;
logLine("Installing...");
progressLabel1->setText("<b>Installing " + selectedComponents[currentComponent].niceName + "</b>");
setProgress2Text("");
installedFiles.clear();
externalProcess->addArgument("make");
externalProcess->addArgument("install");
externalProcess->setWorkingDirectory(dir + "/" + selectedComponents[currentComponent].subDir);
externalProcess->start();
break;
}
case Install:
{
currentStage = WriteUninstallInfo;
logLine("Writing uninstall information...");
progressLabel1->setText("<b>Writing uninstall information for " + selectedComponents[currentComponent].niceName + "</b>");
setProgress2Text("");
TQFile postInstallScript("/tmp/arkollon-postinstall.sh");
if (postInstallScript.exists())
postInstallScript.remove();
postInstallScript.open(IO_WriteOnly);
TQDataStream stream(&postInstallScript);
stream.writeRawBytes((const char*)postinstall_sh_data, postinstall_sh_len);
postInstallScript.close();
TQFile fileList("/tmp/arkollon-filelist");
if (fileList.exists())
fileList.remove();
fileList.open(IO_WriteOnly);
TQTextStream fileStream(&fileList);
TQStringList doneFiles;
for ( TQStringList::Iterator it = installedFiles.begin(); it != installedFiles.end(); ++it )
{
if (doneFiles.find(*it) != doneFiles.end())
continue;
TQFileInfo fileInfo(*it);
if (fileInfo.isDir())
continue;
fileStream << (*it) << '\n';
doneFiles.append(*it);
}
fileList.close();
struct Component c = selectedComponents[currentComponent];
int dashPos = c.subDir.findRev('-');
if (dashPos < 0)
dashPos = c.subDir.length();
TQString appname = c.subDir.left(dashPos);
TQString version = c.subDir.right(c.subDir.length() - dashPos - 1);
externalProcess->addArgument("/bin/sh");
externalProcess->addArgument("/tmp/arkollon-postinstall.sh");
externalProcess->addArgument("--appname");
externalProcess->addArgument(appname);
externalProcess->addArgument("--version");
externalProcess->addArgument(version);
externalProcess->addArgument("--filelist");
externalProcess->addArgument("/tmp/arkollon-filelist");
externalProcess->start();
break;
}
case WriteUninstallInfo:
{
currentStage = None;
currentComponent++;
currentIsTQMake = false;
if (currentComponent >= selectedComponents.count())
{
progressLabel1->setText("<b>Installation completed!</b>");
pleaseWaitLabel->setText("Installation complete");
timeRemaining->setText("");
progressBar->setProgress(totalBTime);
nextButton->setEnabled(true);
if (exec.isEmpty())
{
nextButton->setText("Finish");
setProgress2Text("");
}
else
{
setProgress2Text("Click \"next\" to continue");
}
return;
}
nextStep();
break;
}
default:
break;
}
}
void Wizard::processExited()
{
if (currentStage == WriteUninstallInfo)
{
// Remove temp files from the last stage
TQFile postInstallScript("/tmp/arkollon-postinstall.sh");
if (postInstallScript.exists())
postInstallScript.remove();
TQFile fileList("/tmp/arkollon-filelist");
if (fileList.exists())
fileList.remove();
}
if (!externalProcess->normalExit())
{
logLine("Process was killed");
errorOccured();
return;
}
if (externalProcess->exitStatus() != 0)
{
logLine("Return value " + TQString::number(externalProcess->exitStatus()));
errorOccured();
return;
}
if (currentStage == Compile)
updateTime(lastTimeLine);
nextStep();
}
void Wizard::readyReadStderr()
{
while (externalProcess->canReadLineStderr())
{
TQString line = externalProcess->readLineStderr().latin1();
logDialog->logBox->append(" * "+line);
}
}
void Wizard::readyReadStdout()
{
while (externalProcess->canReadLineStdout())
{
TQString line = externalProcess->readLineStdout().latin1();
logDialog->logBox->append(line);
if (currentStage == Configure)
{
setProgress2Text(line);
continue;
}
commandLine += line;
if (line.right(1) == "\\")
continue;
commandLine = commandLine.left(commandLine.find(';'));
for ( TQValueList<ActionFormat>::Iterator it = actionFormats.begin(); it != actionFormats.end(); ++it )
{
if ((*it).regExp.search(commandLine) == -1)
continue;
setProgress2Text((*it).action + " <b>" + (*it).regExp.cap(1) + "</b> (" + (*it).tool + ")");
if ((currentStage == Install) && ((*it).action == "installing"))
installedFiles.append((*it).regExp.cap(1));
else
updateTime(lastTimeLine);
lastTimeLine = (*it).tool + "," + (*it).regExp.cap(1);
}
commandLine = "";
}
}
void Wizard::updateTime(TQString key)
{
if (!timer.isNull())
{
elapsedBTime += selectedComponents[currentComponent].buildTimes[key];
elapsedTime += timer.elapsed();
float ratio = (float)elapsedTime / (float)elapsedBTime;
int remainingTime = (int)((float)(totalBTime - elapsedBTime) * ratio) / 60000;
if (remainingTime < 0)
remainingTime = 0;
TQString text = TQString::number(remainingTime + 1) + " minutes";
if (remainingTime == 0)
text = "1 minute";
timeRemaining->setText("Estimated time remaining: <b>" + text + "</b>");
progressBar->setProgress(elapsedBTime);
}
timer.start();
}
void Wizard::logLine(TQString line)
{
TQString tmp = line;
TQStringList lines = TQStringList::split("\n", tmp);
for ( TQStringList::Iterator it = lines.begin(); it != lines.end(); ++it )
{
if ((*it).isEmpty())
continue;
logDialog->logBox->append("***** "+*it);
}
}
void Wizard::setProgress2Text(TQString text)
{
TQString croppedText = text;
int i = croppedText.length();
TQFont boldFont = progressLabel2->font();
boldFont.setBold(true);
TQFontMetrics boldFontMetrics(boldFont);
while (boldFontMetrics.width(croppedText) > progressLabel2->width())
{
croppedText = croppedText.left(--i);
}
progressLabel2->setText(croppedText);
}
void Wizard::errorOccured()
{
//logFrame->show();
pleaseWaitLabel->setText("An error occured");
progressLabel1->setText("<b>An error occured</b>");
setProgress2Text("See the log file for more information");
previousButton->setEnabled(true);
}
TQString Wizard::sub(TQString s)
{
TQString tmp = s;
tmp.replace(TQRegExp("\\$TDEDIR"), kdeDir);
tmp.replace(TQRegExp("\\$HOMEDIR"), TQDir::homeDirPath());
tmp.replace(TQRegExp("~"), TQDir::homeDirPath());
tmp.replace(TQRegExp("\\$PREFIX"), "/usr/local");
return tmp;
}
void Wizard::runPressed()
{
TQProcess* proc = new TQProcess(this);
proc->addArgument(exec);
if (!proc->start())
{
TQMessageBox::warning(this, "Warning", "The application could not be started<br>"+exec, TQMessageBox::Ok, TQMessageBox::NoButton, TQMessageBox::NoButton);
}
}
void Wizard::logPressed()
{
logDialog->show();
}
#include "wizard.moc"

@ -1,165 +0,0 @@
/***************************************************************************
* Copyright (C) 2004 by David Sansome *
* me@davidsansome.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. *
***************************************************************************/
#ifndef WIZARD_H
#define WIZARD_H
#include <wizardbase.h>
#include <tqlistview.h>
#include <tqprocess.h>
#include <tqsettings.h>
#include <tqiconview.h>
#include <tqregexp.h>
#include "logdialog.h"
class HeaderListItem;
struct Component
{
TQString name;
TQString niceName;
TQString subDir;
TQString forceDir;
bool optional;
bool kdeOnly;
bool gnomeOnly;
TQString description;
TQString confOptions;
TQMap<TQString, uint> buildTimes;
bool alreadyInstalled;
};
class ComponentListItem : public TQCheckListItem
{
public:
ComponentListItem(struct Component c, TQListView* parent);
int compare(TQListViewItem* i, int col, bool ascending) const;
int rtti() const { return 1001; }
struct Component component;
int section;
};
class ActionFormat
{
public:
ActionFormat() {}
ActionFormat(TQString a, TQString t, TQString r, int) { action=a; tool=t; regExp=r; }
~ActionFormat() {}
TQString action;
TQString tool;
TQRegExp regExp;
};
class Wizard : public WizardBase
{
Q_OBJECT
public:
Wizard(TQWidget *parent = 0, const char *name = 0);
~Wizard();
private:
void createActionFormats();
void startProcess();
void nextStep();
void checkPassword();
void updateTime(TQString key);
TQString lastTimeLine;
void logLine(TQString line);
void errorOccured();
TQString makeDirNice(TQString name);
TQString sub(TQString s);
TQString rootPassword;
private slots:
void processExited();
void readyReadStdout();
void readyReadStderr();
void kdeDirReady();
void getInstalledComponents();
void installedComponentsReady();
void cancelPressed();
void nextPressed();
void previousPressed();
void runPressed();
void logPressed();
void componentSelected(TQListViewItem* item);
void setProgress2Text(TQString text);
void setup();
void setupFromRc();
bool setupFromDir();
private:
enum Stage
{
None,
Autogen,
Configure,
Compile,
Install,
WriteUninstallInfo
};
TQString dir;
TQStringList buildOrder;
TQValueList<struct Component> selectedComponents;
uint totalBTime;
uint elapsedBTime;
uint elapsedTime;
TQTime timer;
TQProcess* externalProcess;
TQProcess* kdeDirProcess;
TQProcess* installedComponentsProcess;
TQString commandLine;
bool currentIsTQMake;
int currentComponent;
enum Stage currentStage;
bool needRoot;
TQString prefix;
TQStringList installedComponents;
TQString exec;
TQString desktop;
TQString kdeDir;
LogDialog* logDialog;
TQMap<int, HeaderListItem*> headers;
TQValueList<ActionFormat> actionFormats;
TQStringList installedFiles;
};
#endif

@ -1,921 +0,0 @@
<!DOCTYPE UI><UI version="3.1" stdsetdef="1">
<class>WizardBase</class>
<widget class="TQDialog">
<property name="name">
<cstring>WizardBase</cstring>
</property>
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>587</width>
<height>384</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>1</hsizetype>
<vsizetype>1</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>530</width>
<height>0</height>
</size>
</property>
<property name="caption">
<string>[AppName] installation</string>
</property>
<vbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
<property name="resizeMode">
<enum>Fixed</enum>
</property>
<widget class="TQLayoutWidget">
<property name="name">
<cstring>layout8</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="TQLabel">
<property name="name">
<cstring>splash</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>0</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="frameShape">
<enum>Box</enum>
</property>
<property name="frameShadow">
<enum>Sunken</enum>
</property>
<property name="scaledContents">
<bool>false</bool>
</property>
</widget>
<widget class="TQLayoutWidget">
<property name="name">
<cstring>layout7</cstring>
</property>
<vbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="TQLabel">
<property name="name">
<cstring>titleLabel</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>5</hsizetype>
<vsizetype>4</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>&lt;b&gt;[AppName] installation&lt;/b&gt;</string>
</property>
<property name="alignment">
<set>AlignVCenter</set>
</property>
</widget>
<widget class="Line">
<property name="name">
<cstring>line1</cstring>
</property>
<property name="frameShape">
<enum>HLine</enum>
</property>
<property name="frameShadow">
<enum>Sunken</enum>
</property>
<property name="orientation">
<enum>Horizontal</enum>
</property>
</widget>
<widget class="TQWidgetStack">
<property name="name">
<cstring>mainStack</cstring>
</property>
<widget class="TQWidget">
<property name="name">
<cstring>WStackPage</cstring>
</property>
<attribute name="id">
<number>0</number>
</attribute>
<vbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
<property name="margin">
<number>0</number>
</property>
<property name="spacing">
<number>0</number>
</property>
<widget class="TQWidgetStack">
<property name="name">
<cstring>installStack</cstring>
</property>
<widget class="TQWidget">
<property name="name">
<cstring>Introduction</cstring>
</property>
<attribute name="id">
<number>0</number>
</attribute>
<vbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="TQLabel">
<property name="name">
<cstring>textLabel2</cstring>
</property>
<property name="text">
<string>&lt;p&gt;This wizard will guide you through the installation of:</string>
</property>
<property name="alignment">
<set>WordBreak|AlignVCenter</set>
</property>
</widget>
<widget class="TQLayoutWidget">
<property name="name">
<cstring>layout12</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
<spacer>
<property name="name">
<cstring>spacer3</cstring>
</property>
<property name="orientation">
<enum>Horizontal</enum>
</property>
<property name="sizeType">
<enum>Fixed</enum>
</property>
<property name="sizeHint">
<size>
<width>30</width>
<height>10</height>
</size>
</property>
</spacer>
<widget class="TQLabel">
<property name="name">
<cstring>appIcon</cstring>
</property>
<property name="scaledContents">
<bool>false</bool>
</property>
</widget>
<widget class="TQLabel">
<property name="name">
<cstring>appNameLabel</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>7</hsizetype>
<vsizetype>5</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>&lt;b&gt;[AppName]&lt;/b&gt;</string>
</property>
</widget>
</hbox>
</widget>
<spacer>
<property name="name">
<cstring>spacer4</cstring>
</property>
<property name="orientation">
<enum>Vertical</enum>
</property>
<property name="sizeType">
<enum>Fixed</enum>
</property>
<property name="sizeHint">
<size>
<width>10</width>
<height>30</height>
</size>
</property>
</spacer>
<widget class="TQLabel">
<property name="name">
<cstring>textLabel4</cstring>
</property>
<property name="text">
<string>Please click "Next" to continue</string>
</property>
</widget>
<spacer>
<property name="name">
<cstring>spacer5</cstring>
</property>
<property name="orientation">
<enum>Vertical</enum>
</property>
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="sizeHint">
<size>
<width>21</width>
<height>71</height>
</size>
</property>
</spacer>
</vbox>
</widget>
<widget class="TQWidget">
<property name="name">
<cstring>Components</cstring>
</property>
<attribute name="id">
<number>1</number>
</attribute>
<vbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="TQLabel">
<property name="name">
<cstring>textLabel5</cstring>
</property>
<property name="text">
<string>Select the components to install</string>
</property>
<property name="alignment">
<set>WordBreak|AlignVCenter</set>
</property>
</widget>
<widget class="TQListView">
<column>
<property name="text">
<string>Component name</string>
</property>
<property name="clickable">
<bool>true</bool>
</property>
<property name="resizable">
<bool>true</bool>
</property>
</column>
<property name="name">
<cstring>componentList</cstring>
</property>
</widget>
<widget class="TQTextEdit">
<property name="name">
<cstring>componentInfo</cstring>
</property>
<property name="textFormat">
<enum>RichText</enum>
</property>
<property name="text">
<string>&lt;i&gt;Select a component from the list above to see a brief description of it.&lt;/i&gt;</string>
</property>
<property name="wordWrap">
<enum>WidgetWidth</enum>
</property>
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</vbox>
</widget>
<widget class="TQWidget">
<property name="name">
<cstring>WStackPage</cstring>
</property>
<attribute name="id">
<number>2</number>
</attribute>
<vbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="TQLabel">
<property name="name">
<cstring>pleaseWaitLabel</cstring>
</property>
<property name="text">
<string>Please wait while the software is compiled and installed</string>
</property>
<property name="alignment">
<set>WordBreak|AlignVCenter</set>
</property>
</widget>
<spacer>
<property name="name">
<cstring>spacer14_2</cstring>
</property>
<property name="orientation">
<enum>Vertical</enum>
</property>
<property name="sizeType">
<enum>Minimum</enum>
</property>
<property name="sizeHint">
<size>
<width>16</width>
<height>30</height>
</size>
</property>
</spacer>
<widget class="TQLabel">
<property name="name">
<cstring>progressLabel1</cstring>
</property>
<property name="text">
<string>Progress Label 1</string>
</property>
</widget>
<widget class="TQLabel">
<property name="name">
<cstring>progressLabel2</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>5</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Progress Label 2</string>
</property>
<property name="textFormat">
<enum>RichText</enum>
</property>
<property name="alignment">
<set>WordBreak|AlignTop|AlignLeft</set>
</property>
</widget>
<widget class="TQProgressBar">
<property name="name">
<cstring>progressBar</cstring>
</property>
<property name="progress">
<number>0</number>
</property>
</widget>
<widget class="TQLabel">
<property name="name">
<cstring>timeRemaining</cstring>
</property>
<property name="text">
<string>Estimated time remaining: &lt;b&gt;Calculating...&lt;/b&gt;</string>
</property>
<property name="alignment">
<set>WordBreak|AlignVCenter|AlignRight</set>
</property>
</widget>
<spacer>
<property name="name">
<cstring>spacer15</cstring>
</property>
<property name="orientation">
<enum>Vertical</enum>
</property>
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="sizeHint">
<size>
<width>20</width>
<height>30</height>
</size>
</property>
</spacer>
<widget class="TQFrame">
<property name="name">
<cstring>logFrame</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>5</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="frameShape">
<enum>NoFrame</enum>
</property>
<property name="frameShadow">
<enum>Plain</enum>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
<property name="margin">
<number>0</number>
</property>
<property name="spacing">
<number>0</number>
</property>
<spacer>
<property name="name">
<cstring>logSpacer_2</cstring>
</property>
<property name="orientation">
<enum>Horizontal</enum>
</property>
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="sizeHint">
<size>
<width>224</width>
<height>20</height>
</size>
</property>
</spacer>
<widget class="TQPushButton">
<property name="name">
<cstring>logButton</cstring>
</property>
<property name="text">
<string>View log file...</string>
</property>
</widget>
</hbox>
</widget>
</vbox>
</widget>
<widget class="TQWidget">
<property name="name">
<cstring>WStackPage</cstring>
</property>
<attribute name="id">
<number>3</number>
</attribute>
<vbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="TQLabel">
<property name="name">
<cstring>textLabel1</cstring>
</property>
<property name="text">
<string>&lt;p&gt;The installation is complete.&lt;/p&gt;</string>
</property>
<property name="alignment">
<set>WordBreak|AlignVCenter</set>
</property>
</widget>
<spacer>
<property name="name">
<cstring>spacer8</cstring>
</property>
<property name="orientation">
<enum>Vertical</enum>
</property>
<property name="sizeType">
<enum>Fixed</enum>
</property>
<property name="sizeHint">
<size>
<width>20</width>
<height>30</height>
</size>
</property>
</spacer>
<widget class="TQLayoutWidget">
<property name="name">
<cstring>layout7</cstring>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
<spacer row="0" column="0" rowspan="3" colspan="1">
<property name="name">
<cstring>spacer16</cstring>
</property>
<property name="orientation">
<enum>Horizontal</enum>
</property>
<property name="sizeType">
<enum>Fixed</enum>
</property>
<property name="sizeHint">
<size>
<width>30</width>
<height>50</height>
</size>
</property>
</spacer>
<widget class="TQCheckBox" row="2" column="1">
<property name="name">
<cstring>uninstallBox</cstring>
</property>
<property name="text">
<string>Place a shortcut to the uninstaller on the desktop</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
<widget class="TQCheckBox" row="1" column="1">
<property name="name">
<cstring>shortcutBox</cstring>
</property>
<property name="text">
<string>Place a shortcut to [AppName] on the desktop</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</grid>
</widget>
<spacer>
<property name="name">
<cstring>spacer9</cstring>
</property>
<property name="orientation">
<enum>Vertical</enum>
</property>
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="sizeHint">
<size>
<width>20</width>
<height>90</height>
</size>
</property>
</spacer>
</vbox>
</widget>
</widget>
</vbox>
</widget>
<widget class="TQWidget">
<property name="name">
<cstring>WStackPage</cstring>
</property>
<attribute name="id">
<number>1</number>
</attribute>
<vbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
<property name="margin">
<number>0</number>
</property>
<property name="spacing">
<number>0</number>
</property>
<widget class="TQWidgetStack">
<property name="name">
<cstring>uninstallStack</cstring>
</property>
<widget class="TQWidget">
<property name="name">
<cstring>WStackPage</cstring>
</property>
<attribute name="id">
<number>0</number>
</attribute>
<vbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="TQLabel">
<property name="name">
<cstring>textLabel1_3</cstring>
</property>
<property name="text">
<string>Please select from the list below the applications you wish to uninstall.</string>
</property>
</widget>
<widget class="TQListView">
<column>
<property name="text">
<string>Application Name</string>
</property>
<property name="clickable">
<bool>true</bool>
</property>
<property name="resizable">
<bool>true</bool>
</property>
</column>
<property name="name">
<cstring>appList</cstring>
</property>
</widget>
</vbox>
</widget>
<widget class="TQWidget">
<property name="name">
<cstring>WStackPage</cstring>
</property>
<attribute name="id">
<number>1</number>
</attribute>
<vbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="TQLabel">
<property name="name">
<cstring>textLabel2_3</cstring>
</property>
<property name="text">
<string>The following files will be removed.&lt;br&gt;
Please check this list, and click &lt;b&gt;next&lt;/b&gt; to continue.</string>
</property>
<property name="textFormat">
<enum>RichText</enum>
</property>
</widget>
<widget class="TQListBox">
<property name="name">
<cstring>fileList</cstring>
</property>
</widget>
</vbox>
</widget>
<widget class="TQWidget">
<property name="name">
<cstring>WStackPage</cstring>
</property>
<attribute name="id">
<number>2</number>
</attribute>
<vbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
<spacer>
<property name="name">
<cstring>spacer14</cstring>
</property>
<property name="orientation">
<enum>Vertical</enum>
</property>
<property name="sizeType">
<enum>Fixed</enum>
</property>
<property name="sizeHint">
<size>
<width>16</width>
<height>30</height>
</size>
</property>
</spacer>
<widget class="TQLabel">
<property name="name">
<cstring>pleaseWaitLabel2</cstring>
</property>
<property name="text">
<string>Please wait while the selected packages are removed...</string>
</property>
</widget>
<spacer>
<property name="name">
<cstring>spacer15_2</cstring>
</property>
<property name="orientation">
<enum>Vertical</enum>
</property>
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="sizeHint">
<size>
<width>41</width>
<height>156</height>
</size>
</property>
</spacer>
<widget class="TQFrame">
<property name="name">
<cstring>logFrame_2</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>5</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="frameShape">
<enum>NoFrame</enum>
</property>
<property name="frameShadow">
<enum>Plain</enum>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
<property name="margin">
<number>0</number>
</property>
<property name="spacing">
<number>0</number>
</property>
<spacer>
<property name="name">
<cstring>logSpacer_2_2</cstring>
</property>
<property name="orientation">
<enum>Horizontal</enum>
</property>
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="sizeHint">
<size>
<width>224</width>
<height>20</height>
</size>
</property>
</spacer>
<widget class="TQPushButton">
<property name="name">
<cstring>logButton2</cstring>
</property>
<property name="text">
<string>View log file...</string>
</property>
</widget>
</hbox>
</widget>
</vbox>
</widget>
</widget>
</vbox>
</widget>
</widget>
</vbox>
</widget>
</hbox>
</widget>
<widget class="Line">
<property name="name">
<cstring>line2</cstring>
</property>
<property name="frameShape">
<enum>HLine</enum>
</property>
<property name="frameShadow">
<enum>Sunken</enum>
</property>
<property name="orientation">
<enum>Horizontal</enum>
</property>
</widget>
<widget class="TQLayoutWidget">
<property name="name">
<cstring>layout2</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
<spacer>
<property name="name">
<cstring>spacer1</cstring>
</property>
<property name="orientation">
<enum>Horizontal</enum>
</property>
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="sizeHint">
<size>
<width>61</width>
<height>31</height>
</size>
</property>
</spacer>
<widget class="TQPushButton">
<property name="name">
<cstring>previousButton</cstring>
</property>
<property name="enabled">
<bool>false</bool>
</property>
<property name="text">
<string>&lt; Previous</string>
</property>
</widget>
<widget class="TQPushButton">
<property name="name">
<cstring>nextButton</cstring>
</property>
<property name="text">
<string>Next &gt;</string>
</property>
<property name="default">
<bool>true</bool>
</property>
</widget>
<widget class="TQPushButton">
<property name="name">
<cstring>cancelButton</cstring>
</property>
<property name="text">
<string>Cancel</string>
</property>
</widget>
</hbox>
</widget>
</vbox>
</widget>
<connections>
<connection>
<sender>nextButton</sender>
<signal>clicked()</signal>
<receiver>WizardBase</receiver>
<slot>nextPressed()</slot>
</connection>
<connection>
<sender>cancelButton</sender>
<signal>clicked()</signal>
<receiver>WizardBase</receiver>
<slot>cancelPressed()</slot>
</connection>
<connection>
<sender>componentList</sender>
<signal>selectionChanged(TQListViewItem*)</signal>
<receiver>WizardBase</receiver>
<slot>componentSelected(TQListViewItem*)</slot>
</connection>
<connection>
<sender>logButton</sender>
<signal>clicked()</signal>
<receiver>WizardBase</receiver>
<slot>logPressed()</slot>
</connection>
<connection>
<sender>logButton2</sender>
<signal>clicked()</signal>
<receiver>WizardBase</receiver>
<slot>logPressed()</slot>
</connection>
<connection>
<sender>previousButton</sender>
<signal>clicked()</signal>
<receiver>WizardBase</receiver>
<slot>previousPressed()</slot>
</connection>
</connections>
<tabstops>
<tabstop>componentList</tabstop>
<tabstop>componentInfo</tabstop>
<tabstop>logButton</tabstop>
<tabstop>previousButton</tabstop>
<tabstop>nextButton</tabstop>
<tabstop>cancelButton</tabstop>
</tabstops>
<includes>
<include location="local" impldecl="in implementation">wizardbase.ui.h</include>
<include location="global" impldecl="in implementation">ntqwidgetstack.h</include>
</includes>
<slots>
<slot>setAppName( TQString n )</slot>
<slot>nextPressed()</slot>
<slot>previousPressed()</slot>
<slot>cancelPressed()</slot>
<slot>browsePressed()</slot>
<slot>runPressed()</slot>
<slot>logPressed()</slot>
<slot>componentSelected( TQListViewItem * item )</slot>
</slots>
<layoutdefaults spacing="6" margin="11"/>
</UI>

@ -1,58 +0,0 @@
#include "data.h"
void WizardBase::setAppName( TQString n )
{
TQPixmap tmp;
tmp.convertFromImage(qembed_findImage("packageIcon"));
appIcon->setPixmap(tmp);
tmp.convertFromImage(qembed_findImage("splash"));
splash->setPixmap(tmp);
setCaption("Installing "+n);
titleLabel->setText("<b>Installing "+n+"</b>");
appNameLabel->setText("<b>"+n+"</b>");
shortcutBox->setText("Place a shortcut to "+n+" on the desktop");
}
void WizardBase::nextPressed()
{
}
void WizardBase::previousPressed()
{
}
void WizardBase::cancelPressed()
{
}
void WizardBase::browsePressed()
{
}
void WizardBase::runPressed()
{
}
void WizardBase::logPressed()
{
}
void WizardBase::componentSelected( TQListViewItem * item )
{
}
Loading…
Cancel
Save