Commit 99dbc6c1 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Make plugins cache relocatable

The plugins cache now contains plugins file path relative to the base
plugins directory (the directory that contains plugins.dat). The cache
can hence be generated from a different absolute directory than the one
it is later installed to.

For native or emulated native builds, this enables build-time cache
generation.

Note however that the relative paths are different in the build tree
(modules/*/.libs/lib*_plugin.*) and in standard installation
(plugins/*/lib*_plugin.*). The cache cannot be copied from the build
tree to the installation directory.
parent 9ef30ee8
This diff is collapsed.
...@@ -59,7 +59,7 @@ static int CacheLoadConfig ( module_t *, FILE * ); ...@@ -59,7 +59,7 @@ static int CacheLoadConfig ( module_t *, FILE * );
/* Sub-version number /* Sub-version number
* (only used to avoid breakage in dev version when cache structure changes) */ * (only used to avoid breakage in dev version when cache structure changes) */
#define CACHE_SUBVERSION_NUM 16 #define CACHE_SUBVERSION_NUM 17
/* Cache filename */ /* Cache filename */
#define CACHE_NAME "plugins.dat" #define CACHE_NAME "plugins.dat"
...@@ -638,9 +638,6 @@ module_t *CacheFind (module_cache_t *cache, size_t count, ...@@ -638,9 +638,6 @@ module_t *CacheFind (module_cache_t *cache, size_t count,
{ {
module_t *module = cache->p_module; module_t *module = cache->p_module;
cache->p_module = NULL; cache->p_module = NULL;
module->psz_filename = cache->path;
cache->path = NULL;
return module; return module;
} }
cache++; cache++;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment