1 /* === S Y N F I G ========================================================= */
3 ** \brief Synfig Studio Entrypoint
5 ** $Id: main.cpp,v 1.2 2005/01/13 18:37:30 darco Exp $
8 ** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
10 ** This package is free software; you can redistribute it and/or
11 ** modify it under the terms of the GNU General Public License as
12 ** published by the Free Software Foundation; either version 2 of
13 ** the License, or (at your option) any later version.
15 ** This package is distributed in the hope that it will be useful,
16 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
17 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 ** General Public License for more details.
21 /* ========================================================================= */
23 /* === H E A D E R S ======================================================= */
39 /* === U S I N G =========================================================== */
43 using namespace synfig;
44 using namespace studio;
46 /* === M A C R O S ========================================================= */
48 /* === G L O B A L S ======================================================= */
50 /* === P R O C E D U R E S ================================================= */
52 /* === M E T H O D S ======================================================= */
54 /* === E N T R Y P O I N T ================================================= */
56 int main(int argc, char **argv)
59 SmartFILE file(IPC::make_connection());
62 fprintf(file.get(),"F\n");
64 // Hey, another copy of us is open!
65 // don't bother opening us, just go ahead and
66 // tell the other copy to load it all up
69 for(;argc>=1;(argc)--)
70 if((argv)[argc] && (argv)[argc][0]!='-')
72 fprintf(file.get(),"O %s\n",etl::absolute_path((argv)[argc]).c_str());
76 fprintf(file.get(),"F\n");
84 studio::App app(&argc, &argv);
88 catch(synfig::SoftwareExpired)
90 cerr<<"FATAL: Software Expired"<<endl;
95 std::cerr<<"Application shutdown with errors ("<<ret<<')'<<std::endl;
100 std::cerr<<"Uncaught Exception:string: "<<str<<std::endl;
103 catch(std::exception x)
105 std::cerr<<"Standard Exception: "<<x.what()<<std::endl;
108 catch(Glib::Exception& x)
110 std::cerr<<"GLib Exception: "<<x.what()<<std::endl;
115 std::cerr<<"Uncaught Exception"<<std::endl;
119 std::cerr<<"Application appears to have terminated successfuly"<<std::endl;