if (error->code == G_FILE_ERROR_NOENT)
{
gchar* filename = g_object_get_data (G_OBJECT (extension), "filename");
- gchar* folder = g_strconcat ("extensions/", filename, NULL);
+ gchar* folder;
+ if (g_str_has_prefix (filename, "lib"))
+ filename = &filename[strlen ("len")];
+ if (g_str_has_suffix (filename, G_MODULE_SUFFIX))
+ filename = g_strndup (filename,
+ strlen (filename) - strlen ("." G_MODULE_SUFFIX));
+ else
+ filename = g_strdup (filename);
+ folder = g_strconcat ("extensions/", filename, NULL);
+ g_free (filename);
katze_assign (config_file,
sokoke_find_config_filename (folder, "config"));
g_free (folder);
bld.install_files ('${MDATADIR}/' + APPNAME + '/res', 'data/autosuggestcontrol.js')
bld.install_files ('${MDATADIR}/' + APPNAME + '/res', 'data/autosuggestcontrol.css')
- # FIXME: Determine the library naming for other platforms
- if bld.env['platform'] == 'win32':
+ if 1:
extensions = os.listdir ('data/extensions')
for extension in extensions:
- folder = 'lib' + extension + '.dll'
source = 'data/extensions/' + extension + '/config'
if os.path.exists (source):
bld.install_files ('${SYSCONFDIR}/xdg/' + APPNAME + \
- '/extensions/' + folder, source)
- elif Options.platform == 'linux':
- extensions = os.listdir ('data/extensions')
- for extension in extensions:
- folder = 'lib' + extension + '.so'
- source = 'data/extensions/' + extension + '/config'
- if os.path.exists (source):
- bld.install_files ('${SYSCONFDIR}/xdg/' + APPNAME + \
- '/extensions/' + folder, source)
+ '/extensions/' + extension, source)
if Options.commands['check'] or bld.env['tests']:
bld.add_subdirs ('tests')