aboutsummaryrefslogtreecommitdiffstats
path: root/wsutil
diff options
context:
space:
mode:
authorJoão Valverde <j@v6e.pt>2019-10-10 15:34:46 +0000
committerJoão Valverde <j@v6e.pt>2019-10-10 15:58:41 +0000
commit97cb389a3531269b3c86555156a2bba62ccfd8a5 (patch)
tree16a7b35a0e1a1411fcf11ff3e05af31b2e2c57ae /wsutil
parent51fbc7198ef3ebd49c3c491e4a5b3ed72eec278d (diff)
Revert "CMake: Don't install HTML manuals twice"
This reverts commit f1285fcf061669702ca1accd7b2c50ebc8198993. NSIS package is broken with this commit. Change-Id: Ief22a308edad188fa2d5fab79355f19493359fa6 Reviewed-on: https://code.wireshark.org/review/34758 Petri-Dish: João Valverde <j@v6e.pt> Tested-by: Petri Dish Buildbot Reviewed-by: João Valverde <j@v6e.pt>
Diffstat (limited to 'wsutil')
-rw-r--r--wsutil/CMakeLists.txt1
-rw-r--r--wsutil/filesystem.c33
-rw-r--r--wsutil/filesystem.h13
3 files changed, 6 insertions, 41 deletions
diff --git a/wsutil/CMakeLists.txt b/wsutil/CMakeLists.txt
index af6084268d..c7d017cf7b 100644
--- a/wsutil/CMakeLists.txt
+++ b/wsutil/CMakeLists.txt
@@ -10,7 +10,6 @@
add_definitions(-DPLUGIN_DIR=\"${CMAKE_INSTALL_PREFIX}/${PLUGIN_INSTALL_LIBDIR}\")
add_definitions(-DEXTCAP_DIR=\"${CMAKE_INSTALL_PREFIX}/${EXTCAP_INSTALL_LIBDIR}\")
add_definitions(-DDATA_DIR=\"${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATADIR}\")
-add_definitions(-DDOC_DIR=\"${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DOCDIR}\")
set(WSUTIL_PUBLIC_HEADERS
adler32.h
diff --git a/wsutil/filesystem.c b/wsutil/filesystem.c
index 97ec8a7ef7..3526ac1fbb 100644
--- a/wsutil/filesystem.c
+++ b/wsutil/filesystem.c
@@ -57,7 +57,6 @@ char *persconffile_dir = NULL;
char *datafile_dir = NULL;
char *persdatafile_dir = NULL;
char *persconfprofile = NULL;
-char *docfile_dir = NULL;
static gboolean do_store_persconffiles = FALSE;
static GHashTable *profile_files = NULL;
@@ -1884,32 +1883,6 @@ get_datafile_path(const char *filename)
}
}
-static void init_docfile_dir(void)
-{
- if (running_in_build_directory_flag) {
- docfile_dir = g_build_filename(get_progfile_dir(), "doc", NULL);
- return;
- }
-#ifdef _WIN32
- docfile_dir = g_strdup(get_progfile_dir());
-#else
-#ifdef __APPLE__
- if (appbundle_dir != NULL) {
- docfile_dir = g_build_filename(appbundle_dir, "Contents/Resources/share/doc/wireshark", (gchar *)NULL);
- return;
- }
-#endif
- docfile_dir = g_strdup(DOC_DIR);
-#endif
-}
-
-const char *get_docfile_dir(void)
-{
- if (!docfile_dir)
- init_docfile_dir();
- return docfile_dir;
-}
-
/*
* Return an error message for UNIX-style errno indications on open or
* create operations.
@@ -2288,7 +2261,7 @@ done:
}
gchar *
-help_file_url(const gchar *filename)
+data_file_url(const gchar *filename)
{
gchar *file_path;
gchar *uri;
@@ -2297,7 +2270,7 @@ help_file_url(const gchar *filename)
if(g_path_is_absolute(filename)) {
file_path = g_strdup(filename);
} else {
- file_path = g_build_filename(get_docfile_dir(), filename, NULL);
+ file_path = g_strdup_printf("%s/%s", get_datafile_dir(), filename);
}
/* XXX - check, if the file is really existing, otherwise display a simple_dialog about the problem */
@@ -2333,8 +2306,6 @@ free_progdirs(void)
#endif
g_free(extcap_dir);
extcap_dir = NULL;
- g_free(docfile_dir);
- docfile_dir = NULL;
}
/*
diff --git a/wsutil/filesystem.h b/wsutil/filesystem.h
index e34a3616e6..b204fe5932 100644
--- a/wsutil/filesystem.h
+++ b/wsutil/filesystem.h
@@ -66,11 +66,6 @@ WS_DLL_PUBLIC const char *get_plugins_pers_dir_with_version(void);
WS_DLL_PUBLIC const char *get_extcap_dir(void);
/*
- * Get the directory in which document files are stored.
- */
-WS_DLL_PUBLIC const char *get_docfile_dir(void);
-
-/*
* Get the flag indicating whether we're running from a build
* directory.
*/
@@ -326,15 +321,15 @@ WS_DLL_PUBLIC gboolean copy_file_binary_mode(const char *from_filename,
/*
- * Given a help filename return a filesystem URL. Relative paths are prefixed with
- * the directory path.
+ * Given a filename return a filesystem URL. Relative paths are prefixed with
+ * the datafile directory path.
*
* @param filename A file name or path. Relative paths will be prefixed with
- * the directory path.
+ * the data file directory path.
* @return A filesystem URL for the file or NULL on failure. A non-NULL return
* value must be freed with g_free().
*/
-WS_DLL_PUBLIC gchar* help_file_url(const gchar *filename);
+WS_DLL_PUBLIC gchar* data_file_url(const gchar *filename);
/*
* Free the internal structtures