23 #include <tools/worldinfo_viewer/worldinfo_viewer.h>
24 #include <tools/worldinfo_viewer/backend_thread.h>
25 #include <worldinfo_utils/data_container.h>
26 #include <utils/system/hostinfo.h>
27 #include <utils/time/clock.h>
28 #include <config/sqlite.h>
33 using namespace fawkes;
35 int main(
int argc,
char** argv)
50 addr = config->
get_string(
"/worldinfo/multicast_addr");
51 port = config->
get_uint(
"/worldinfo/udp_port");
52 key = config->
get_string(
"/worldinfo/encryption_key");
53 iv = config->
get_string(
"/worldinfo/encryption_iv");
58 e.
append(
"Could not get required configuration data for world info viewer");
69 key.c_str(), iv.c_str() );
71 backend_thread->
start();
75 Gtk::Main kit(argc, argv);
76 #ifdef GLIBMM_EXCEPTIONS_ENABLED
77 Glib::RefPtr<Gtk::Builder> builder =
78 Gtk::Builder::create_from_file( RESDIR
"/guis/worldinfo_viewer/"
79 "worldinfo_viewer.ui" );
81 std::auto_ptr<Gtk::BuilderError> error;
82 Glib::RefPtr<Gtk::Builder> builder =
83 Gtk::Builder::create_from_file(RESDIR
"/guis/worldinfo_viewer/worldinfo_viewer.ui", error);
92 kit.run( viewer.get_window() );
94 catch (std::exception
const& e)
96 std::cerr <<
"Error: " << e.what() << std::endl;
100 backend_thread->
join();
101 delete backend_thread;
103 delete data_container;