//This file is part of AcetoneISO. Copyright 2006,2007,2008,2009  Fabrizio Di Marco and Marco Di Antonio (acetoneiso@gmail.com)
//
//    AcetoneISO2 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 3 of the License, or
//    (at your option) any later version.
//
//    AcetoneISO2 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 AcetoneISO2.  If not, see <http://www.gnu.org/licenses/>.
#include <QApplication>
#include "acetoneiso.h"
#include <QTranslator>
 
int main(int argc, char *argv[])
{
    QApplication app(argc, argv);

//const char *h = "--help"; 
QString clImage = argv[1];
if ( clImage.contains("--help") ) {
      printf ( "AcetoneISO2 2.devel Distribuited under GPL v.3.0 \nby Fabrizio Di Marco and Marco Di Antonio 2006-2007-2008 \nusage: \nacetoneiso2 [$path_to_imagefile_to_mount] --> mounts given image and opens it in default filemanager \nacetoneiso2           --> opens AcetoneISO2 GUI\nacetoneiso2 --help    --> shows this help\n\n " );
    }
else {
      //printf ( "Mounting %s\n", argv[1] );  
      //cmMount( argv[1] );
      QString locale = QLocale::system().name();
      QTranslator translator;
      translator.load(QString(":/locale/acetoneiso_") + locale);
      app.installTranslator(&translator);

      acetoneiso *dialog = new acetoneiso();
      dialog->show();
      return app.exec();
     }
}
