From 44c0624bd9f0a4a69777cfdeab8d1b05690c6f36 Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Tue, 2 Jan 2007 06:49:40 +0000 Subject: Add a WIRESHARK_RUN_FROM_BUILD_DIRECTORY environment variable on UN*X; if set, and if the program isn't running with additional privileges, it'll treat the directory in which the program is found as the data directory. If, on Windows, the version-number subdirectory of {data directory}\plugins doesn't exist (which is assumed to mean that the program is being run from the build directory), or if, on UN*X, WIRESHARK_RUN_FROM_BUILD_DIRECTORY is set, the plugin directory is the "plugins" subdirectory of the data directory, and all subdirectories of that directory are scanned for plugins, as the "plugins" subdirectory of the build directory contains subdirectories for the plugins; this means that if we're running from the build directory, we'll find the plugins we built in the build tree. When generating the wireshark-filter man page, run tshark with WIRESHARK_RUN_FROM_BUILD_DIRECTORY set, so it uses the plugins from the build to generate the list of filters. svn path=/trunk/; revision=20261 --- epan/filesystem.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'epan/filesystem.h') diff --git a/epan/filesystem.h b/epan/filesystem.h index 8458b13bc2..9f5356a39c 100644 --- a/epan/filesystem.h +++ b/epan/filesystem.h @@ -81,6 +81,23 @@ extern const char *get_progfile_dir(void); */ extern const char *get_datafile_dir(void); +/* + * Find the directory in which plugins are stored; this must be called + * after init_progfile_dir() is called. + */ +extern void init_plugin_dir(void); + +/* + * Get the directory in which plugins are stored. + */ +extern const char *get_plugin_dir(void); + +/* + * Get the flag indicating whether we're running from a build + * directory. + */ +extern gboolean running_in_build_directory(void); + /* * Construct the path name of a global configuration file, given the * file name. -- cgit v1.2.3