diff options
Diffstat (limited to 'kdpkg-install')
-rw-r--r-- | kdpkg-install/Makefile.am | 32 | ||||
-rw-r--r-- | kdpkg-install/console.cpp | 88 | ||||
-rw-r--r-- | kdpkg-install/console.h | 56 | ||||
-rw-r--r-- | kdpkg-install/consoledialog.ui | 72 | ||||
-rw-r--r-- | kdpkg-install/icons/empty.png | bin | 0 -> 178 bytes | |||
-rw-r--r-- | kdpkg-install/icons/install.png | bin | 0 -> 1429 bytes | |||
-rw-r--r-- | kdpkg-install/icons/remove.png | bin | 0 -> 801 bytes | |||
-rw-r--r-- | kdpkg-install/icons/warning.png | bin | 0 -> 2310 bytes | |||
-rw-r--r-- | kdpkg-install/install.cpp | 392 | ||||
-rw-r--r-- | kdpkg-install/install.h | 66 | ||||
-rw-r--r-- | kdpkg-install/installdialog.ui | 449 | ||||
-rw-r--r-- | kdpkg-install/kdpkg-install.desktop | 13 | ||||
-rw-r--r-- | kdpkg-install/main.cpp | 83 | ||||
-rw-r--r-- | kdpkg-install/process.cpp | 63 | ||||
-rw-r--r-- | kdpkg-install/process.h | 37 | ||||
-rwxr-xr-x | kdpkg-install/sh/kdpkg-sh | 28 |
16 files changed, 1379 insertions, 0 deletions
diff --git a/kdpkg-install/Makefile.am b/kdpkg-install/Makefile.am new file mode 100644 index 0000000..c0ed3d9 --- /dev/null +++ b/kdpkg-install/Makefile.am @@ -0,0 +1,32 @@ +# set the include path for X, qt and KDE +AM_CPPFLAGS = $(all_includes) + +# these are the headers for your project +noinst_HEADERS = install.h console.h + +# let automoc handle all of the meta source files (moc) +METASOURCES = AUTO + +# the application source, library search path, and link libraries +kdpkg_install_SOURCES = main.cpp install.cpp installdialog.ui process.cpp console.cpp consoledialog.ui +kdpkg_install_LDFLAGS = $(KDE_RPATH) $(all_libraries) +kdpkg_install_LDADD = $(LIB_KDEUI) + + +# application +xdg_apps_DATA = kdpkg-install.desktop +bin_PROGRAMS = kdpkg-install + +sharedir = $(pkgdatadir) +install-data-local: + $(mkinstalldirs) $(DESTDIR)$(sharedir) + cp -aR $(srcdir)/icons $(DESTDIR)$(sharedir)/ + cp -aR $(srcdir)/sh $(DESTDIR)$(sharedir)/ + + + +# translation +messages: rc.cpp + $(EXTRACTRC) `find . -name \*.ui -o -name \*.rc` > rc.cpp + $(XGETTEXT) *.cpp -o $(podir)/kdpkg-install.pot + diff --git a/kdpkg-install/console.cpp b/kdpkg-install/console.cpp new file mode 100644 index 0000000..cc6f450 --- /dev/null +++ b/kdpkg-install/console.cpp @@ -0,0 +1,88 @@ +/*************************************************************************** + * Copyright (C) 2007 by Fabian Wuertz * + * [email protected] * + * * + * 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 <kgenericfactory.h> +#include <kpushbutton.h> +#include <qlistbox.h> +#include <qlineedit.h> +#include <qcombobox.h> +#include <qwidgetstack.h> +#include <qlistview.h> +#include <qtextedit.h> + +#include <qlabel.h> +#include <qpushbutton.h> + +#include "console.h" + +console::console(QWidget *parent, const QStrList &run, const char *name, const QStringList &) +: Widget(parent,name) +{ + //label->setText( name ); + loadKonsole(); + konsoleFrame->installEventFilter( this ); + + // run command + terminal()->startProgram( "/usr/share/kdpkg/sh/kdpkg-sh", run ); + connect( konsole, SIGNAL(destroyed()), this, SLOT( finish() ) ); + +} + + + + +//------------------------------------------------------------------------------ +//--- load console ------------------------------------------------------------- +//------------------------------------------------------------------------------ + +void console::loadKonsole() +{ + KLibFactory* factory = KLibLoader::self()->factory( "libsanekonsolepart" ); + if (!factory) + factory = KLibLoader::self()->factory( "libkonsolepart" ); + konsole = static_cast<KParts::Part*>( factory->create( konsoleFrame, "konsolepart", "QObject", "KParts::ReadOnlyPart" ) ); + terminal()->setAutoDestroy( true ); + terminal()->setAutoStartShell( false ); + konsole->widget()->setGeometry(0, 0, konsoleFrame->width(), konsoleFrame->height()); +} + +bool console::eventFilter( QObject *o, QEvent *e ) +{ + // This function makes the console emulator expanding + if ( e->type() == QEvent::Resize ) + { + QResizeEvent *re = dynamic_cast< QResizeEvent * >( e ); + if ( !re ) return false; + konsole->widget()->setGeometry( 0, 0, re->size().width(), re->size().height() ); + } + return false; +}; + +void console::finish() +{ + emit finished(true); +} + + + +#include "console.moc" + diff --git a/kdpkg-install/console.h b/kdpkg-install/console.h new file mode 100644 index 0000000..b2fd554 --- /dev/null +++ b/kdpkg-install/console.h @@ -0,0 +1,56 @@ +/*************************************************************************** + * Copyright (C) 2007 by Fabian Wuertz * + * [email protected] * + * * + * 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 _CONSOLE_H_ +#define _CONSOLE_H_ + +#include "consoledialog.h" + +#include <kde_terminal_interface.h> +#include <kparts/part.h> + +class console : public Widget +{ + Q_OBJECT + + public: + console(QWidget *parent = 0L, const QStrList &run = QStrList(), const char *name = 0L, const QStringList &foo = QStringList()); + // console + ExtTerminalInterface *terminal() + { + return static_cast<ExtTerminalInterface*>(konsole->qt_cast( "ExtTerminalInterface" ) ); + } + virtual bool eventFilter( QObject *o, QEvent *e ); + + public slots: + virtual void finish(); + + protected slots: + void loadKonsole(); + KParts::Part *konsole; + + signals: + void finished(bool); + +}; + +#endif + diff --git a/kdpkg-install/consoledialog.ui b/kdpkg-install/consoledialog.ui new file mode 100644 index 0000000..1d1fa24 --- /dev/null +++ b/kdpkg-install/consoledialog.ui @@ -0,0 +1,72 @@ +<!DOCTYPE UI><UI version="3.3" stdsetdef="1"> +<class>Widget</class> +<widget class="QWidget"> + <property name="name"> + <cstring>Widget</cstring> + </property> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>546</width> + <height>440</height> + </rect> + </property> + <property name="caption"> + <string>Widget</string> + </property> + <grid> + <property name="name"> + <cstring>unnamed</cstring> + </property> + <widget class="QFrame" row="0" column="0"> + <property name="name"> + <cstring>borderFrame</cstring> + </property> + <property name="frameShape"> + <enum>GroupBoxPanel</enum> + </property> + <property name="frameShadow"> + <enum>Plain</enum> + </property> + <property name="lineWidth"> + <number>2</number> + </property> + <property name="margin"> + <number>0</number> + </property> + <grid> + <property name="name"> + <cstring>unnamed</cstring> + </property> + <widget class="QFrame" row="0" column="0"> + <property name="name"> + <cstring>konsoleFrame</cstring> + </property> + <property name="sizePolicy"> + <sizepolicy> + <hsizetype>5</hsizetype> + <vsizetype>7</vsizetype> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="frameShape"> + <enum>NoFrame</enum> + </property> + <property name="frameShadow"> + <enum>Raised</enum> + </property> + <property name="lineWidth"> + <number>7</number> + </property> + </widget> + </grid> + </widget> + </grid> +</widget> +<slots> + <slot>button_clicked()</slot> +</slots> +<layoutdefaults spacing="2" margin="2"/> +</UI> diff --git a/kdpkg-install/icons/empty.png b/kdpkg-install/icons/empty.png Binary files differnew file mode 100644 index 0000000..fc97070 --- /dev/null +++ b/kdpkg-install/icons/empty.png diff --git a/kdpkg-install/icons/install.png b/kdpkg-install/icons/install.png Binary files differnew file mode 100644 index 0000000..347e2b6 --- /dev/null +++ b/kdpkg-install/icons/install.png diff --git a/kdpkg-install/icons/remove.png b/kdpkg-install/icons/remove.png Binary files differnew file mode 100644 index 0000000..2333ffa --- /dev/null +++ b/kdpkg-install/icons/remove.png diff --git a/kdpkg-install/icons/warning.png b/kdpkg-install/icons/warning.png Binary files differnew file mode 100644 index 0000000..1f05acb --- /dev/null +++ b/kdpkg-install/icons/warning.png diff --git a/kdpkg-install/install.cpp b/kdpkg-install/install.cpp new file mode 100644 index 0000000..2548c1b --- /dev/null +++ b/kdpkg-install/install.cpp @@ -0,0 +1,392 @@ +/* + * install.cpp + * + * Copyright (c) 2007 Fabian Wuertz + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * 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 <kgenericfactory.h> +#include <klocale.h> +#include <kurlrequester.h> +#include <kaboutapplication.h> + +#include <qlistbox.h> +#include <qfile.h> +#include <qpushbutton.h> +#include <qwidgetstack.h> +#include <qlabel.h> +#include <qlistview.h> +#include <qregexp.h> +#include <qradiobutton.h> +#include <qfiledialog.h> + +#include <console.h> +#include <install.h> + +install::install( const QString &url, QWidget *parent, const char *name, const QStringList &) +:InstallDialog(parent, name) +{ + + + if( !url ) + path = QFileDialog::getOpenFileName( "", i18n("Debian Package (*.deb)"), this, i18n("open file dialog"), i18n("Choose a file to open") ); + else + path = url; + + this->shell = new Process(); + + this->shell->setCommand("dpkg -f "+path); + this->shell->start(true); + fields = QStringList::split( "\n", this->shell->getBuffer().stripWhiteSpace() ); + + installPushButton->hide(); + nextPushButton1->hide(); + + + + if( !checkArchitecture() ) + page2x1(); + else if( isLocked() ) + page2x2(); + + +} + +//----------------------------------------------------------------------------// +//--- next -------------------------------------------------------------------// +//----------------------------------------------------------------------------// + +void install::next1() +{ + if( !isLocked() ) + { + nextPushButton1->hide(); + nextPushButton2->show(); + widgetStack->raiseWidget(0); + } +} + + +void install::next2() +{ + nextPushButton2->hide(); + if( syncRadioButton->isChecked() ) + page3(); + else + page1(); +} + + + +//----------------------------------------------------------------------------// +//--- pages ------------------------------------------------------------------// +//----------------------------------------------------------------------------// + + +// page 0: skip apt-get update? +// page 1: dependencies +// page 2: warnings +// page 3: apt-get update +// page 4: install package + + +void install::page1() +{ + showDependencies(); + + widgetStack->raiseWidget(1); + installPushButton->show(); + closePushButton->show(); + titleTextLabel->setText( "<b>"+i18n( "The following packages will be installed, updated or removed:" )+"</b>" ); +} + +void install::page2x1() +{ + errorTextLabel->setText("<b>"+i18n("The architecture of the package and the system doesn't match! You will not be able to install this package!")+"</b>"); + nextPushButton2->hide(); + widgetStack->raiseWidget(2); + +} + +void install::page2x2() +{ + errorTextLabel->setText("<b>"+i18n("The package database is used by another process (E.g Synaptic)! Please terminate this process and press next.")+"</b>"); + nextPushButton1->show(); + nextPushButton2->hide(); + widgetStack->raiseWidget(2); +} + + +void install::page3() +{ + titleTextLabel->setText( "<b>"+i18n( "Resynchronization of the package index files.")+"</b>" ); + closePushButton->hide(); + + QStrList run; run.append( "/usr/share/kdpkg/sh/kdpkg-sh" ); + run.append( "update" ); + + QWidget *consoleWidget = new console(this, run ); + widgetStack->addWidget(consoleWidget, 3); + widgetStack->raiseWidget(3); + + connect( consoleWidget, SIGNAL( finished(bool) ), this, SLOT( page1() )); +} + + +void install::page4() +{ + installPushButton->hide(); + closePushButton->hide(); + titleTextLabel->setText( "<b>"+i18n( "Installation of the new package." )+"</b>" ); + + + if( !installPkg ) + installPkg = "none"; + if( !removePkg ) + removePkg = "none"; + + QStrList run; run.append( "/usr/share/kdpkg/sh/kdpkg-sh" ); + run.append( "install" ); + run.append( path ); + run.append( installPkg ); + run.append( removePkg ); + + QWidget *consoleWidget = new console(this, run ); + widgetStack->addWidget(consoleWidget, 4); + widgetStack->raiseWidget(4); + + connect( consoleWidget, SIGNAL( finished(bool) ), this, SLOT( close() )); + + +} + + +//----------------------------------------------------------------------------// +//--- showDependencies -------------------------------------------------------// +//----------------------------------------------------------------------------// + +void install::showDependencies() +{ + + // show packages which will be installed + + QString tmpString = fields.grep( QRegExp("^Depends:") )[0].mid(9); + tmpString += ", "+fields.grep( "Pre-Depends:" )[0].mid(13); + + + QStringList allDepends = QStringList::split( ", ", tmpString ); + + QString missingDepends; + QStringList tmp; + + for(uint i = 0; i < allDepends.count(); i++) + { + if( allDepends[i].contains("|") ) { + tmp = QStringList::split( " | ", allDepends[i] ); + uint j = 0; + bool exit = FALSE; + while ( !exit && j < tmp.count() ) { + if( isInstalled(tmp[j]) ) + exit = TRUE; + j++; + } + if( !exit ) + missingDepends += tmp[0]+" "; + } + else + { + if( !isInstalled( allDepends[i] ) ) + missingDepends += QStringList::split( " ", allDepends[i] )[0]+" "; + } + } + + + this->shell->setCommand("apt-get -s install "+missingDepends); + this->shell->start(true); + QStringList installList = QStringList::split( "\n", this->shell->getBuffer().stripWhiteSpace() ).grep("Inst"); + + + for(uint i = 0; i < installList.count(); i++) + { + QString name = QStringList::split( " ", installList[i] )[1]; + QString pkgVersion; + QString sysVersion; + if( installList[i].contains("[") ) + { + pkgVersion = QStringList::split( " ", installList[i] )[3].mid(1); + sysVersion = QStringList::split( " ", installList[i] )[2].mid(1).replace("]", ""); + } + else + pkgVersion = QStringList::split( " ", installList[i] )[2].mid(1); + + QListViewItem * item = new QListViewItem( dependenciesListView, 0 ); + item->setPixmap( 0, QPixmap( "/usr/share/kdpkg/icons/install.png") ); + item->setText( 1, name ); + item->setText( 2, pkgVersion ); + item->setText( 3, sysVersion ); + + installPkg += name+","; + } + + // find rconflicts + + QString pkgName = fields.grep("Package:")[0].mid(9); + QString pkgVersion = fields.grep("Version:")[0].mid(9); + + QString rconflicts; + + this->shell->setCommand("cat /var/lib/dpkg/status | grep "+pkgName+" -B 16| grep Conflicts -B 16"); + this->shell->start(true); + QStringList input1 = QStringList::split( "\n\n", this->shell->getBuffer().stripWhiteSpace() ); + + for(uint i = 0; i < input1.count(); i++) + { + if( input1[i].contains(pkgName) ) + { + QStringList input2 = QStringList::split( "\n", input1[i] ); + QString name = QStringList::split( " ", input2.grep("Package:")[0] )[1]; + QString cVersion = input2.grep("Conflicts:")[0].mid(11); // conflictVersion + cVersion = QStringList::split( ",", cVersion ).grep(pkgName)[0]; + cVersion = QStringList::split( "(", cVersion )[1]; + cVersion = cVersion.replace(")", ""); + QString op = QStringList::split( " ", cVersion )[0]; + cVersion = QStringList::split( " ", cVersion )[1]; + + if( cVersion == "") + { + rconflicts += name+" "; + printf("1"); + } + else + { + printf("2"); + this->shell->setCommand("if dpkg --compare-versions "+pkgVersion+" \""+op+"\" "+cVersion+"; then echo \"TRUE\"; fi"); + this->shell->start(true); + if( this->shell->getBuffer().stripWhiteSpace() == "TRUE" ) + rconflicts += name+" "; + } + } + } + + + // show packages which will be removed + + QString conflicts = fields.grep( "Conflicts" )[0].mid(11); + conflicts = conflicts.replace( ",", "" ); + conflicts = conflicts+" "+rconflicts; + + this->shell->setCommand("apt-get -s remove "+conflicts); + this->shell->start(true); + QStringList removeList = QStringList::split( "\n", this->shell->getBuffer().stripWhiteSpace() ).grep("Remv"); + + + for(uint i = 0; i < removeList.count(); i++) + { + QString name = QStringList::split( " ", removeList[i] )[1]; + QString sysVersion = QStringList::split( " [", removeList[i] )[1].replace("]", ""); + + QListViewItem * item = new QListViewItem( dependenciesListView, 0 ); + item->setPixmap( 0, QPixmap( "/usr/share/kdpkg/icons/remove.png") ); + item->setText( 1, name ); + item->setText( 3, sysVersion ); + + removePkg += name+","; + } +} + +//----------------------------------------------------------------------------// +//--- isInstalled ------------------------------------------------------------// +//----------------------------------------------------------------------------// + +bool install::isInstalled(QString input) +{ + QString package = QStringList::split( " ", input )[0]; + QString version = QStringList::split( " (", input )[1].replace(")", ""); + + + this->shell->setCommand("apt-cache policy "+package); + this->shell->start(true); + QString sysVersion = QStringList::split( "\n", this->shell->getBuffer().stripWhiteSpace() )[1]; + sysVersion = QStringList::split( ":", sysVersion)[1].replace(" ",""); + + + if( sysVersion.contains("(") || sysVersion == "" ) + return FALSE; + else if( version != "" ) + { + QString op = QStringList::split( " ", version )[0]; + QString pkgVersion = QStringList::split( " ", version )[1]; + + this->shell->setCommand("if dpkg --compare-versions "+sysVersion+" \""+op+"\" "+pkgVersion+"; then echo \"TRUE\"; fi"); + this->shell->start(true); + if( this->shell->getBuffer().stripWhiteSpace() == "TRUE" ) + return TRUE; + else + return FALSE; + } + else + return TRUE; +} + +//----------------------------------------------------------------------------// +//--- about ------------------------------------------------------------------// +//----------------------------------------------------------------------------// + +void install::showAbout() +{ + KAboutApplication* about = new KAboutApplication ( this ); + about->show(); +} + +//----------------------------------------------------------------------------// +//--- checks -----------------------------------------------------------------// +//----------------------------------------------------------------------------// + +bool install::checkArchitecture() +{ + QString arch = fields.grep("Architecture:")[0].mid(14); + + if(arch == "all") + return TRUE; + + // get architecture + this->shell->setCommand("dpkg --print-architecture"); + this->shell->start(true); + + if( arch == this->shell->getBuffer().stripWhiteSpace() ) + return TRUE; + + return FALSE; + +} + + +bool install::isLocked() +{ + this->shell->setCommand("apt-get install -s" ); + this->shell->start(true); + if( this->shell->getBuffer().stripWhiteSpace().contains("...") ) + return FALSE; + else + return TRUE; +} + + + + + +#include "install.moc" diff --git a/kdpkg-install/install.h b/kdpkg-install/install.h new file mode 100644 index 0000000..96f1844 --- /dev/null +++ b/kdpkg-install/install.h @@ -0,0 +1,66 @@ +/* + * kdpg.h + * + * Copyright (c) 2007 Fabian Wuertz + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * 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 INSTALL_H_ +#define INSTALL_H_ + +#include <installdialog.h> + +#include <kde_terminal_interface.h> +#include <kparts/part.h> +#include <process.h> +#include <qprocess.h> + +class install : public InstallDialog +{ + Q_OBJECT + + public: + install(const QString &url = QString(), QWidget *parent = 0L, const char *name = 0L, const QStringList &foo = QStringList()); + QString installPkg; + QString removePkg; + QString path; + QStringList fields; + bool isInstalled(QString); + bool checkArchitecture(); + bool isLocked(); + + + + private: + Process* shell; + + + public slots: + virtual void showAbout(); + virtual void page1(); + virtual void page2x1(); + virtual void page2x2(); + virtual void page3(); + virtual void page4(); + virtual void showDependencies(); + virtual void next1(); + virtual void next2(); + + signals: + void exit(bool); + +}; + +#endif diff --git a/kdpkg-install/installdialog.ui b/kdpkg-install/installdialog.ui new file mode 100644 index 0000000..6b6b2d6 --- /dev/null +++ b/kdpkg-install/installdialog.ui @@ -0,0 +1,449 @@ +<!DOCTYPE UI><UI version="3.3" stdsetdef="1"> +<class>InstallDialog</class> +<author>Fabian Wuertz</author> +<widget class="QWidget"> + <property name="name"> + <cstring>InstallDialog</cstring> + </property> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>649</width> + <height>400</height> + </rect> + </property> + <property name="caption"> + <string>kdpkg-install</string> + </property> + <property name="icon"> + <pixmap>image0</pixmap> + </property> + <grid> + <property name="name"> + <cstring>unnamed</cstring> + </property> + <widget class="QPushButton" row="4" column="0"> + <property name="name"> + <cstring>aboutPushButton</cstring> + </property> + <property name="text"> + <string>a&bout</string> + </property> + <property name="accel"> + <string>Alt+B</string> + </property> + <property name="iconSet"> + <iconset>image1</iconset> + </property> + </widget> + <widget class="QPushButton" row="4" column="5"> + <property name="name"> + <cstring>closePushButton</cstring> + </property> + <property name="text"> + <string>cl&ose</string> + </property> + <property name="accel"> + <string>Alt+O</string> + </property> + <property name="iconSet"> + <iconset>image2</iconset> + </property> + </widget> + <widget class="QPushButton" row="4" column="4"> + <property name="name"> + <cstring>installPushButton</cstring> + </property> + <property name="text"> + <string>inst&all</string> + </property> + <property name="accel"> + <string>Alt+A</string> + </property> + </widget> + <widget class="Line" row="1" column="0" rowspan="1" colspan="6"> + <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="QFrame" row="0" column="0" rowspan="1" colspan="6"> + <property name="name"> + <cstring>frame</cstring> + </property> + <property name="frameShape"> + <enum>NoFrame</enum> + </property> + <property name="frameShadow"> + <enum>Raised</enum> + </property> + <grid> + <property name="name"> + <cstring>unnamed</cstring> + </property> + <widget class="QLabel" row="0" column="2"> + <property name="name"> + <cstring>titleTextLabel</cstring> + </property> + <property name="sizePolicy"> + <sizepolicy> + <hsizetype>7</hsizetype> + <vsizetype>5</vsizetype> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="text"> + <string><b>Package installation</b></string> + </property> + </widget> + <widget class="QLabel" row="0" column="0"> + <property name="name"> + <cstring>logoPixmapLabel</cstring> + </property> + <property name="sizePolicy"> + <sizepolicy> + <hsizetype>0</hsizetype> + <vsizetype>0</vsizetype> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="pixmap"> + <pixmap>image3</pixmap> + </property> + <property name="scaledContents"> + <bool>true</bool> + </property> + </widget> + <spacer row="0" column="1"> + <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>5</width> + <height>20</height> + </size> + </property> + </spacer> + </grid> + </widget> + <spacer row="4" column="1"> + <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>160</width> + <height>20</height> + </size> + </property> + </spacer> + <widget class="QWidgetStack" row="2" column="0" rowspan="1" colspan="6"> + <property name="name"> + <cstring>widgetStack</cstring> + </property> + <property name="sizePolicy"> + <sizepolicy> + <hsizetype>7</hsizetype> + <vsizetype>7</vsizetype> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <widget class="QWidget"> + <property name="name"> + <cstring>WStackPage</cstring> + </property> + <attribute name="id"> + <number>0</number> + </attribute> + <widget class="QButtonGroup"> + <property name="name"> + <cstring>syncGroup</cstring> + </property> + <property name="geometry"> + <rect> + <x>60</x> + <y>110</y> + <width>400</width> + <height>70</height> + </rect> + </property> + <property name="frameShape"> + <enum>NoFrame</enum> + </property> + <property name="title"> + <string></string> + </property> + <grid> + <property name="name"> + <cstring>unnamed</cstring> + </property> + <property name="margin"> + <number>6</number> + </property> + <widget class="QRadioButton" row="0" column="0"> + <property name="name"> + <cstring>syncRadioButton</cstring> + </property> + <property name="text"> + <string>Res&ynchronize the package index files (apt-get update)</string> + </property> + <property name="accel"> + <string>Alt+Y</string> + </property> + <property name="checked"> + <bool>true</bool> + </property> + </widget> + <widget class="QRadioButton" row="1" column="0"> + <property name="name"> + <cstring>skipRadioButton</cstring> + </property> + <property name="text"> + <string>Skip Resynchroni&zation</string> + </property> + <property name="accel"> + <string>Alt+Z</string> + </property> + </widget> + </grid> + </widget> + </widget> + <widget class="QWidget"> + <property name="name"> + <cstring>WStackPage</cstring> + </property> + <attribute name="id"> + <number>1</number> + </attribute> + <grid> + <property name="name"> + <cstring>unnamed</cstring> + </property> + <widget class="QListView" row="0" column="0"> + <column> + <property name="text"> + <string>Status</string> + </property> + <property name="clickable"> + <bool>true</bool> + </property> + <property name="resizable"> + <bool>true</bool> + </property> + </column> + <column> + <property name="text"> + <string>Name</string> + </property> + <property name="clickable"> + <bool>true</bool> + </property> + <property name="resizable"> + <bool>true</bool> + </property> + </column> + <column> + <property name="text"> + <string>Version</string> + </property> + <property name="clickable"> + <bool>true</bool> + </property> + <property name="resizable"> + <bool>true</bool> + </property> + </column> + <column> + <property name="text"> + <string>Version on System </string> + </property> + <property name="clickable"> + <bool>true</bool> + </property> + <property name="resizable"> + <bool>true</bool> + </property> + </column> + <property name="name"> + <cstring>dependenciesListView</cstring> + </property> + <property name="allColumnsShowFocus"> + <bool>true</bool> + </property> + <property name="resizeMode"> + <enum>LastColumn</enum> + </property> + </widget> + </grid> + </widget> + <widget class="QWidget"> + <property name="name"> + <cstring>WStackPage</cstring> + </property> + <attribute name="id"> + <number>2</number> + </attribute> + <widget class="QLabel"> + <property name="name"> + <cstring>errorPixmapLabel</cstring> + </property> + <property name="geometry"> + <rect> + <x>60</x> + <y>120</y> + <width>32</width> + <height>32</height> + </rect> + </property> + <property name="pixmap"> + <pixmap>image4</pixmap> + </property> + <property name="scaledContents"> + <bool>true</bool> + </property> + </widget> + <widget class="QLabel"> + <property name="name"> + <cstring>errorTextLabel</cstring> + </property> + <property name="geometry"> + <rect> + <x>110</x> + <y>110</y> + <width>440</width> + <height>50</height> + </rect> + </property> + <property name="text"> + <string></string> + </property> + <property name="alignment"> + <set>WordBreak|AlignVCenter</set> + </property> + </widget> + </widget> + </widget> + <widget class="Line" row="3" column="0" rowspan="1" colspan="6"> + <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="QPushButton" row="4" column="2"> + <property name="name"> + <cstring>nextPushButton1</cstring> + </property> + <property name="text"> + <string>ne&xt ></string> + </property> + <property name="accel"> + <string>Alt+X</string> + </property> + </widget> + <widget class="QPushButton" row="4" column="3"> + <property name="name"> + <cstring>nextPushButton2</cstring> + </property> + <property name="text"> + <string>ne&xt ></string> + </property> + <property name="accel"> + <string>Alt+X</string> + </property> + </widget> + </grid> +</widget> +<images> + <image name="image0"> + <data format="PNG" length="518">89504e470d0a1a0a0000000d49484452000000100000001008060000001ff3ff61000001cd49444154388d95923f68d3411cc53f179bc6067569b0b5580413b425524141c8100527c5a910a471118b94424a409bc1213a1504271d1c0b2a01753110224aa216cd521429a81483cda4a58aa61a53ffe497e6f79c5a43fa370fde70df3bdebd7bf790443dabaf3d171692dd038df3b5b862b038d93f6e7f9bb28bc983578b6374540a7d57aab37df9991b9c04b66c28507dde735956512ae764cf5f97aa0ff57beed85ba01370349e775007eb91abd7b1f7e869f41d9c2e8c7b3f30c1d493dc356041924d2324615d627bed4df71d7b3167ab5690aaaf24ebb164f54b15a3b9178c03ced53268015019ab54f8f8ac561bb2b7751d38b2b5bda71725d19f77980a74ee6670f61e6563ccc5461746d2ff85310668b1def3c1b9833dd32f0f59b7eecfe4078fffbcebacd07678849b3fa42f2b9eb022c81ca95f134c4787cf8e452211793c9e5340ebd285ebfe8224fedee65c669413803b93c9cc07028149a07d533d58de80564944a3d1f3f1785c3e9fef0ce0dab4403dd3e9f4e770389c073cebf6602da452a911bfdfbf2f180c0e1863da360c7135261289422c16fb04ec6cda0140369b1d2a954a5da15068d818e36eda8124bc5eef83783cfe15d8b5dca16604005f2010780a742c09fc034ec20a696fe072cb0000000049454e44ae426082</data> + </image> + <image name="image1"> + <data format="PNG" length="837">89504e470d0a1a0a0000000d49484452000000100000001008060000001ff3ff610000030c49444154388d75536b485301143ef7ee6e73d3e9dc74a29bade1ccd2a9a199b29569a541a1642c34a9e8fda4b22462503ffa6361694444f422821e28a596981ab64a5b4fcb9c216589545ad3b9e5dabc6e77bb3bfd3266da07e7dff77d9c73be7308448499509640e6302090f5c7e6457143c4429aa7bc66ac3d3e328d888853aa2c49bca36e7741bbe3de39fb50d375745a2dacd3f91b9f3c349af7e766183494800ae4538166d5d9aa4b67f6156d07d60bf0a903187e3408971793248f0f4bb234c93abd26b91a7f2700c0a6691d542e8cbc88952b1037cf42d7da5938b05289cdfa2578a7ae015f7ffe86ae1b27104b25885585787271dce5491d915f769bafea3c7de0d0fa5515d19d7739ecb01dda06c1d968e5747c75312d9e09c7a82c615ece16e9c4ba3ce9844828e6c0f8ec14ef8673a6cc3a8bb50b72d2f225f5b76a9f2322f6bd7d8717f585dea531ea53e912b92a70561d49143fca56d2be1205a26121de28d25e434420098745aad16a530000d81805b439b17ef4c71743a76d7020703fcf587fcdfd3edbcd719a05b00c8122c493974172f9144f9ec813b49c7743ba36d8f69d06ebfb37addd88be99a2edf790464b62eeb6d0300fa87d7c7170c4b092a27b1e3bb9dd7d14b45f06c98800821d7662c6c300007f949c726ead00502bc165eef1796a3ea692ed76cbb7eee1710b8485835444415a84b0e07f06aaacecd5d15132000070025780be091f0900f0f6fb58078844101ee483c284f0c2d2107e59a0303d2a4eb92b517376036d5e43375c01efaf1168be7aa9862b4e321188088bf83c59957e4e4f66182373fffc051f6273a121649eb1ff85a929c86a1166f0e882e5914c9a3a8ca14851103c152c183df660a0244857f2f26f4c7bd5c1e58e23cb183ca245dfd75eb48ebbb17fc48ebd958791de3817715732a24187b6a305de3df122c3a46eca1fec8c0f3d683c79680c03607d528fd85885d87a01dbca8b8777c4871e0cd410ff7e6396449e985f5a5c1e973ebf88e3676929b05edbbb87a3e6de1f0d4f4dafafbf6298c140fe34030080548220b842b1c28f2417dd63b62e3febf85f327f0068e5b17dc3fece020000000049454e44ae426082</data> + </image> + <image name="image2"> + <data format="PNG" length="752">89504e470d0a1a0a0000000d49484452000000100000001008060000001ff3ff61000002b749444154388da592cd4b546114c69ff7dc199db91fe9bd2329def1fa45ab89460ac145216db536228ab87227e2aa5acc3ada69b9cc4d5121f807f4074408228841a3086590cd4c313adef952e7833bf73d6d52296bd5591d1e38bff370ce239819ff5381bf893bb3b322bbba7a0b525e070010ed744c4d6d5d5f5ebeb44dfce9e09d61dc3775fda93538784defe90188709a4ec3ddd8d82b94cb0fef1e1fbffd27604dd71fd8b1d862dbcc8c109af61b982b151cbd7ac5dfb7b71fdd39397976a6d359f3de3086af3ace82393d2d9819b25804b5b6825a5b218b45b09430a7a6c455c759786f18c397002af0d81c1d2585084d7d7dd0c6c6e0efedc1fff205dad8189afafba110c1bc778f54211eff065837cd36351abd1deee800b259046331046c1beae424d48909046c1bc1580c329b45b8bd1daae3dc5e37cdb60b078d46af66db4485021400a74b4bf03219046c1b01db8697c9a09c4840c966217239689d9d8446a3f7fc8d0a50a7d353885c0e00208900212e0ec80c797000b82ed830409e0705a89f039a2ceb53fdebd73214e54acd34a12f2f2368dba8673200339abbba60bc7881f2f838b4c343d45db7dc64599fcee9cc8c2d5d7f5e8846f9b8bb9b0b6fde702d95e2a3a1213e1a1ae26a2ac5f9d7aff9d871b8108df296ae3f3f9b3bcfc147cb6a979ef7a13b14ea0c11a11689e08aeb0200ca9685503e8f9a94f856abfd10c1e0cd817cfee05290922d2d37aabeff362c84131102ea2fbd02c065469539155694fb374aa5e4a51c249349accecd6d17356da00a3cd9f7fdcfbbbecfbbbecffbbeffb90a3c71356de0e5cccccedadada4594138984585959692e954a61cff3542965989943ccdc6c022a005100aa00ea445423a24a2010a8eaba5e191919a90966463a9dc6e2e2226d6e6e522e97a34aa5a2341a0df27d5f00001171301894a150484622113f1e8fcbf9f979198fc7f11306f33f74f0ffac1c0000000049454e44ae426082</data> + </image> + <image name="image3"> + <data format="PNG" length="2322">89504e470d0a1a0a0000000d4948445200000020000000200806000000737a7af4000008d9494441545885c597cb935d5775c67f6b9f7deeabafbaafa4eec618193f4b18481cab1cc094143b3194ed5465901114c53fc004ff01649251c22424930c529925834ca8542038948bb862ac042c195b560bec58a80d92b125abbbd58ffb388fbdd75a19dc56cb7248d9b3acaa736ad73ea7ceface5edffaf6b7c5ddf9ff8c58bdf61d66ead4ed06599de0020e88802949959c85b21bd17a8247c70ddc1d2180402822d666667b63dabd845a0338ab9fba9f48c0cd9120040170b20cc8550302f11616619e793f398004c09058204581c40e2eb6188a709f7b7e048a2f8bf01652fca01c76d78a693b2518968c5006c40582cc3f7d5b8e8389f703983f337782c8c1bba6ac18fe15e01bb1d7bfbf80beba8117982a3965ac6dbf950c4c8b0d1139676affa1399fc6fd5587eab6041f2c81c84d600ef811e011737f2cc029444ef407dd2553a5498a25275ba2d72929e26172a34c6e5c234fb7c05aca7e6f65b8347cf2e89d479f2cfa1d020135bbe2ee67447841e025840b0209010982e82ffe86bd46bf1bca852792d7872dcdb05c03466e1a72ce5876b469994ec754930aad5a8a5e6471719962f10856089d5e41bf3fa08c86b813cc4896c18542040f05d9046d0d45deca4dfd1d11fe565ef8876fde79e2339f7c27ab43280945247423ad96e404cd6483e9f6bba4e936dd5e97de70406f61485ce8114470cbe4a62525a355a32c4a24f6984ca62c0c17500b54d3294d93c875c6bd2508ec8dab0b4590870458de3af3171bae4693121848084cb737a8db447f7195c5958f331c468a0e8865924ed1aa4255e9c4927e7f80c5925993d9dd9eb1b5b9cd3bef5ca35f76e99601114702143227f6d2a13efff2a30b2f16313c1e0b4110279ba1ba4f1255627f40374ed0f41ed38d29b3ad058a1808b14bd9efd3eb8e18ad1e62f3c62e97d637196fef30aba614aac4028e0c7b8063dee204dcc00041312d417001628ce059e78ccef9809d2146fadd25209255b1ac5893c85505931b0413b6b697583bb7465918837e870ec5fc374568537a1fd7edb6666f53c644f000b19080aad1aa925511209b31ecf5e90fba88383736c758de9785286005213a264219955e7f010f8e98803bf63e7515803027a21490936366f3aeb37d1d30553cb5f395f079a2a5d111a4239841d5dca0630e4540f6ffc7c4090ae699a42d6272203186d311a128228621029b3b35bbd3968faf0c512b000f0e842206b266da9c6934d3a4865633adc37079994ed961b2372661d49aa935d36aa6b14456c7b3216ab882ab616a8805dc84f52b5bfcfa9d1d30f8af736ff3f6d55d621054159f0721884826a35951cf184ed3b49c3dfd53aebfbb41b240339be222986674ffcaa638895a1b9a9c48b921b70d668a04a5ae1bceac5da69ed65cfcf5065593f8cc0387c9b9a56912ae869b118388e446493993b3ee6f01c2f29125cebdf432b153305818d0d60dbe2fa50e14064ddd6206aa8e88133be00af5aca2ec96f4fbc24edbb2f5ee9407ef19311a7699ce12650c98b828108b50a09ae63c50c501d339d786bd92f1aca6d3e9913453027a20eb81ac1529658a9831849e169cffe57bacfdf21abfffd9bbe8c51ed7ae8e3157868392eb5b13ca5890b3e0dee22e84580469db4cca992627da9cc83951a784230c073daadc9273a2da7fdeb6892ab768abb4e6e8cd3656e5e87297c1a0cbea4a8f2a29fd4e0084b58bd7b974799bac1935c7cd0a57233a82b99154d17cab5f3f2c8a1c688a969005e9808812ca1edd5073efb10546c382a6aab8fb63cb24552eae6fd38b32efe26ca0f352460929a4dcce39a0faa18901d4a08c81a2165aaf8839d0ef7678e3d235ceacbdc71f7eee18556354c9a952cb83f72cb3b953b37ca44f9b336514cc4d3021164521661937c55cf9a0437b9f4db97d6c81c612969d1c154b0d3b9386ee20b057d52c6b973b8e765919f5f8d9eb57f9c46a8f632b0bcc1aa549829909085184d0b6f3fae7f4d14ae0181a9560014b999639071e3a3ee2f8271779feec15c49d632b0b5cb9ba433d53aea6c468a18b999182e37870878848d1b489dc2a593f22000737c3dd500a626168824995b9f8d636d534b3b53b63fdf22e9fbeff309fffec0ad36424dddf6b4c50352104a28496ac86ea470770334c4035a179dfc8b642b7079ffbbd155646032655c368d861dcb4983a6ef302a602cc2ce046b4267572caa4ac98da6f716dbf2514e8386e017548eae04eca0daba305c4606fd2f0bb771fc180bacab77ca840a98aa9158e1347a3a321371362885466380173473e04896bc472263746f07cc0d09b9d24800a98cf1727c87c930bee9033d574bca4b9a5f8d69ffdf98def7fef9f8fe3e9c18ee42246a30882bbe3ee6473cced039722cce727d32952ecbf8fcf51cc2986bb83d8bebbaf68a77b5cbbbecd8537ae5d3df3faf6b77f7076ef6571777ef8dcf3bc71fee507de5e3fffc46cebcd3f19f5a68faf2ecae26834a0d3eb40e8923398cfcf09002104d4e0fac60665511cac8cecdf028a6acd6c326373a7657b12d7bd77ecb995bb1f7ef681071ffec9c93f786ce7c48987e67e203533da7a76e9afffee9f2efdea57effefd4b3f397ddfcfcffdf8d4c5f5f37f5ce6f79e58399c579697faf47b0b48d9c12ca26e7832cc8c1ce6c62278a26e678cf7666cef287bba74a173f8d3cf1d3f71f2477f7af2899f7dfed1476f1c3ad4e3afbefd97a47a06dc3424a6686e01a8a67bfeb5af7f759daf7f757d736bfa8fafbcfcd2b157ce9e7e74edcdb34fdbf8d29747fde95d771c2d595a1a421c80cea8c75376c73336c745aa8b8fbdb672ec0b3f7ce8b13f7afed12f3e7ee1e1877f67bb08f0afdffb3e5535e1d0a11e49136a760b0066075b6dde0702508d77eca9a7bf74e5a9a7bf74a54d7cf7fc85d7577ffa9ffffec87f9f7bf1c9e9e55f3cdd0f97efdbd8a91ae9de75f6d8f12ffcdb535f7cf28553a71e7bf3de7bef1c03bcf8e3d35475c570d0a74d0d6afb526f37b9f2c1a319f343e7cd68737330ae67639bee5ebff6cc33cf3c0bcf3c7b61ede2e89557cf7ee2d0e2627df2d4c9dfdcb17ab40178f5b535eef13b1181dc26eca6c730e77fe9fc2d00e1d6ccad73e36d9a90b292f69d6edbb454b3dd9d54edecb4254c263bb07a14004d2d292b9db2c0f18395fdbffafa7f00e3aac411f2cc9ef10000000049454e44ae426082</data> + </image> + <image name="image4"> + <data format="PNG" length="1421">89504e470d0a1a0a0000000d4948445200000020000000200806000000737a7af400000554494441545885d5975d6c145514c77f776667f6b3ed6eb76cbb9b5d4a294a2d05317c2bd2184404da0a41242a51e189a0848444a306a244e39b823ef84222890f44239a182a1a1334f1a3044b7421e189ef60c1d0164adbfd9aeecef56166b74369a12d51e34dfe99b37b67cef9df73ffe7cc5c21a5e47f393a5ba8eb58c5744001c464fd28937928d9ca1eb7c2f980c6b98e55bc077826eb4b9de8039d2dd4690a5f856683b71acc1e9696697cf3eb357a80c244fd4d98b5ae7040f540f4710baa07d626f8082863120b9a1081642beb0434170317890434e67ff2084f035e26a88709111082bd9e6a082d99030b3b616127a12573f054c3ec10bb807240fb4708245bd923a036b6428169bb41895898b69bd80a05b742b47d396f02be89f81dd79e75b650e752385039074fd59a8d50fd22202de83174df1586ae9c46bb4e83cfc5f7c7bae9669c821c17819767b24ff3b228f14c19eaac0f39f6db55dadb3b3971e22cf9bc49e2fe87f1685f723369b8633ae14fcff11d90b359de1b813f5a794c15ec8d2c53285ffe2ad7f30b387a348910024551e8eaea21188e13991a42def805f9270d8d414e7ddbc559207f37ff77dd2b45b0570f4164f50ca85c47363b08809412d33401e8ebeb83ca754456d7a387606115bbb104e9ba2702c956360b7830da22a0e6155075745d22a52c11304d937058075587e856a22d02afcacc83cb7809ab2cef1863ccc9536d0415c107fe7a285fb20c02f3802c55551aaa2ac9e7f325c4e33e200d8179942f5a80bf1e1a2b78a32d4182bb94e598044cc9db4030febc0fa6bc00420259204b6d6d198661601806c1a086db3d0464401420b289f8733a8aa06c5b03af037eeea0b5510974b650a708765435833e6d25e80920650521432ca691cd66c9e572c4629a3d970206c01d45af7d94aa668879d9b4bd8126c0cd181d725402bac201d50b91b630543ce10890020649241432990ce9749a1933742b30fd360620d44ca43580ea8567eb781f088c9585db0894fafd06506b9683ab6cd83103c020a1508e5048924aa5a8af978ef97ee006b8bca8358b886eb8fb7be2b6321182bd9e04849a6bc03f1fb83e0a579378bc40a160027d584daf000c010690077f23a1659df4fcd8cf6c935dc0d758cdc970c6bb252dc956f62882a7a66e05bdee49705562ed7bd64606480359eaea04b366b9f0fbb3a5adb1ae69cb163950153ce1cb0c7450b6268ee7e0057eb609c8db089c6a2388e0b3caa578aad64c05df5cdb598ea2f8acdf192085ae674609eeb407c0e5460ff630d49d45bb4ac3e53487cef4731347872ce5d594ec73f9a888ac17e0bbcf4e7daf0da7ddcb91239758b9f2248b17ffcefefde7c7b8b7cf82af86c87ad0fc94ed6ce41d4694a50a8e7edf06e54ba2a08547a43eed408a2d5bfea2b7378b61187474dc64ed5a93f2f2e1f9e16ca5413151bd06d230906768680a72f24817e78a5970012882b7f429106ed1400f003d36b7d1aa54924e0f924a99140a054cd344ca82bdad05c0b4e1b0dd3ae116851b3f99cc1d6227f083ad852135d9ca6645b023be1dbcd303a00ac7ca8bc2730a3043286470f8b0413e9f67fdfa21366ecc95c4793b72200c144da2474c32c7883557d37be8124960489c6ce362a089dae9ef025480706195ab13d2be9aa52c0cc31c6163af5ede0a6965e4fc2eb87e8aab0bda59085c7309a855fd903a0d4229a64d8028f60c67efb0ab47ca922d4b2977fe3f32f8f0fdaa1fdc0a51acafe83e57b6c0c71c675bff71106a1614b5145c3889388e70d249a408216e0984fdcabee5a3c8362f0cf20596c01401785e6be2a12a370f18262e534efe98359e71ba8f2b9f5fe4127003e81636133756afd6b88773de3887c4ead91920e7dce822997f6394942bfeebe3f9dfdeac06dfae15d7560000000049454e44ae426082</data> + </image> +</images> +<connections> + <connection> + <sender>closePushButton</sender> + <signal>clicked()</signal> + <receiver>InstallDialog</receiver> + <slot>close()</slot> + </connection> + <connection> + <sender>aboutPushButton</sender> + <signal>clicked()</signal> + <receiver>InstallDialog</receiver> + <slot>showAbout()</slot> + </connection> + <connection> + <sender>installPushButton</sender> + <signal>clicked()</signal> + <receiver>InstallDialog</receiver> + <slot>page4()</slot> + </connection> + <connection> + <sender>nextPushButton1</sender> + <signal>clicked()</signal> + <receiver>InstallDialog</receiver> + <slot>next1()</slot> + </connection> + <connection> + <sender>nextPushButton2</sender> + <signal>clicked()</signal> + <receiver>InstallDialog</receiver> + <slot>next2()</slot> + </connection> +</connections> +<includes> + <include location="local" impldecl="in implementation">kdialog.h</include> +</includes> +<slots> + <slot>showDependencies(const QString&)</slot> + <slot>showAbout()</slot> + <slot>page4()</slot> + <slot>next1()</slot> + <slot>next2()</slot> +</slots> +<layoutdefaults spacing="6" margin="6"/> +</UI> diff --git a/kdpkg-install/kdpkg-install.desktop b/kdpkg-install/kdpkg-install.desktop new file mode 100644 index 0000000..0f4c54f --- /dev/null +++ b/kdpkg-install/kdpkg-install.desktop @@ -0,0 +1,13 @@ +[Desktop Entry] +Encoding=UTF-8 +Icon=kdpkg +Type=Application +Exec=su-to-root -X -c "kdpkg-install %U" + +Name=kdpkg-install +Comment=Information about sidux +Comment[de]=Informationen über sidux + +MimeType=application/x-deb;application/x-debian-package; + +Categories=Qt;KDE;Utility diff --git a/kdpkg-install/main.cpp b/kdpkg-install/main.cpp new file mode 100644 index 0000000..45b23d8 --- /dev/null +++ b/kdpkg-install/main.cpp @@ -0,0 +1,83 @@ +/* + * main.cpp + * + * Copyright (c) 2007 Fabian Wuertz + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * 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 "install.h" + +#include <kapplication.h> +#include <kaboutdata.h> +#include <kcmdlineargs.h> +#include <klocale.h> + + +static KCmdLineOptions options[] = +{ + { "+[URL]", I18N_NOOP("Location to open"), 0 }, + KCmdLineLastOption +}; + + + + +int main(int argc, char **argv) +{ + // specify data for About dialog + KAboutData* about = new KAboutData("kdpkg-install", I18N_NOOP("kdpkg-install"), ""); + + about->setProgramLogo( QImage("/usr/share/icons/hicolor/32x32/apps/kdpkg.png") ); + about->setShortDescription( I18N_NOOP("Frontend for dpkg.") ); + about->setLicense(KAboutData::License_GPL_V2); + about->setHomepage("http://linux.wuertz.org"); + about->setBugAddress("[email protected]"); + about->setCopyrightStatement("(c) 2007 Fabian Würtz"); + + about->addAuthor("Fabian Würtz (xadras)", I18N_NOOP("Developer"), "[email protected]", "http://linux.wuertz.org/"); + + + + KCmdLineArgs::init(argc, argv, about); + KCmdLineArgs::addCmdLineOptions( options ); + + KApplication app; + install *mainWin = 0; + + if (!app.isRestored()) + { + // no session.. just start up normally + KCmdLineArgs *args = KCmdLineArgs::parsedArgs(); + + QString url; + + for(int i = 0; i < args->count(); i++) // Counting start at 0! + url = QString::fromLocal8Bit(args->arg(i)); + + //printf(url); + + mainWin = new install( url ); + app.setMainWidget( mainWin ); + //mainWin->getFile(url); + mainWin->show(); + + args->clear(); + } + + // mainWin has WDestructiveClose flag by default, so it will delete itself. + return app.exec(); +} + diff --git a/kdpkg-install/process.cpp b/kdpkg-install/process.cpp new file mode 100644 index 0000000..9c02a77 --- /dev/null +++ b/kdpkg-install/process.cpp @@ -0,0 +1,63 @@ +#include "process.h" + + + + + Process::Process() + { + _buffer = QString::null; + _process = new KProcess(); + + connect(_process, SIGNAL(receivedStdout(KProcess*, char*, int)), + this, SLOT(slotProcessOutput(KProcess*, char*, int))); + + } + + Process::~Process() + { + } + + void Process::setCommand(QString command) + { + // make clean + _process->clearArguments(); + _buffer = QString::null; + + *_process << "/bin/sh"; + *_process << "-c"; + *_process << command; + } + + + void Process::start(bool block) + { + if( block ) + _process->start(KProcess::Block, KProcess::Stdout); + else + _process->start(KProcess::DontCare, KProcess::Stdout); + } + + QString Process::getBuffer() + { + return _buffer; + } + + int Process::exitStatus() + { + return _process->exitStatus(); + } + + bool Process::normalExit() + { + return _process->normalExit(); + } + + void Process::slotProcessOutput(KProcess* process, char* buffer, int len) + { + if (process != _process) return; + + _buffer.append(QString::fromLocal8Bit(buffer, len)); + } + + + diff --git a/kdpkg-install/process.h b/kdpkg-install/process.h new file mode 100644 index 0000000..c2cbe8b --- /dev/null +++ b/kdpkg-install/process.h @@ -0,0 +1,37 @@ +#ifndef PROCESS_H +#define PROCESS_H + +#include <kprocess.h> +#include <iostream> +#include <fstream> + + + +class Process; + + + +class Process : public QObject { + Q_OBJECT + +public: + Process(); + ~Process(); + + QString getBuffer(); + int exitStatus(); + bool normalExit(); + void setCommand(QString command); + void start(bool block=true); + +protected: + KProcess* _process; + QString _buffer; + +protected slots: + void slotProcessOutput(KProcess* process, char* buffer, int buflen); +}; + + + +#endif diff --git a/kdpkg-install/sh/kdpkg-sh b/kdpkg-install/sh/kdpkg-sh new file mode 100755 index 0000000..e192a09 --- /dev/null +++ b/kdpkg-install/sh/kdpkg-sh @@ -0,0 +1,28 @@ +#!/bin/sh +# (C) Fabian Wuertz Feb 2008 + + +if [ "$1" == "update" ]; then + apt-get update + echo "" + echo "Done! Press enter to continuo." + read +fi + +if [ "$1" == "install" ]; then + if [ "$3" != "none" ]; then + installPackage=$(echo ${3//","/" "}) + apt-get install $installPackage + fi + if [ "$4" != "none" ]; then + removePackage=$(echo ${4//","/" "}) + apt-get remove $removePackage + fi + dpkg -i $2 + apt-get install -f + echo "" + echo "Done! Press enter to continuo." + read +fi + + |