> @@ -94,6 +94,54 @@ PLUGIN_SET_TRANSLATABLE_INFO(LOCALEDIR, GETTEXT_PACKAGE, > PLUGIN_NAME, > PLUGIN_VERSION, "Enrico Trotta > <[email protected]>") > > > +/* Windows compatibility for resolving system plugin data path. > + * This only works if the plugin's data is installed in the same tree as the > + * plugin DLL, which might not be true (as the DLL has to be in Geany's > libdir > + * but the plugin's data might be anywhere in theory) */
Why so complicated? `g_win32_get_package_installation_directory_of_module(NULL);` works perfectly fine and returns "C:\Program Files (x86)\Geany". We use exactly this also in Geany itself. I think this would even not break if the plugin DLL is installed somewhere else, according to the GTK docs, if I understood correctly, when passing `NULL` the location of the main process is used, which is in our case Geany. That would require that the plugin's data still has to be installed in Geany's installation directory. I would say this is a valid requirement. Btw, PLUGINDATADIR cannot be used here because it contains the absolute path of the prefix used at `./configure`. But PKGDATADIR can be used even if it is not per plugin defined, e.g. ```-DPLUGINDATADIR=\"/h/geany_install/share/geany-plugins/geniuspaste\" -DPKGDATADIR=\"share/geany-plugins\" ``` (I configure Geany on my system with `--prefix=/h/geany_install` where /h is H:\ which is a RAM disk) See http://pastebin.geany.org/WOdqZ/ for a simpler patch which works for me, pasted from within Geany using GeanyVC and GeniusPaste :) --- Reply to this email directly or view it on GitHub: https://github.com/geany/geany-plugins/pull/402/files#r55920643
