mirror of https://github.com/procxx/kepka.git
trying to load specific versions of libs on linux, otherwise - just libs
This commit is contained in:
parent
23cc9d866b
commit
9e43f1b5de
|
@ -330,10 +330,13 @@ namespace {
|
|||
}
|
||||
void setupGTK() {
|
||||
QLibrary lib_gtk(QLatin1String("gtk-x11-2.0"), 0, 0), lib_indicator(QLatin1String("appindicator"), 1, 0);
|
||||
if (!lib_gtk.load()) {
|
||||
lib_gtk.setFileNameAndVersion(QLatin1String("gtk-x11-2.0"), QString());
|
||||
if (!lib_gtk.load()) {
|
||||
_initErrors.push_back(QString("Failed to load 'gtk-x11-2.0' library!"));
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (!loadFunction(lib_gtk, "gtk_init_check", ps_gtk_init_check)) return;
|
||||
if (!loadFunction(lib_gtk, "gtk_menu_new", ps_gtk_menu_new)) return;
|
||||
|
@ -351,12 +354,17 @@ namespace {
|
|||
if (!loadFunction(lib_gtk, "g_type_check_instance_cast", ps_g_type_check_instance_cast)) return;
|
||||
if (!loadFunction(lib_gtk, "g_signal_connect_data", ps_g_signal_connect_data)) return;
|
||||
|
||||
if (lib_indicator.load()) {
|
||||
setupAppIndicator(lib_indicator);
|
||||
} else {
|
||||
lib_indicator.setFileNameAndVersion(QLatin1String("appindicator"), QString());
|
||||
if (lib_indicator.load()) {
|
||||
setupAppIndicator(lib_indicator);
|
||||
} else {
|
||||
_initErrors.push_back(QString("Failed to load 'appindicator' library!"));
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (!loadFunction(lib_gtk, "gdk_init_check", ps_gdk_init_check)) return;
|
||||
if (!loadFunction(lib_gtk, "gdk_pixbuf_new_from_data", ps_gdk_pixbuf_new_from_data)) return;
|
||||
|
@ -383,11 +391,14 @@ namespace {
|
|||
useAppIndicator = true;
|
||||
}
|
||||
void setupUnity() {
|
||||
QLibrary lib_unity("unity", 9, 0);
|
||||
QLibrary lib_unity(QLatin1String("unity"), 9, 0);
|
||||
if (!lib_unity.load()) {
|
||||
lib_unity.setFileNameAndVersion(QLatin1String("unity"), QString());
|
||||
if (!lib_unity.load()) {
|
||||
_initErrors.push_back(QString("Failed to load 'unity' library!"));
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (!loadFunction(lib_unity, "unity_launcher_entry_get_for_desktop_id", ps_unity_launcher_entry_get_for_desktop_id)) return;
|
||||
if (!loadFunction(lib_unity, "unity_launcher_entry_set_count", ps_unity_launcher_entry_set_count)) return;
|
||||
|
|
Loading…
Reference in New Issue