summaryrefslogtreecommitdiff
path: root/wsutil/filesystem.c
diff options
context:
space:
mode:
authorJeff Morriss <jeff.morriss.ws@gmail.com>2014-06-16 18:25:33 -0400
committerJeff Morriss <jeff.morriss.ws@gmail.com>2014-06-16 23:14:05 +0000
commitf113306e0ed0efc77eb9655c6196243af7fce6ce (patch)
treea2eeb3d6e90ff1b9d00d60f78f17a8fc7e65645e /wsutil/filesystem.c
parent048646d322a79ef0f4b609527bf5a5b5bfe7a199 (diff)
downloadwireshark-f113306e0ed0efc77eb9655c6196243af7fce6ce.tar.gz
More Python-bindings removal.
Change-Id: I4d82175781e65c73179f4c8e737a7900cb050bce Reviewed-on: https://code.wireshark.org/review/2283 Reviewed-by: Jeff Morriss <jeff.morriss.ws@gmail.com>
Diffstat (limited to 'wsutil/filesystem.c')
-rw-r--r--wsutil/filesystem.c112
1 files changed, 0 insertions, 112 deletions
diff --git a/wsutil/filesystem.c b/wsutil/filesystem.c
index e98a291640..796251fec1 100644
--- a/wsutil/filesystem.c
+++ b/wsutil/filesystem.c
@@ -951,118 +951,6 @@ get_datafile_dir(void)
return datafile_dir;
}
-#ifdef HAVE_PYTHON
-/*
- * Find the directory where the python dissectors are stored.
- *
- * On Windows, we use the "py_dissector" subdirectory of the datafile directory.
- *
- * On UN*X, we use the PYTHON_DIR value supplied by the configure
- * script, unless we think we're being run from the build directory,
- * in which case we use the "py_dissector" subdirectory of the datafile directory.
- *
- * In both cases, we then use the subdirectory of that directory whose
- * name is the version number.
- *
- * XXX - if we think we're being run from the build directory, perhaps we
- * should have the plugin code not look in the version subdirectory
- * of the plugin directory, but look in all of the subdirectories
- * of the plugin directory, so it can just fetch the plugins built
- * as part of the build process.
- */
-static const char *wspython_dir = NULL;
-
-static void
-init_wspython_dir(void)
-{
-#ifdef _WIN32
- /*
- * On Windows, the data file directory is the installation
- * directory; the python dissectors are stored under it.
- *
- * Assume we're running the installed version of Wireshark;
- * on Windows, the data file directory is the directory
- * in which the Wireshark binary resides.
- */
- wspython_dir = g_strdup_printf("%s\\python\\%s", get_datafile_dir(),
- VERSION);
-
- /*
- * Make sure that pathname refers to a directory.
- */
- if (test_for_directory(wspython_dir) != EISDIR) {
- /*
- * Either it doesn't refer to a directory or it
- * refers to something that doesn't exist.
- *
- * Assume that means we're running a version of
- * Wireshark we've built in a build directory,
- * in which case {datafile dir}\python is the
- * top-level plugins source directory, and use
- * that directory and set the "we're running in
- * a build directory" flag, so the plugin
- * scanner will check all subdirectories of that
- * directory for python dissectors.
- */
- g_free( (gpointer) wspython_dir);
- wspython_dir = g_strdup_printf("%s\\python", get_datafile_dir());
- running_in_build_directory_flag = TRUE;
- }
-#else
- if (running_in_build_directory_flag) {
- /*
- * We're (probably) being run from the build directory and
- * weren't started with special privileges, so we'll use
- * the "python" subdirectory of the datafile directory
- * (the datafile directory is the build directory).
- */
- wspython_dir = g_strdup_printf("%s/epan/wspython/", get_datafile_dir());
- } else {
- if (getenv("WIRESHARK_PYTHON_DIR") && !started_with_special_privs()) {
- /*
- * The user specified a different directory for plugins
- * and we aren't running with special privileges.
- */
- wspython_dir = g_strdup(getenv("WIRESHARK_PYTHON_DIR"));
- }
-#ifdef __APPLE__
- /*
- * If we're running from an app bundle and weren't started
- * with special privileges, use the Contents/Resources/lib/wireshark/python
- * subdirectory of the app bundle.
- *
- * (appbundle_dir is not set to a non-null value if we're
- * started with special privileges, so we need only check
- * it; we don't need to call started_with_special_privs().)
- */
- else if (appbundle_dir != NULL) {
- wspython_dir = g_strdup_printf("%s/Contents/Resources/lib/wireshark/python",
- appbundle_dir);
- }
-#endif
- else {
- wspython_dir = PYTHON_DIR;
- }
- }
-#endif
-}
-#endif /* HAVE_PYTHON */
-
-/*
- * Get the directory in which the python dissectors are stored.
- */
-const char *
-get_wspython_dir(void)
-{
-#ifdef HAVE_PYTHON
- if (!wspython_dir) init_wspython_dir();
- return wspython_dir;
-#else
- return NULL;
-#endif
-}
-
-
#if defined(HAVE_PLUGINS) || defined(HAVE_LUA)
/*
* Find the directory where the plugins are stored.