[vlc-devel] [vlc-commits] Remove endianess and type sizes from plugin name

Felix Paul Kühne fkuehne.videolan at googlemail.com
Mon May 9 20:09:17 CEST 2011


On May 9, 2011, at 7:55 PM, Rémi Denis-Courmont wrote:

> Le lundi 9 mai 2011 20:48:54 Felix Paul Kühne, vous avez écrit :
>> On May 9, 2011, at 7:43 PM, Rémi Denis-Courmont wrote:
>>> Le lundi 9 mai 2011 20:37:16 Felix Paul Kühne, vous avez écrit :
>>>> it is absolutely necessary to
>>>> keep the arch's name in the plugin cache's name, at least in a #ifdef
>>>> __APPLE__ or something.
>>> 
>>> We NEVER had the architecture name in the plugin cache name to begin
>>> with.
>> 
>> Ehm, correct. Doesn't change the fact that I can't have different plugin
>> caches in the same directory anymore, which is a no-go for so-called
>> Universal Binaries.
> 
> You never could do that. Generating the plugins cache at build-time was never 
> supported until today.
Correct. However, I include plugin caches created prior to packaging the binary, which work on any device of the target architecture due to the limited number of supported configurations.

> And now, this new possibility remains limited to native 
> builds and probably dysfunctional due to paths issues. You cannot build fat 
> binaries natively, so that is not an option for you, and never was.
I can. That's what I do for every single release, since fat binaries include both 32bit and 64bit Intel code plus optional 32bit PowerPC code, which can be easily cross-compiled and even executed on the host machine due to an emulator included in the OS (PPC apps behave exactly the same way as native ones and can even be debugged, they are just slower).

A good fix for me would be a per-OS installation location of the cache, so it can be moved somewhere next to the preferences were it used to reside previously. If this isn't an option for you, I'll have to do something like this:

diff --git a/src/modules/cache.c b/src/modules/cache.c
index 09cd83b..0f3628d 100644
--- a/src/modules/cache.c
+++ b/src/modules/cache.c
@@ -61,7 +61,17 @@ static int    CacheLoadConfig  ( module_t *, FILE * );
 #define CACHE_SUBVERSION_NUM 12
 
 /* Cache filename */
+#ifndef __APPLE__
 #define CACHE_NAME "plugins.dat"
+#else
+#ifdef __x86_64__
+#define CACHE_NAME "plugins-x86_64.dat"
+#elif __i386__
+#define CACHE_NAME "plugins-x86.dat"
+#else
+#define CACHE_NAME "plugins-ppc32.dat"
+#endif
+#endif
 /* Magic for the cache filename */
 #define CACHE_STRING "cache "PACKAGE_NAME" "PACKAGE_VERSION


Best regards,

Felix


More information about the vlc-devel mailing list