1 #include <boost/filesystem/operations.hpp>
2 using namespace boost::filesystem;
4 #include "py/python.hpp"
5 #include "qui/MussaWindow.hpp"
6 #include "alg/parse_options.hpp"
7 #include "mussa_exceptions.hpp"
11 #include <QApplication>
13 #include "qui/MussaWindow.hpp"
14 #include "alg/parse_options.hpp"
15 #include "mussa_exceptions.hpp"
17 int main(int argc, char **argv)
21 // if we're under unix and don't have a display, see if we can still run
23 opts.useGUI = getenv("DISPLAY") != 0;
24 if (opts.useGUI == false) {
25 std::clog << "DISPLAY not set, running in console mode only" << std::endl;
29 QApplication app(argc, argv, opts.useGUI);
30 Q_INIT_RESOURCE(icons);
32 initialize_mussa(opts, argc, argv);
34 if (opts.analysis == 0) {
40 if (opts.runAsPythonInterpeter) {
41 get_py().interpreter();
43 #endif /* USE_PYTHON */
45 MussaWindow win(opts.analysis);
50 } catch (mussa_error e) {
52 } catch (boost::filesystem::filesystem_error e) {
54 } catch( boost::python::error_already_set ) {
56 } catch (std::runtime_error e) {
59 qFatal("unrecognized exception");