| 1 |
/**************************************************************************************** |
| 2 |
* Copyright (c) 2002 Mark Kretschmann <kretschmann@kde.org> * |
| 3 |
* * |
| 4 |
* This program is free software; you can redistribute it and/or modify it under * |
| 5 |
* the terms of the GNU General Public License as published by the Free Software * |
| 6 |
* Foundation; either version 2 of the License, or (at your option) any later * |
| 7 |
* version. * |
| 8 |
* * |
| 9 |
* This program is distributed in the hope that it will be useful, but WITHOUT ANY * |
| 10 |
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A * |
| 11 |
* PARTICULAR PURPOSE. See the GNU General Public License for more details. * |
| 12 |
* * |
| 13 |
* You should have received a copy of the GNU General Public License along with * |
| 14 |
* this program. If not, see <http://www.gnu.org/licenses/>. * |
| 15 |
****************************************************************************************/ |
| 16 |
|
| 17 |
#include "core/support/Amarok.h" |
| 18 |
#include "App.h" |
| 19 |
#include "aboutdialog/OcsData.h" |
| 20 |
|
| 21 |
#include <KAboutData> |
| 22 |
#include <KCmdLineArgs> |
| 23 |
#include <KDebug> |
| 24 |
|
| 25 |
//#define AMAROK_USE_DRKONQI |
| 26 |
|
| 27 |
extern AMAROK_EXPORT class KAboutData aboutData; //defined in App.cpp |
| 28 |
extern AMAROK_EXPORT class OcsData ocsData; |
| 29 |
|
| 30 |
|
| 31 |
int main( int argc, char *argv[] ) |
| 32 |
{ |
| 33 |
|
| 34 |
//Authors |
| 35 |
aboutData.addAuthor( ki18n("Alejandro Wainzinger"), |
| 36 |
ki18n("Developer (xevix)"), "aikawarazuni@gmail.com", "http://awainzin-foss.blogspot.com" ); |
| 37 |
aboutData.addAuthor( ki18n("Bart 'Where are my toothpicks' Cerneels"), |
| 38 |
ki18n("Developer (Stecchino)"), "bart.cerneels@kde.org", "http://commonideas.blogspot.com" ); |
| 39 |
aboutData.addAuthor( ki18n("Dan 'Hey, it compiled...' Meltzer"), |
| 40 |
ki18n("Developer (hydrogen)"), "parallelgrapefruit@gmail.com" ); |
| 41 |
aboutData.addAuthor( ki18n("Ian 'The Beard' Monroe"), |
| 42 |
ki18n("Developer (eean)"), "ian@monroe.nu", "http://www.monroe.nu/" ); |
| 43 |
aboutData.addAuthor( ki18n("Jeff 'IROKSOHARD' Mitchell"), |
| 44 |
ki18n("Developer (jefferai)"), "mitchell@kde.org", "http://amarok.kde.org/blog/categories/13-jefferai" ); |
| 45 |
aboutData.addAuthor( ki18n("Leo Franchi"), |
| 46 |
ki18n("Developer (lfranchi)"), "lfranchi@kde.org" ); |
| 47 |
aboutData.addAuthor( ki18n("Lydia 'is wrong(TM)' Pintscher"), |
| 48 |
ki18n("Release Vixen (Nightrose)"), "lydia@kde.org" ); |
| 49 |
aboutData.addAuthor( ki18n("Mark 'It's good, but it's not irssi' Kretschmann" ), //krazy:exclude=contractions |
| 50 |
ki18n("Project founder (markey)"), "kretschmann@kde.org", "http://amarok.kde.org/blog/categories/1-markey" ); |
| 51 |
aboutData.addAuthor( ki18n("Maximilian Kossick"), |
| 52 |
ki18n("Developer (maxx_k)"), "maximilian.kossick@gmail.com" ); |
| 53 |
aboutData.addAuthor( ki18n("Nikolaj Hald 'Also very hot' Nielsen"), |
| 54 |
ki18n("Developer (nhn)"), "nhn@kde.org", "http://amarok.kde.org/blog/categories/18-freespirit" ); |
| 55 |
aboutData.addAuthor( ki18n("Seb 'Surfin' down under' Ruiz"), |
| 56 |
ki18n("Developer (sebr)"), "ruiz@kde.org", "http://www.sebruiz.net" ); |
| 57 |
aboutData.addAuthor( ki18n("Téo Mrnjavac"), |
| 58 |
ki18n("Developer (Teo`)"), "teo@kde.org", "http://teom.wordpress.com/" ); |
| 59 |
|
| 60 |
ocsData.addAuthor( "xevix", aboutData.authors().at( 0 ) ); |
| 61 |
ocsData.addAuthor( "Stecchino", aboutData.authors().at( 1 ) ); |
| 62 |
ocsData.addAuthor( QString(), aboutData.authors().at( 2 ) ); |
| 63 |
ocsData.addAuthor( "eean", aboutData.authors().at( 3 ) ); |
| 64 |
ocsData.addAuthor( "jefferai", aboutData.authors().at( 4 ) ); |
| 65 |
ocsData.addAuthor( "lfranchi", aboutData.authors().at( 5 ) ); |
| 66 |
ocsData.addAuthor( "nightrose", aboutData.authors().at( 6 ) ); |
| 67 |
ocsData.addAuthor( "MarkKretschmann", aboutData.authors().at( 7 ) ); |
| 68 |
ocsData.addAuthor( QString(), aboutData.authors().at( 8 ) ); |
| 69 |
ocsData.addAuthor( "nhnFreespirit", aboutData.authors().at( 9 ) ); |
| 70 |
ocsData.addAuthor( "seb", aboutData.authors().at( 10 ) ); |
| 71 |
ocsData.addAuthor( "teom", aboutData.authors().at( 11 ) ); |
| 72 |
|
| 73 |
//Contributors |
| 74 |
aboutData.addCredit( ki18n("Alex Merry"), ki18n("Developer, Replay Gain support"), "kde@randomguy3.me.uk" ); |
| 75 |
ocsData.addCredit( "randomguy3", aboutData.credits().last() ); |
| 76 |
aboutData.addCredit( ki18n("Casey Link"), ki18n("MP3tunes integration"), "unnamedrambler@gmail.com" ); |
| 77 |
ocsData.addCredit( "Ramblurr", aboutData.credits().last() ); |
| 78 |
aboutData.addCredit( ki18n("Casper van Donderen"), ki18n("Windows porting"), "casper.vandonderen@gmail.com" ); |
| 79 |
ocsData.addCredit( "cvandonderen", aboutData.credits().last() ); |
| 80 |
aboutData.addCredit( ki18n("Christie Harris"), ki18n("Rokymoter (dangle)"), "dangle.baby@gmail.com" ); |
| 81 |
ocsData.addCredit( "dangle", aboutData.credits().last() ); |
| 82 |
aboutData.addCredit( ki18n("Dan Leinir Turthra Jensen"), ki18n("Usability"), "admin@leinir.dk" ); |
| 83 |
ocsData.addCredit( "leinir", aboutData.credits().last() ); |
| 84 |
aboutData.addCredit( ki18n("Daniel Caleb Jones"), ki18n("Biased playlists"), "danielcjones@gmail.com" ); |
| 85 |
ocsData.addCredit( QString(), aboutData.credits().last() ); |
| 86 |
aboutData.addCredit( ki18n("Daniel Dewald"), ki18n("Tag Guesser, Labels"), "Daniel.Dewald@time-shift.de" ); |
| 87 |
ocsData.addCredit( QString(), aboutData.credits().last() ); |
| 88 |
aboutData.addCredit( ki18n("Daniel Winter"), ki18n("Nepomuk integration"), "dw@danielwinter.de" ); |
| 89 |
ocsData.addCredit( QString(), aboutData.credits().last() ); |
| 90 |
aboutData.addCredit( ki18n("Edward \"Hades\" Toroshchin"), ki18n("Developer"), "edward.hades@gmail.com" ); |
| 91 |
ocsData.addCredit( "hadeschief", aboutData.credits().last() ); |
| 92 |
aboutData.addCredit( ki18n("Frank Meerkötter"), ki18n("Podcast improvements"), |
| 93 |
"frank@meerkoetter.org" ); |
| 94 |
ocsData.addCredit( QString(), aboutData.credits().last() ); |
| 95 |
aboutData.addCredit( ki18n("Greg Meyer"), ki18n("Live CD, Bug squashing (oggb4mp3)"), "greg@gkmweb.com" ); |
| 96 |
ocsData.addCredit( "oggb4mp3", aboutData.credits().last() ); |
| 97 |
aboutData.addCredit( ki18n("Harald Sitter"), ki18n("Rokymoter (apachelogger)"), "harald.sitter@kdemail.net" ); |
| 98 |
ocsData.addCredit( "apachelogger", aboutData.credits().last() ); |
| 99 |
aboutData.addCredit( ki18n("John Atkinson"), ki18n(( "Assorted patches" )), "john@fauxnetic.co.uk" ); |
| 100 |
ocsData.addCredit( "fauxnetic", aboutData.credits().last() ); |
| 101 |
aboutData.addCredit( ki18n("Kenneth Wesley Wimer II"), ki18n("Icons"), "kwwii@bootsplash.org" ); |
| 102 |
ocsData.addCredit( "kwwii", aboutData.credits().last() ); |
| 103 |
aboutData.addCredit( ki18n("Kevin Funk"), ki18n("Developer, Website theme (KRF)"), "krf@electrostorm.net" ); |
| 104 |
ocsData.addCredit( "krf", aboutData.credits().last() ); |
| 105 |
aboutData.addCredit( ki18n("Kuba Serafinowski"), ki18n("Rokymoter"), "zizzfizzix@gmail.com" ); |
| 106 |
ocsData.addCredit( "zizzfizzix", aboutData.credits().last() ); |
| 107 |
aboutData.addCredit( ki18n("Lee Olson"), ki18n("Artwork"), "leetolson@gmail.com" ); |
| 108 |
ocsData.addCredit( QString(), aboutData.credits().last() ); |
| 109 |
aboutData.addCredit( ki18n("Ljubomir Simin"), ki18n("Rokymoter (ljubomir)"), "ljubomir.simin@gmail.com" ); |
| 110 |
ocsData.addCredit( "ljubomir", aboutData.credits().last() ); |
| 111 |
aboutData.addCredit( ki18n("Mathias Panzenböck"), ki18n("Podcast improvements"), "grosser.meister.morti@gmx.net" ); |
| 112 |
ocsData.addCredit( "panzi", aboutData.credits().last() ); |
| 113 |
aboutData.addCredit( ki18n("Max Howell"), ki18n("Developer, Vision"), "max.howell@methylblue.com" ); |
| 114 |
ocsData.addCredit( QString(), aboutData.credits().last() ); |
| 115 |
aboutData.addCredit( ki18n("Mikko Caldara"), ki18n("Bug triaging and sanitizing"), "mikko.cal@gmail.com" ); |
| 116 |
ocsData.addCredit( QString(), aboutData.credits().last() ); |
| 117 |
aboutData.addCredit( ki18n("Myriam Schweingruber"), ki18n("Rokymoter, bug squashing (Mamarok)"), "myriam@kde.org" ); |
| 118 |
ocsData.addCredit( "Mamarok", aboutData.credits().last() ); |
| 119 |
aboutData.addCredit( ki18n("Nuno Pinheiro"), ki18n("Artwork"), "nuno@oxygen-icons.org" ); |
| 120 |
ocsData.addCredit( "nunopinheirokde", aboutData.credits().last() ); |
| 121 |
aboutData.addCredit( ki18n("Olivier Bédard"), ki18n("Website hosting"), "paleo@pwsp.net" ); |
| 122 |
ocsData.addCredit( QString(), aboutData.credits().last() ); |
| 123 |
aboutData.addCredit( ki18n("Pasi Lalinaho"), ki18n("Rokymoter (emunkki)"), "pasi@getamarok.com" ); |
| 124 |
ocsData.addCredit( QString(), aboutData.credits().last() ); |
| 125 |
aboutData.addCredit( ki18n("Peter Zhou Lei"), ki18n("Scripting interface"), "peterzhoulei@gmail.com" ); |
| 126 |
ocsData.addCredit( "peterzl", aboutData.credits().last() ); |
| 127 |
aboutData.addCredit( ki18n("Rick W. Chen"), ki18n("Cover fetcher"), "stuffcorpse@archlinux.us" ); |
| 128 |
ocsData.addCredit( "stuffcorpse", aboutData.credits().last() ); |
| 129 |
aboutData.addCredit( ki18n("Scott Wheeler"), ki18n("TagLib & ktrm code"), "wheeler@kde.org" ); |
| 130 |
ocsData.addCredit( "wheels", aboutData.credits().last() ); |
| 131 |
aboutData.addCredit( ki18n("Shane King"), ki18n("Patches & Windows porting (shakes)"), "kde@dontletsstart.com" ); |
| 132 |
ocsData.addCredit( QString(), aboutData.credits().last() ); |
| 133 |
aboutData.addCredit( ki18n("Simon Esneault"), ki18n("Photos & Videos applets, Context View"), "simon.esneault@gmail.com" ); |
| 134 |
ocsData.addCredit( "Takahani", aboutData.credits().last() ); |
| 135 |
aboutData.addCredit( ki18n("Soren Harward"), ki18n("Developer, Automated Playlist Generator"), "stharward@gmail.com" ); |
| 136 |
ocsData.addCredit( QString(), aboutData.credits().last() ); |
| 137 |
aboutData.addCredit( ki18n("Sven Krohlas"), ki18n("Rokymoter, Developer (sven423)"), "sven@asbest-online.de" ); |
| 138 |
ocsData.addCredit( "krohlas", aboutData.credits().last() ); |
| 139 |
aboutData.addCredit( ki18n("Thomas Lübking"), ki18n("Developer"), "thomas.luebking@web.de" ); |
| 140 |
ocsData.addCredit( "thomas12777", aboutData.credits().last() ); |
| 141 |
aboutData.addCredit( ki18n("Valentin Rouet"), ki18n("Developer"), "v.rouet@gmail.com" ); |
| 142 |
ocsData.addCredit( QString(), aboutData.credits().last() ); |
| 143 |
aboutData.addCredit( ki18n("Wade Olson"), ki18n("Splash screen artist"), "wade@corefunction.com" ); |
| 144 |
ocsData.addCredit( QString(), aboutData.credits().last() ); |
| 145 |
aboutData.addCredit( ki18n("William Viana Soares"), ki18n("Context view"), "vianasw@gmail.com" ); |
| 146 |
ocsData.addCredit( QString(), aboutData.credits().last() ); |
| 147 |
aboutData.addCredit( ki18n("Former contributors"), ki18n("People listed below have contributed to Amarok in the past. Thank you!"), "" ); |
| 148 |
ocsData.addCredit( "%%category%%", aboutData.credits().last() ); |
| 149 |
aboutData.addCredit( ki18n("Adam Pigg"), ki18n("Analyzers, patches, shoutcast"), "adam@piggz.co.uk" ); |
| 150 |
ocsData.addCredit( QString(), aboutData.credits().last() ); |
| 151 |
aboutData.addCredit( ki18n("Adeodato Simó"), ki18n("Patches"), "asp16@alu.ua.es" ); |
| 152 |
ocsData.addCredit( QString(), aboutData.credits().last() ); |
| 153 |
aboutData.addCredit( ki18n("Alexandre Oliveira"), ki18n("Developer"), "aleprj@gmail.com" ); |
| 154 |
ocsData.addCredit( QString(), aboutData.credits().last() ); |
| 155 |
aboutData.addCredit( ki18n("Andreas Mair"), ki18n("MySQL support"), "am_ml@linogate.com" ); |
| 156 |
ocsData.addCredit( QString(), aboutData.credits().last() ); |
| 157 |
aboutData.addCredit( ki18n("Andrew de Quincey"), ki18n("Postgresql support"), "adq_dvb@lidskialf.net" ); |
| 158 |
ocsData.addCredit( QString(), aboutData.credits().last() ); |
| 159 |
aboutData.addCredit( ki18n("Andrew Turner"), ki18n("Patches"), "andrewturner512@googlemail.com" ); |
| 160 |
ocsData.addCredit( QString(), aboutData.credits().last() ); |
| 161 |
aboutData.addCredit( ki18n("Andy Kelk"), ki18n("MTP and Rio Karma media devices, patches"), "andy@mopoke.co.uk" ); |
| 162 |
ocsData.addCredit( QString(), aboutData.credits().last() ); |
| 163 |
aboutData.addCredit( ki18n("Christian Muehlhaeuser"), ki18n("Developer"), "chris@chris.de" ); |
| 164 |
ocsData.addCredit( QString(), aboutData.credits().last() ); |
| 165 |
aboutData.addCredit( ki18n("Derek Nelson"), ki18n("Graphics, splash-screen"), "admrla@gmail.com" ); |
| 166 |
ocsData.addCredit( QString(), aboutData.credits().last() ); |
| 167 |
aboutData.addCredit( ki18n("Enrico Ros"), ki18n("Analyzers, Context Browser and systray eye-candy"), "eros.kde@email.it" ); |
| 168 |
ocsData.addCredit( QString(), aboutData.credits().last() ); |
| 169 |
aboutData.addCredit( ki18n("Frederik Holljen"), ki18n("Developer"), "fh@ez.no" ); |
| 170 |
ocsData.addCredit( QString(), aboutData.credits().last() ); |
| 171 |
aboutData.addCredit( ki18n("Gábor Lehel"), ki18n("Developer"), "illissius@gmail.com" ); |
| 172 |
ocsData.addCredit( QString(), aboutData.credits().last() ); |
| 173 |
aboutData.addCredit( ki18n("Gérard Dürrmeyer"), ki18n("Icons and image work"), "gerard@randomtree.com" ); |
| 174 |
ocsData.addCredit( QString(), aboutData.credits().last() ); |
| 175 |
aboutData.addCredit( ki18n("Giovanni Venturi"), ki18n("Dialog to filter the collection titles"), "giovanni@ksniffer.org" ); |
| 176 |
ocsData.addCredit( QString(), aboutData.credits().last() ); |
| 177 |
aboutData.addCredit( ki18n("Jarkko Lehti"), ki18n("Tester, IRC channel operator, whipping"), "grue@iki.fi" ); |
| 178 |
ocsData.addCredit( QString(), aboutData.credits().last() ); |
| 179 |
aboutData.addCredit( ki18n("Jocke Andersson"), ki18n("Rokymoter, bug fixer (Firetech)"), "ajocke@gmail.com" ); |
| 180 |
ocsData.addCredit( QString(), aboutData.credits().last() ); |
| 181 |
aboutData.addCredit( ki18n("Marco Gulino"), ki18n("Konqueror Sidebar, some DCOP methods"), "marco@kmobiletools.org" ); |
| 182 |
ocsData.addCredit( QString(), aboutData.credits().last() ); |
| 183 |
aboutData.addCredit( ki18n("Martin Aumueller"), ki18n("Developer"), "aumuell@reserv.at" ); |
| 184 |
ocsData.addCredit( QString(), aboutData.credits().last() ); |
| 185 |
aboutData.addCredit( ki18n("Melchior Franz"), ki18n("FHT routine, bugfixes"), "mfranz@kde.org" ); |
| 186 |
ocsData.addCredit( QString(), aboutData.credits().last() ); |
| 187 |
aboutData.addCredit( ki18n("Michael Pyne"), ki18n("K3b export code"), "michael.pyne@kdemail.net" ); |
| 188 |
ocsData.addCredit( QString(), aboutData.credits().last() ); |
| 189 |
aboutData.addCredit( ki18n("Mike Diehl"), ki18n("Developer"), "madpenguin8@yahoo.com" ); |
| 190 |
ocsData.addCredit( QString(), aboutData.credits().last() ); |
| 191 |
aboutData.addCredit( ki18n("Paul Cifarelli"), ki18n("Developer"), "paul@cifarelli.net" ); |
| 192 |
ocsData.addCredit( QString(), aboutData.credits().last() ); |
| 193 |
aboutData.addCredit( ki18n("Peter C. Ndikuwera"), ki18n("Bugfixes, PostgreSQL support"), "pndiku@gmail.com" ); |
| 194 |
ocsData.addCredit( QString(), aboutData.credits().last() ); |
| 195 |
aboutData.addCredit( ki18n("Pierpaolo Panfilo"), ki18n("Developer"), "pippo_dp@libero.it" ); |
| 196 |
ocsData.addCredit( QString(), aboutData.credits().last() ); |
| 197 |
aboutData.addCredit( ki18n("Reigo Reinmets"), ki18n("Wikipedia support, patches"), "xatax@hot.ee" ); |
| 198 |
ocsData.addCredit( QString(), aboutData.credits().last() ); |
| 199 |
aboutData.addCredit( ki18n("Roman Becker"), ki18n("Former Amarok logo, former splash screen, former icons"), "roman@formmorf.de" ); |
| 200 |
ocsData.addCredit( QString(), aboutData.credits().last() ); |
| 201 |
aboutData.addCredit( ki18n("Sami Nieminen"), ki18n("Audioscrobbler support"), "sami.nieminen@iki.fi" ); |
| 202 |
ocsData.addCredit( QString(), aboutData.credits().last() ); |
| 203 |
aboutData.addCredit( ki18n("Stanislav Karchebny"), ki18n("Developer"), "berkus@madfire.net" ); |
| 204 |
ocsData.addCredit( QString(), aboutData.credits().last() ); |
| 205 |
aboutData.addCredit( ki18n("Stefan Bogner"), ki18n("Loads of stuff"), "bochi@online.ms" ); |
| 206 |
ocsData.addCredit( QString(), aboutData.credits().last() ); |
| 207 |
|
| 208 |
KCmdLineArgs::reset(); |
| 209 |
KCmdLineArgs::init( argc, argv, &::aboutData ); //calls KCmdLineArgs::addStdCmdLineOptions() |
| 210 |
|
| 211 |
App::initCliArgs(); |
| 212 |
KUniqueApplication::addCmdLineOptions(); |
| 213 |
|
| 214 |
KCmdLineArgs* const args = KCmdLineArgs::parsedArgs(); |
| 215 |
|
| 216 |
KUniqueApplication::StartFlag startFlag; |
| 217 |
startFlag = args->isSet( "multipleinstances" ) ? KUniqueApplication::NonUniqueInstance : KUniqueApplication::StartFlag( 0 ); |
| 218 |
|
| 219 |
if( !KUniqueApplication::start( startFlag ) ) { |
| 220 |
QList<QByteArray> instanceOptions; |
| 221 |
instanceOptions << "previous" << "play" << "play-pause" << "stop" << "next" |
| 222 |
<< "append" << "queue" << "load"; |
| 223 |
|
| 224 |
// Check if an option for a running instance is set |
| 225 |
bool isSet = false; |
| 226 |
for( int i = 0; i < instanceOptions.size(); ++i ) |
| 227 |
if( args->isSet( instanceOptions[ i ] ) ) |
| 228 |
isSet = true; |
| 229 |
|
| 230 |
if ( !isSet ) |
| 231 |
fprintf( stderr, "Amarok is already running!\n" ); |
| 232 |
return 0; |
| 233 |
} |
| 234 |
|
| 235 |
App app; |
| 236 |
app.setUniqueInstance( startFlag == KUniqueApplication::NonUniqueInstance ); |
| 237 |
return app.exec(); |
| 238 |
} |