2017-03-10 18:34:56 +00:00
|
|
|
using Dino.Entities;
|
|
|
|
using Dino.Ui;
|
|
|
|
|
2017-04-07 09:09:47 +00:00
|
|
|
extern const string GETTEXT_PACKAGE;
|
|
|
|
extern const string LOCALE_INSTALL_DIR;
|
|
|
|
|
2017-03-10 18:34:56 +00:00
|
|
|
namespace Dino {
|
|
|
|
|
|
|
|
void main(string[] args) {
|
2017-04-07 09:09:47 +00:00
|
|
|
|
2017-03-12 12:19:04 +00:00
|
|
|
try{
|
2017-03-12 13:42:04 +00:00
|
|
|
string? exec_path = args.length > 0 ? args[0] : null;
|
2017-04-07 09:09:47 +00:00
|
|
|
SearchPathGenerator search_path_generator = new SearchPathGenerator(exec_path);
|
|
|
|
Intl.textdomain(GETTEXT_PACKAGE);
|
|
|
|
internationalize(GETTEXT_PACKAGE, search_path_generator.get_locale_path(GETTEXT_PACKAGE, LOCALE_INSTALL_DIR));
|
|
|
|
|
2017-03-12 12:19:04 +00:00
|
|
|
Gtk.init(ref args);
|
2017-04-07 09:09:47 +00:00
|
|
|
Dino.Ui.Application app = new Dino.Ui.Application() { search_path_generator=search_path_generator };
|
2017-08-29 19:47:53 +00:00
|
|
|
Plugins.Loader loader = new Plugins.Loader(app);
|
|
|
|
loader.loadAll();
|
2017-03-23 16:10:45 +00:00
|
|
|
|
2017-03-12 12:19:04 +00:00
|
|
|
app.run(args);
|
|
|
|
loader.shutdown();
|
|
|
|
} catch (Error e) {
|
|
|
|
print(@"Fatal error: $(e.message)\n");
|
2017-03-10 18:34:56 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-06-16 12:29:02 +00:00
|
|
|
}
|