Rev 1221 | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
678 | werner | 1 | /******************************************************************************************** |
2 | ** iLand - an individual based forest landscape and disturbance model |
||
3 | ** http://iland.boku.ac.at |
||
4 | ** Copyright (C) 2009- Werner Rammer, Rupert Seidl |
||
5 | ** |
||
6 | ** This program is free software: you can redistribute it and/or modify |
||
7 | ** it under the terms of the GNU General Public License as published by |
||
8 | ** the Free Software Foundation, either version 3 of the License, or |
||
9 | ** (at your option) any later version. |
||
10 | ** |
||
11 | ** This program is distributed in the hope that it will be useful, |
||
12 | ** but WITHOUT ANY WARRANTY; without even the implied warranty of |
||
13 | ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||
14 | ** GNU General Public License for more details. |
||
15 | ** |
||
16 | ** You should have received a copy of the GNU General Public License |
||
17 | ** along with this program. If not, see <http://www.gnu.org/licenses/>. |
||
18 | ********************************************************************************************/ |
||
19 | |||
827 | werner | 20 | #include <QCoreApplication> |
678 | werner | 21 | #include <stdio.h> |
22 | #include <QDebug> |
||
23 | #include <QDateTime> |
||
24 | #include <QStringList> |
||
1182 | werner | 25 | #include "version.h" |
678 | werner | 26 | #include "exception.h" |
27 | #include <stdexcept> |
||
28 | #include <QTimer> |
||
679 | werner | 29 | #include <QString> |
678 | werner | 30 | |
31 | #include "consoleshell.h" |
||
32 | int main(int argc, char *argv[]) |
||
33 | { |
||
34 | QCoreApplication a(argc, argv); |
||
35 | |||
36 | printf("iLand console (%s - #%s)\n", currentVersion(), svnRevision()); |
||
760 | werner | 37 | printf("This is the console version of iLand, the individual based\nlandscape and disturbance forest model.\n"); |
678 | werner | 38 | printf("More at: http://iland.boku.ac.at \n"); |
993 | werner | 39 | printf("(c) Werner Rammer, Rupert Seidl, 2009-2015 \n"); |
827 | werner | 40 | printf("compiled: %s\n", compiler().toLocal8Bit().data()); |
678 | werner | 41 | printf("****************************************\n\n"); |
679 | werner | 42 | if (a.arguments().count()<3) { |
678 | werner | 43 | printf("Usage: \n"); |
679 | werner | 44 | printf("ilandc.exe <xml-project-file> <years> <...other options>\n"); |
837 | werner | 45 | printf("Options:\n"); |
46 | printf("you specify a number key=value pairs, and *after* loading of the project\n"); |
||
47 | printf("the 'key' settings are set to 'value'. E.g.: ilandc project.xml 100 output.stand.enabled=false output.stand.landscape=false\n"); |
||
993 | werner | 48 | printf("See also http://iland.boku.ac.at/iLand+console\n."); |
678 | werner | 49 | return 0; |
50 | } |
||
51 | ConsoleShell iland_shell; |
||
52 | |||
835 | werner | 53 | QTimer::singleShot(0, &iland_shell, SLOT(run())); |
759 | werner | 54 | //a.installEventFilter(&iland_shell); |
678 | werner | 55 | return a.exec(); |
56 | } |