1
/* This file is part of Apper
3
* Copyright (C) 2012 Matthias Klumpp <matthias@tenstral.net>
5
* This program is free software; you can redistribute it and/or modify
6
* it under the terms of the GNU General Public License as published by
7
* the Free Software Foundation; either version 2 of the License, or
8
* (at your option) any later version.
10
* This program is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU General Public License for more details.
15
* You should have received a copy of the GNU General Public License
16
* along with this program; see the file COPYING. If not, write to
17
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18
* Boston, MA 02110-1301, USA.
22
#include <KCmdLineArgs>
24
#include <KApplication>
25
#include <KMessageBox>
27
#include <glib-object.h>
28
#include <listaller.h>
30
#include "SetupWizard.h"
32
int main(int argc, char** argv)
34
KAboutData aboutData("appsetup-kde", 0, ki18n("KDE Application Installer"), "0.1",
35
ki18n("KDE Application Installer"), KAboutData::License_GPL,
36
ki18n("(C) 2012, Matthias Klumpp"));
38
aboutData.addAuthor(ki18nc("@info:credit", "Daniel Nicoletti"), ki18n("Developer"),
39
"dantti12@gmail.com");
40
aboutData.addAuthor(ki18nc("@info:credit", "Matthias Klumpp"), ki18n("Developer"),
41
"matthias@tenstral.net");
42
aboutData.setProductName("apper/listaller");
44
KCmdLineArgs::init(argc, argv, &aboutData);
45
// Add --verbose as commandline option
46
KCmdLineOptions options;
47
options.add("verbose", ki18n("Show verbose information"));
48
options.add("+file", ki18n("IPK package filename"));
49
KCmdLineArgs::addCmdLineOptions(options);
51
KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
53
// Set if we are in verbose mode
54
listaller_set_verbose_mode(args->isSet("verbose"));
55
listaller_add_log_domain("KDEAppSetup");
58
for(int i = 0; i < args->count(); i++) {
60
QFileInfo file(fname);
68
// Initialize GObject type system
73
// Check if we have a package
74
if (fname.isEmpty()) {
75
KMessageBox::sorry (0, i18n("Sorry, we didn't get an existing IPK package as parameter."),
76
i18n("Package not found!"));
80
// Create & run the setup wizard
81
SetupWizard *wizard = new SetupWizard(fname);