Subversion Repositories public iLand

Rev

Rev 1104 | Rev 1217 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

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