diff options
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | configure.ac | 3 | ||||
-rw-r--r-- | src/main.c | 40 |
3 files changed, 50 insertions, 1 deletions
@@ -1,5 +1,13 @@ 11-07-11 Cyrille Bagard <nocbos@gmail.com> + * configure.ac: + Define the plugins directory. + + * src/main.c: + Show a small version info with all major used directories. + +11-07-11 Cyrille Bagard <nocbos@gmail.com> + * src/analysis/binary.c: Load the type of binary from XML. diff --git a/configure.ac b/configure.ac index a60359b..ad71854 100644 --- a/configure.ac +++ b/configure.ac @@ -90,6 +90,7 @@ AC_CHECK_FUNCS([strrchr]) AH_TEMPLATE([VERSION], [Define the version number of the program for the about box.]) AH_TEMPLATE([PACKAGE_DATA_DIR], [Define the directory where the associated data will be installed.]) AH_TEMPLATE([PACKAGE_SOURCE_DIR], [Define the directory where the code source is waiting for being compiled.]) +AH_TEMPLATE([PLUGINS_DIR], [Define the directory where the plugins are installed.]) AH_TEMPLATE([LOCALE_DIR], [Define the directory where the message catalogs are installed.]) @@ -118,6 +119,8 @@ fi packagesrcdir=`cd $srcdir && pwd` AC_DEFINE_UNQUOTED(PACKAGE_SOURCE_DIR, "${packagesrcdir}") +AC_DEFINE_UNQUOTED(PLUGINS_DIR, PACKAGE_DATA_DIR "/plugins") + if test "x${prefix}" = "xNONE"; then AC_DEFINE_UNQUOTED(LOCALE_DIR, "${ac_default_prefix}/share/locale") else @@ -37,7 +37,7 @@ #include "glibext/delayed.h" #include "gtkext/support.h" #include "plugins/pglist.h" - +#include "../revision.h" #include "format/mangling/demangler.h" @@ -46,6 +46,36 @@ /****************************************************************************** * * +* Paramètres : - * +* * +* Description : Affiche des indications sur la version courante du programme.* +* * +* Retour : - * +* * +* Remarques : - * +* * +******************************************************************************/ + +static show_version(void) +{ + printf("\n"); + + printf("-o- OpenIDA r%u -o-\n", REVISION); + printf(_("Last compiled on %s at %s\n"), __DATE__, __TIME__); + + printf("\n"); + + printf(_("Data directory: %s\n"), PACKAGE_DATA_DIR); + printf(_("Plugins directory: %s\n"), PLUGINS_DIR); + printf(_("Locale directory: %s\n"), LOCALE_DIR); + + printf("\n"); + +} + + +/****************************************************************************** +* * * Paramètres : argc = nombre d'arguments dans la ligne de commande. * * argv = arguments de la ligne de commande. * * * @@ -64,6 +94,14 @@ int main(int argc, char **argv) const char *filename; /* Chemin du dernier projet */ openida_project *project; /* Nouveau projet courant */ + + if (argc > 1 && strcmp(argv[1], "--version") == 0) + { + show_version(); + return EXIT_SUCCESS; + } + + config = load_configuration("main", main_params, MPT_COUNT); set_main_configuration(config); |