[ocaml] move the GCS-only related code out of xpprz lib

Most of the pprz.xlib is used by the legacy GCS only, using in
particular the deprecated canvans.
This PR is isolating the relevant part to the GCS folder, so it will be
easier in the future to avoid the compilation of this part by default.

Conditional compilation of the old GCS: test if glade is installed
to build supervision, logplotter and the (legacy) GCS.
This commit is contained in:
Gautier Hattenberger
2022-04-07 14:45:20 +02:00
committed by Fabien-B
parent cd546696ef
commit cf150db155
48 changed files with 222 additions and 809 deletions

1
.gitignore vendored
View File

@@ -129,7 +129,6 @@ Cargo.lock
/sw/lib/ocaml/expr_parser.mli
/sw/lib/ocaml/gtk_papget_led_editor.ml
/sw/lib/ocaml/expr_lexer.ml
/sw/lib/ocaml/META.pprz
# /sw/logalizer/
/sw/logalizer/logplotter

View File

@@ -157,10 +157,10 @@ cockpit: libpprz
cockpit.opt: libpprz
$(MAKE) -C $(COCKPIT) opt
tmtc: libpprz cockpit
tmtc: libpprz
$(MAKE) -C $(TMTC)
tmtc.opt: libpprz cockpit.opt
tmtc.opt: libpprz
$(MAKE) -C $(TMTC) opt
generators: libpprz

View File

@@ -1,4 +0,0 @@
<program command="sw/ground_segment/tmtc/settings" name="Settings">
<arg constant="@AIRCRAFT" flag="-ac" />
</program>

View File

