-LRN: add docdir to installation get path
authorChristian Grothoff <christian@grothoff.org>
Sun, 25 Dec 2011 14:45:41 +0000 (14:45 +0000)
committerChristian Grothoff <christian@grothoff.org>
Sun, 25 Dec 2011 14:45:41 +0000 (14:45 +0000)
src/include/gnunet_os_lib.h
src/util/os_installation.c

index ff324e18ab71901e4df6987a10f83c2752e981d3..944713606cc33f89109d7fab234683b745f4aa37 100644 (file)
@@ -66,12 +66,12 @@ enum GNUNET_OS_InstallationPathKind
   GNUNET_OS_IPK_BINDIR,
 
   /**
-   * Return the directory where libraries are installed. (lib/)
+   * Return the directory where libraries are installed. (lib/gnunet/)
    */
   GNUNET_OS_IPK_LIBDIR,
 
   /**
-   * Return the directory where data is installed (share/)
+   * Return the directory where data is installed (share/gnunet/)
    */
   GNUNET_OS_IPK_DATADIR,
 
@@ -88,9 +88,15 @@ enum GNUNET_OS_InstallationPathKind
   GNUNET_OS_IPK_SELF_PREFIX,
 
   /**
-   * Return the prefix of the path with application icons.
+   * Return the prefix of the path with application icons (share/icons/).
    */
-  GNUNET_OS_IPK_ICONDIR
+  GNUNET_OS_IPK_ICONDIR,
+
+  /**
+   * Return the prefix of the path with documentation files, including the
+   * license (share/doc/gnunet/).
+   */
+  GNUNET_OS_IPK_DOCDIR
 };
 
 
index a7a6ae915cee9881e1f742cdb88b2af3e7da9d28..c5cf1ccb36394c6a4b437b280715b6acf01cf1f2 100644 (file)
@@ -421,6 +421,11 @@ GNUNET_OS_installation_get_path (enum GNUNET_OS_InstallationPathKind dirkind)
     dirname =
         DIR_SEPARATOR_STR "share" DIR_SEPARATOR_STR "icons" DIR_SEPARATOR_STR;
     break;
+  case GNUNET_OS_IPK_DOCDIR:
+    dirname =
+        DIR_SEPARATOR_STR "share" DIR_SEPARATOR_STR "doc" DIR_SEPARATOR_STR \
+        "gnunet" DIR_SEPARATOR_STR;
+    break;
   default:
     GNUNET_free (execpath);
     return NULL;