diff options
Diffstat (limited to 'src/analysis')
31 files changed, 173 insertions, 109 deletions
diff --git a/src/analysis/Makefile.am b/src/analysis/Makefile.am index 1dd83cb..39dd2dd 100644 --- a/src/analysis/Makefile.am +++ b/src/analysis/Makefile.am @@ -18,6 +18,8 @@ libanalysis_la_SOURCES = \ type.h type.c \ variable.h variable.c +libanalysis_la_CFLAGS = $(TOOLKIT_CFLAGS) $(LIBXML_CFLAGS) + libanalysis_la_LIBADD = \ contents/libanalysiscontents.la \ db/libanalysisdb.la \ @@ -26,16 +28,10 @@ libanalysis_la_LIBADD = \ storage/libanalysisstorage.la \ types/libanalysistypes.la -libanalysis_la_LDFLAGS = - devdir = $(includedir)/chrysalide/$(subdir:src/%=core/%) dev_HEADERS = $(libanalysis_la_SOURCES:%c=) -AM_CPPFLAGS = $(LIBGTK_CFLAGS) $(LIBXML_CFLAGS) - -AM_CFLAGS = $(DEBUG_CFLAGS) $(WARNING_FLAGS) $(COMPLIANCE_FLAGS) - SUBDIRS = contents db disass human storage types diff --git a/src/analysis/binary.c b/src/analysis/binary.c index 41f148a..0f0ff93 100644 --- a/src/analysis/binary.c +++ b/src/analysis/binary.c @@ -43,17 +43,18 @@ #include "../common/cpp.h" #include "../common/xdg.h" #include "../core/collections.h" +#include "../core/columns.h" #include "../core/logs.h" #include "../core/params.h" #include "../core/processors.h" #include "../format/known.h" #include "../glibext/gbinarycursor.h" -#include "../glibext/gloadedpanel.h" -#include "../gtkext/easygtk.h" -#include "../gtkext/gtkblockdisplay.h" -#include "../gtkext/gtkdisplaypanel.h" -#include "../gtkext/gtkgraphdisplay.h" -#include "../gtkext/hexdisplay.h" +#ifdef HAVE_GTK_SUPPORT +# include "../glibext/gloadedpanel.h" +# include "../gtkext/easygtk.h" +# include "../gtkext/gtkdisplaypanel.h" +# include "../gtkext/gtkgraphdisplay.h" +#endif @@ -168,6 +169,8 @@ static void on_binary_processor_changed(GArchProcessor *, GArchInstruction *, gb /* Fournit le désignation associée à l'élément chargé. */ static char *g_loaded_binary_describe(const GLoadedBinary *, bool); +#ifdef HAVE_GTK_SUPPORT + /* Détermine le nombre de vues disponibles pour un contenu. */ static unsigned int g_loaded_binary_count_views(const GLoadedBinary *); @@ -186,6 +189,8 @@ static unsigned int g_loaded_binary_get_view_index(GLoadedBinary *, GtkWidget *) /* Fournit toutes les options d'affichage pour un contenu. */ static GDisplayOptions *g_loaded_binary_get_display_options(const GLoadedBinary *, unsigned int); +#endif + /* ---------------------------------------------------------------------------------- */ @@ -231,6 +236,8 @@ static void g_loaded_binary_class_init(GLoadedBinaryClass *klass) loaded->describe = (describe_loaded_fc)g_loaded_binary_describe; +#ifdef HAVE_GTK_SUPPORT + loaded->count_views = (count_loaded_views_fc)g_loaded_binary_count_views; loaded->get_view_name = (get_loaded_view_name_fc)g_loaded_binary_get_view_name; loaded->build_def_view = (build_loaded_def_view_fc)g_loaded_binary_build_default_view; @@ -239,6 +246,8 @@ static void g_loaded_binary_class_init(GLoadedBinaryClass *klass) loaded->get_options = (get_loaded_options_fc)g_loaded_binary_get_display_options; +#endif + } @@ -1466,7 +1475,9 @@ static bool g_loaded_binary_analyze(GLoadedBinary *binary, bool connect, bool ca char *desc; /* Description humaine associée*/ bool has_virt; /* Présence de virtuel ? */ GProcContext *context; /* Contexte de suivi dédié */ +#ifdef HAVE_GTK_SUPPORT GWidthTracker *tracker; /* Gestionnaire de largeur */ +#endif /* Interprétation du format associé */ @@ -1512,12 +1523,16 @@ static bool g_loaded_binary_analyze(GLoadedBinary *binary, bool connect, bool ca { output_disassembly(binary, context, status, &binary->disass_cache); +#ifdef HAVE_GTK_SUPPORT + tracker = g_buffer_cache_get_width_tracker(binary->disass_cache); g_width_tracker_build_initial_cache(tracker, gid, status); g_object_unref(G_OBJECT(tracker)); +#endif + } g_object_unref(G_OBJECT(context)); @@ -1661,6 +1676,9 @@ static char *g_loaded_binary_describe(const GLoadedBinary *binary, bool full) } +#ifdef HAVE_GTK_SUPPORT + + /****************************************************************************** * * * Paramètres : binary = contenu chargé à consulter. * @@ -1872,3 +1890,6 @@ static GDisplayOptions *g_loaded_binary_get_display_options(const GLoadedBinary return result; } + + +#endif diff --git a/src/analysis/block-int.h b/src/analysis/block-int.h index faa0e1f..869042c 100644 --- a/src/analysis/block-int.h +++ b/src/analysis/block-int.h @@ -44,12 +44,16 @@ typedef int (* block_compare_links_fc) (const block_link_t *, const block_link_t /* Fournit les détails des origines d'un bloc de code donné. */ typedef block_link_t * (* block_get_links_fc) (const GCodeBlock *, const GBlockList *, size_t *); +#ifdef HAVE_GTK_SUPPORT + /* Fournit la représentation graphique d'un bloc de code. */ typedef GBufferView * (* block_build_view_fc) (const GCodeBlock *, segcnt_list *); /* Construit un ensemble d'indications pour bloc. */ typedef char *(* block_build_tooltip_fc) (const GCodeBlock *); +#endif + /* Description d'un bloc de code (instance) */ struct _GCodeBlock @@ -64,7 +68,9 @@ struct _GCodeBlock size_t index; /* Indice dans une liste */ size_t rank; /* Rang dans l'exécution */ +#ifdef HAVE_GTK_SUPPORT GBufferView *view; /* Représentation construite */ +#endif }; @@ -77,8 +83,10 @@ struct _GCodeBlockClass block_compare_links_fc cmp_links; /* Comparaison de liens */ block_get_links_fc get_src; /* Obtention des origines */ block_get_links_fc get_dest; /* Obtention des destinations */ +#ifdef HAVE_GTK_SUPPORT block_build_view_fc build; /* Construction d'une vue */ block_build_tooltip_fc build_tooltip; /* Construction d'une bulle */ +#endif }; diff --git a/src/analysis/block.c b/src/analysis/block.c index 119dc86..a60d7ed 100644 --- a/src/analysis/block.c +++ b/src/analysis/block.c @@ -139,7 +139,9 @@ static void g_code_block_init(GCodeBlock *block) block->index = (size_t)-1; block->rank = (size_t)-1; +#ifdef HAVE_GTK_SUPPORT block->view = NULL; +#endif } @@ -158,7 +160,9 @@ static void g_code_block_init(GCodeBlock *block) static void g_code_block_dispose(GCodeBlock *block) { +#ifdef HAVE_GTK_SUPPORT g_clear_object(&block->view); +#endif G_OBJECT_CLASS(g_code_block_parent_class)->dispose(G_OBJECT(block)); @@ -322,6 +326,9 @@ void g_code_block_set_rank(GCodeBlock *block, size_t rank) } +#ifdef HAVE_GTK_SUPPORT + + /****************************************************************************** * * * Paramètres : block = bloc de code à manipuler. * @@ -383,6 +390,9 @@ char *g_code_block_build_tooltip(const GCodeBlock *block) } +#endif + + /* ---------------------------------------------------------------------------------- */ /* DEFINITION DE LIAISONS ENTRE BLOCS DE CODE */ diff --git a/src/analysis/block.h b/src/analysis/block.h index 63f0be0..08cfeb4 100644 --- a/src/analysis/block.h +++ b/src/analysis/block.h @@ -33,7 +33,9 @@ #include "../arch/instruction.h" #include "../arch/vmpa.h" #include "../common/bits.h" -#include "../glibext/bufferview.h" +#ifdef HAVE_GTK_SUPPORT +# include "../glibext/bufferview.h" +#endif #include "../glibext/linesegment.h" @@ -74,12 +76,16 @@ size_t g_code_block_get_rank(const GCodeBlock *); /* Définit le rang du bloc de code dans le flot d'exécution. */ void g_code_block_set_rank(GCodeBlock *, size_t); +#ifdef HAVE_GTK_SUPPORT + /* Fournit la représentation graphique d'un bloc de code. */ GBufferView *g_code_block_get_view(GCodeBlock *, segcnt_list *); /* Construit un ensemble d'indications pour bloc. */ char *g_code_block_build_tooltip(const GCodeBlock *); +#endif + /* ------------------- DEFINITION DE LIAISONS ENTRE BLOCS DE CODE ------------------- */ diff --git a/src/analysis/contents/Makefile.am b/src/analysis/contents/Makefile.am index 66e3cac..1263f42 100644 --- a/src/analysis/contents/Makefile.am +++ b/src/analysis/contents/Makefile.am @@ -8,18 +8,9 @@ libanalysiscontents_la_SOURCES = \ memory.h memory.c \ restricted.h restricted.c -libanalysiscontents_la_LIBADD = - -libanalysiscontents_la_LDFLAGS = +libanalysiscontents_la_CFLAGS = $(TOOLKIT_CFLAGS) devdir = $(includedir)/chrysalide/$(subdir:src/%=core/%) dev_HEADERS = $(libanalysiscontents_la_SOURCES:%c=) - - -AM_CPPFLAGS = $(LIBGTK_CFLAGS) $(LIBXML_CFLAGS) - -AM_CFLAGS = $(DEBUG_CFLAGS) $(WARNING_FLAGS) $(COMPLIANCE_FLAGS) - -SUBDIRS = diff --git a/src/analysis/db/Makefile.am b/src/analysis/db/Makefile.am index 8f8242c..b9325e0 100644 --- a/src/analysis/db/Makefile.am +++ b/src/analysis/db/Makefile.am @@ -21,20 +21,16 @@ libanalysisdb_la_SOURCES = \ server.h server.c \ snapshot.h snapshot.c +libanalysisdb_la_CFLAGS = $(TOOLKIT_CFLAGS) $(LIBXML_CFLAGS) $(LIBARCHIVE_CFLAGS) $(LIBSQLITE_CFLAGS) $(LIBSSL_CFLAGS) + libanalysisdb_la_LIBADD = \ items/libanalysisdbitems.la \ misc/libanalysisdbmisc.la -libanalysisdb_la_LDFLAGS = $(LIBSSL_LIBS) - devdir = $(includedir)/chrysalide/$(subdir:src/%=core/%) dev_HEADERS = $(libanalysisdb_la_SOURCES:%c=) -AM_CPPFLAGS = $(LIBGTK_CFLAGS) $(LIBXML_CFLAGS) $(LIBARCHIVE_CFLAGS) $(LIBSQLITE_CFLAGS) $(LIBSSL_CFLAGS) - -AM_CFLAGS = $(DEBUG_CFLAGS) $(WARNING_FLAGS) $(COMPLIANCE_FLAGS) - SUBDIRS = items misc diff --git a/src/analysis/db/items/Makefile.am b/src/analysis/db/items/Makefile.am index b9ce117..f8f70d5 100644 --- a/src/analysis/db/items/Makefile.am +++ b/src/analysis/db/items/Makefile.am @@ -7,18 +7,9 @@ libanalysisdbitems_la_SOURCES = \ move.h move.c \ switcher.h switcher.c -libanalysisdbitems_la_LIBADD = - -libanalysisdbitems_la_LDFLAGS = +libanalysisdbitems_la_CFLAGS = $(TOOLKIT_CFLAGS) $(LIBXML_CFLAGS) $(LIBSQLITE_CFLAGS) devdir = $(includedir)/chrysalide/$(subdir:src/%=core/%) dev_HEADERS = $(libanalysisdbitems_la_SOURCES:%c=) - - -AM_CPPFLAGS = $(LIBGTK_CFLAGS) $(LIBXML_CFLAGS) $(LIBARCHIVE_CFLAGS) $(LIBSQLITE_CFLAGS) - -AM_CFLAGS = $(DEBUG_CFLAGS) $(WARNING_FLAGS) $(COMPLIANCE_FLAGS) - -SUBDIRS = diff --git a/src/analysis/db/items/comment.c b/src/analysis/db/items/comment.c index da7a4c0..fb27f60 100644 --- a/src/analysis/db/items/comment.c +++ b/src/analysis/db/items/comment.c @@ -39,9 +39,9 @@ #include "../../human/asm/lang.h" #include "../../../common/array.h" #include "../../../common/extstr.h" +#include "../../../core/columns.h" #include "../../../glibext/gbinarycursor.h" #include "../../../glibext/linegen-int.h" -#include "../../../gtkext/gtkblockdisplay.h" diff --git a/src/analysis/db/items/move.c b/src/analysis/db/items/move.c index af1c8c1..d009456 100644 --- a/src/analysis/db/items/move.c +++ b/src/analysis/db/items/move.c @@ -35,9 +35,13 @@ #include "../collection-int.h" #include "../item-int.h" -#include "../../../gui/core/global.h" +#ifdef HAVE_GTK_SUPPORT +# include "../../../gui/core/global.h" +#endif #include "../../../glibext/gbinarycursor.h" -#include "../../../glibext/gloadedpanel.h" +#ifdef HAVE_GTK_SUPPORT +# include "../../../glibext/gloadedpanel.h" +#endif @@ -410,6 +414,8 @@ static char *g_db_move_build_label(GDbMove *move) static bool g_db_move_run(const GDbMove *move, GLineCursor *cursor) { +#ifdef HAVE_GTK_SUPPORT + GLoadedPanel *panel; /* Afficheur effectif de code */ typedef struct _move_params @@ -465,6 +471,8 @@ static bool g_db_move_run(const GDbMove *move, GLineCursor *cursor) if (panel != NULL) g_object_unref(G_OBJECT(panel)); +#endif + return true; } diff --git a/src/analysis/db/misc/Makefile.am b/src/analysis/db/misc/Makefile.am index 6d4af6c..fc3cab2 100644 --- a/src/analysis/db/misc/Makefile.am +++ b/src/analysis/db/misc/Makefile.am @@ -6,18 +6,7 @@ libanalysisdbmisc_la_SOURCES = \ snapshot.h snapshot.c \ timestamp.h timestamp.c -libanalysisdbmisc_la_LIBADD = - -libanalysisdbmisc_la_LDFLAGS = - devdir = $(includedir)/chrysalide/$(subdir:src/%=core/%) dev_HEADERS = $(libanalysisdbmisc_la_SOURCES:%c=) - - -AM_CPPFLAGS = $(LIBGTK_CFLAGS) $(LIBXML_CFLAGS) $(LIBARCHIVE_CFLAGS) $(LIBSQLITE_CFLAGS) - -AM_CFLAGS = $(DEBUG_CFLAGS) $(WARNING_FLAGS) $(COMPLIANCE_FLAGS) - -SUBDIRS = diff --git a/src/analysis/disass/Makefile.am b/src/analysis/disass/Makefile.am index 5631468..fe840c6 100644 --- a/src/analysis/disass/Makefile.am +++ b/src/analysis/disass/Makefile.am @@ -15,14 +15,9 @@ libanalysisdisass_la_SOURCES = \ rank.h rank.c \ routines.h routines.c -libanalysisdisass_la_LDFLAGS = +libanalysisdisass_la_CFLAGS = $(TOOLKIT_CFLAGS) $(LIBXML_CFLAGS) devdir = $(includedir)/chrysalide/$(subdir:src/%=core/%) dev_HEADERS = $(libanalysisdisass_la_SOURCES:%c=) - - -AM_CPPFLAGS = $(LIBGTK_CFLAGS) $(LIBXML_CFLAGS) - -AM_CFLAGS = $(DEBUG_CFLAGS) $(WARNING_FLAGS) $(COMPLIANCE_FLAGS) diff --git a/src/analysis/disass/area.h b/src/analysis/disass/area.h index 12c4617..0817419 100644 --- a/src/analysis/disass/area.h +++ b/src/analysis/disass/area.h @@ -30,7 +30,7 @@ #include "../../format/preload.h" #include "../../format/symbol.h" #include "../../glibext/delayed.h" -#include "../../gtkext/gtkstatusstack.h" +#include "../../glibext/notifier.h" diff --git a/src/analysis/disass/block.c b/src/analysis/disass/block.c index ea1441f..973fd56 100644 --- a/src/analysis/disass/block.c +++ b/src/analysis/disass/block.c @@ -34,9 +34,9 @@ #include "../block-int.h" #include "../../arch/instructions/raw.h" #include "../../common/extstr.h" +#include "../../core/columns.h" #include "../../core/params.h" #include "../../glibext/gbinarycursor.h" -#include "../../gtkext/gtkblockdisplay.h" @@ -88,12 +88,16 @@ static block_link_t *g_basic_block_get_sources(const GBasicBlock *, const GBlock /* Fournit les détails des destinations de bloc de code. */ static block_link_t *g_basic_block_get_destinations(const GBasicBlock *, const GBlockList *, size_t *); +#ifdef HAVE_GTK_SUPPORT + /* Fournit la représentation graphique d'un bloc de code. */ static GBufferView *g_basic_block_build_view(const GBasicBlock *, segcnt_list *); /* Construit un ensemble d'indications pour bloc. */ static char *g_basic_block_build_tooltip(const GBasicBlock *); +#endif + /* ---------------------------------------------------------------------------------- */ @@ -133,8 +137,10 @@ static void g_basic_block_class_init(GBasicBlockClass *class) block->cmp_links = (block_compare_links_fc)g_basic_block_compare_links; block->get_src = (block_get_links_fc)g_basic_block_get_sources; block->get_dest = (block_get_links_fc)g_basic_block_get_destinations; +#ifdef HAVE_GTK_SUPPORT block->build = (block_build_view_fc)g_basic_block_build_view; block->build_tooltip = (block_build_tooltip_fc)g_basic_block_build_tooltip; +#endif } @@ -466,6 +472,9 @@ static block_link_t *g_basic_block_get_destinations(const GBasicBlock *block, co } +#ifdef HAVE_GTK_SUPPORT + + /****************************************************************************** * * * Paramètres : block = bloc de code à manipuler. * @@ -856,6 +865,9 @@ static char *g_basic_block_build_tooltip(const GBasicBlock *block) } +#endif + + /****************************************************************************** * * * Paramètres : block = bloc d'instructions à consulter. * diff --git a/src/analysis/disass/disassembler.c b/src/analysis/disass/disassembler.c index 4056c59..7ea127d 100644 --- a/src/analysis/disass/disassembler.c +++ b/src/analysis/disass/disassembler.c @@ -38,11 +38,11 @@ #include "routines.h" #include "../human/asm/lang.h" #include "../../arch/storage.h" +#include "../../core/columns.h" #include "../../core/global.h" #include "../../core/params.h" #include "../../core/nproc.h" #include "../../glibext/generators/prologue.h" -#include "../../gtkext/gtkblockdisplay.h" #include "../../plugins/pglist.h" @@ -391,7 +391,9 @@ void output_disassembly(GLoadedBinary *binary, GProcContext *context, GtkStatusS GBinContent *content; /* Contenu bianire manipulé */ GCodingLanguage *lang; /* Langage de sortie préféré */ int offset; /* Décalage des étiquettes */ +#ifdef HAVE_GTK_SUPPORT GWidthTracker *tracker; /* Gestionnaire de largeurs */ +#endif char **text; /* Contenu brute à imprimer */ char *desc; /* Désignation du binaire */ const gchar *checksum; /* Identifiant de binaire */ @@ -409,9 +411,11 @@ void output_disassembly(GLoadedBinary *binary, GProcContext *context, GtkStatusS g_generic_config_get_value(get_main_configuration(), MPK_LABEL_OFFSET, &offset); +#ifdef HAVE_GTK_SUPPORT tracker = g_buffer_cache_get_width_tracker(*cache); g_width_tracker_set_column_min_width(tracker, DLC_ASSEMBLY_LABEL, offset); g_object_unref(G_OBJECT(tracker)); +#endif g_buffer_cache_wlock(*cache); diff --git a/src/analysis/disass/fetch.h b/src/analysis/disass/fetch.h index 7afabc6..44b5424 100644 --- a/src/analysis/disass/fetch.h +++ b/src/analysis/disass/fetch.h @@ -27,7 +27,7 @@ #include "../binary.h" #include "../../glibext/delayed.h" -#include "../../gtkext/gtkstatusstack.h" +#include "../../glibext/notifier.h" diff --git a/src/analysis/disass/instructions.h b/src/analysis/disass/instructions.h index c0cd4ac..24fe982 100644 --- a/src/analysis/disass/instructions.h +++ b/src/analysis/disass/instructions.h @@ -28,7 +28,7 @@ #include "../routine.h" #include "../../arch/processor.h" #include "../../format/executable.h" -#include "../../gtkext/gtkstatusstack.h" +#include "../../glibext/notifier.h" diff --git a/src/analysis/disass/limit.c b/src/analysis/disass/limit.c index 1e460e0..2caefd6 100644 --- a/src/analysis/disass/limit.c +++ b/src/analysis/disass/limit.c @@ -76,7 +76,7 @@ void compute_routine_limit(GBinSymbol *symbol, const vmpa2t *next, GArchProcesso /* Dans tous les cas, on va se référer à la portion contenante... */ - portion = g_binary_portion_find_at_addr(portions, &addr, (GdkRectangle []) { { 0 } }); + portion = g_binary_portion_find_at_addr(portions, &addr); assert(portion != NULL); range = g_binary_portion_get_range(portion); diff --git a/src/analysis/disass/output.h b/src/analysis/disass/output.h index 20729d2..2213840 100644 --- a/src/analysis/disass/output.h +++ b/src/analysis/disass/output.h @@ -29,7 +29,7 @@ #include "../human/lang.h" #include "../../format/preload.h" #include "../../glibext/buffercache.h" -#include "../../gtkext/gtkstatusstack.h" +#include "../../glibext/notifier.h" diff --git a/src/analysis/disass/routines.h b/src/analysis/disass/routines.h index 9a2c308..af8e814 100644 --- a/src/analysis/disass/routines.h +++ b/src/analysis/disass/routines.h @@ -27,7 +27,7 @@ #include "../binary.h" #include "../routine.h" -#include "../../gtkext/gtkstatusstack.h" +#include "../../glibext/notifier.h" diff --git a/src/analysis/human/Makefile.am b/src/analysis/human/Makefile.am index bd5fa9f..a8e98e6 100644 --- a/src/analysis/human/Makefile.am +++ b/src/analysis/human/Makefile.am @@ -6,19 +6,15 @@ libanalysishuman_la_SOURCES = \ lang-int.h \ lang.h lang.c +libanalysishuman_la_CFLAGS = $(TOOLKIT_CFLAGS) + libanalysishuman_la_LIBADD = \ asm/libanalysishumanasm.la -libanalysishuman_la_LDFLAGS = - devdir = $(includedir)/chrysalide/$(subdir:src/%=core/%) dev_HEADERS = $(libanalysishuman_la_SOURCES:%c=) -AM_CPPFLAGS = $(LIBGTK_CFLAGS) $(LIBXML_CFLAGS) $(LIBARCHIVE_CFLAGS) $(LIBSQLITE_CFLAGS) - -AM_CFLAGS = $(DEBUG_CFLAGS) $(WARNING_FLAGS) $(COMPLIANCE_FLAGS) - SUBDIRS = asm diff --git a/src/analysis/human/asm/Makefile.am b/src/analysis/human/asm/Makefile.am index 9dbf717..a3ab6a4 100644 --- a/src/analysis/human/asm/Makefile.am +++ b/src/analysis/human/asm/Makefile.am @@ -5,18 +5,9 @@ noinst_LTLIBRARIES = libanalysishumanasm.la libanalysishumanasm_la_SOURCES = \ lang.h lang.c -libanalysishumanasm_la_LIBADD = - -libanalysishumanasm_la_LDFLAGS = +libanalysishumanasm_la_CFLAGS = $(TOOLKIT_CFLAGS) devdir = $(includedir)/chrysalide/$(subdir:src/%=core/%) dev_HEADERS = $(libanalysishumanasm_la_SOURCES:%c=) - - -AM_CPPFLAGS = $(LIBGTK_CFLAGS) $(LIBXML_CFLAGS) $(LIBARCHIVE_CFLAGS) $(LIBSQLITE_CFLAGS) - -AM_CFLAGS = $(DEBUG_CFLAGS) $(WARNING_FLAGS) $(COMPLIANCE_FLAGS) - -SUBDIRS = diff --git a/src/analysis/loaded-int.h b/src/analysis/loaded-int.h index 62534a6..f91e85d 100644 --- a/src/analysis/loaded-int.h +++ b/src/analysis/loaded-int.h @@ -48,6 +48,8 @@ typedef bool (* analyze_loaded_fc) (GLoadedContent *, bool, bool, wgroup_id_t, G /* Fournit le désignation associée à l'élément chargé. */ typedef char * (* describe_loaded_fc) (const GLoadedContent *, bool); +#ifdef HAVE_GTK_SUPPORT + /* Détermine le nombre de vues disponibles pour un contenu. */ typedef unsigned int (* count_loaded_views_fc) (const GLoadedContent *); @@ -66,6 +68,8 @@ typedef unsigned int (* get_loaded_view_index_fc) (GLoadedContent *, GtkWidget * /* Fournit toutes les options d'affichage pour un contenu. */ typedef GDisplayOptions * (* get_loaded_options_fc) (const GLoadedContent *, unsigned int); +#endif + /* Accès à un contenu binaire quelconque (instance) */ struct _GLoadedContent @@ -91,6 +95,8 @@ struct _GLoadedContentClass describe_loaded_fc describe; /* Description de contenu */ +#ifdef HAVE_GTK_SUPPORT + count_loaded_views_fc count_views; /* Compteur de vues */ get_loaded_view_name_fc get_view_name; /* Désignation d'une vue donnée*/ build_loaded_def_view_fc build_def_view;/* Mise en place initiale */ @@ -99,6 +105,8 @@ struct _GLoadedContentClass get_loaded_options_fc get_options; /* Obtention de liste d'options*/ +#endif + /* Signaux */ void (* analyzed) (GLoadedContent *, gboolean); diff --git a/src/analysis/loaded.c b/src/analysis/loaded.c index 9ec2f74..02caeff 100644 --- a/src/analysis/loaded.c +++ b/src/analysis/loaded.c @@ -32,8 +32,10 @@ #include "../core/global.h" #include "../core/queue.h" #include "../glibext/chrysamarshal.h" -#include "../glibext/gloadedpanel.h" -#include "../glibext/named-int.h" +#ifdef HAVE_GTK_SUPPORT +# include "../glibext/gloadedpanel.h" +# include "../glibext/named-int.h" +#endif #include "../glibext/seq.h" #include "../plugins/pglist.h" @@ -60,9 +62,13 @@ static void g_loaded_content_class_init(GLoadedContentClass *); /* Initialise un contenu chargé. */ static void g_loaded_content_init(GLoadedContent *); +#ifdef HAVE_GTK_SUPPORT + /* Procède à l'initialisation de l'interface de composant nommé. */ static void g_loaded_content_named_init(GNamedWidgetIface *); +#endif + /* Supprime toutes les références externes. */ static void g_loaded_content_dispose(GLoadedContent *); @@ -89,8 +95,12 @@ static void on_loaded_content_analysis_completed(GSeqWork *, analysis_data_t *); /* Détermine le type d'une interface pour l'intégration de contenu chargé. */ +#ifdef HAVE_GTK_SUPPORT G_DEFINE_TYPE_WITH_CODE(GLoadedContent, g_loaded_content, G_TYPE_OBJECT, G_IMPLEMENT_INTERFACE(G_TYPE_NAMED_WIDGET, g_loaded_content_named_init)); +#else +G_DEFINE_TYPE(GLoadedContent, g_loaded_content, G_TYPE_OBJECT); +#endif /****************************************************************************** @@ -143,6 +153,9 @@ static void g_loaded_content_init(GLoadedContent *content) } +#ifdef HAVE_GTK_SUPPORT + + /****************************************************************************** * * * Paramètres : iface = interface GLib à initialiser. * @@ -163,6 +176,9 @@ static void g_loaded_content_named_init(GNamedWidgetIface *iface) } +#endif + + /****************************************************************************** * * * Paramètres : content = instance d'objet GLib à traiter. * @@ -577,6 +593,9 @@ char **g_loaded_content_detect_obfuscators(const GLoadedContent *content, bool v /* ---------------------------------------------------------------------------------- */ +#ifdef HAVE_GTK_SUPPORT + + /****************************************************************************** * * * Paramètres : content = contenu chargé à consulter. * @@ -745,12 +764,18 @@ GDisplayOptions *g_loaded_content_get_display_options(const GLoadedContent *cont } +#endif + + /* ---------------------------------------------------------------------------------- */ /* VUES ET BASCULEMENT ENTRE LES VUES */ /* ---------------------------------------------------------------------------------- */ +#ifdef HAVE_GTK_SUPPORT + + /****************************************************************************** * * * Paramètres : panel = panneau affichant un contenu binaire. * @@ -866,3 +891,6 @@ GtkWidget *get_loaded_panel_from_built_view(GtkWidget *view) return result; } + + +#endif diff --git a/src/analysis/loaded.h b/src/analysis/loaded.h index 406375c..040dacb 100644 --- a/src/analysis/loaded.h +++ b/src/analysis/loaded.h @@ -27,13 +27,17 @@ #include <glib-object.h> #include <stdbool.h> -#include <gtk/gtk.h> +#ifdef HAVE_GTK_SUPPORT +# include <gtk/gtk.h> +#endif #include "content.h" #include "../common/xml.h" #include "../glibext/gdisplayoptions.h" -#include "../gtkext/gtkdockstation.h" +#ifdef HAVE_GTK_SUPPORT +# include "../gtkext/gtkdockstation.h" +#endif @@ -87,6 +91,8 @@ char **g_loaded_content_detect_obfuscators(const GLoadedContent *, bool, size_t /* --------------------------- GESTION DYNAMIQUE DES VUES --------------------------- */ +#ifdef HAVE_GTK_SUPPORT + /* Détermine le nombre de vues disponibles pour un contenu. */ unsigned int g_loaded_content_count_views(const GLoadedContent *); @@ -105,11 +111,15 @@ unsigned int g_loaded_content_get_view_index(GLoadedContent *, GtkWidget *); /* Fournit toutes les options d'affichage pour un contenu. */ GDisplayOptions *g_loaded_content_get_display_options(const GLoadedContent *, unsigned int); +#endif + /* ----------------------- VUES ET BASCULEMENT ENTRE LES VUES ----------------------- */ +#ifdef HAVE_GTK_SUPPORT + /* Fournit la station d'accueil d'un panneau d'affichage. */ GtkDockStation *get_dock_station_for_view_panel(GtkWidget *); @@ -119,6 +129,8 @@ GtkWidget *get_scroll_window_for_view_panel(GtkWidget *); /* Fournit le panneau chargé inclus dans un affichage. */ GtkWidget *get_loaded_panel_from_built_view(GtkWidget *); +#endif + #endif /* _ANALYSIS_LOADED_H */ diff --git a/src/analysis/project.c b/src/analysis/project.c index 682dfb9..c966195 100644 --- a/src/analysis/project.c +++ b/src/analysis/project.c @@ -1365,6 +1365,9 @@ static void on_new_content_resolved(GContentResolver *resolver, wgroup_id_t wid, /* ---------------------------------------------------------------------------------- */ +#ifdef HAVE_GTK_SUPPORT + + /****************************************************************************** * * * Paramètres : - * @@ -1437,3 +1440,6 @@ void push_project_into_recent_list(const GStudyProject *project) g_generic_config_set_value(get_main_configuration(), MPK_LAST_PROJECT, project->filename); } + + +#endif diff --git a/src/analysis/project.h b/src/analysis/project.h index e8c6365..c058444 100644 --- a/src/analysis/project.h +++ b/src/analysis/project.h @@ -25,7 +25,9 @@ #define _ANALYSIS_PROJECT_H -#include <gtk/gtk.h> +#ifdef HAVE_GTK_SUPPORT +# include <gtk/gtk.h> +#endif #include "loaded.h" @@ -115,12 +117,16 @@ GLoadedContent **g_study_project_get_contents(GStudyProject *, size_t *); /* ------------------------- GESTION GLOBALISEE DES PROJETS ------------------------- */ +#ifdef HAVE_GTK_SUPPORT + /* Fournit le gestionnaire des projets connus. */ GtkRecentManager *get_project_manager(void); /* Place un projet au sommet de la pile des projets récents. */ void push_project_into_recent_list(const GStudyProject *); +#endif + #endif /* _PROJECT_H */ diff --git a/src/analysis/routine.c b/src/analysis/routine.c index 41bf451..de066dc 100644 --- a/src/analysis/routine.c +++ b/src/analysis/routine.c @@ -37,9 +37,9 @@ #include "routine-int.h" #include "../arch/instructions/raw.h" #include "../common/extstr.h" +#include "../core/columns.h" #include "../core/params.h" #include "../glibext/gbinarycursor.h" -#include "../gtkext/gtkblockdisplay.h" @@ -1047,6 +1047,8 @@ void g_binary_routine_print_code(const GBinRoutine *routine, GLangOutput *lang, +#ifdef HAVE_GTK_SUPPORT + /****************************************************************************** * * @@ -1334,3 +1336,6 @@ char *g_binary_routine_build_tooltip(const GBinRoutine *routine, const GLoadedBi return result; } + + +#endif diff --git a/src/analysis/routine.h b/src/analysis/routine.h index f148406..2e5e22d 100644 --- a/src/analysis/routine.h +++ b/src/analysis/routine.h @@ -133,10 +133,13 @@ char *g_binary_routine_to_string(const GBinRoutine *, bool); +#ifdef HAVE_GTK_SUPPORT /* Construit un petit résumé concis de la routine. */ char *g_binary_routine_build_tooltip(const GBinRoutine *, const GLoadedBinary *); +#endif + #endif /* _ANALYSIS_ROUTINE_H */ diff --git a/src/analysis/storage/Makefile.am b/src/analysis/storage/Makefile.am index aee0faf..3eb287b 100644 --- a/src/analysis/storage/Makefile.am +++ b/src/analysis/storage/Makefile.am @@ -13,18 +13,9 @@ libanalysisstorage_la_SOURCES = \ storage.h storage.c \ tpmem.h tpmem.c -libanalysisstorage_la_LIBADD = - -libanalysisstorage_la_LDFLAGS = $(LIBSSL_LIBS) +libanalysisstorage_la_CFLAGS = $(TOOLKIT_CFLAGS) $(LIBXML_CFLAGS) devdir = $(includedir)/chrysalide/$(subdir:src/%=core/%) dev_HEADERS = $(libanalysisstorage_la_SOURCES:%c=) - - -AM_CPPFLAGS = $(LIBGTK_CFLAGS) $(LIBXML_CFLAGS) $(LIBARCHIVE_CFLAGS) $(LIBSQLITE_CFLAGS) $(LIBSSL_CFLAGS) - -AM_CFLAGS = $(DEBUG_CFLAGS) $(WARNING_FLAGS) $(COMPLIANCE_FLAGS) - -SUBDIRS = diff --git a/src/analysis/types/Makefile.am b/src/analysis/types/Makefile.am index e3cbda0..bc6ff14 100644 --- a/src/analysis/types/Makefile.am +++ b/src/analysis/types/Makefile.am @@ -12,18 +12,9 @@ libanalysistypes_la_SOURCES = \ proto.h proto.c \ template.h template.c -libanalysistypes_la_LIBADD = - -libanalysistypes_la_LDFLAGS = +libanalysistypes_la_CFLAGS = $(TOOLKIT_CFLAGS) devdir = $(includedir)/chrysalide/$(subdir:src/%=core/%) dev_HEADERS = $(libanalysistypes_la_SOURCES:%c=) - - -AM_CPPFLAGS = $(LIBGTK_CFLAGS) $(LIBXML_CFLAGS) - -AM_CFLAGS = $(DEBUG_CFLAGS) $(WARNING_FLAGS) $(COMPLIANCE_FLAGS) - -SUBDIRS = |