From: Stefano Zacchiroli Date: Tue, 1 Feb 2005 18:24:28 +0000 (+0000) Subject: added (linked to matita) executable cicbrowser: when invoked it only shows X-Git-Tag: V_0_1_0~65 X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=commitdiff_plain;h=92b20571ab97c7d662304926c113fc42292b4435;p=helm.git added (linked to matita) executable cicbrowser: when invoked it only shows a cicBrowser window which can be used to browse the library --- diff --git a/helm/matita/Makefile.in b/helm/matita/Makefile.in index 6a2a88623..07fd7f338 100644 --- a/helm/matita/Makefile.in +++ b/helm/matita/Makefile.in @@ -41,21 +41,23 @@ CCMOS = \ LIB_DEPS = $(shell $(OCAMLFIND) query -recursive -predicates "byte" -format "%d/%a" $(REQUIRES)) -all: matita matitac +all: matita matitac cicbrowser ifeq ($(HAVE_OCAMLOPT),yes) CMXS = $(patsubst %.cmo,%.cmx,$(CMOS)) CCMXS = $(patsubst %.cmo,%.cmx,$(CCMOS)) LIBX_DEPS = $(shell $(OCAMLFIND) query -recursive -predicates "native" -format "%d/%a" $(REQUIRES)) -opt: matita.opt matitac.opt +opt: matita.opt matitac.opt cicbrowser.opt else opt: @echo "Native code compilation is disabled" endif matita: $(LIB_DEPS) $(CMOS) matita.ml + rm -f cicbrowser $(OCAMLC) $(PKGS) -linkpkg -o $@ $(CMOS) matita.ml matita.opt: $(LIBX_DEPS) $(CMXS) matita.ml + rm -f cicbrowser.opt $(OCAMLOPT) $(PKGS) -linkpkg -o $@ $(CMXS) matita.ml matitac: $(LIB_DEPS) $(CCMOS) matitac.ml @@ -63,6 +65,11 @@ matitac: $(LIB_DEPS) $(CCMOS) matitac.ml matitac.opt: $(LIBX_DEPS) $(CMXS) matitac.ml $(OCAMLOPT) $(CPKGS) -linkpkg -o $@ $(CCMXS) matitac.ml +cicbrowser: matita + test -f $@ || ln $< $@ +cicbrowser.opt: matita.opt + test -f $@ || ln $< $@ + matitaGeneratedGui.ml matitaGeneratedGui.mli: matita.glade $(LABLGLADECC) $< > matitaGeneratedGui.ml $(OCAMLC) $(PKGS) -i matitaGeneratedGui.ml > matitaGeneratedGui.mli @@ -76,7 +83,8 @@ matitaGeneratedGui.ml matitaGeneratedGui.mli: matita.glade clean: rm -rf *.cma *.cmo *.cmi *.cmx *.cmxa *.a *.o \ - matita matita.opt matitac matitac.opt + matita matita.opt matitac matitac.opt \ + cicbrowser cicbrowser.opt distclean: clean rm -f matitaGeneratedGui.ml matitaGeneratedGui.mli rm -f config.log config.status Makefile buildTimeConf.ml diff --git a/helm/matita/matita.glade b/helm/matita/matita.glade index d9e922f98..fd460dd24 100644 --- a/helm/matita/matita.glade +++ b/helm/matita/matita.glade @@ -4,7 +4,6 @@ - True Matita GTK_WINDOW_TOPLEVEL GTK_WIN_POS_NONE @@ -491,7 +490,6 @@ 155 450 - True Tactics GTK_WINDOW_TOPLEVEL GTK_WIN_POS_NONE diff --git a/helm/matita/matita.ml b/helm/matita/matita.ml index e8c030b61..6e57c2e8f 100644 --- a/helm/matita/matita.ml +++ b/helm/matita/matita.ml @@ -221,9 +221,17 @@ let _ = let _ = (* CicEnvironment.set_trust (fun _ -> false); *) +(* (try load_script Sys.argv.(1) with Invalid_argument _ -> ()); - gui#console#show (); +*) + if Pcre.pmatch ~pat:"cicbrowser$" Sys.argv.(0) then begin + ignore (MatitaMathView.cicBrowser ~disambiguator ~currentProof ()) + end else begin + gui#main#mainWin#show (); + gui#toolbar#toolBarWin#show (); + gui#console#show () + end; GtkThread.main ()