@@ -26,67 +26,61 @@ Q=@
OCAMLCFLAGS=-thread -ccopt -fPIC
include ../../Makefile.ocaml
OCAMLPATH:=$(shell echo $(PAPARAZZI_SRC)/sw/ground_segment/cockpit/lib:$(OCAMLPATH))
export OCAMLPATH
INCLUDES=
LIBS=
LIBSX=$(LIBS:.cma=.cmxa)
INCLUDES=
PKG = -package pprzlink,pprz.xlib
LINKPKG = $(PKG) -linkpkg -dllpath-pkg pprz.xlib,pprzlink
PKG = -package pprzlink,gcslib
LINKPKG = $(PKG) -linkpkg -dllpath-pkg pprzlink,gcslib,pprz
LABLGTK2INIT = $(shell ocamlfind query -p-format lablgtk2.init 2>/dev/null)
ifeq ($(LABLGTK2INIT),)
LABLGTK2INIT = $(shell ocamlfind query -p-format lablgtk2.auto-init 2>/dev/null)
endif
LABLGTK2_VER := $(shell ocamlfind query -format '%v' lablgtk2)
# major.minor version
LABLGTK2_MM := $(shell echo $(LABLGTK2_VER) | cut -f1,2 -d.)
#LABLGTK2_NATIVE_WINDOW := $(shell echo '$(LABLGTK2_MM)>=2.18' | bc)
ifeq ($(shell echo '$(LABLGTK2_MM)>=2.18' | bc),1)
CAMLP4_DEFS = -DGDK_NATIVE_WINDOW
endif
# workaround wrong reported version of lablgtk in Debian/Ubuntu
# see https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=822949 and https://bugs.launchpad.net/ubuntu/+source/lablgtk2/+bug/1577236
# Ubuntu 16.04: 2.18.3+dfsg-1 Ubuntu 16.10: 2.18.3+dfsg-2
LABLGTK2_DEB := $(shell LC_ALL=C apt-cache policy liblablgtk2-ocaml | grep Installed | awk '{print $$2}' 2>/dev/null)
ifneq (,$(findstring 2.18, $(LABLGTK2_DEB)))
CAMLP4_DEFS = -DGDK_NATIVE_WINDOW
endif
CAMLP4_DEFS ?=
PP_OPTS = -pp "camlp4o pa_macro.cmo $(CAMLP4_DEFS)"
# which source files to run through camlp4
PP_SRC = gcs.ml
PP_CMO = $(PP_SRC:.ml=.cmo)
PP_CMX = $(PP_SRC:.ml=.cmx)
LABLGTK2GLADE = $(shell ocamlfind query -p-format lablgtk2.glade 2>/dev/null)
ML= gtk_setting_time.ml gtk_strip.ml horizon.ml strip.ml gtk_save_settings.ml saveSettings.ml page_settings.ml pages.ml speech.ml plugin.ml sectors.ml map2d.ml editFP.ml intruders.ml shapes.ml live.ml particules.ml papgets.ml gcs.ml
MAIN=gcs
CMO=$(ML:.ml=.cmo)
CMX=$(ML:.ml=.cmx)
# only compile it lablgtk2 is installed
ifeq ($(LABLGTK2INIT),)
all :
@echo Skipping legacy GCS build \(missing lablgtk2.init\)
opt :
@echo Skipping legacy GCS.opt build \(missing lablgtk2.init\)
else
ifeq ($(LABLGTK2GLADE),)
all :
@echo Skipping legacy GCS build \(missing lablgtk2.glade\)
opt :
@echo Skipping legacy GCS.opt build \(missing lablgtk2.glade\)
else
all : $(MAIN)
opt : $(MAIN).opt
$(MAIN) : $(CMO) $(LIBPPRZCMA) $(LIBPPRZLINKCMA) $(XLIBPPRZCMA)
endif
endif
gcslib :
$(Q)$(MAKE) -C lib
$(MAIN) : $(CMO) $(LIBPPRZCMA) $(LIBPPRZLINKCMA) $(XLIBPPRZCMA) gcslib
@echo OL $@
$(Q)$(OCAMLC) $(OCAMLCFLAGS) $(INCLUDES) $(LIBS) $(LINKPKG) $(CMO) -o $@
$(Q)$(OCAMLC) $(OCAMLCFLAGS) $(INCLUDES) $(LINKPKG) $(CMO) -o $@
$(MAIN).opt : $(CMX) $(LIBPPRZCMXA) $(LIBPPRZLINKCMXA) $(XLIBPPRZCMXA)
$(MAIN).opt : $(CMX) $(LIBPPRZCMXA) $(LIBPPRZLINKCMXA) $(XLIBPPRZCMXA) gcslib
@echo OOL $@
$(Q)$(OCAMLOPT) $(OCAMLCFLAGS) $(INCLUDES) $(LIBSX) -package pprz.xlib,$(LABLGTK2INIT) -linkpkg $(CMX) -o $@
# bit of a hack: only run some specifc files through caml4p
$(PP_CMO): $(PP_SRC)
@echo OC $<
$(Q)$(OCAMLC) $(OCAMLCFLAGS) $(INCLUDES) $(PP_OPTS) $(PKG) -c $<
$(PP_CMX): $(PP_SRC)
@echo OOC $<
$(Q)$(OCAMLOPT) $(OCAMLCFLAGS) $(INCLUDES) $(PP_OPTS) $(PKG) -c $<
$(Q)$(OCAMLOPT) $(OCAMLCFLAGS) $(INCLUDES) -package pprz.xlib,$(LABLGTK2INIT) -linkpkg $(CMX) -o $@
%.cmo: %.ml
@echo OC $<
@@ -122,6 +116,7 @@ compass : compass.ml
clean:
$(Q)rm -f *~* *.cm* *.o *.out *.opt map2d gcs .depend gtk_strip.ml gtk_setting_time.ml gtk_save_settings.ml compass ant_track ant_track_pmm ant_track_pmm_gtk3 actuators
$(MAKE) -C lib clean
.PHONY: all opt clean
@@ -147,8 +142,7 @@ actuators : actuators.c
.depend: Makefile
@echo DEPEND $@
$(Q)$(OCAMLDEP) -I $(LIBPPRZDIR) $(PP_OPTS) $(PP_SRC) > .depend
$(Q)$(OCAMLDEP) -I $(LIBPPRZDIR) $(filter-out $(PP_SRC), $(ML)) *.mli >> .depend
$(Q)$(OCAMLDEP) -I $(LIBPPRZDIR) -I lib $(ML) lib/*.mli *.mli > .depend
ifneq ($(MAKECMDGOALS),clean)
-include .depend

View File

@@ -670,13 +670,7 @@ let () =
(window:>GWindow.window_skel),switch_fullscreen
| Some xid ->
let window =
IFDEF GDK_NATIVE_WINDOW THEN
Gdk.Window.native_of_xid xid
ELSE
xid
END
in
let window = Gdk.Window.native_of_xid xid in
(GWindow.plug ~window ~width ~height ():>GWindow.window_skel), fun _ -> () in
(* Editor frame *)

View File

@@ -0,0 +1,2 @@
gtk_*.ml

View File

@@ -0,0 +1,8 @@
description = "Paparazzi GCS lib"
requires = "pprz.xlib,pprzlink,lablgtk2-gnome.gnomecanvas,lablgtk2.glade"
version = "1.0"
directory = ""
archive(byte) = "gcslib-pprz.cma"
archive(native) = "gcslib-pprz.cmxa"

View File

@@ -0,0 +1,142 @@
# Hey Emacs, this is a -*- makefile -*-
#
# Copyright (C) 2003 Pascal Brisset, Antoine Drouin
# Copyright (C) 2022 Gautier Hattenberger
#
# This file is part of paparazzi.
#
# paparazzi is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# paparazzi is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with paparazzi; see the file COPYING. If not, write to
# the Free Software Foundation, 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
#
Q=@
include ../../../Makefile.ocaml
# verbose ocamlmklib: Print commands before executing them
#VERBOSITY = -verbose
VERBOSITY =
UNAME = $(shell uname -s)
ifeq ("$(UNAME)","Darwin")
MKTEMP = gmktemp
else
MKTEMP = mktemp
endif
LABLGTK2GNOMECANVAS = $(shell ocamlfind query -p-format lablgtk2-gnome.gnomecanvas 2>/dev/null)
ifeq ($(LABLGTK2GNOMECANVAS),)
LABLGTK2GNOMECANVAS = $(shell ocamlfind query -p-format lablgtk2.gnomecanvas 2>/dev/null)
endif
INCLUDES=
PKGCOMMON=pprzlink
XINCLUDES=
XPKGCOMMON=pprzlink,xml-light,glibivy,$(LABLGTK2GNOMECANVAS),lablgtk2.glade
PKG = -package pprzlink,pprz.xlib
LINKPKG = $(PKG) -linkpkg -dllpath-pkg pprz.xlib,pprzlink
XSRC = contrastLabel.ml acIcon.ml wind_sock.ml gtk_papget_editor.ml gtk_papget_text_editor.ml gtk_papget_gauge_editor.ml gtk_papget_led_editor.ml papget_common.ml papget_renderer.ml papget.ml mapCanvas.ml mapWaypoints.ml mapTrack.ml mapGoogle.ml mapIGN.ml ml_gtk_drag.o xmlEdit.ml mapFP.ml
XCMO = $(XSRC:.ml=.cmo)
XCMX = $(XSRC:.ml=.cmx)
all : byte native
byte : gcslib-pprz.cma
native : gcslib-pprz.cmxa
gcslib-pprz.cma libgcslib-pprz.a: $(XCMO)
@echo OL $@
$(Q)$(OCAMLMKLIB) $(VERBOSITY) $(XINCLUDES) -o gcslib-pprz $^
gcslib-pprz.cmxa dllgcslib-pprz.so: $(XCMX)
@echo OOL $@
$(Q)$(OCAMLMKLIB) $(VERBOSITY) $(XINCLUDES) -o gcslib-pprz $^
# trying to set correct dependencies for parallel build
# these are order only depedencies
gcslib-pprz.cma: | libgcslib-pprz.a dllgcslib-pprz.so
gcslib-pprz.cmxa: | libgcslib-pprz.a dllgcslib-pprz.so
%.o : %.c
@echo OC $<
$(Q)$(OCAMLC) -ccopt -fPIC $(INCLUDES) -package $(PKGCOMMON) -c $<
$(XCMO) $(XCMX): PKGCOMMON=$(XPKGCOMMON)
GTKCFLAGS := $(shell pkg-config --cflags gtk+-2.0) -DGTK_DISABLE_DEPRECATED
ml_gtk_drag.o : ml_gtk_drag.c
@echo OC $<
$(Q)$(OCAMLC) $(INCLUDES) -package $(PKGCOMMON) -c -ccopt "$(GTKCFLAGS)" $<
%.cmo : %.ml
@echo OC $<
$(Q)$(OCAMLC) $(INCLUDES) $(PKG) -c $<
%.cmx : %.ml
@echo OOC $<
$(Q)$(OCAMLOPT) $(INCLUDES) $(PKG) -c $<
%.cmi : %.mli
@echo OC $<
$(Q)$(OCAMLC) $(XINCLUDES) $(INCLUDES) $(PKG) $<
gtk_papget_editor.ml : widgets.glade
@echo GLADE $@
$(eval $@_TMP := $(shell $(MKTEMP)))
$(Q)grep -v invisible_char $< > $($@_TMP)
$(Q)lablgladecc2 -root papget_editor -hide-default $($@_TMP) | grep -B 1000000 " end" > $@
$(Q)rm -f $($@_TMP)
gtk_papget_text_editor.ml : widgets.glade
@echo GLADE $@
$(eval $@_TMP := $(shell $(MKTEMP)))
$(Q)grep -v invisible_char $< > $($@_TMP)
$(Q)lablgladecc2 -root table_text_editor -hide-default $($@_TMP) | grep -B 1000000 " end" > $@
$(Q)rm -f $($@_TMP)
gtk_papget_gauge_editor.ml : widgets.glade
@echo GLADE $@
$(eval $@_TMP := $(shell $(MKTEMP)))
$(Q)grep -v invisible_char $< > $($@_TMP)
$(Q)lablgladecc2 -root table_gauge_editor -hide-default $($@_TMP) | grep -B 1000000 " end" > $@
$(Q)rm -f $($@_TMP)
gtk_papget_led_editor.ml : widgets.glade
@echo GLADE $@
$(eval $@_TMP := $(shell $(MKTEMP)))
$(Q)grep -v invisible_char $< > $($@_TMP)
$(Q)$(Q)lablgladecc2 -root table_led_editor -hide-default $($@_TMP) | grep -B 1000000 " end" > $@
$(Q)rm -f $($@_TMP)
clean :
$(Q)rm -f *~ *.cm* *.out *.opt .depend *.a *.o *.so gtk_papget_*.ml
.PHONY: all byte native clean
#
# Dependencies
#
.depend: Makefile
@echo DEPEND $@
$(Q)$(OCAMLDEP) $(XSRC) *.mli >> .depend
ifneq ($(MAKECMDGOALS),clean)
-include .depend
endif

View File

@@ -38,21 +38,17 @@ SERVERCMO = server_globals.cmo aircraft_server.cmo wind.cmo airprox.cmo kml.cmo
SERVERCMX = $(SERVERCMO:.cmo=.cmx)
all: link server messages settings ivy_tcp_aircraft ivy_tcp_controller broadcaster ivy2udp ivy2serial ivy_serial_bridge app_server ivy2nmea gpsd2ivy
all: link server messages ivy_tcp_aircraft ivy_tcp_controller broadcaster ivy2udp ivy2serial ivy_serial_bridge app_server ivy2nmea gpsd2ivy
opt: server.opt
clean:
$(Q)rm -f link server messages settings *.bak *~ core *.o .depend *.opt *.out *.cm* ivy_tcp_aircraft ivy_tcp_controller broadcaster ivy2udp ivy2serial ivy_serial_bridge app_server gpsd2ivy c_ivy_client_example_1 c_ivy_client_example_2 c_ivy_client_example_3 ivy2nmea
$(Q)rm -f link server messages *.bak *~ core *.o .depend *.opt *.out *.cm* ivy_tcp_aircraft ivy_tcp_controller broadcaster ivy2udp ivy2serial ivy_serial_bridge app_server gpsd2ivy c_ivy_client_example_1 c_ivy_client_example_2 c_ivy_client_example_3 ivy2nmea
messages : messages.cmo $(LIBPPRZCMA) $(LIBPPRZLINKCMA)
@echo OL $@
$(Q)$(OCAMLC) $(INCLUDES) -o $@ $(LINKPKG) gtkInit.cmo $<
settings : settings_gui.cmo ../cockpit/page_settings.cmo $(LIBPPRZCMA) $(LIBPPRZLINKCMA)
@echo OL $@
$(Q)$(OCAMLC) $(INCLUDES) -o $@ $(XLINKPKG) gtkInit.cmo -I ../cockpit gtk_save_settings.cmo saveSettings.cmo page_settings.cmo $<
server : $(SERVERCMO) $(LIBPPRZCMA) $(LIBPPRZLINKCMA)
@echo OL $@
$(Q)$(OCAMLC) $(INCLUDES) -o $@ $(LINKPKG) $(SERVERCMO)
@@ -94,9 +90,6 @@ ivy2serial : ivy2serial.cmo $(LIBPPRZCMA) $(LIBPPRZLINKCMA)
@echo OL $@
$(Q)$(OCAMLC) $(INCLUDES) -o $@ $(LINKPKG) gtkInit.cmo $<
settings_gui.cmo : INCLUDES += -I ../cockpit
settings_gui.cmo : ../cockpit/page_settings.cmi
%.cmo : %.ml
@echo OC $<
$(Q)$(OCAMLC) $(INCLUDES) $(PKG) -c $<

View File

@@ -1,116 +0,0 @@
(*
* Multi aircraft settings handler
*
* Copyright (C) 2007 ENAC, Pascal Brisset, Antoine Drouin
*
* This file is part of paparazzi.
*
* paparazzi is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* paparazzi is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with paparazzi; see the file COPYING. If not, write to
* the Free Software Foundation, 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*
*)
open Printf
module Ground_Pprz = PprzLink.Messages(struct let name = "ground" end)
module Tele_Pprz = PprzLink.Messages(struct let name = "telemetry" end)
let (//) = Filename.concat
let conf_dir = Env.paparazzi_home // "conf"
let conf_xml = ExtXml.parse_file (conf_dir // "conf.xml")
let one_ac = fun (notebook:GPack.notebook) ac_name ->
(* Get the setting file *)
let xml_file = Env.paparazzi_home // "var" // "aircrafts" // ac_name // "settings.xml" in
if not (Sys.file_exists xml_file) then
Printf.fprintf stderr "A/C '%s' not compiled: %s not found\n%!" ac_name xml_file
else
(* Get the A/C id *)
let aircraft = ExtXml.child ~select:(fun x -> Xml.attrib x "name" = ac_name) conf_xml "aircraft" in
let ac_id = Xml.attrib aircraft "ac_id" in
(* Call to ivy to set a value *)
let callback = fun idx value ->
let vs = ["ac_id", PprzLink.String ac_id; "index", PprzLink.Int idx] in
if classify_float value = FP_normal || classify_float value =FP_zero then
let vs' = ("value", PprzLink.Float value) :: vs in
Ground_Pprz.message_send "dl" "DL_SETTING" vs'
else
Ground_Pprz.message_send "dl" "GET_DL_SETTING" vs in
(* Build the buttons and sliders *)
let xml = ExtXml.parse_file xml_file in
let xmls = Xml.children (ExtXml.child xml "dl_settings") in
let settings = new Page_settings.settings xmls callback ac_id Env.gcs_default_icons_theme (fun _ _ -> ()) in
(* Bind to values updates *)
let get_dl_value = fun _sender vs ->
settings#set (PprzLink.int_assoc "index" vs) (Some (string_of_float (PprzLink.float_assoc "value" vs)))
in
ignore (Tele_Pprz.message_bind "DL_VALUE" get_dl_value);
(* Get the aiframe file *)
let af = Xml.attrib aircraft "airframe" in
let af_file = conf_dir // af in
(* Show the page *)
let tab_label = GPack.hbox () in
let _label = GMisc.label ~text:ac_name ~packing:tab_label#pack () in
let button_save_settings = GButton.button ~packing:tab_label#pack () in
ignore (GMisc.image ~stock:`SAVE ~packing:button_save_settings#add ());
ignore (button_save_settings#connect#clicked (fun () -> settings#save af_file));
ignore (notebook#append_page ~tab_label:tab_label#coerce settings#widget)
let _ =
let ivy_bus = ref Defivybus.default_ivy_bus in
let acs = ref [] in
let geometry = ref "" in
let anon_fun = (fun x -> prerr_endline ("WARNING: don't do anything with "^x)) in
let speclist =
[ "-b", Arg.String (fun x -> ivy_bus := x), (sprintf "<ivy bus> Default is %s" !ivy_bus);
"-ac", Arg.String (fun x -> acs := x :: !acs), "A/C name";
"-g", Arg.String (fun x -> geometry := x), "<geometry> Set the window geometry ( '500x500+100+100' )"]
and usage_msg = "Usage: " in
Arg.parse speclist anon_fun usage_msg;
if List.length !acs = 0 then begin
prerr_endline "Error: Specify at least one Aircraft for which to display the settings!";
Arg.usage speclist usage_msg;
exit 1
end;
(** Connect to the Ivy bus *)
Ivy.init "Paparazzi settings" "READY" (fun _ _ -> ());
Ivy.start !ivy_bus;
(** Open the window container with its notebook*)
let icon = GdkPixbuf.from_file Env.icon_file in
let window = GWindow.window ~icon ~width:400 ~height:300 ~allow_shrink:true ~title:"PaSettings" () in
ignore (window#parse_geometry !geometry);
let notebook = GPack.notebook ~packing:window#add ~tab_pos:`TOP () in
List.iter (one_ac notebook) !acs;
(** Start the main loop *)
window#show ();
let loop = Glib.Main.create true in
while Glib.Main.is_running loop do ignore (Glib.Main.iteration true) done

View File

@@ -7,7 +7,7 @@ archive(byte) = "lib-pprz.cma"
archive(native) = "lib-pprz.cmxa"
package "xlib" (
requires = "pprz,LABLGTK2GNOMECANVAS,lablgtk2.glade"
requires = "pprz"
version = "1.0"
archive(byte) = "xlib-pprz.cma"
archive(native) = "xlib-pprz.cmxa"

View File

@@ -23,43 +23,23 @@
Q=@
#OCAMLC=ocamlfind ocamlc
#OCAMLOPT=ocamlfind ocamlopt
#OCAMLDEP=ocamlfind ocamldep
#OCAMLLEX=ocamllex
#OCAMLYACC=ocamlyacc
#OCAMLMKLIB=ocamlmklib
#OCAMLLIBDIR=$(shell $(OCAMLC) -where)
include ../../Makefile.ocaml
# verbose ocamlmklib: Print commands before executing them
#VERBOSITY = -verbose
VERBOSITY =
UNAME = $(shell uname -s)
ifeq ("$(UNAME)","Darwin")
MKTEMP = gmktemp
else
MKTEMP = mktemp
endif
LABLGTK2GNOMECANVAS = $(shell ocamlfind query -p-format lablgtk2-gnome.gnomecanvas 2>/dev/null)
ifeq ($(LABLGTK2GNOMECANVAS),)
LABLGTK2GNOMECANVAS = $(shell ocamlfind query -p-format lablgtk2.gnomecanvas 2>/dev/null)
endif
INCLUDES=
PKGCOMMON=pprzlink,xml-light,netclient,nettls-gnutls,glibivy,lablgtk2
XINCLUDES=
XPKGCOMMON=pprzlink,xml-light,glibivy,$(LABLGTK2GNOMECANVAS),lablgtk2.glade
XPKGCOMMON=pprzlink,xml-light,glibivy,lablgtk2
SRC = fig.ml debug.ml base64.ml serial.ml ocaml_tools.ml expr_syntax.ml expr_parser.ml expr_lexer.ml extXml.ml env.ml xml2h.ml latlong.ml egm96.ml srtm.ml http.ml gm.ml iGN.ml geometry_2d.ml cserial.o ubx.ml xmlCom.ml os_calls.ml editAirframe.ml defivybus.ml fp_proc.ml quaternion.ml
SRC += gen_common.ml radio.ml settings.ml module.ml flight_plan.ml autopilot.ml airframe.ml telemetry.ml aircraft.ml
CMO = $(SRC:.ml=.cmo)
CMX = $(SRC:.ml=.cmx)
XSRC = gtk_tools.ml platform.ml contrastLabel.ml acIcon.ml wind_sock.ml gtk_papget_editor.ml gtk_papget_text_editor.ml gtk_papget_gauge_editor.ml gtk_papget_led_editor.ml papget_common.ml papget_renderer.ml papget.ml mapCanvas.ml mapWaypoints.ml mapTrack.ml mapGoogle.ml mapIGN.ml ml_gtk_drag.o xmlEdit.ml mapFP.ml
XSRC = gtk_tools.ml
XCMO = $(XSRC:.ml=.cmo)
XCMX = $(XSRC:.ml=.cmx)
@@ -82,13 +62,13 @@ lib-pprz.cmxa dlllib-pprz.so: $(CMX)
@echo OOL $@
$(Q)$(OCAMLMKLIB) $(VERBOSITY) $(INCLUDES) -o lib-pprz $^
xlib-pprz.cma libxlib-pprz.a: $(XCMO)
xlib-pprz.cma: $(XCMO)
@echo OL $@
$(Q)$(OCAMLMKLIB) $(VERBOSITY) $(XINCLUDES) -o xlib-pprz $^
$(Q)$(OCAMLC) -a $(XINCLUDES) -o $@ $^
xlib-pprz.cmxa dllxlib-pprz.so: $(XCMX)
xlib-pprz.cmxa: $(XCMX)
@echo OOL $@
$(Q)$(OCAMLMKLIB) $(VERBOSITY) $(XINCLUDES) -o xlib-pprz $^
$(Q)$(OCAMLOPT) -a $(XINCLUDES) -o $@ $^
# trying to set correct dependencies for parallel build
# these are order only depedencies
@@ -96,10 +76,6 @@ lib-pprz.cma: | liblib-pprz.a dlllib-pprz.so
lib-pprz.cmxa: | liblib-pprz.a dlllib-pprz.so
xlib-pprz.cma: | libxlib-pprz.a dllxlib-pprz.so
xlib-pprz.cmxa: | libxlib-pprz.a dllxlib-pprz.so
xml_get.cmo : xml_get.ml lib-pprz.cma
@echo OC $@
$(Q)$(OCAMLC) $(INCLUDES) -package $(PKGCOMMON) -I . lib-pprz.cma -c $<
@@ -118,11 +94,6 @@ tests : lib-pprz.cma $(TESTS_CMO)
$(XCMO) $(XCMX): PKGCOMMON=$(XPKGCOMMON)
GTKCFLAGS := $(shell pkg-config --cflags gtk+-2.0) -DGTK_DISABLE_DEPRECATED
ml_gtk_drag.o : ml_gtk_drag.c
@echo OC $<
$(Q)$(OCAMLC) $(INCLUDES) -package $(PKGCOMMON) -c -ccopt "$(GTKCFLAGS)" $<
%.cmo : %.ml
@echo OC $<
$(Q)$(OCAMLC) $(INCLUDES) -package $(PKGCOMMON) -c $<
@@ -143,40 +114,8 @@ ml_gtk_drag.o : ml_gtk_drag.c
@echo OCY $<
$(Q)$(OCAMLYACC) $<
gtk_papget_editor.ml : widgets.glade
@echo GLADE $@
$(eval $@_TMP := $(shell $(MKTEMP)))
$(Q)grep -v invisible_char $< > $($@_TMP)
$(Q)lablgladecc2 -root papget_editor -hide-default $($@_TMP) | grep -B 1000000 " end" > $@
$(Q)rm -f $($@_TMP)
gtk_papget_text_editor.ml : widgets.glade
@echo GLADE $@
$(eval $@_TMP := $(shell $(MKTEMP)))
$(Q)grep -v invisible_char $< > $($@_TMP)
$(Q)lablgladecc2 -root table_text_editor -hide-default $($@_TMP) | grep -B 1000000 " end" > $@
$(Q)rm -f $($@_TMP)
gtk_papget_gauge_editor.ml : widgets.glade
@echo GLADE $@
$(eval $@_TMP := $(shell $(MKTEMP)))
$(Q)grep -v invisible_char $< > $($@_TMP)
$(Q)lablgladecc2 -root table_gauge_editor -hide-default $($@_TMP) | grep -B 1000000 " end" > $@
$(Q)rm -f $($@_TMP)
gtk_papget_led_editor.ml : widgets.glade
@echo GLADE $@
$(eval $@_TMP := $(shell $(MKTEMP)))
$(Q)grep -v invisible_char $< > $($@_TMP)
$(Q)$(Q)lablgladecc2 -root table_led_editor -hide-default $($@_TMP) | grep -B 1000000 " end" > $@
$(Q)rm -f $($@_TMP)
META.pprz: META.pprz.template
@echo COPY $<
$(shell sed -e 's/LABLGTK2GNOMECANVAS/$(LABLGTK2GNOMECANVAS)/g' $< > $@)
clean :
$(Q)rm -f *~ *.cm* *.out *.opt .depend *.a *.o *.so tests gtk_papget_*.ml expr_parser.ml expr_parser.mli expr_lexer.ml expr_lexer.mli META.pprz
$(Q)rm -f *~ *.cm* *.out *.opt .depend *.a *.o *.so tests gtk_papget_*.ml expr_parser.ml expr_parser.mli expr_lexer.ml expr_lexer.mli
.PHONY: all byte native clean

View File

@@ -1,147 +0,0 @@
(*
* OpenGL utils
*
* Copyright (C) 2004 CENA/ENAC, Yann Le Fablec
*
* This file is part of paparazzi.
*
* paparazzi is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* paparazzi is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with paparazzi; see the file COPYING. If not, write to
* the Free Software Foundation, 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*
*)
(* = YLF 28/10/2001 = *)
(* = = *)
(* = Derniere update : 28/10/2002 = *)
(* = = *)
(* = = *)
(* = 28/10/2002 : create_draw_glarea_base et = *)
(* = et connect_draw_glarea_simple = *)
(* = 15/05/2002 : gl_to_gtk_color et gtk_to_gl_color = *)
(* = 12/04/2002 : create_draw_glarea_simple = *)
(* = = *)
(* ================================================================================== *)
open Gtk_tools
(* ============================================================================= *)
(* = Creation d'une drawing area OpenGL = *)
(* = = *)
(* = width = hauteur de la zone = *)
(* = height = hauteur de la zone = *)
(* = pack_method = maniere de placer la zone (ex. : hbox#pack) = *)
(* ============================================================================= *)
let create_draw_glarea_base width height pack_method =
(* Creation des widgets *)
GlGtk.area [`DEPTH_SIZE 1; `RGBA; `DOUBLEBUFFER]
~width:width ~height:height ~packing:pack_method ()
(* ============================================================================= *)
(* = Connection des fonctions de base a une drawing area OpenGL = *)
(* = = *)
(* = area = la zone = *)
(* = init_func = fonction d'initialisation (realize) = *)
(* = display_func = fonction de dessin dans la zone = *)
(* = reshape_func = appelee lors d'un changement de taille = *)
(* ============================================================================= *)
let connect_draw_glarea_simple area
init_func display_func reshape_func =
(* La nouvelle fonction de dessin appelle celle qui est passee en parametre quand *)
(* necessaire et fait le flush ensuite *)
let draw = (fun () -> if (area:GlGtk.area)#misc#visible then begin
display_func (); Gl.flush (); area#swap_buffers ()
end) in
(* Connection des fonctions *)
ignore(area#connect#realize ~callback:init_func) ;
ignore(area#connect#display ~callback:draw) ;
ignore(area#connect#reshape ~callback:reshape_func) ;
(* Renvoie la nouvelle fonction de dessin *)
draw
(* ============================================================================= *)
(* = Creation d'une drawing area OpenGL = *)
(* = = *)
(* = width = hauteur de la zone = *)
(* = height = hauteur de la zone = *)
(* = pack_method = maniere de placer la zone (ex. : hbox#pack) = *)
(* = init_func = fonction d'initialisation (realize) = *)
(* = display_func = fonction de dessin dans la zone = *)
(* = reshape_func = appelee lors d'un changement de taille = *)
(* ============================================================================= *)
let create_draw_glarea_simple width height pack_method
init_func display_func reshape_func =
(* Creation des widgets *)
let area = create_draw_glarea_base width height pack_method in
let draw = connect_draw_glarea_simple area
init_func display_func reshape_func in
(* Renvoie la zone de dessin et la nouvelle fonction de dessin *)
(area, draw)
(* ============================================================================= *)
(* = Connexion evenements souris a une zone de dessin OpenGL = *)
(* = = *)
(* = area = la zone de dessin = *)
(* = mouse_press = fonction appelee lors d'un click souris = *)
(* = mouse_move = fonction appelee lors d'un deplacement = *)
(* = mouse_release = fonction appelee lors du relachement d'un bouton = *)
(* ============================================================================= *)
let glarea_mouse_connect area mouse_press mouse_move mouse_release =
(area:GlGtk.area)#event#add [`POINTER_MOTION; `BUTTON_PRESS; `BUTTON_RELEASE] ;
area#event#set_extensions `ALL;
ignore(area#event#connect#button_press ~callback:mouse_press) ;
ignore(area#event#connect#motion_notify ~callback:mouse_move) ;
ignore(area#event#connect#button_release ~callback:mouse_release)
(* ============================================================================= *)
(* = Connexion evenements clavier a une zone de dessin = *)
(* = = *)
(* = area = la zone de dessin = *)
(* = key_press = fonction appelee lors de l'appui sur une touche = *)
(* = key_release = fonction appelee lors du relachement d'une touche = *)
(* ============================================================================= *)
let glarea_key_connect area key_press key_release =
(* Par defaut l'evenement key_release n'est pas associe au widget *)
(area:GlGtk.area)#event#add [`KEY_RELEASE] ;
ignore(area#event#connect#key_press
~callback:(fun ev -> key_press (GdkEvent.Key.keyval ev))) ;
ignore(area#event#connect#key_release
~callback:(fun ev -> key_release (GdkEvent.Key.keyval ev))) ;
area#misc#set_can_focus true ;
area#misc#grab_focus ()
(* ============================================================================= *)
(* = Passage de couleur GTK vers GL = *)
(* = = *)
(* = color = couleur GTK (`NAME ou `RGB) a transformer = *)
(* ============================================================================= *)
let gtk_to_gl_color color =
let t = GDraw.color color in
((float_of_int (Gdk.Color.red t))/.65535.0,
(float_of_int (Gdk.Color.green t))/.65535.0,
(float_of_int (Gdk.Color.blue t))/.65535.0)
(* ============================================================================= *)
(* = Passage de couleur GL vers GTK = *)
(* = = *)
(* = (r, g, b) = couleur GL a transformer en equivalent GTK = *)
(* ============================================================================= *)
let gl_to_gtk_color (r, g, b) =
`RGB(int_of_float (r*.65535.0), int_of_float (g*.65535.0),
int_of_float (b*.65535.0))
(* =============================== FIN ========================================= *)

View File

@@ -1,88 +0,0 @@
(*
* OpenGL utils
*
* Copyright (C) 2004 CENA/ENAC, Yann Le Fablec
*
* This file is part of paparazzi.
*
* paparazzi is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* paparazzi is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with paparazzi; see the file COPYING. If not, write to
* the Free Software Foundation, 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*
*)
(** Module de gestion des zones de dessin OpenGL
{b Dépendences : Platform}
*)
(** {6 Drawing Areas OpenGL} *)
(** [create_draw_glarea_base width height pack_method] crée une zone de
dessin OpenGL de largeur [width] et de hauteur [height]. Cette zone est
placée comme indiqué dans [pack_method]. La zone créée est renvoyée *)
val create_draw_glarea_base :
int -> int -> (GObj.widget -> unit) -> GlGtk.area
(** [connect_draw_glarea_simple area init_func display_func reshape_func]
connecte les signaux de base à une zone de dessin créée avec
{!Gtk_tools_GL.create_draw_glarea_base}. La fonction de redessin
est renvoyée *)
val connect_draw_glarea_simple :
GlGtk.area ->
(unit -> unit) ->
(unit -> 'a) -> (width:int -> height:int -> unit) -> unit -> unit
(** [create_draw_glarea_simple width height pack_method
init_func display_func reshape_func] crée une zone de dessin OpenGL et y
connecte les signaux. Un couple contenant la zone et la fonction de
redessin est renvoyé *)
val create_draw_glarea_simple :
int ->
int ->
(GObj.widget -> unit) ->
(unit -> unit) ->
(unit -> 'a) ->
(width:int -> height:int -> unit) -> GlGtk.area * (unit -> unit)
(** {6 Signaux des Drawing Areas OpenGL} *)
(** [glarea_mouse_connect area mouse_press mouse_move mouse_release]
connecte les événements souris à la zone de dessin [area] *)
val glarea_mouse_connect :
GlGtk.area ->
(GdkEvent.Button.t -> bool) ->
(GdkEvent.Motion.t -> bool) -> (GdkEvent.Button.t -> bool) -> unit
(** [glarea_key_connect area key_press key_release] connecte les
événements claviers à la zone de dessin [area] *)
val glarea_key_connect :
GlGtk.area -> (Gdk.keysym -> bool) -> (Gdk.keysym -> bool) -> unit
(** {6 Couleurs Gtk <-> OpenGL} *)
(** [gtk_to_gl_color color] crée une couleur OpenGL (r, g, b) à partir
de [color]. Les composantes RGB sont dans l'intervalle [\[0.0, 1.0\]] *)
val gtk_to_gl_color : GDraw.color -> float * float * float
(** [gl_to_gtk_color (r, g, b)] fonction inverse de la precedente *)
val gl_to_gtk_color :
float * float * float -> [> `RGB of int * int * int]

View File

@@ -1,236 +0,0 @@
(*
* Icons library
*
* Copyright (C) 2004 CENA/ENAC, Yann Le Fablec
*
* This file is part of paparazzi.
*
* paparazzi is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* paparazzi is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with paparazzi; see the file COPYING. If not, write to
* the Free Software Foundation, 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*
*)
let question_icon =
[|"48 48 69 1";
" c #000000";". c #060708";"X c #06080a";"o c #0a0a0a";"O c #19150d";
"+ c gray8";"@ c gray10";"# c #221c12";"$ c #393939";"% c #2b3d61";
"& c #354564";"* c #654f24";"= c #6c5526";"- c #705627";"; c #715929";
": c #735f3b";"> c #7c622d";"; c #7f6941";"< c gray39";"1 c #727272";
"2 c #737579";"3 c gray50";"4 c #81642e";"5 c #876a31";"6 c #8c6d31";
"7 c #937435";"8 c #9b7b3a";"9 c #a27f3b";"0 c #927c52";"q c #a6823c";
"w c #a9853d";"e c #a68748";"r c #a38e55";"t c #a48b5a";"y c #b38d40";
"u c #bc9443";"i c #be9b53";"p c #bea363";"a c #bfa16a";"s c #bea272";
"d c #c09745";"f c #c39f56";"g c #c9a45b";"h c #d2a64c";"j c #d8ab4e";
"k c #d8ac5a";"l c #d8b15f";"z c #c3a466";"x c #c6a76a";"c c #c9ac73";
"v c #d2b06c";"b c #d9b263";"n c #d8b56e";"m c #dbba73";"M c #d8ba7b";
"N c #f7c35a";"B c #f7c96d";"V c #f7cf7e";"C c #aaaaaa";"Z c #d8be86";
"A c #dcc494";"S c #f7d48c";"D c #f7d899";"F c #f7dca5";"G c #f7dfaf";
"H c #f7e2b8";"J c #f7e5c0";"K c white";"L c None";
"LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL";
"LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL";
"LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL";
"LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL";
"LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL";
"LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL";
"LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL";
"LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL";
"LLLLLLLLLLLLLLLLLLo LLLLLLLLLLLLLLLLLLLL";
"LLLLLLLLLLLLLLLLL 9uj8q> LLLLLLLLLLLLLLLLLL";
"LLLLLLLLLLLLLLLL jDDHDMMMiq LLLLLLLLLLLLLLLLL";
"LLLLLLLLLLLLLLL NHHDSNNNVMlq= LLLLLLLLLLLLLLLL";
"LLLLLLLLLLLLLLo NGFNe77wNNVnlq LLLLLLLLLLLLLLL";
"LLLLLLLLLLLLLL pDHN7 7NNBll4 +LLLLLLLLLLLLLL";
"LLLLLLLLLLLLLo BJV7 % fNVjlq LLLLLLLLLLLLLL";
"LLLLLLLLLLLLL rSGj &33 tNBljq KLLLLLLLLLLLLL";
"LLLLLLLLLLLLL hVNq &3KK tBBnj4 .CKLLLLLLLLLLLL";
"LLLLLLLLLLLLL NSNq 2KKL tNnnj* CKLLLLLLLLLLLL";
"LLLLLLLLLLLLL vlu4 3KL zBMjq 3CKLLLLLLLLLLLL";
"LLLLLLLLLLLLL XX tKL 6vZlj; 3CKLLLLLLLLLLLL";
"LLLLLLLLLLLLL X X3K uSZju +3KLLLLLLLLLLLLL";
"LLLLLLLLLLLLLL 0<C333. wBZjj 3CKLLLLLLLLLLLLL";
"LLLLLLLLLLLLLLL 2333K NSvk8 +3KLLLLLLLLLLLLLL";
"LLLLLLLLLLLLLLLLLLLL =fAmcaO CCKLLLLLLLLLLLLLL";
"LLLLLLLLLLLLLLLLLLLL 5vngx, .3CKLLLLLLLLLLLLLLL";
"LLLLLLLLLLLLLLLLLLLL 7Mbks 2CKLLLLLLLLLLLLLLLL";
"LLLLLLLLLLLLLLLLLLLL uMbk0 3KLLLLLLLLLLLLLLLLL";
"LLLLLLLLLLLLLLLLLLLL jZlj: CCKLLLLLLLLLLLLLLLLL";
"LLLLLLLLLLLLLLLLLLLL iMju 1KLLLLLLLLLLLLLLLLLL";
"LLLLLLLLLLLLLLLLLLLL eeq4 XCKLLLLLLLLLLLLLLLLLL";
"LLLLLLLLLLLLLLLLLLLL @$ 3CKLLLLLLLLLLLLLLLLLL";
"LLLLLLLLLLLLLLLLLLLL X3KLLLLLLLLLLLLLLLLLLL";
"LLLLLLLLLLLLLLLLLLLLL t2<33CKLLLLLLLLLLLLLLLLLLL";
"LLLLLLLLLLLLLLLLLLLLL# X..KLLLLLLLLLLLLLLLLLLLL";
"LLLLLLLLLLLLLLLLLLLL mVSu LLLLLLLLLLLLLLLLLLLL";
"LLLLLLLLLLLLLLLLLLLL VDDj LLLLLLLLLLLLLLLLLLLL";
"LLLLLLLLLLLLLLLLLLLL SSlu CKLLLLLLLLLLLLLLLLLL";
"LLLLLLLLLLLLLLLLLLLL Snju CKLLLLLLLLLLLLLLLLLL";
"LLLLLLLLLLLLLLLLLLLL hlu; .CKLLLLLLLLLLLLLLLLLL";
"LLLLLLLLLLLLLLLLLLLLL CKLLLLLLLLLLLLLLLLLL";
"LLLLLLLLLLLLLLLLLLLLL 3CKLLLLLLLLLLLLLLLLLL";
"LLLLLLLLLLLLLLLLLLLLLL XoX33CKLLLLLLLLLLLLLLLLLL";
"LLLLLLLLLLLLLLLLLLLLLLL 333CKLLLLLLLLLLLLLLLLLLL";
"LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL";
"LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL";
"LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL";
"LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL";
"LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL"|]
let error_icon =
[|"48 48 133 2";
" c #000000";". c #070909";"X c #0c0403";"o c #0a0a0a";"O c #0d0f10";
"+ c #130605";"@ c #1d0907";"# c #1c0908";"$ c #131313";"% c #1b1b1b";
"& c #250c0a";"* c #2c0e0b";"= c #310d0a";"- c #3a0f0b";"; c #35100e";
": c #3d130f";"> c #361210";"; c #242424";"< c #2c2c2c";"1 c #323232";
"2 c #3b3b3b";"3 c #41130e";"4 c #401411";"5 c #4d1712";"6 c #4e1814";
"7 c #571b15";"8 c #591710";"9 c #581b15";"0 c #5c1e1a";"q c #6e190f";
"w c #671c16";"e c #6b1d15";"r c #791e15";"t c #66221d";"y c #6c231e";
"u c #7d231c";"i c #742620";"p c #772822";"a c #7f2821";"s c #484848";
"d c #545454";"f c #656565";"g c #7e7e7e";"h c #951f11";"j c #981f11";
"k c #83241b";"l c #87281e";"z c #892116";"x c #8b261c";"c c #89281f";
"v c #952214";"b c #932419";"n c #92291f";"m c #9c2213";"M c #9a261a";
"N c #9b291d";"B c #832b24";"V c #8c2a23";"C c #8e2e28";"Z c #8f3832";
"A c #942c24";"S c #9b2d23";"D c #943029";"F c #9e3026";"G c #9d3229";
"H c #9e3b32";"J c #a52415";"K c #a42618";"L c #a3291c";"P c #a82211";
"I c #aa2718";"U c #ab291b";"Y c #b22413";"T c #b12718";"R c #b5291a";
"E c #bb2513";"W c #bc2b1a";"Q c #a12d22";"! c #a92f20";"~ c #a03026";
"^ c #a03229";"/ c #a5392e";"( c #ab3224";") c #a9352a";"_ c #a83a2e";
"` c #a43c33";"' c #af3f33";"] c #c32613";"[ c #c72816";"{ c #c62d1b";
"} c #ce2e1c";"| c #d22813";" . c #d02e1b";".. c #db2a15";"X. c #df301c";
"o. c #e22b15";"O. c #ec2d15";"+. c #e4311b";"@. c #ea311b";"#. c #ea3a1b";
"$. c #f4321a";"%. c #f6381c";"&. c #fd3216";"*. c #fb3318";"=. c #fc3b1a";
"-. c #c1782e";";. c #ff401e";":. c #d48d1d";">. c #cd8622";";. c #c18138";
"<. c #c79d37";"1. c #c49c39";"2. c #ca9d31";"3. c #cda137";"4. c #cfa43c";
"5. c #d5a82e";"6. c #dcac2b";"7. c #d4a534";"8. c #d1a53a";"9. c #d8a733";
"0. c #d9aa32";"q. c #daad3c";"w. c #dfb035";"e. c #ddb039";"r. c #e1ae23";
"t. c #e1b233";"y. c #cfa540";"u. c #d4aa43";"i. c #d2aa48";"p. c #d8ac40";
"a. c #dfb445";"s. c #fdfdfd";"d. c None";
"d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.";
"d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.";
"d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.";
"d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.";
"d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.";
"d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.";
"d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.";
"d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.";
"d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.=.&.*.*.$.O.@.@.@.@.@. d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.";
"d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.=.=.&.O.| ] E Y Y Y P Y W { } } W d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.";
"d.d.d.d.d.d.d.d.d.d.d.d.d.d.&.&...] Y P P P P j v J J J I U R W R d.d.d.d.d.d.d.d.d.d.d.d.d.";
"d.d.d.d.d.d.d.d.d.d.d.d.=.&.O.] Y P P P P P m m P I J J K K L U U U z d.d.d.d.d.d.d.d.d.d.d.d.";
"d.d.d.d.d.d.d.d.d.d.d.=.&...E P P P P P P v J J J J J I K K L K L L L r d.d.d.d.d.d.d.d.d.d.";
"d.d.d.d.d.d.d.d.d.d.=.&.| Y P P P P P P J v J J K I K ) ( K K L K L L N 8 d.d.d.d.d.d.d.d.d.";
"d.d.d.d.d.d.d.d.d.=.&.| P P P P P P P P J J m m J K K K ( ) L L N L L N k # d.d.d.d.d.d.d.d.d.";
"d.d.d.d.d.d.d.d.d.=.o.Y P P P P J P ! ! J I J m m L K K K ) ) ) Q L L Q N w o d.d.d.d.d.d.d.d.";
"d.d.d.d.d.d.d.d.=.&.E P P P J P ! ! P ( ( J K K K b m L L K L _ ) Q L L S x ; o d.d.d.d.d.d.d.";
"d.d.d.d.d.d.d.d.*.| P P P P P J h S ! K ( ( K K K K b b L L L L ) _ Q Q L S 7 d.d.d.d.d.d.";
"d.d.d.d.d.d.d.#.*.E P P J h I P m P K ( ( ( ) J K K L b b N Q L L _ _ ( S Q u # $ d.d.d.d.d.d.";
"d.d.d.d.d.d.d.%...P P P P j J K I I K K ( ( ' ) L L L L M b N Q Q S / _ S S c = o d.d.d.d.d.d.";
"d.d.d.d.d.d. %.[ I :.r.r.r.r.r.r.6.6.6.6.6.e.a.e.0.0.0.0.7.2.2.7.8.8.-.Q S A 3 o d.d.d.d.d.";
"d.d.d.d.d.d. $.E P r.r.r.r.r.r.6.r.6.6.6.6.6.q.e.q.0.9.9.9.9.7.7.8.7.8.Q S A 5 . o d.d.d.d.d.";
"d.d.d.d.d.d. $.E P r.r.r.t.r.r.6.r.6.6.6.0.9.5.3.q.p.9.9.9.7.4.8.8.8.y.~ Q A 7 . , d.d.d.d.d.";
"d.d.d.d.d.d. #.Y P r.r.r.r.t.t.6.6.6.6.6.6.6.9.5.2.7.p.p.7.4.7.<.1.1.1.~ F D 9 . % d.d.d.d.d.";
"d.d.d.d.d.d. +.T J r.r.6.r.6.0.w.6.6.6.0.0.0.9.9.9.2.7.u.u.u.8.8.8.y.y.^ S C 6 % d.d.d.d.d.";
"d.d.d.d.d.d. X.T J r.6.6.6.6.6.e.e.0.0.0.6.2.9.7.7.7.2.3.8.u.u.y.8.4.y.^ G V : % d.d.d.d.d.";
"d.d.d.d.d.d. } R J >.6.6.6.6.6.6.e.e.9.0.9.2.2.9.7.7.3.3.4.8.i.i.4.y.,.^ G a & % s.d.d.d.d.";
"d.d.d.d.d.d. R W K K K I K L N M S ) _ L L Q S S S S S Q S S ^ ^ ` ^ ^ F D w X . % s.d.d.d.d.";
"d.d.d.d.d.d. q { U I K L K L U M b L / Q Q L Q n n Q A Q Q G Q ^ ^ ` G G C 6 o , s.d.d.d.d.";
"d.d.d.d.d.d. . U U K K L L L Q L N N N ^ S Q Q S c V A A ^ S G G ^ ^ ` D i # . . o 1 d.d.d.d.d.";
"d.d.d.d.d.d. o e R U L L L L L Q L N Q ) / S Q Q S F ~ S ^ ^ G ^ ^ G H Z 6 % d d.d.d.d.d.";
"d.d.d.d.d.d.d. . z U L L L L Q L S N N S ` Q S Q ~ Q ^ A A ^ G D / G C t + o < s.d.d.d.d.d.";
"d.d.d.d.d.d.d. + M K L S L Q Q ! Q S S S / Q Q ^ ^ ^ G D ^ ^ ^ G D p * $ s s.d.d.d.d.d.";
"d.d.d.d.d.d.d.d. . - M Q L L Q Q Q Q Q Q Q ` ` V A Q ^ ^ D D ^ G D p > o , g d.d.d.d.d.d.";
"d.d.d.d.d.d.d.d. = x S S Q Q Q Q ~ ~ ~ A ` Z G ^ ^ G G G G C y * % d s.d.d.d.d.d.d.";
"d.d.d.d.d.d.d.d.d.1 . @ e N N S S Q Q ~ ~ ~ S H ` G ^ G G D B 0 & % s s.d.d.d.d.d.d.d.";
"d.d.d.d.d.d.d.d.d.d. 3 k n S S S F F F G F ` G D D B y 4 . . O 1 s.s.d.d.d.d.d.d.d.";
"d.d.d.d.d.d.d.d.d.d. . X ; t k V V A A A C V B p 0 > X O < g s.d.d.d.d.d.d.d.d.";
"d.d.d.d.d.d.d.d.d.d.d. . # * 4 7 0 9 6 : * # . $ 2 g s.d.d.d.d.d.d.d.d.d.";
"d.d.d.d.d.d.d.d.d.d.d.d.d. . . . o , f s.s.d.d.d.d.d.d.d.d.d.d.";
"d.d.d.d.d.d.d.d.d.d.d.d.d.d. , % . . . . $ % d g s.s.d.d.d.d.d.d.d.d.d.d.d.";
"d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d. $ . . . o o . O O , s g s.s.d.d.d.d.d.d.d.d.d.d.d.d.d.";
"d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d. 1 , , % % % , , 1 d s.s.s.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.";
"d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.s.s.s.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.";
"d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.";
"d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.";
"d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.";
"d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d."|]
let warning_icon =
[|"48 48 97 2";" c #000000";". c #0b0501";"X c #0b0900";"o c #0a0a0a";
"O c #170402";"+ c #120e00";"@ c #1c0705";"# c #151001";"$ c #1c1501";
"% c #131313";"& c #220704";"* c #260806";"= c #2c0805";"- c #2e0a08";
"; c #251d02";": c #3b0b07";"> c #3d0c08";"; c #2a2103";"< c #312604";
"1 c #3a2d05";"2 c gray17";"3 c #410c06";"4 c #440d09";"5 c #4b0d07";
"6 c #490e09";"7 c #4d100c";"8 c #520e07";"9 c #571109";"0 c #5c110b";
"q c #413205";"w c #4c3b06";"e c #513f07";"r c #62120a";"t c #6d140b";
"y c #73150d";"u c #78150b";"i c #731711";"p c #7a1710";"a c #791812";
"s c #524007";"d c #675009";"f c #69520a";"g c #71570a";"h c #745a0c";
"j c #7b610a";"k c #85170c";"l c #86180d";"z c #8a180d";"x c #851a12";
"c c #8a1a11";"v c #901a0e";"b c #9a1b0e";"n c #931d12";"m c #9c1e14";
"M c #a41c0e";"N c #a91d0f";"B c #a01d11";"V c #b31f0f";"C c #b21f10";
"Z c #b9200f";"A c #b62010";"S c #bc2111";"D c #ab4216";"F c #b14010";
"G c #ba5b12";"H c #bf6f16";"J c #924f48";"K c #c62210";"L c #ca2311";
"P c #d32412";"I c #da2613";"U c #e32712";"Y c #e42e1a";"T c #eb2713";
"R c #ec2813";"E c #f42913";"W c #c26c13";"Q c #c67e15";"! c #c87e14";
"~ c #b9930e";"^ c #bd9312";"/ c #cb8614";"( c #cd8912";") c #c39b0f";
"_ c #c59913";"` c #cb9e13";"' c #d18913";"] c #d7a816";"[ c #d7a81a";
"{ c #d8a51c";"} c #dcaa14";"| c #d8a919";" . c #dfb112";".. c #e0ad12";
"X. c #e0b213";"o. c #808080";"O. c None";
"O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.";
"O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.";
"O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.";
"O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.";
"O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.";
"O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.";
"O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.";
"O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.R E L c o.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.";
"O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.T E P N l X O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.";
"O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.N E P N M b 0 O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.";
"O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.N E U V M M B z - % O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.";
"O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.R T Z M M A B b r O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.";
"O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.N E L M M G W M B v : O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.";
"O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.M E I M M M . .M B B u O.O.O.O.O.O.O.O.O.O.O.O.O.O.";
"O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.R T Z M M .... .' B B v 5 O.O.O.O.O.O.O.O.O.O.O.O.O.O.";
"O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.N E L M M W . . . .B B B y O.O.O.O.O.O.O.O.O.O.O.O.O.";
"O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.N E I N M M ....~ ..} ( M b z 5 O.O.O.O.O.O.O.O.O.O.O.O.O.";
"O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.U E Z M M ' ) X q } ..M B B y O.O.O.O.O.O.O.O.O.O.O.O.";
"O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.M E P M M M .j . + ..} ( B m z 6 O.O.O.O.O.O.O.O.O.O.O.O.";
"O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.T U V M M X. ., $ } } } B M m y O.O.O.O.O.O.O.O.O.O.O.";
"O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.N E L M M ( X. .; ; } } } ( M m v 6 O.O.O.O.O.O.O.O.O.O.O.";
"O.O.O.O.O.O.O.O.O.O.O.O.O.O.N R I M M M ..X. .; ; q } } } } m B b y O.O.O.O.O.O.O.O.O.O.";
"O.O.O.O.O.O.O.O.O.O.O.O.O.O.t R S M M ( X. .} w q q } } } } ( B m c 4 O.O.O.O.O.O.O.O.O.O.";
"O.O.O.O.O.O.O.O.O.O.O.O.O.N E P N M M . . ...$ ; q } } } } ] m m m r O.O.O.O.O.O.O.O.O.";
"O.O.O.O.O.O.O.O.O.O.O.O.O.U R A M M . . ...} X X ; } } } } } ' m m x = O.O.O.O.O.O.O.O.O.";
"O.O.O.O.O.O.O.O.O.O.O.O.N R P N M ' . .} } } . + X < } } | } | | m m m 0 % O.O.O.O.O.O.O.O.";
"O.O.O.O.O.O.O.O.O.O.O.O.Y R A B M } ........} + s } } } | } | ( m m p @ O.O.O.O.O.O.O.O.";
"O.O.O.O.O.O.O.O.O.O.O.N R P B N ' .} ....} } 1 e + h } } | } | | | m m c 6 O.O.O.O.O.O.O.O.";
"O.O.O.O.O.O.O.O.O.O.O.Y T Z M B .} ....} } } ^ f < _ ] | } | } | | / m n i . O.O.O.O.O.O.O.";
"O.O.O.O.O.O.O.O.O.O.N R P M B ( .....} } } } } } } | } } | } | | [ | m m c > O.O.O.O.O.O.O.";
"O.O.O.O.O.O.O.O.O.O.Y T A B M .} ..} } } } } ` ; ; _ } | } | | [ | { H m n 0 O.O.O.O.O.O.";
"O.O.O.O.O.O.O.O.O.M R P M B ( ..} } ..} } } } w f | } ] | | [ [ { / m m a = O.O.O.O.O.O.";
"O.O.O.O.O.O.O.O.O.J R A B M } } } } } } } } } 1 X h | | | | | | | [ [ m m x 7 o o O.O.O.O.O.O.";
"O.O.O.O.O.O.O.O.M T I M M / ..} } } } } } } } ^ < j ] } | | | | | | [ [ H m m 0 o o O.O.O.O.O.";
"O.O.O.O.O.O.O.O.t R K M M m M M B B B G W / / } } } | | | | | | [ [ | { / D m a @ 2 O.O.O.O.O.";
"O.O.O.O.O.O.O.O.3 L B m M M M m B B B B B B m m m m B m m m m m m m m m m m m x > O.O.O.O.";
"O.O.O.O.O.O.O.O.O u 5 t t u l z n m m B B B B m m m m m m m m m m m m m m m m m 0 O.O.O.O.";
"O.O.O.O.O.O.O.O. o . & = 3 > 0 0 r t i y i x c x c c c x c x x x x x x a i 7 o O.O.O.O.";
"O.O.O.O.O.O.O.O. o . & @ & & 4 > 4 > 4 > > > : : > > > > - @ O.O.O.O.";
"O.O.O.O.O.O.O.O. . o . o o o o O.O.O.O.";
"O.O.O.O.O.O.O.O.O. o o . . o o o O.O.O.O.";
"O.O.O.O.O.O.O.O.O.O.O.O.O. o o o O.O.O.O.";
"O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O. O.O.O.O.O.O.";
"O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.";
"O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.";
"O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.";
"O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.";
"O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O."|]

View File

@@ -1,27 +0,0 @@
(*
* Icons library
*
* Copyright (C) 2004 CENA/ENAC, Yann Le Fablec
*
* This file is part of paparazzi.
*
* paparazzi is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* paparazzi is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with paparazzi; see the file COPYING. If not, write to
* the Free Software Foundation, 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*
*)
val question_icon : string array
val error_icon : string array
val warning_icon : string array

View File

@@ -1,29 +0,0 @@
(*
* Copyright (C) 2004 CENA/ENAC, Yann Le Fablec
*
* This file is part of paparazzi.
*
* paparazzi is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* paparazzi is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with paparazzi; see the file COPYING. If not, write to
* the Free Software Foundation, 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*
*)
let platform_name =
let os = Sys.os_type in
if os = "Win32" then Unix.putenv "GTK_RC_FILES" (Unix.getcwd () ^ "/wingtk.rc") ;
os
let platform_is_unix = platform_name = "Unix"
let platform_is_win32 = platform_name = "Win32"

View File

@@ -1,30 +0,0 @@
(*
* Copyright (C) 2004 CENA/ENAC, Yann Le Fablec
*
* This file is part of paparazzi.
*
* paparazzi is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* paparazzi is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with paparazzi; see the file COPYING. If not, write to
* the Free Software Foundation, 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*
*)
(** Renvoie le nom de la plateforme : Unix ou Win32 *)
val platform_name : string
(** Teste si la plateforme courante est Unix *)
val platform_is_unix : bool
(** Teste si la plateforme courante est Windows (Win32) *)
val platform_is_win32 : bool

View File

@@ -27,10 +27,20 @@ include ../Makefile.ocaml
INCLUDES=
PKG = -package glibivy,pprz
LINKPKG = $(PKG) -linkpkg -dllpath-pkg pprz,pprzlink
LABLGTK2GLADE = $(shell ocamlfind query -p-format lablgtk2.glade 2>/dev/null)
# only compile it lablgtk2.glade is installed
ifeq ($(LABLGTK2GLADE),)
XPKG = -package pprz.xlib
XLINKPKG = $(XPKG) -linkpkg -dllpath-pkg pprz.xlib,pprzlink
all : play plotter sd2log plotprofile openlog2tlm sdlogger_download
else
XPKG = -package pprz.xlib,lablgtk2.glade
XLINKPKG = $(XPKG) -linkpkg -dllpath-pkg pprz.xlib,pprzlink
all : play plotter logplotter sd2log plotprofile openlog2tlm sdlogger_download
endif
all: play plotter logplotter sd2log plotprofile openlog2tlm sdlogger_download
play : log_file.cmo play_core.cmo play.cmo $(LIBPPRZCMA) $(LIBPPRZLINKCMA)
@echo OL $@

View File

@@ -37,13 +37,22 @@ ifeq ($(LABLGTK2GNOMEUI),)
LABLGTK2GNOMEUI = $(shell ocamlfind query -p-format lablgtk2.gnomeui 2>/dev/null)
endif
LABLGTK2GLADE = $(shell ocamlfind query -p-format lablgtk2.glade 2>/dev/null)
INCLUDES =
XPKG = -package pprz.xlib,$(LABLGTK2GNOMEUI)
XPKG = -package pprz.xlib,lablgtk2.glade,$(LABLGTK2GNOMEUI)
XLINKPKG = $(XPKG) -linkpkg -dllpath-pkg pprz.xlib,pprzlink
PAPARAZZICENTERCMO = gtk_pc.cmo gtk_process.cmo pc_common.cmo pc_control_panel.cmo pc_aircraft.cmo paparazzicenter.cmo
# only compile it lablgtk2.glade is installed
ifeq ($(LABLGTK2GLADE),)
all :
@echo Skipping legacy Paparazzi Center build
else
all: paparazzicenter
endif
paparazzicenter : $(PAPARAZZICENTERCMO) $(LIBPPRZCMA) $(LIBPPRZLINKCMA) $(XLIBPPRZCMA)
@echo OL $@