2 * Test the writer code...
7 int main (string[] args) {
14 var app = BuilderApplication.singleton( args);
16 if (BuilderApplication.opt_debug || BuilderApplication.opt_compile_project == null) {
17 GLib.Log.set_handler(null,
18 GLib.LogLevelFlags.LEVEL_DEBUG | GLib.LogLevelFlags.LEVEL_WARNING,
20 print("%s: %s\n", dom, msg);
24 if (BuilderApplication.opt_bjs_compile != null) {
26 //BuilderApplication.compileBjs();
27 print("compile BJS comming soon");
29 GLib.Process.exit(Posix.EXIT_SUCCESS);
31 if (BuilderApplication.opt_list_projects) {
33 //BuilderApplication.compileBjs();
34 Project.Project.loadAll();
35 print("Projects\n %s\n", Project.Project.listAllToString());
36 GLib.Process.exit(Posix.EXIT_SUCCESS);
38 Project.Project.loadAll();
40 if (BuilderApplication.opt_list_projects) {
42 //BuilderApplication.compileBjs();
44 print("Projects\n %s\n", Project.Project.listAllToString());
45 GLib.Process.exit(Posix.EXIT_SUCCESS);
47 var cur_project = null;
48 if (BuilderApplication.opt_compile_project != null) {
51 cur_project = Project.Project.getProjectByHash( BuilderApplication.opt_compile_project);
53 if (cur_project == null) {
54 GLib.error("invalid project %s, use --list-projects to show project ids");
61 if (BuilderApplication.opt_bjs_compile != null) {
63 //BuilderApplication.compileBjs();
64 print("compile BJS comming soon");
66 GLib.Process.exit(Posix.EXIT_SUCCESS);
70 if (BuilderApplication.opt_compile_target != null) {
72 Palete.ValaSourceCompiler.buildApplication();
74 GLib.Process.exit(Posix.EXIT_SUCCESS);
79 GLib.debug("project = %s\n", BuilderApplication.opt_compile_project);
83 GtkClutter.init (ref args);
84 new JsRender.Lang_Class();
85 GLib.Log.set_always_fatal(LogLevelFlags.LEVEL_ERROR | LogLevelFlags.LEVEL_CRITICAL);
89 // respond to other arguments
91 /*var proj = Project.Project.getProject("Pman.Core");
93 print("could not load test project Pman.Core");
99 var w = Xcls_MainWindow.singleton();
104 // it looks like showall after children causes segfault on ubuntu 14.4
106 w.windowstate.switchState(WindowState.State.FILES);