On Sat, 18 May 2013 16:12:04 +0200 Enrico Tröger enrico.troeger@uvena.de wrote:
or even more convenient but a little harder to implement would be something like plugin_build_syspath(plugin, ...)
scope/src/scope.c: char *helpfile = g_build_filename(PLUGINHTMLDOCDIR, "scope.html", NULL); char *gladefile = g_build_filename(PLUGINDATADIR, "scope.glade", NULL);
Why do we need an entirely plugin_build_syspath() function? Even for a portable Geany, the above directories can be #define-d as functions.
What should plugin_build_syspath() return to cover both directories? Something different, depending on whether the last "..." ends with .glade or .html? Some common prefix?
Maybe we can standartize PLUGIN*DIR instead, including automatically defining them under waf? Currently, the above two directories require 10 LOC of python, including a check for win32 - and I wasn't able to guess the proper definitions without your help.
Also, a C function covers the access, but not the installation...
Except this, I'd want to implement plugin_build_syspath() like described, just to make plugin authors happy after the plugins broke which used relative paths so far.
As a plugin developer, any interface that provides stable, platform indepent plugin directory names will make me happy. Though if I have to re-#define the PLUGIN*DIR-s as different plugin_build_syspath() calls above a certain API version, while still depending on the python code for installation, I will be, how to put it, moderately happy. :)