aboutsummaryrefslogtreecommitdiffstats
path: root/gtk
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2007-01-02 06:49:40 +0000
committerGuy Harris <guy@alum.mit.edu>2007-01-02 06:49:40 +0000
commit44c0624bd9f0a4a69777cfdeab8d1b05690c6f36 (patch)
treeb6c33da33b6d3f27fd6dbcdee25edeaabc8d4a38 /gtk
parent3722c2687bdb8c52198552ef2b124b6ddba793cd (diff)
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
Diffstat (limited to 'gtk')
-rw-r--r--gtk/about_dlg.c4
-rw-r--r--gtk/main.c7
2 files changed, 7 insertions, 4 deletions
diff --git a/gtk/about_dlg.c b/gtk/about_dlg.c
index 3744530c8b..49a1796aed 100644
--- a/gtk/about_dlg.c
+++ b/gtk/about_dlg.c
@@ -257,10 +257,8 @@ about_folders_page_new(void)
g_free((void *) path);
/* global plugins */
- path = get_plugins_global_dir(PLUGIN_DIR);
- about_folders_row(table, "Global Plugins", path,
+ about_folders_row(table, "Global Plugins", get_plugin_dir(),
"dissector plugins");
- g_free((void *) path);
#endif
gtk_container_add(GTK_CONTAINER(scrolledwindow), table);
diff --git a/gtk/main.c b/gtk/main.c
index 8c14baeb7e..63f8ce4999 100644
--- a/gtk/main.c
+++ b/gtk/main.c
@@ -2138,6 +2138,11 @@ main(int argc, char *argv[])
*/
get_credential_info();
+ /*
+ * Now attempt to get the pathname of the plugins.
+ */
+ init_plugin_dir();
+
/* initialize the funnel mini-api */
initialize_funnel_ops();
@@ -2356,7 +2361,7 @@ main(int argc, char *argv[])
"-G" flag, as the "-G" flag dumps information registered by the
dissectors, and we must do it before we read the preferences, in
case any dissectors register preferences. */
- epan_init(PLUGIN_DIR,register_all_protocols,register_all_protocol_handoffs,
+ epan_init(register_all_protocols,register_all_protocol_handoffs,
failure_alert_box,open_failure_alert_box,read_failure_alert_box);
splash_update(splash_win, "Init tap listeners ...");