2009-05-12 01:40:57 +02:00
/*
2013-03-06 03:40:18 +01:00
* Copyright 2008 Aaron Seigo < aseigo @ kde . org >
* Copyright 2013 Sebastian Kügler < sebas @ kde . org >
2009-05-12 01:40:57 +02:00
*
* 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 ,
* 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 Library General Public
* License along with this program ; if not , write to the
* Free Software Foundation , Inc . ,
* 51 Franklin Street , Fifth Floor , Boston , MA 02110 - 1301 , USA .
*/
2013-03-06 03:40:18 +01:00
# include <KCmdLineArgs>
# include <KLocalizedString>
2013-02-13 01:38:57 +01:00
# include "plasmapkg.h"
2009-05-12 01:40:57 +02:00
int main ( int argc , char * * argv )
{
2013-03-05 15:54:42 +01:00
KLocalizedString description = ki18n ( " Plasma Package Manager " ) ;
2013-02-13 01:38:57 +01:00
2013-03-06 03:40:18 +01:00
const char version [ ] = " 2.0 " ;
2009-05-12 01:40:57 +02:00
2013-03-05 15:54:42 +01:00
KCmdLineArgs : : init ( argc , argv , " plasmapkg " , " plasmapkg " , ki18n ( " Plasma Package Manager " ) , version , description ) ;
2009-05-12 01:40:57 +02:00
KCmdLineOptions options ;
2011-11-09 12:56:49 +01:00
options . add ( " h " ) ;
2013-03-05 15:54:42 +01:00
options . add ( " hash <path> " , ki18nc ( " Do not translate <path> " , " Generate a SHA1 hash for the package at <path> " ) ) ;
2009-05-12 01:40:57 +02:00
options . add ( " g " ) ;
2013-03-05 15:54:42 +01:00
options . add ( " global " , ki18n ( " For install or remove, operates on packages installed for all users. " ) ) ;
2009-05-12 01:40:57 +02:00
options . add ( " t " ) ;
options . add ( " type <type> " ,
2013-03-05 15:54:42 +01:00
ki18nc ( " theme, wallpaper, etc. are keywords, but they may be translated, as both versions "
2009-05-12 01:40:57 +02:00
" are recognized by the application "
" (if translated, should be same as messages with 'package type' context below) " ,
2010-04-28 01:30:40 +02:00
" The type of package, e.g. theme, wallpaper, plasmoid, dataengine, runner, layout-template, etc. " ) ,
2009-05-12 01:40:57 +02:00
" plasmoid " ) ;
2013-02-13 01:38:57 +01:00
//options.add("s");
2009-05-12 01:40:57 +02:00
options . add ( " i " ) ;
2013-03-05 15:54:42 +01:00
options . add ( " install <path> " , ki18nc ( " Do not translate <path> " , " Install the package at <path> " ) ) ;
2013-02-13 01:38:57 +01:00
options . add ( " s " ) ;
2013-03-05 15:54:42 +01:00
options . add ( " show <name> " , ki18nc ( " Do not translate <name> " , " Show information of package <name> " ) ) ;
2009-05-12 01:40:57 +02:00
options . add ( " u " ) ;
2013-03-05 15:54:42 +01:00
options . add ( " upgrade <path> " , ki18nc ( " Do not translate <path> " , " Upgrade the package at <path> " ) ) ;
2009-05-12 01:40:57 +02:00
options . add ( " l " ) ;
2013-03-05 15:54:42 +01:00
options . add ( " list " , ki18n ( " List installed packages " ) ) ;
options . add ( " list-types " , ki18n ( " lists all known Package types that can be installed " ) ) ;
2009-05-12 01:40:57 +02:00
options . add ( " r " ) ;
2013-03-05 15:54:42 +01:00
options . add ( " remove <name> " , ki18nc ( " Do not translate <name> " , " Remove the package named <name> " ) ) ;
2009-05-12 01:40:57 +02:00
options . add ( " p " ) ;
2013-03-05 15:54:42 +01:00
options . add ( " packageroot <path> " , ki18n ( " Absolute path to the package root. If not supplied, then the standard data directories for this KDE session will be searched instead. " ) ) ;
2009-05-12 01:40:57 +02:00
KCmdLineArgs : : addCmdLineOptions ( options ) ;
2013-02-13 01:38:57 +01:00
Plasma : : PlasmaPkg app ( argc , argv ) ;
return app . exec ( ) ;
2009-05-12 01:40:57 +02:00
}