2 * Copyright (C) 2010 Red Hat Inc.
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License along
15 * with this program; if not, write to the Free Software Foundation, Inc.,
16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
27 let cli_request = Cmdline.command_line () in
29 (* If we're in verbose mode, print some debug information which
30 * could be useful in bug reports.
33 debug "%s %s" Config.package Config.version;
34 let v = fst (Libvirt.get_version ()) in
35 debug "libvirt %d.%d.%d"
36 (v / 1_000_000) ((v / 1_000) mod 1_000) (v mod 1_000);
37 let g = G.create () in
38 let v = G.version g in
39 debug "libguestfs %Ld.%Ld.%Ld%s"
40 v.G.major v.G.minor v.G.release v.G.extra;
44 let ds = Window.open_main_window () in
45 Slave.set_failure_hook (Window.failure ds);
46 Slave.set_busy_hook ds.Window.throbber_busy;
47 Slave.set_idle_hook ds.Window.throbber_idle;
49 (* What did the user request on the command line? *)
50 Window.run_cli_request ds cli_request;
52 (* Run the main display thread. When this returns, the application